本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用 DebuggerHookConfigcollection_configs
物件建立 debugger_hook_config
物件。
from sagemaker.debugger import DebuggerHookConfig
debugger_hook_config=DebuggerHookConfig(
collection_configs=collection_configs
)
Debugger 會將模型訓練輸出張量儲存至預設 S3 儲存貯體。預設 S3 儲存貯體 URI 的格式為 s3://amzn-s3-demo-bucket-sagemaker-<region>-<12digit_account_id>/<training-job-name>/debug-output/.
如果您想指定確切的 S3 儲存貯體 URI,請使用下列程式碼範例:
from sagemaker.debugger import DebuggerHookConfig
debugger_hook_config=DebuggerHookConfig(
s3_output_path="specify-uri
"
collection_configs=collection_configs
)
如需更多資訊,請參閱 Amazon SageMaker Python SDK