

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

# 考慮重要說明
<a name="sagemaker-hyperpod-multihead-slurm-notes"></a>

本節提供幾個重要說明，您可能會發現這些說明很有用。

1. 若要遷移至多控制器 Slurm 叢集，請完成以下步驟。

   1. 遵循[使用 CloudFormation 堆疊佈建資源](sagemaker-hyperpod-multihead-slurm-cfn.md)中的指示來佈建所有必要的資源。

   1. 遵循[準備和上傳生命週期指令碼](sagemaker-hyperpod-multihead-slurm-scripts.md)中的指示來上傳更新的生命週期指令碼。更新 `provisioning_parameters.json` 檔案時，將您現有的控制器群組移至 `worker_groups` 區段，然後在 `controller_group` 區段中新增控制器群組名稱。

   1. 執行 [update-cluster](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/update-cluster.html) API 呼叫以建立新的控制器群組，並保留原始運算執行個體群組和控制器群組。

1. 若要縮減控制器節點的數量，請使用 [update-cluster](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/update-cluster.html) CLI 命令。對於每個控制器執行個體群組，您可以將控制器節點數量縮減至 1。這表示您無法將控制器節點的數量縮減至 0。
**重要**  
對於 2025 年 1 月 24 日之前建立的叢集，您必須先使用 [UpdateClusterSoftware](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateClusterSoftware.html) API 更新叢集軟體，再執行 [update-cluster](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/update-cluster.html) CLI 命令。

   以下是縮減控制器節點數量的 CLI 命令範例。

   ```
   aws sagemaker update-cluster \
       --cluster-name my_cluster \
       --instance-groups '[{                  
       "InstanceGroupName": "controller_ig_name",
       "InstanceType": "ml.t3.medium",
       "InstanceCount": 3,
       "LifeCycleConfig": {
           "SourceS3Uri": "s3://amzn-s3-demo-bucket1",
           "OnCreate": "on_create.sh"
       },
       "ExecutionRole": "slurm_execution_role_arn",
       "ThreadsPerCore": 1
   },
   {
       "InstanceGroupName": "compute-ig_name",       
       "InstanceType": "ml.c5.xlarge",
       "InstanceCount": 2,
       "LifeCycleConfig": {
           "SourceS3Uri": "s3://amzn-s3-demo-bucket1",
           "OnCreate": "on_create.sh"
       },
       "ExecutionRole": "compute_node_role_arn",
       "ThreadsPerCore": 1
   }]'
   ```

1. 若要批次刪除控制器節點，請使用 [batch-delete-cluster-nodes](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/batch-delete-cluster-nodes.html) CLI 命令。對於每個控制器執行個體群組，您必須至少保留一個控制器節點。如果您想要批次刪除所有控制器節點，API 操作將無法運作。
**重要**  
對於 2025 年 1 月 24 日之前建立的叢集，您必須先使用 [UpdateClusterSoftware](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateClusterSoftware.html) API 更新叢集軟體，再執行 [batch-delete-cluster-nodes](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/batch-delete-cluster-nodes.html) CLI 命令。

   以下是批次刪除控制器節點的 CLI 命令範例。

   ```
   aws sagemaker batch-delete-cluster-nodes --cluster-name my_cluster --node-ids instance_ids_to_delete
   ```

1. 若要針對叢集建立問題進行疑難排解，請從 SageMaker AI 主控台中的叢集詳細資訊頁面檢查失敗訊息。您也可以使用 CloudWatch 日誌，針對叢集建立問題進行疑難排解。從 CloudWatch 主控台中，選擇**日誌群組**。然後，搜尋 `clusters` 以查看與叢集建立相關的日誌群組清單。  
![\[此圖顯示 CloudWatch 主控台中的 Amazon SageMaker HyperPod 叢集日誌群組。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/hyperpod/hyperpod-lifecycle-multihead-logs.png)