

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 考虑重要说明
注意事项

此部分提供了一些重要说明，可能会对您有所帮助。

1. 要迁移到多控制器 Slurm 集群，请完成以下步骤。

   1. 按照[使用 Amazon 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.amazonaws.cn/cli/latest/reference/sagemaker/update-cluster.html) API 调用以创建新的控制器组，并保留原始计算实例组和控制器组。

1. 要缩减控制器节点的数量，请使用 [update-cluster](https://docs.amazonaws.cn/cli/latest/reference/sagemaker/update-cluster.html) CLI 命令。对于每个控制器实例组，可缩减至的最小控制器节点数为 1。这意味着您无法将控制器节点数缩减至 0。
**重要**  
对于 2025 年 1 月 24 日之前创建的集群，在运行 update-cluster CLI 命令之前，必须先使用 [UpdateClusterSoftware](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_UpdateClusterSoftware.html)API [更新集群](https://docs.amazonaws.cn/cli/latest/reference/sagemaker/update-cluster.html)软件。

   以下是用于缩减控制器节点数的 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.amazonaws.cn/cli/latest/reference/sagemaker/batch-delete-cluster-nodes.html)CLI 命令。对于每个控制器实例组，您必须至少保留一个控制器节点。如果要批量删除所有控制器节点，则 API 操作将不起作用。
**重要**  
对于 2025 年 1 月 24 日之前创建的集群，必须先使用 [UpdateClusterSoftware](https://docs.amazonaws.cn/sagemaker/latest/APIReference/API_UpdateClusterSoftware.html)API 更新集群软件，然后才能运行 [batch-delete-cluster-nodes](https://docs.amazonaws.cn/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.amazonaws.cn/sagemaker/latest/dg/images/hyperpod/hyperpod-lifecycle-multihead-logs.png)