create_cluster
¶
create_cluster(
*,
config_overrides: Optional[SageMakerClientConfig] = None,
cluster_name: Optional[ClusterName] = None,
instance_groups: Optional[ClusterInstanceGroupSpecifications] = None,
restricted_instance_groups: Optional[
ClusterRestrictedInstanceGroupSpecifications
] = None,
restricted_instance_groups_config: Optional[
ClusterRestrictedInstanceGroupsConfig
] = None,
vpc_config: Optional[VpcConfig] = None,
tags: Optional[TagList] = None,
orchestrator: Optional[ClusterOrchestrator] = None,
node_recovery: Optional[ClusterNodeRecovery] = None,
tiered_storage_config: Optional[ClusterTieredStorageConfig] = None,
node_provisioning_mode: Optional[ClusterNodeProvisioningMode] = None,
cluster_role: Optional[RoleArn] = None,
auto_scaling: Optional[ClusterAutoScalingConfig] = None,
) -> CreateClusterResponse
Creates an Amazon 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.
Parameters:
-
cluster_name(Optional[ClusterName], default:None) –The name for the new SageMaker HyperPod cluster.
-
instance_groups(Optional[ClusterInstanceGroupSpecifications], default:None) –The instance groups to be created in the SageMaker HyperPod cluster.
-
restricted_instance_groups(Optional[ClusterRestrictedInstanceGroupSpecifications], default:None) –The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.
-
restricted_instance_groups_config(Optional[ClusterRestrictedInstanceGroupsConfig], default:None) –The configuration for the restricted instance groups (RIG) in the SageMaker HyperPod cluster.
-
vpc_config(Optional[VpcConfig], default:None) –Specifies the Amazon Virtual Private Cloud (VPC) that is associated with the Amazon SageMaker HyperPod cluster. You can control access to and from your resources by configuring your VPC. For more information, see Give SageMaker access to resources in your Amazon VPC.
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:
-
For information about adding IPv6 support to your VPC, see to IPv6 Support for VPC.
-
For information about creating a new IPv6-compatible VPC, see Amazon VPC Creation Guide.
-
To configure SageMaker HyperPod with a custom Amazon VPC, see Custom Amazon VPC Setup for SageMaker HyperPod.
-
-
tags(Optional[TagList], default:None) –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.
-
orchestrator(Optional[ClusterOrchestrator], default:None) –The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, supported values are
"Eks"and"Slurm", which is to use an Amazon Elastic Kubernetes Service or Slurm cluster as the orchestrator.If you specify the
Orchestratorfield, you must provide exactly one orchestrator configuration: eitherEksorSlurm. Specifying both or providing an empty configuration returns a validation error. -
node_recovery(Optional[ClusterNodeRecovery], default:None) –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 toNone, cluster administrators will need to manually manage any faulty cluster instances. -
tiered_storage_config(Optional[ClusterTieredStorageConfig], default:None) –The configuration for managed tier checkpointing on the HyperPod cluster. When enabled, this feature uses a multi-tier storage approach for storing model checkpoints, providing faster checkpoint operations and improved fault tolerance across cluster nodes.
-
node_provisioning_mode(Optional[ClusterNodeProvisioningMode], default:None) –The mode for provisioning nodes in the cluster. You can specify the following modes:
-
Continuous: Scaling behavior that enables 1) concurrent operation execution within instance groups, 2) continuous retry mechanisms for failed operations, 3) enhanced customer visibility into cluster events through detailed event streams, 4) partial provisioning capabilities. Your clusters and instance groups remain
InServicewhile scaling. This mode is only supported for EKS orchestrated clusters.
-
-
cluster_role(Optional[RoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes to perform cluster autoscaling operations. This role must have permissions for
sagemaker:BatchAddClusterNodesandsagemaker:BatchDeleteClusterNodes. This is only required when autoscaling is enabled and when HyperPod is performing autoscaling operations. -
auto_scaling(Optional[ClusterAutoScalingConfig], default:None) –The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system.
Raises:
-
ResourceInUse–Resource being accessed is in use.
-
ResourceLimitExceeded–You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 | |