Amazon SageMaker Service

2024/06/18 - Amazon SageMaker Service - 8 new 4 updated api methods

Changes  Launched a new feature in SageMaker to provide managed MLflow Tracking Servers for customers to track ML experiments. This release also adds a new capability of attaching additional storage to SageMaker HyperPod cluster instances.

DeleteMlflowTrackingServer (new) Link ¶

Deletes an MLflow Tracking Server. For more information, see Clean up MLflow resources.

See also: AWS API Documentation

Request Syntax

client.delete_mlflow_tracking_server(
    TrackingServerName='string'
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the the tracking server to delete.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      A TrackingServerArn object, the ARN of the tracking server that is deleted if successfully found.

UpdateMlflowTrackingServer (new) Link ¶

Updates properties of an existing MLflow Tracking Server.

See also: AWS API Documentation

Request Syntax

client.update_mlflow_tracking_server(
    TrackingServerName='string',
    ArtifactStoreUri='string',
    TrackingServerSize='Small'|'Medium'|'Large',
    AutomaticModelRegistration=True|False,
    WeeklyMaintenanceWindowStart='string'
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the MLflow Tracking Server to update.

type ArtifactStoreUri

string

param ArtifactStoreUri

The new S3 URI for the general purpose bucket to use as the artifact store for the MLflow Tracking Server.

type TrackingServerSize

string

param TrackingServerSize

The new size for the MLflow Tracking Server.

type AutomaticModelRegistration

boolean

param AutomaticModelRegistration

Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True . To disable automatic model registration, set this value to False . If not specified, AutomaticModelRegistration defaults to False

type WeeklyMaintenanceWindowStart

string

param WeeklyMaintenanceWindowStart

The new weekly maintenance window start day and time to update. The maintenance window day and time should be in Coordinated Universal Time (UTC) 24-hour standard time. For example: TUE:03:30.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      The ARN of the updated MLflow Tracking Server.

StartMlflowTrackingServer (new) Link ¶

Programmatically start an MLflow Tracking Server.

See also: AWS API Documentation

Request Syntax

client.start_mlflow_tracking_server(
    TrackingServerName='string'
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the tracking server to start.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      The ARN of the started tracking server.

CreatePresignedMlflowTrackingServerUrl (new) Link ¶

Returns a presigned URL that you can use to connect to the MLflow UI attached to your tracking server. For more information, see Launch the MLflow UI using a presigned URL.

See also: AWS API Documentation

Request Syntax

client.create_presigned_mlflow_tracking_server_url(
    TrackingServerName='string',
    ExpiresInSeconds=123,
    SessionExpirationDurationInSeconds=123
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the tracking server to connect to your MLflow UI.

type ExpiresInSeconds

integer

param ExpiresInSeconds

The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.

type SessionExpirationDurationInSeconds

integer

param SessionExpirationDurationInSeconds

The duration in seconds that your MLflow UI session is valid.

rtype

dict

returns

Response Syntax

{
    'AuthorizedUrl': 'string'
}

Response Structure

  • (dict) --

    • AuthorizedUrl (string) --

      A presigned URL with an authorization token.

ListMlflowTrackingServers (new) Link ¶

Lists all MLflow Tracking Servers.

See also: AWS API Documentation

Request Syntax

client.list_mlflow_tracking_servers(
    CreatedAfter=datetime(2015, 1, 1),
    CreatedBefore=datetime(2015, 1, 1),
    TrackingServerStatus='Creating'|'Created'|'CreateFailed'|'Updating'|'Updated'|'UpdateFailed'|'Deleting'|'DeleteFailed'|'Stopping'|'Stopped'|'StopFailed'|'Starting'|'Started'|'StartFailed'|'MaintenanceInProgress'|'MaintenanceComplete'|'MaintenanceFailed',
    MlflowVersion='string',
    SortBy='Name'|'CreationTime'|'Status',
    SortOrder='Ascending'|'Descending',
    NextToken='string',
    MaxResults=123
)
type CreatedAfter

datetime

param CreatedAfter

Use the CreatedAfter filter to only list tracking servers created after a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00" . The CreatedAfter parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter.

type CreatedBefore

datetime

param CreatedBefore

Use the CreatedBefore filter to only list tracking servers created before a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00" . The CreatedBefore parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter.

type TrackingServerStatus

string

param TrackingServerStatus

Filter for tracking servers with a specified creation status.

type MlflowVersion

string

param MlflowVersion

Filter for tracking servers using the specified MLflow version.

type SortBy

string

param SortBy

Filter for trackings servers sorting by name, creation time, or creation status.

type SortOrder

string

param SortOrder

Change the order of the listed tracking servers. By default, tracking servers are listed in Descending order by creation time. To change the list order, you can specify SortOrder to be Ascending .

type NextToken

string

param NextToken

If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of tracking servers to list.

rtype

dict

returns

Response Syntax

{
    'TrackingServerSummaries': [
        {
            'TrackingServerArn': 'string',
            'TrackingServerName': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'TrackingServerStatus': 'Creating'|'Created'|'CreateFailed'|'Updating'|'Updated'|'UpdateFailed'|'Deleting'|'DeleteFailed'|'Stopping'|'Stopped'|'StopFailed'|'Starting'|'Started'|'StartFailed'|'MaintenanceInProgress'|'MaintenanceComplete'|'MaintenanceFailed',
            'IsActive': 'Active'|'Inactive',
            'MlflowVersion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerSummaries (list) --

      A list of tracking servers according to chosen filters.

      • (dict) --

        The summary of the tracking server to list.

        • TrackingServerArn (string) --

          The ARN of a listed tracking server.

        • TrackingServerName (string) --

          The name of a listed tracking server.

        • CreationTime (datetime) --

          The creation time of a listed tracking server.

        • LastModifiedTime (datetime) --

          The last modified time of a listed tracking server.

        • TrackingServerStatus (string) --

          The creation status of a listed tracking server.

        • IsActive (string) --

          The activity status of a listed tracking server.

        • MlflowVersion (string) --

          The MLflow version used for a listed tracking server.

    • NextToken (string) --

      If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.

CreateMlflowTrackingServer (new) Link ¶

Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store. For more information, see Create an MLflow Tracking Server.

See also: AWS API Documentation

Request Syntax

client.create_mlflow_tracking_server(
    TrackingServerName='string',
    ArtifactStoreUri='string',
    TrackingServerSize='Small'|'Medium'|'Large',
    MlflowVersion='string',
    RoleArn='string',
    AutomaticModelRegistration=True|False,
    WeeklyMaintenanceWindowStart='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

A unique string identifying the tracking server name. This string is part of the tracking server ARN.

type ArtifactStoreUri

string

param ArtifactStoreUri

[REQUIRED]

The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store.

type TrackingServerSize

string

param TrackingServerSize

The size of the tracking server you want to create. You can choose between "Small" , "Medium" , and "Large" . The default MLflow Tracking Server configuration size is "Small" . You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use.

We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users.

type MlflowVersion

string

param MlflowVersion

The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see How it works.

type RoleArn

string

param RoleArn

[REQUIRED]

The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have AmazonS3FullAccess permissions. For more information on IAM permissions for tracking server creation, see Set up IAM permissions for MLflow.

type AutomaticModelRegistration

boolean

param AutomaticModelRegistration

Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True . To disable automatic model registration, set this value to False . If not specified, AutomaticModelRegistration defaults to False .

type WeeklyMaintenanceWindowStart

string

param WeeklyMaintenanceWindowStart

The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.

type Tags

list

param Tags

Tags consisting of key-value pairs used to manage metadata for the tracking server.

  • (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.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      The ARN of the tracking server.

DescribeMlflowTrackingServer (new) Link ¶

Returns information about an MLflow Tracking Server.

See also: AWS API Documentation

Request Syntax

client.describe_mlflow_tracking_server(
    TrackingServerName='string'
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the MLflow Tracking Server to describe.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string',
    'TrackingServerName': 'string',
    'ArtifactStoreUri': 'string',
    'TrackingServerSize': 'Small'|'Medium'|'Large',
    'MlflowVersion': 'string',
    'RoleArn': 'string',
    'TrackingServerStatus': 'Creating'|'Created'|'CreateFailed'|'Updating'|'Updated'|'UpdateFailed'|'Deleting'|'DeleteFailed'|'Stopping'|'Stopped'|'StopFailed'|'Starting'|'Started'|'StartFailed'|'MaintenanceInProgress'|'MaintenanceComplete'|'MaintenanceFailed',
    'IsActive': 'Active'|'Inactive',
    'TrackingServerUrl': 'string',
    'WeeklyMaintenanceWindowStart': 'string',
    'AutomaticModelRegistration': True|False,
    'CreationTime': datetime(2015, 1, 1),
    'CreatedBy': {
        'UserProfileArn': 'string',
        'UserProfileName': 'string',
        'DomainId': 'string',
        'IamIdentity': {
            'Arn': 'string',
            'PrincipalId': 'string',
            'SourceIdentity': 'string'
        }
    },
    'LastModifiedTime': datetime(2015, 1, 1),
    'LastModifiedBy': {
        'UserProfileArn': 'string',
        'UserProfileName': 'string',
        'DomainId': 'string',
        'IamIdentity': {
            'Arn': 'string',
            'PrincipalId': 'string',
            'SourceIdentity': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      The ARN of the described tracking server.

    • TrackingServerName (string) --

      The name of the described tracking server.

    • ArtifactStoreUri (string) --

      The S3 URI of the general purpose bucket used as the MLflow Tracking Server artifact store.

    • TrackingServerSize (string) --

      The size of the described tracking server.

    • MlflowVersion (string) --

      The MLflow version used for the described tracking server.

    • RoleArn (string) --

      The Amazon Resource Name (ARN) for an IAM role in your account that the described MLflow Tracking Server uses to access the artifact store in Amazon S3.

    • TrackingServerStatus (string) --

      The current creation status of the described MLflow Tracking Server.

    • IsActive (string) --

      Whether the described MLflow Tracking Server is currently active.

    • TrackingServerUrl (string) --

      The URL to connect to the MLflow user interface for the described tracking server.

    • WeeklyMaintenanceWindowStart (string) --

      The day and time of the week when weekly maintenance occurs on the described tracking server.

    • AutomaticModelRegistration (boolean) --

      Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled.

    • CreationTime (datetime) --

      The timestamp of when the described MLflow Tracking Server was created.

    • CreatedBy (dict) --

      Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.

      • UserProfileArn (string) --

        The Amazon Resource Name (ARN) of the user's profile.

      • UserProfileName (string) --

        The name of the user's profile.

      • DomainId (string) --

        The domain associated with the user.

      • IamIdentity (dict) --

        The IAM Identity details associated with the user. These details are associated with model package groups, model packages, and project entities only.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the IAM identity.

        • PrincipalId (string) --

          The ID of the principal that assumes the IAM identity.

        • SourceIdentity (string) --

          The person or application which assumes the IAM identity.

    • LastModifiedTime (datetime) --

      The timestamp of when the described MLflow Tracking Server was last modified.

    • LastModifiedBy (dict) --

      Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.

      • UserProfileArn (string) --

        The Amazon Resource Name (ARN) of the user's profile.

      • UserProfileName (string) --

        The name of the user's profile.

      • DomainId (string) --

        The domain associated with the user.

      • IamIdentity (dict) --

        The IAM Identity details associated with the user. These details are associated with model package groups, model packages, and project entities only.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the IAM identity.

        • PrincipalId (string) --

          The ID of the principal that assumes the IAM identity.

        • SourceIdentity (string) --

          The person or application which assumes the IAM identity.

StopMlflowTrackingServer (new) Link ¶

Programmatically stop an MLflow Tracking Server.

See also: AWS API Documentation

Request Syntax

client.stop_mlflow_tracking_server(
    TrackingServerName='string'
)
type TrackingServerName

string

param TrackingServerName

[REQUIRED]

The name of the tracking server to stop.

rtype

dict

returns

Response Syntax

{
    'TrackingServerArn': 'string'
}

Response Structure

  • (dict) --

    • TrackingServerArn (string) --

      The ARN of the stopped tracking server.

CreateCluster (updated) Link ¶
Changes (request)
{'InstanceGroups': {'InstanceStorageConfigs': [{'EbsVolumeConfig': {'VolumeSizeInGB': 'integer'}}]}}

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
                    }
                },
            ]
        },
    ],
    VpcConfig={
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
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.

        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 .

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.

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': {'InstanceStorageConfigs': [{'EbsVolumeConfig': {'VolumeSizeInGB': 'integer'}}]}}

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
                    }
                },
            ]
        },
    ],
    'VpcConfig': {
        'SecurityGroupIds': [
            'string',
        ],
        'Subnets': [
            'string',
        ]
    }
}

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.

            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 .

    • 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) --

DescribeClusterNode (updated) Link ¶
Changes (response)
{'NodeDetails': {'InstanceStorageConfigs': [{'EbsVolumeConfig': {'VolumeSizeInGB': 'integer'}}]}}

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',
            '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.

          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.

UpdateCluster (updated) Link ¶
Changes (request)
{'InstanceGroups': {'InstanceStorageConfigs': [{'EbsVolumeConfig': {'VolumeSizeInGB': 'integer'}}]}}

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
                    }
                },
            ]
        },
    ]
)
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.

        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 .

rtype

dict

returns

Response Syntax

{
    'ClusterArn': 'string'
}

Response Structure

  • (dict) --

    • ClusterArn (string) --

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