create_cluster
async
¶
create_cluster(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = 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/async_sage_maker.py
3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 | |