

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 執行 SageMaker 訓練任務
<a name="cluster-specific-configurations-run-sagemaker-training-job"></a>

SageMaker HyperPod 配方支援提交 SageMaker 訓練任務。提交訓練任務之前，您必須更新叢集組態 `sm_job.yaml` 並安裝對應環境。

## 使用您的配方做為 SageMaker 訓練任務
<a name="cluster-specific-configurations-cluster-config-sm-job-yaml"></a>

如果您未託管叢集，則可以使用配方做為 SageMaker 訓練任務。您必須修改 SageMaker 訓練任務組態檔案 `sm_job.yaml`，才能執行您的配方。

```
sm_jobs_config:
  output_path: null 
  tensorboard_config:
    output_path: null 
    container_logs_path: null
  wait: True 
  inputs: 
    s3: 
      train: null
      val: null
    file_system:  
      directory_path: null
  additional_estimator_kwargs: 
    max_run: 1800
```

1. `output_path`：您可以指定將模型儲存至 Amazon S3 URL 的位置。

1. `tensorboard_config`：您可以指定 TensorBoard 相關組態，例如輸出路徑或 TensorBoard 日誌路徑。

1. `wait`：您可以指定在提交訓練任務時是否要等待任務完成。

1. `inputs`：您可以指定訓練和驗證資料的路徑。資料來源可以來自共用檔案系統，例如 Amazon FSx 或 Amazon S3 URL。

1. `additional_estimator_kwargs`：用於將訓練任務提交至 SageMaker 訓練任務平台的其他估算器引數。如需詳細資訊，請參閱[演算法估算器](https://sagemaker.readthedocs.io/en/stable/api/training/algorithm.html)。