[英]How to add dynamic training job name to SageMaker training job executed within an AWS StateMachine described by CDK?
[英]Assigning name to AWS SageMaker Training job
這可能是一個非常基本的問題(我想是)
estimator = PyTorch(entry_point='train.py',
source_dir = 'code',
role = role,
framework_version = '1.5.0',
py_version = 'py3',
instance_count = 2,
instance_type = 'ml.g4dn.2xlarge',
hyperparameters={"epochs": 2,
"num_labels": 46,
"backend": "gloo",
},
profiler_config=profiler_config,
debugger_hook_config=debugger_hook_config,
rules=rules
)
我如上聲明我的估算器,並使用 fit() 將其放入訓練中。
我已經在我的 sagemaker 上完成了其中的幾個,並且在 aws 培訓工作日志中有幾個培訓工作。
但它們都以“pytorch-training-2021 ....”的形式出現。
無論如何我可以聲明訓練作業的名稱,例如 'custom-model-xgboost-ver1' 嗎?
我認為它可以作為 estimator 的參數之一,但我找不到它。
提前致謝。
當您調用fit()
您可以傳遞此參數job_name=yourJobName
您可以使用以下代碼段作為示例,使用estimator.fit()
from sagemaker.pytorch import PyTorch
estimator = PyTorch(entry_point='mnist.py',
role=role,
py_version='py3',
framework_version='1.8.0',
instance_count=2,
instance_type='ml.c5.2xlarge',
hyperparameters={
'epochs': 1,
'backend': 'gloo'
})
estimator.fit('training': inputs, job_name='Name')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.