Skip to content

ClusterInstanceGroupSpecification

Source code in docs_src/capo_sagemaker/types/cluster_instance_group_specification.py
class ClusterInstanceGroupSpecification(TypedDict, closed=True):
    instance_count: NotRequired[
        "capo_sagemaker.types.cluster_instance_count.ClusterInstanceCount"
    ]
    """<p>Specifies the number of instances to add to the instance group of a SageMaker HyperPod cluster.</p>"""
    min_instance_count: NotRequired[
        "capo_sagemaker.types.cluster_instance_count.ClusterInstanceCount"
    ]
    """<p>Defines the minimum number of instances required for an instance group to become <code>InService</code>. If this threshold isn't met within 3 hours, the instance group rolls back to its previous state - zero instances for new instance groups, or previous settings for existing instance groups. <code>MinInstanceCount</code> only affects the initial transition to <code>InService</code> and does not guarantee maintaining this minimum afterward. </p>"""
    instance_group_name: NotRequired[
        "capo_sagemaker.types.cluster_instance_group_name.ClusterInstanceGroupName"
    ]
    """<p>Specifies the name of the instance group.</p>"""
    instance_type: NotRequired[
        "capo_sagemaker.types.cluster_instance_type.ClusterInstanceType"
    ]
    """<p>Specifies the instance type of the instance group.</p>"""
    instance_requirements: NotRequired[
        "capo_sagemaker.types.cluster_instance_requirements.ClusterInstanceRequirements"
    ]
    """<p>The instance requirements for the instance group, including the instance types to use. Use this to create a flexible instance group that supports multiple instance types. The <code>InstanceType</code> and <code>InstanceRequirements</code> properties are mutually exclusive.</p>"""
    life_cycle_config: NotRequired[
        "capo_sagemaker.types.cluster_life_cycle_config.ClusterLifeCycleConfig"
    ]
    """<p>Specifies the LifeCycle configuration for the instance group.</p>"""
    execution_role: NotRequired["capo_sagemaker.types.role_arn.RoleArn"]
    """<p>Specifies an IAM execution role to be assumed by the instance group.</p>"""
    threads_per_core: NotRequired[
        "capo_sagemaker.types.cluster_threads_per_core.ClusterThreadsPerCore"
    ]
    """<p>Specifies the value for <b>Threads per core</b>. For instance types that support multithreading, you can specify <code>1</code> for disabling multithreading and <code>2</code> for enabling multithreading. For instance types that doesn't support multithreading, specify <code>1</code>. For more information, see the reference table of <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html">CPU cores and threads per CPU core per instance type</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>"""
    instance_storage_configs: NotRequired[
        "capo_sagemaker.types.cluster_instance_storage_configs.ClusterInstanceStorageConfigs"
    ]
    """<p>Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.</p>"""
    on_start_deep_health_checks: NotRequired[
        "capo_sagemaker.types.on_start_deep_health_checks.OnStartDeepHealthChecks"
    ]
    """<p>A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.</p>"""
    training_plan_arn: NotRequired[
        "capo_sagemaker.types.training_plan_arn.TrainingPlanArn"
    ]
    """<p>The Amazon Resource Name (ARN); of the training plan to use for this cluster instance group.</p> <p>For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see <code> <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingPlan.html">CreateTrainingPlan</a> </code>.</p>"""
    override_vpc_config: NotRequired["capo_sagemaker.types.vpc_config.VpcConfig"]
    """<p>To configure multi-AZ deployments, customize the Amazon VPC configuration at the instance group level. You can specify different subnets and security groups across different AZs in the instance group specification to override a SageMaker HyperPod cluster's default Amazon VPC configuration. For more information about deploying a cluster in multiple AZs, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-multiple-availability-zones">Setting up SageMaker HyperPod clusters across multiple AZs</a>.</p> <note> <p>When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:</p> <ul> <li> <p>Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.</p> </li> <li> <p>In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/deploy-ipv6-cluster.html#_deploy_an_ipv6_cluster_with_eksctl">Amazon EKS IPv6 Cluster Deployment</a>.</p> </li> </ul> <p>Additional resources for IPv6 configuration:</p> <ul> <li> <p>For information about adding IPv6 support to your VPC, see to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-migrate-ipv6.html">IPv6 Support for VPC</a>.</p> </li> <li> <p>For information about creating a new IPv6-compatible VPC, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html">Amazon VPC Creation Guide</a>.</p> </li> <li> <p>To configure SageMaker HyperPod with a custom Amazon VPC, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-prerequisites.html#sagemaker-hyperpod-prerequisites-optional-vpc">Custom Amazon VPC Setup for SageMaker HyperPod</a>.</p> </li> </ul> </note>"""
    scheduled_update_config: NotRequired[
        "capo_sagemaker.types.scheduled_update_config.ScheduledUpdateConfig"
    ]
    """<p>The configuration object of the schedule that SageMaker uses to update the AMI.</p>"""
    image_id: NotRequired["capo_sagemaker.types.image_id.ImageId"]
    """<p>When configuring your HyperPod cluster, you can specify an image ID using one of the following options:</p> <ul> <li> <p> <code>HyperPodPublicAmiId</code>: Use a HyperPod public AMI</p> </li> <li> <p> <code>CustomAmiId</code>: Use your custom AMI</p> </li> <li> <p> <code>default</code>: Use the default latest system image. For clusters with continuous scaling node provisioning mode, new instance groups inherit the AMI from the earliest existing instance group</p> </li> </ul> <p>If you choose to use a custom AMI (<code>CustomAmiId</code>), ensure it meets the following requirements:</p> <ul> <li> <p>Encryption: The custom AMI must be unencrypted.</p> </li> <li> <p>Ownership: The custom AMI must be owned by the same Amazon Web Services account that is creating the HyperPod cluster.</p> </li> <li> <p>Volume support: Only the primary AMI snapshot volume is supported; additional AMI volumes are not supported.</p> </li> </ul> <p>When updating the instance group's AMI through the <code>UpdateClusterSoftware</code> operation, if an instance group uses a custom AMI, you must provide an <code>ImageId</code> or use the default as input. Note that if you don't specify an instance group in your <code>UpdateClusterSoftware</code> request, then all of the instance groups are patched with the specified image.</p>"""
    auto_patch_config: NotRequired[
        "capo_sagemaker.types.cluster_auto_patch_config.ClusterAutoPatchConfig"
    ]
    """<p>The configuration for automatic OS security patching. If present, the system automatically applies PATCH AMI updates to this instance group.</p>"""
    image_release_version: NotRequired[
        "capo_sagemaker.types.image_release_version.ImageReleaseVersion"
    ]
    """<p>The version of the HyperPod-managed AMI to use for the instance group. Uses semantic versioning in the format <code>MAJOR.MINOR.PATCH</code> (for example, <code>1.2.3</code>). If omitted, the latest available version is used.</p>"""
    kubernetes_config: NotRequired[
        "capo_sagemaker.types.cluster_kubernetes_config.ClusterKubernetesConfig"
    ]
    """<p>Specifies the Kubernetes configuration for the instance group. You describe what you want the labels and taints to look like, and the cluster works to reconcile the actual state with the declared state for nodes in this instance group. </p>"""
    slurm_config: NotRequired[
        "capo_sagemaker.types.cluster_slurm_config.ClusterSlurmConfig"
    ]
    """<p>Specifies the Slurm configuration for the instance group.</p>"""
    capacity_requirements: NotRequired[
        "capo_sagemaker.types.cluster_capacity_requirements.ClusterCapacityRequirements"
    ]
    """<p>Specifies the capacity requirements for the instance group.</p>"""
    network_interface: NotRequired[
        "capo_sagemaker.types.cluster_network_interface.ClusterNetworkInterface"
    ]
    """<p>The network interface configuration for the instance group.</p>"""

auto_patch_config instance-attribute

auto_patch_config: NotRequired[ClusterAutoPatchConfig]

The configuration for automatic OS security patching. If present, the system automatically applies PATCH AMI updates to this instance group.

capacity_requirements instance-attribute

capacity_requirements: NotRequired[ClusterCapacityRequirements]

Specifies the capacity requirements for the instance group.

execution_role instance-attribute

execution_role: NotRequired[RoleArn]

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

image_id instance-attribute

image_id: NotRequired[ImageId]

When configuring your HyperPod cluster, you can specify an image ID using one of the following options:

  • HyperPodPublicAmiId: Use a HyperPod public AMI

  • CustomAmiId: Use your custom AMI

  • default: Use the default latest system image. For clusters with continuous scaling node provisioning mode, new instance groups inherit the AMI from the earliest existing instance group

If you choose to use a custom AMI (CustomAmiId), ensure it meets the following requirements:

  • Encryption: The custom AMI must be unencrypted.

  • Ownership: The custom AMI must be owned by the same Amazon Web Services account that is creating the HyperPod cluster.

  • Volume support: Only the primary AMI snapshot volume is supported; additional AMI volumes are not supported.

When updating the instance group's AMI through the UpdateClusterSoftware operation, if an instance group uses a custom AMI, you must provide an ImageId or use the default as input. Note that if you don't specify an instance group in your UpdateClusterSoftware request, then all of the instance groups are patched with the specified image.

image_release_version instance-attribute

image_release_version: NotRequired[ImageReleaseVersion]

The version of the HyperPod-managed AMI to use for the instance group. Uses semantic versioning in the format MAJOR.MINOR.PATCH (for example, 1.2.3). If omitted, the latest available version is used.

instance_count instance-attribute

instance_count: NotRequired[ClusterInstanceCount]

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

instance_group_name instance-attribute

instance_group_name: NotRequired[ClusterInstanceGroupName]

Specifies the name of the instance group.

instance_requirements instance-attribute

instance_requirements: NotRequired[ClusterInstanceRequirements]

The instance requirements for the instance group, including the instance types to use. Use this to create a flexible instance group that supports multiple instance types. The InstanceType and InstanceRequirements properties are mutually exclusive.

instance_storage_configs instance-attribute

instance_storage_configs: NotRequired[ClusterInstanceStorageConfigs]

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

instance_type instance-attribute

instance_type: NotRequired[ClusterInstanceType]

Specifies the instance type of the instance group.

kubernetes_config instance-attribute

kubernetes_config: NotRequired[ClusterKubernetesConfig]

Specifies the Kubernetes configuration for the instance group. You describe what you want the labels and taints to look like, and the cluster works to reconcile the actual state with the declared state for nodes in this instance group.

life_cycle_config instance-attribute

life_cycle_config: NotRequired[ClusterLifeCycleConfig]

Specifies the LifeCycle configuration for the instance group.

min_instance_count instance-attribute

min_instance_count: NotRequired[ClusterInstanceCount]

Defines the minimum number of instances required for an instance group to become InService. If this threshold isn't met within 3 hours, the instance group rolls back to its previous state - zero instances for new instance groups, or previous settings for existing instance groups. MinInstanceCount only affects the initial transition to InService and does not guarantee maintaining this minimum afterward.

network_interface instance-attribute

network_interface: NotRequired[ClusterNetworkInterface]

The network interface configuration for the instance group.

on_start_deep_health_checks instance-attribute

on_start_deep_health_checks: NotRequired[OnStartDeepHealthChecks]

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

override_vpc_config instance-attribute

override_vpc_config: NotRequired[VpcConfig]

To configure multi-AZ deployments, customize the Amazon VPC configuration at the instance group level. You can specify different subnets and security groups across different AZs in the instance group specification to override a SageMaker HyperPod cluster's default Amazon VPC configuration. For more information about deploying a cluster in multiple AZs, see Setting up SageMaker HyperPod clusters across multiple AZs.

When your Amazon VPC and subnets support IPv6, network communications differ based on the cluster orchestration platform:

  • Slurm-orchestrated clusters automatically configure nodes with dual IPv6 and IPv4 addresses, allowing immediate IPv6 network communications.

  • In Amazon EKS-orchestrated clusters, nodes receive dual-stack addressing, but pods can only use IPv6 when the Amazon EKS cluster is explicitly IPv6-enabled. For information about deploying an IPv6 Amazon EKS cluster, see Amazon EKS IPv6 Cluster Deployment.

Additional resources for IPv6 configuration:

scheduled_update_config instance-attribute

scheduled_update_config: NotRequired[ScheduledUpdateConfig]

The configuration object of the schedule that SageMaker uses to update the AMI.

slurm_config instance-attribute

slurm_config: NotRequired[ClusterSlurmConfig]

Specifies the Slurm configuration for the instance group.

threads_per_core instance-attribute

threads_per_core: NotRequired[ClusterThreadsPerCore]

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.

training_plan_arn instance-attribute

training_plan_arn: NotRequired[TrainingPlanArn]

The Amazon Resource Name (ARN); of the training plan to use for this cluster instance group.

For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .