Amazon SageMaker Service

2024/09/09 - Amazon SageMaker Service - 5 updated api methods

Changes  Amazon Sagemaker supports orchestrating SageMaker HyperPod clusters with Amazon EKS

CreateCluster (updated) Link ¶
Changes (request)
{'InstanceGroups': {'OnStartDeepHealthChecks': ['InstanceStress | '
                                                'InstanceConnectivity']},
 'NodeRecovery': 'Automatic | None',
 'Orchestrator': {'Eks': {'ClusterArn': 'string'}}}

Creates a SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide .

See also: AWS API Documentation

Request Syntax

client.create_cluster(
    ClusterName='string',
    InstanceGroups=[
        {
            'InstanceCount': 123,
            'InstanceGroupName': 'string',
            'InstanceType': 'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.48xlarge'|'ml.trn1.32xlarge'|'ml.trn1n.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.c5n.large'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge',
            'LifeCycleConfig': {
                'SourceS3Uri': 'string',
                'OnCreate': 'string'
            },
            'ExecutionRole': 'string',
            'ThreadsPerCore': 123,
            'InstanceStorageConfigs': [
                {
                    'EbsVolumeConfig': {
                        'VolumeSizeInGB': 123
                    }
                },
            ],
            'OnStartDeepHealthChecks': [
                'InstanceStress'|'InstanceConnectivity',
            ]
        },
    ],
    VpcConfig={
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    Orchestrator={
        'Eks': {
            'ClusterArn': 'string'
        }
    },
    NodeRecovery='Automatic'|'None'
)
type ClusterName

string

param ClusterName

[REQUIRED]

The name for the new SageMaker HyperPod cluster.

type InstanceGroups

list

param InstanceGroups

[REQUIRED]

The instance groups to be created in the SageMaker HyperPod cluster.

  • (dict) --

    The specifications of an instance group that you need to define.

    • InstanceCount (integer) -- [REQUIRED]

      Specifies the number of instances to add to the instance group of a SageMaker HyperPod cluster.

    • InstanceGroupName (string) -- [REQUIRED]

      Specifies the name of the instance group.

    • InstanceType (string) -- [REQUIRED]

      Specifies the instance type of the instance group.

    • LifeCycleConfig (dict) -- [REQUIRED]

      Specifies the LifeCycle configuration for the instance group.

      • SourceS3Uri (string) -- [REQUIRED]

        An Amazon S3 bucket path where your lifecycle scripts are stored.

        Warning

        Make sure that the S3 bucket path starts with s3://sagemaker- . The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker- .

      • OnCreate (string) -- [REQUIRED]

        The file name of the entrypoint script of lifecycle scripts under SourceS3Uri . This entrypoint script runs during cluster creation.

    • ExecutionRole (string) -- [REQUIRED]

      Specifies an IAM execution role to be assumed by the instance group.

    • ThreadsPerCore (integer) --

      Specifies the value for Threads per core . For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For instance types that doesn't support multithreading, specify 1 . For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide .

    • InstanceStorageConfigs (list) --

      Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.

      • (dict) --

        Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: EbsVolumeConfig.

        • EbsVolumeConfig (dict) --

          Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

          • VolumeSizeInGB (integer) -- [REQUIRED]

            The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

    • OnStartDeepHealthChecks (list) --

      A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.

      • (string) --

type VpcConfig

dict

param VpcConfig

Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC.

  • SecurityGroupIds (list) -- [REQUIRED]

    The VPC security group IDs, in the form sg-xxxxxxxx . Specify the security groups for the VPC that is specified in the Subnets field.

    • (string) --

  • Subnets (list) -- [REQUIRED]

    The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones.

    • (string) --

type Tags

list

param Tags

Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see Tagging Amazon Web Services Resources User Guide.

  • (dict) --

    A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

    You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.

    For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.

    • Key (string) -- [REQUIRED]

      The tag key. Tag keys must be unique per resource.

    • Value (string) -- [REQUIRED]

      The tag value.

type Orchestrator

dict

param Orchestrator

The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is "eks" , which is to use an Amazon Elastic Kubernetes Service (EKS) cluster as the orchestrator.

  • Eks (dict) -- [REQUIRED]

    The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster.

    • ClusterArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon EKS cluster associated with the SageMaker HyperPod cluster.

type NodeRecovery

string

param NodeRecovery

The node recovery mode for the SageMaker HyperPod cluster. When set to Automatic , SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to None , cluster administrators will need to manually manage any faulty cluster instances.

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string'
}

Response Structure

  • (dict) --

    • ClusterArn (string) --

      The Amazon Resource Name (ARN) of the cluster.

DescribeCluster (updated) Link ¶
Changes (response)
{'InstanceGroups': {'OnStartDeepHealthChecks': ['InstanceStress | '
                                                'InstanceConnectivity']},
 'NodeRecovery': 'Automatic | None',
 'Orchestrator': {'Eks': {'ClusterArn': 'string'}}}

Retrieves information of a SageMaker HyperPod cluster.

See also: AWS API Documentation

Request Syntax

client.describe_cluster(
    ClusterName='string'
)
type ClusterName

string

param ClusterName

[REQUIRED]

The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string',
    'ClusterName': 'string',
    'ClusterStatus': 'Creating'|'Deleting'|'Failed'|'InService'|'RollingBack'|'SystemUpdating'|'Updating',
    'CreationTime': datetime(2015, 1, 1),
    'FailureMessage': 'string',
    'InstanceGroups': [
        {
            'CurrentCount': 123,
            'TargetCount': 123,
            'InstanceGroupName': 'string',
            'InstanceType': 'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.48xlarge'|'ml.trn1.32xlarge'|'ml.trn1n.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.c5n.large'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge',
            'LifeCycleConfig': {
                'SourceS3Uri': 'string',
                'OnCreate': 'string'
            },
            'ExecutionRole': 'string',
            'ThreadsPerCore': 123,
            'InstanceStorageConfigs': [
                {
                    'EbsVolumeConfig': {
                        'VolumeSizeInGB': 123
                    }
                },
            ],
            'OnStartDeepHealthChecks': [
                'InstanceStress'|'InstanceConnectivity',
            ]
        },
    ],
    'VpcConfig': {
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    },
    'Orchestrator': {
        'Eks': {
            'ClusterArn': 'string'
        }
    },
    'NodeRecovery': 'Automatic'|'None'
}

Response Structure

  • (dict) --

    • ClusterArn (string) --

      The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.

    • ClusterName (string) --

      The name of the SageMaker HyperPod cluster.

    • ClusterStatus (string) --

      The status of the SageMaker HyperPod cluster.

    • CreationTime (datetime) --

      The time when the SageMaker Cluster is created.

    • FailureMessage (string) --

      The failure message of the SageMaker HyperPod cluster.

    • InstanceGroups (list) --

      The instance groups of the SageMaker HyperPod cluster.

      • (dict) --

        Details of an instance group in a SageMaker HyperPod cluster.

        • CurrentCount (integer) --

          The number of instances that are currently in the instance group of a SageMaker HyperPod cluster.

        • TargetCount (integer) --

          The number of instances you specified to add to the instance group of a SageMaker HyperPod cluster.

        • InstanceGroupName (string) --

          The name of the instance group of a SageMaker HyperPod cluster.

        • InstanceType (string) --

          The instance type of the instance group of a SageMaker HyperPod cluster.

        • LifeCycleConfig (dict) --

          Details of LifeCycle configuration for the instance group.

          • SourceS3Uri (string) --

            An Amazon S3 bucket path where your lifecycle scripts are stored.

            Warning

            Make sure that the S3 bucket path starts with s3://sagemaker- . The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker- .

          • OnCreate (string) --

            The file name of the entrypoint script of lifecycle scripts under SourceS3Uri . This entrypoint script runs during cluster creation.

        • ExecutionRole (string) --

          The execution role for the instance group to assume.

        • ThreadsPerCore (integer) --

          The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide .

        • InstanceStorageConfigs (list) --

          The additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.

          • (dict) --

            Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: EbsVolumeConfig. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            • EbsVolumeConfig (dict) --

              Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

              • VolumeSizeInGB (integer) --

                The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

        • OnStartDeepHealthChecks (list) --

          A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.

          • (string) --

    • VpcConfig (dict) --

      Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC.

      • SecurityGroupIds (list) --

        The VPC security group IDs, in the form sg-xxxxxxxx . Specify the security groups for the VPC that is specified in the Subnets field.

        • (string) --

      • Subnets (list) --

        The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones.

        • (string) --

    • Orchestrator (dict) --

      The type of orchestrator used for the SageMaker HyperPod cluster.

      • Eks (dict) --

        The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster.

        • ClusterArn (string) --

          The Amazon Resource Name (ARN) of the Amazon EKS cluster associated with the SageMaker HyperPod cluster.

    • NodeRecovery (string) --

      The node recovery mode configured for the SageMaker HyperPod cluster.

DescribeClusterNode (updated) Link ¶
Changes (response)
{'NodeDetails': {'InstanceStatus': {'Status': {'DeepHealthCheckInProgress'}}}}

Retrieves information of a node (also called a instance interchangeably) of a SageMaker HyperPod cluster.

See also: AWS API Documentation

Request Syntax

client.describe_cluster_node(
    ClusterName='string',
    NodeId='string'
)
type ClusterName

string

param ClusterName

[REQUIRED]

The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster in which the node is.

type NodeId

string

param NodeId

[REQUIRED]

The ID of the SageMaker HyperPod cluster node.

rtype

dict

returns

Response Syntax

{
    'NodeDetails': {
        'InstanceGroupName': 'string',
        'InstanceId': 'string',
        'InstanceStatus': {
            'Status': 'Running'|'Failure'|'Pending'|'ShuttingDown'|'SystemUpdating'|'DeepHealthCheckInProgress',
            'Message': 'string'
        },
        'InstanceType': 'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.48xlarge'|'ml.trn1.32xlarge'|'ml.trn1n.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.c5n.large'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge',
        'LaunchTime': datetime(2015, 1, 1),
        'LifeCycleConfig': {
            'SourceS3Uri': 'string',
            'OnCreate': 'string'
        },
        'ThreadsPerCore': 123,
        'InstanceStorageConfigs': [
            {
                'EbsVolumeConfig': {
                    'VolumeSizeInGB': 123
                }
            },
        ],
        'PrivatePrimaryIp': 'string',
        'PrivateDnsHostname': 'string',
        'Placement': {
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • NodeDetails (dict) --

      The details of the SageMaker HyperPod cluster node.

      • InstanceGroupName (string) --

        The instance group name in which the instance is.

      • InstanceId (string) --

        The ID of the instance.

      • InstanceStatus (dict) --

        The status of the instance.

        • Status (string) --

          The status of an instance in a SageMaker HyperPod cluster.

        • Message (string) --

          The message from an instance in a SageMaker HyperPod cluster.

      • InstanceType (string) --

        The type of the instance.

      • LaunchTime (datetime) --

        The time when the instance is launched.

      • LifeCycleConfig (dict) --

        The LifeCycle configuration applied to the instance.

        • SourceS3Uri (string) --

          An Amazon S3 bucket path where your lifecycle scripts are stored.

          Warning

          Make sure that the S3 bucket path starts with s3://sagemaker- . The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker- .

        • OnCreate (string) --

          The file name of the entrypoint script of lifecycle scripts under SourceS3Uri . This entrypoint script runs during cluster creation.

      • ThreadsPerCore (integer) --

        The number of threads per CPU core you specified under CreateCluster .

      • InstanceStorageConfigs (list) --

        The configurations of additional storage specified to the instance group where the instance (node) is launched.

        • (dict) --

          Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: EbsVolumeConfig. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          • EbsVolumeConfig (dict) --

            Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

            • VolumeSizeInGB (integer) --

              The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

      • PrivatePrimaryIp (string) --

        The private primary IP address of the SageMaker HyperPod cluster node.

      • PrivateDnsHostname (string) --

        The private DNS hostname of the SageMaker HyperPod cluster node.

      • Placement (dict) --

        The placement details of the SageMaker HyperPod cluster node.

        • AvailabilityZone (string) --

          The Availability Zone where the node in the SageMaker HyperPod cluster is launched.

        • AvailabilityZoneId (string) --

          The unique identifier (ID) of the Availability Zone where the node in the SageMaker HyperPod cluster is launched.

ListClusterNodes (updated) Link ¶
Changes (response)
{'ClusterNodeSummaries': {'InstanceStatus': {'Status': {'DeepHealthCheckInProgress'}}}}

Retrieves the list of instances (also called nodes interchangeably) in a SageMaker HyperPod cluster.

See also: AWS API Documentation

Request Syntax

client.list_cluster_nodes(
    ClusterName='string',
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    InstanceGroupNameContains='string',
    MaxResults=123,
    NextToken='string',
    SortBy='CREATION_TIME'|'NAME',
    SortOrder='Ascending'|'Descending'
)
type ClusterName

string

param ClusterName

[REQUIRED]

The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster in which you want to retrieve the list of nodes.

type CreationTimeAfter

datetime

param CreationTimeAfter

A filter that returns nodes in a SageMaker HyperPod cluster created after the specified time. Timestamps are formatted according to the ISO 8601 standard.

Acceptable formats include:

  • YYYY-MM-DDThh:mm:ss.sssTZD (UTC), for example, 2014-10-01T20:30:00.000Z

  • YYYY-MM-DDThh:mm:ss.sssTZD (with offset), for example, 2014-10-01T12:30:00.000-08:00

  • YYYY-MM-DD , for example, 2014-10-01

  • Unix time in seconds, for example, 1412195400 . This is also referred to as Unix Epoch time and represents the number of seconds since midnight, January 1, 1970 UTC.

For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide .

type CreationTimeBefore

datetime

param CreationTimeBefore

A filter that returns nodes in a SageMaker HyperPod cluster created before the specified time. The acceptable formats are the same as the timestamp formats for CreationTimeAfter . For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide .

type InstanceGroupNameContains

string

param InstanceGroupNameContains

A filter that returns the instance groups whose name contain a specified string.

type MaxResults

integer

param MaxResults

The maximum number of nodes to return in the response.

type NextToken

string

param NextToken

If the result of the previous ListClusterNodes request was truncated, the response includes a NextToken . To retrieve the next set of cluster nodes, use the token in the next request.

type SortBy

string

param SortBy

The field by which to sort results. The default value is CREATION_TIME .

type SortOrder

string

param SortOrder

The sort order for results. The default value is Ascending .

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'ClusterNodeSummaries': [
        {
            'InstanceGroupName': 'string',
            'InstanceId': 'string',
            'InstanceType': 'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.48xlarge'|'ml.trn1.32xlarge'|'ml.trn1n.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.c5n.large'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge',
            'LaunchTime': datetime(2015, 1, 1),
            'InstanceStatus': {
                'Status': 'Running'|'Failure'|'Pending'|'ShuttingDown'|'SystemUpdating'|'DeepHealthCheckInProgress',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The next token specified for listing instances in a SageMaker HyperPod cluster.

    • ClusterNodeSummaries (list) --

      The summaries of listed instances in a SageMaker HyperPod cluster

      • (dict) --

        Lists a summary of the properties of an instance (also called a node interchangeably) of a SageMaker HyperPod cluster.

        • InstanceGroupName (string) --

          The name of the instance group in which the instance is.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceType (string) --

          The type of the instance.

        • LaunchTime (datetime) --

          The time when the instance is launched.

        • InstanceStatus (dict) --

          The status of the instance.

          • Status (string) --

            The status of an instance in a SageMaker HyperPod cluster.

          • Message (string) --

            The message from an instance in a SageMaker HyperPod cluster.

UpdateCluster (updated) Link ¶
Changes (request)
{'InstanceGroups': {'OnStartDeepHealthChecks': ['InstanceStress | '
                                                'InstanceConnectivity']},
 'NodeRecovery': 'Automatic | None'}

Updates a SageMaker HyperPod cluster.

See also: AWS API Documentation

Request Syntax

client.update_cluster(
    ClusterName='string',
    InstanceGroups=[
        {
            'InstanceCount': 123,
            'InstanceGroupName': 'string',
            'InstanceType': 'ml.p4d.24xlarge'|'ml.p4de.24xlarge'|'ml.p5.48xlarge'|'ml.trn1.32xlarge'|'ml.trn1n.32xlarge'|'ml.g5.xlarge'|'ml.g5.2xlarge'|'ml.g5.4xlarge'|'ml.g5.8xlarge'|'ml.g5.12xlarge'|'ml.g5.16xlarge'|'ml.g5.24xlarge'|'ml.g5.48xlarge'|'ml.c5.large'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.12xlarge'|'ml.c5.18xlarge'|'ml.c5.24xlarge'|'ml.c5n.large'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.8xlarge'|'ml.m5.12xlarge'|'ml.m5.16xlarge'|'ml.m5.24xlarge'|'ml.t3.medium'|'ml.t3.large'|'ml.t3.xlarge'|'ml.t3.2xlarge',
            'LifeCycleConfig': {
                'SourceS3Uri': 'string',
                'OnCreate': 'string'
            },
            'ExecutionRole': 'string',
            'ThreadsPerCore': 123,
            'InstanceStorageConfigs': [
                {
                    'EbsVolumeConfig': {
                        'VolumeSizeInGB': 123
                    }
                },
            ],
            'OnStartDeepHealthChecks': [
                'InstanceStress'|'InstanceConnectivity',
            ]
        },
    ],
    NodeRecovery='Automatic'|'None'
)
type ClusterName

string

param ClusterName

[REQUIRED]

Specify the name of the SageMaker HyperPod cluster you want to update.

type InstanceGroups

list

param InstanceGroups

[REQUIRED]

Specify the instance groups to update.

  • (dict) --

    The specifications of an instance group that you need to define.

    • InstanceCount (integer) -- [REQUIRED]

      Specifies the number of instances to add to the instance group of a SageMaker HyperPod cluster.

    • InstanceGroupName (string) -- [REQUIRED]

      Specifies the name of the instance group.

    • InstanceType (string) -- [REQUIRED]

      Specifies the instance type of the instance group.

    • LifeCycleConfig (dict) -- [REQUIRED]

      Specifies the LifeCycle configuration for the instance group.

      • SourceS3Uri (string) -- [REQUIRED]

        An Amazon S3 bucket path where your lifecycle scripts are stored.

        Warning

        Make sure that the S3 bucket path starts with s3://sagemaker- . The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker- .

      • OnCreate (string) -- [REQUIRED]

        The file name of the entrypoint script of lifecycle scripts under SourceS3Uri . This entrypoint script runs during cluster creation.

    • ExecutionRole (string) -- [REQUIRED]

      Specifies an IAM execution role to be assumed by the instance group.

    • ThreadsPerCore (integer) --

      Specifies the value for Threads per core . For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For instance types that doesn't support multithreading, specify 1 . For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide .

    • InstanceStorageConfigs (list) --

      Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.

      • (dict) --

        Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: EbsVolumeConfig.

        • EbsVolumeConfig (dict) --

          Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

          • VolumeSizeInGB (integer) -- [REQUIRED]

            The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker .

    • OnStartDeepHealthChecks (list) --

      A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.

      • (string) --

type NodeRecovery

string

param NodeRecovery

The node recovery mode to be applied to the SageMaker HyperPod cluster.

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string'
}

Response Structure

  • (dict) --

    • ClusterArn (string) --

      The Amazon Resource Name (ARN) of the updated SageMaker HyperPod cluster.