CfnClusterPropsMixin
- class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnClusterPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-cluster.html
- CloudformationResource:
AWS::SageMaker::Cluster
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # on_demand: Any # spot: Any cfn_cluster_props_mixin = sagemaker_mixins.CfnClusterPropsMixin(sagemaker_mixins.CfnClusterMixinProps( auto_scaling=sagemaker_mixins.CfnClusterPropsMixin.ClusterAutoScalingConfigProperty( auto_scaler_type="autoScalerType", mode="mode" ), cluster_name="clusterName", cluster_role="clusterRole", instance_groups=[sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceGroupProperty( capacity_requirements=sagemaker_mixins.CfnClusterPropsMixin.ClusterCapacityRequirementsProperty( on_demand=on_demand, spot=spot ), current_count=123, execution_role="executionRole", image_id="imageId", instance_count=123, instance_group_name="instanceGroupName", instance_storage_configs=[sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty( ebs_volume_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 ) )], instance_type="instanceType", kubernetes_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesConfigProperty( labels={ "labels_key": "labels" }, taints=[sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesTaintProperty( effect="effect", key="key", value="value" )] ), life_cycle_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterLifeCycleConfigProperty( on_create="onCreate", source_s3_uri="sourceS3Uri" ), on_start_deep_health_checks=["onStartDeepHealthChecks"], override_vpc_config=sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] ), scheduled_update_config=sagemaker_mixins.CfnClusterPropsMixin.ScheduledUpdateConfigProperty( deployment_config=sagemaker_mixins.CfnClusterPropsMixin.DeploymentConfigProperty( auto_rollback_configuration=[sagemaker_mixins.CfnClusterPropsMixin.AlarmDetailsProperty( alarm_name="alarmName" )], rolling_update_policy=sagemaker_mixins.CfnClusterPropsMixin.RollingUpdatePolicyProperty( maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ), rollback_maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ) ), wait_interval_in_seconds=123 ), schedule_expression="scheduleExpression" ), threads_per_core=123, training_plan_arn="trainingPlanArn" )], node_provisioning_mode="nodeProvisioningMode", node_recovery="nodeRecovery", orchestrator=sagemaker_mixins.CfnClusterPropsMixin.OrchestratorProperty( eks=sagemaker_mixins.CfnClusterPropsMixin.ClusterOrchestratorEksConfigProperty( cluster_arn="clusterArn" ) ), restricted_instance_groups=[sagemaker_mixins.CfnClusterPropsMixin.ClusterRestrictedInstanceGroupProperty( current_count=123, environment_config=sagemaker_mixins.CfnClusterPropsMixin.EnvironmentConfigProperty( f_sx_lustre_config=sagemaker_mixins.CfnClusterPropsMixin.FSxLustreConfigProperty( per_unit_storage_throughput=123, size_in_gi_b=123 ) ), execution_role="executionRole", instance_count=123, instance_group_name="instanceGroupName", instance_storage_configs=[sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty( ebs_volume_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 ) )], instance_type="instanceType", on_start_deep_health_checks=["onStartDeepHealthChecks"], override_vpc_config=sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] ), threads_per_core=123, training_plan_arn="trainingPlanArn" )], tags=[CfnTag( key="key", value="value" )], tiered_storage_config=sagemaker_mixins.CfnClusterPropsMixin.TieredStorageConfigProperty( instance_memory_allocation_percentage=123, mode="mode" ), vpc_config=sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SageMaker::Cluster.- Parameters:
props (
Union[CfnClusterMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['autoScaling', 'clusterName', 'clusterRole', 'instanceGroups', 'nodeProvisioningMode', 'nodeRecovery', 'orchestrator', 'restrictedInstanceGroups', 'tags', 'tieredStorageConfig', 'vpcConfig']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AlarmDetailsProperty
- class CfnClusterPropsMixin.AlarmDetailsProperty(*, alarm_name=None)
Bases:
objectThe details of the alarm to monitor during the AMI update.
- Parameters:
alarm_name (
Optional[str]) – The name of the alarm.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins alarm_details_property = sagemaker_mixins.CfnClusterPropsMixin.AlarmDetailsProperty( alarm_name="alarmName" )
Attributes
CapacitySizeConfigProperty
- class CfnClusterPropsMixin.CapacitySizeConfigProperty(*, type=None, value=None)
Bases:
objectThe configuration of the size measurements of the AMI update.
Using this configuration, you can specify whether SageMaker should update your instance group by an amount or percentage of instances.
- Parameters:
type (
Optional[str]) – Specifies whether SageMaker should process the update by amount or percentage of instances.value (
Union[int,float,None]) – Specifies the amount or percentage of instances SageMaker updates at a time.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins capacity_size_config_property = sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 )
Attributes
- type
Specifies whether SageMaker should process the update by amount or percentage of instances.
- value
Specifies the amount or percentage of instances SageMaker updates at a time.
ClusterAutoScalingConfigProperty
- class CfnClusterPropsMixin.ClusterAutoScalingConfigProperty(*, auto_scaler_type=None, mode=None)
Bases:
objectSpecifies the autoscaling configuration for a HyperPod cluster.
- Parameters:
auto_scaler_type (
Optional[str]) – The type of autoscaler to use. Currently supported value isKarpenter. Default: - “Karpenter”mode (
Optional[str]) – Describes whether autoscaling is enabled or disabled for the cluster. Valid values areEnableandDisable.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_auto_scaling_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterAutoScalingConfigProperty( auto_scaler_type="autoScalerType", mode="mode" )
Attributes
- auto_scaler_type
The type of autoscaler to use.
Currently supported value is
Karpenter.
- mode
Describes whether autoscaling is enabled or disabled for the cluster.
Valid values are
EnableandDisable.
ClusterCapacityRequirementsProperty
- class CfnClusterPropsMixin.ClusterCapacityRequirementsProperty(*, on_demand=None, spot=None)
Bases:
objectDefines the instance capacity requirements for an instance group, including configurations for both Spot and On-Demand capacity types.
- Parameters:
on_demand (
Any) – Configuration options specific to On-Demand instances.spot (
Any) – Configuration options specific to Spot instances.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # on_demand: Any # spot: Any cluster_capacity_requirements_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterCapacityRequirementsProperty( on_demand=on_demand, spot=spot )
Attributes
- on_demand
Configuration options specific to On-Demand instances.
- spot
Configuration options specific to Spot instances.
ClusterEbsVolumeConfigProperty
- class CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty(*, root_volume=None, volume_kms_key_id=None, volume_size_in_gb=None)
Bases:
objectDefines the configuration for attaching an additional Amazon Elastic Block Store (EBS) volume to each instance of the SageMaker HyperPod cluster instance group.
To learn more, see SageMaker HyperPod release notes: June 20, 2024 .
- Parameters:
root_volume (
Union[bool,IResolvable,None]) – Specifies whether the configuration is for the cluster’s root or secondary Amazon EBS volume. You can specify twoClusterEbsVolumeConfigfields to configure both the root and secondary volumes. Set the value toTrueif you’d like to provide your own customer managed AWS KMS key to encrypt the root volume. WhenTrue: - The configuration is applied to the root volume. - You can’t specify theVolumeSizeInGBfield. The size of the root volume is determined for you. - You must specify a KMS key ID forVolumeKmsKeyIdto encrypt the root volume with your own KMS key instead of an AWS owned KMS key. Otherwise, by default, the value isFalse, and the following applies: - The configuration is applied to the secondary volume, while the root volume is encrypted with an AWS owned key. - You must specify theVolumeSizeInGBfield. - You can optionally specify theVolumeKmsKeyIdto encrypt the secondary volume with your own KMS key instead of an AWS owned KMS key.volume_kms_key_id (
Optional[str]) – The ID of a KMS key to encrypt the Amazon EBS volume.volume_size_in_gb (
Union[int,float,None]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_ebs_volume_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 )
Attributes
- root_volume
Specifies whether the configuration is for the cluster’s root or secondary Amazon EBS volume.
You can specify two
ClusterEbsVolumeConfigfields to configure both the root and secondary volumes. Set the value toTrueif you’d like to provide your own customer managed AWS KMS key to encrypt the root volume. WhenTrue:The configuration is applied to the root volume.
You can’t specify the
VolumeSizeInGBfield. The size of the root volume is determined for you.You must specify a KMS key ID for
VolumeKmsKeyIdto encrypt the root volume with your own KMS key instead of an AWS owned KMS key.
Otherwise, by default, the value is
False, and the following applies:The configuration is applied to the secondary volume, while the root volume is encrypted with an AWS owned key.
You must specify the
VolumeSizeInGBfield.You can optionally specify the
VolumeKmsKeyIdto encrypt the secondary volume with your own KMS key instead of an AWS owned KMS key.
- volume_kms_key_id
The ID of a KMS key to encrypt the Amazon EBS volume.
- volume_size_in_gb
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.
ClusterInstanceGroupProperty
- class CfnClusterPropsMixin.ClusterInstanceGroupProperty(*, capacity_requirements=None, current_count=None, execution_role=None, image_id=None, instance_count=None, instance_group_name=None, instance_storage_configs=None, instance_type=None, kubernetes_config=None, life_cycle_config=None, on_start_deep_health_checks=None, override_vpc_config=None, scheduled_update_config=None, threads_per_core=None, training_plan_arn=None)
Bases:
objectThe configuration information of the instance group within the HyperPod cluster.
- Parameters:
capacity_requirements (
Union[IResolvable,ClusterCapacityRequirementsProperty,Dict[str,Any],None]) – Specifies the capacity requirements configuration for an instance group.current_count (
Union[int,float,None]) – The number of instances that are currently in the instance group of a SageMaker HyperPod cluster.execution_role (
Optional[str]) – The execution role for the instance group to assume.image_id (
Optional[str]) – AMI Id to be used for launching EC2 instances - HyperPodPublicAmiId or CustomAmiId.instance_count (
Union[int,float,None]) – The number of instances in an instance group of the SageMaker HyperPod cluster.instance_group_name (
Optional[str]) – The name of the instance group of a SageMaker HyperPod cluster.instance_storage_configs (
Union[IResolvable,Sequence[Union[IResolvable,ClusterInstanceStorageConfigProperty,Dict[str,Any]]],None]) – The configurations of additional storage specified to the instance group where the instance (node) is launched.instance_type (
Optional[str]) – The instance type of the instance group of a SageMaker HyperPod cluster.kubernetes_config (
Union[IResolvable,ClusterKubernetesConfigProperty,Dict[str,Any],None]) – Kubernetes configuration for cluster nodes including labels and taints.life_cycle_config (
Union[IResolvable,ClusterLifeCycleConfigProperty,Dict[str,Any],None]) – The lifecycle configuration for a SageMaker HyperPod cluster.on_start_deep_health_checks (
Optional[Sequence[str]]) – A flag indicating whether deep health checks should be performed when the HyperPod cluster instance group is created or updated. Deep health checks are comprehensive, invasive tests that validate the health of the underlying hardware and infrastructure components.override_vpc_config (
Union[IResolvable,VpcConfigProperty,Dict[str,Any],None]) – The customized Amazon VPC configuration at the instance group level that overrides the default Amazon VPC configuration of the SageMaker HyperPod cluster.scheduled_update_config (
Union[IResolvable,ScheduledUpdateConfigProperty,Dict[str,Any],None]) – The configuration object of the schedule that SageMaker follows when updating the AMI.threads_per_core (
Union[int,float,None]) – The number of threads per CPU core you specified underCreateCluster.training_plan_arn (
Optional[str]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # on_demand: Any # spot: Any cluster_instance_group_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceGroupProperty( capacity_requirements=sagemaker_mixins.CfnClusterPropsMixin.ClusterCapacityRequirementsProperty( on_demand=on_demand, spot=spot ), current_count=123, execution_role="executionRole", image_id="imageId", instance_count=123, instance_group_name="instanceGroupName", instance_storage_configs=[sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty( ebs_volume_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 ) )], instance_type="instanceType", kubernetes_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesConfigProperty( labels={ "labels_key": "labels" }, taints=[sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesTaintProperty( effect="effect", key="key", value="value" )] ), life_cycle_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterLifeCycleConfigProperty( on_create="onCreate", source_s3_uri="sourceS3Uri" ), on_start_deep_health_checks=["onStartDeepHealthChecks"], override_vpc_config=sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] ), scheduled_update_config=sagemaker_mixins.CfnClusterPropsMixin.ScheduledUpdateConfigProperty( deployment_config=sagemaker_mixins.CfnClusterPropsMixin.DeploymentConfigProperty( auto_rollback_configuration=[sagemaker_mixins.CfnClusterPropsMixin.AlarmDetailsProperty( alarm_name="alarmName" )], rolling_update_policy=sagemaker_mixins.CfnClusterPropsMixin.RollingUpdatePolicyProperty( maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ), rollback_maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ) ), wait_interval_in_seconds=123 ), schedule_expression="scheduleExpression" ), threads_per_core=123, training_plan_arn="trainingPlanArn" )
Attributes
- capacity_requirements
Specifies the capacity requirements configuration for an instance group.
- current_count
The number of instances that are currently in the instance group of a SageMaker HyperPod cluster.
- execution_role
The execution role for the instance group to assume.
- image_id
AMI Id to be used for launching EC2 instances - HyperPodPublicAmiId or CustomAmiId.
- instance_count
The number of instances in an instance group of the SageMaker HyperPod cluster.
- instance_group_name
The name of the instance group of a SageMaker HyperPod cluster.
- instance_storage_configs
The configurations of additional storage specified to the instance group where the instance (node) is launched.
- instance_type
The instance type of the instance group of a SageMaker HyperPod cluster.
- kubernetes_config
Kubernetes configuration for cluster nodes including labels and taints.
- life_cycle_config
The lifecycle configuration for a SageMaker HyperPod cluster.
- on_start_deep_health_checks
A flag indicating whether deep health checks should be performed when the HyperPod cluster instance group is created or updated.
Deep health checks are comprehensive, invasive tests that validate the health of the underlying hardware and infrastructure components.
- override_vpc_config
The customized Amazon VPC configuration at the instance group level that overrides the default Amazon VPC configuration of the SageMaker HyperPod cluster.
- scheduled_update_config
The configuration object of the schedule that SageMaker follows when updating the AMI.
- threads_per_core
The number of threads per CPU core you specified under
CreateCluster.
- training_plan_arn
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.
ClusterInstanceStorageConfigProperty
- class CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty(*, ebs_volume_config=None)
Bases:
objectDefines 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 .
- Parameters:
ebs_volume_config (
Union[IResolvable,ClusterEbsVolumeConfigProperty,Dict[str,Any],None]) – 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.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_instance_storage_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty( ebs_volume_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 ) )
Attributes
- ebs_volume_config
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.
ClusterKubernetesConfigProperty
- class CfnClusterPropsMixin.ClusterKubernetesConfigProperty(*, labels=None, taints=None)
Bases:
objectKubernetes configuration that specifies labels and taints to be applied to cluster nodes in an instance group.
- Parameters:
labels (
Union[Mapping[str,str],IResolvable,None]) – Key-value pairs of labels to be applied to cluster nodes.taints (
Union[IResolvable,Sequence[Union[IResolvable,ClusterKubernetesTaintProperty,Dict[str,Any]]],None]) – List of taints to be applied to cluster nodes.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_kubernetes_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesConfigProperty( labels={ "labels_key": "labels" }, taints=[sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesTaintProperty( effect="effect", key="key", value="value" )] )
Attributes
- labels
Key-value pairs of labels to be applied to cluster nodes.
- taints
List of taints to be applied to cluster nodes.
ClusterKubernetesTaintProperty
- class CfnClusterPropsMixin.ClusterKubernetesTaintProperty(*, effect=None, key=None, value=None)
Bases:
objectA Kubernetes taint that can be applied to cluster nodes.
- Parameters:
effect (
Optional[str]) – The effect of the taint. Valid values areNoSchedule,PreferNoSchedule, andNoExecute.key (
Optional[str]) – The key of the taint.value (
Optional[str]) – The value of the taint.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_kubernetes_taint_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterKubernetesTaintProperty( effect="effect", key="key", value="value" )
Attributes
- effect
The effect of the taint.
Valid values are
NoSchedule,PreferNoSchedule, andNoExecute.
- key
The key of the taint.
ClusterLifeCycleConfigProperty
- class CfnClusterPropsMixin.ClusterLifeCycleConfigProperty(*, on_create=None, source_s3_uri=None)
Bases:
objectThe lifecycle configuration for a SageMaker HyperPod cluster.
- Parameters:
on_create (
Optional[str]) – The file name of the entrypoint script of lifecycle scripts underSourceS3Uri. This entrypoint script runs during cluster creation.source_s3_uri (
Optional[str]) – An Amazon S3 bucket path where your lifecycle scripts are stored. .. epigraph:: Make sure that the S3 bucket path starts withs3://sagemaker-. The IAM role for SageMaker HyperPod has the managed`AmazonSageMakerClusterInstanceRolePolicy<https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol-cluster.html>`_ attached, which allows access to S3 buckets with the specific prefixsagemaker-.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_life_cycle_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterLifeCycleConfigProperty( on_create="onCreate", source_s3_uri="sourceS3Uri" )
Attributes
- on_create
The file name of the entrypoint script of lifecycle scripts under
SourceS3Uri.This entrypoint script runs during cluster creation.
- source_s3_uri
An Amazon S3 bucket path where your lifecycle scripts are stored.
Make sure that the S3 bucket path starts with
s3://sagemaker-. The IAM role for SageMaker HyperPod has the managed`AmazonSageMakerClusterInstanceRolePolicy<https://docs.aws.amazon.com/sagemaker/latest/dg/security-iam-awsmanpol-cluster.html>`_ attached, which allows access to S3 buckets with the specific prefixsagemaker-.
ClusterOrchestratorEksConfigProperty
- class CfnClusterPropsMixin.ClusterOrchestratorEksConfigProperty(*, cluster_arn=None)
Bases:
objectThe configuration for the Amazon EKS cluster that is used as the orchestrator for the SageMaker HyperPod cluster.
This includes the Amazon Resource Name (ARN) of the EKS cluster
- Parameters:
cluster_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_orchestrator_eks_config_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterOrchestratorEksConfigProperty( cluster_arn="clusterArn" )
Attributes
- cluster_arn
The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.
ClusterRestrictedInstanceGroupProperty
- class CfnClusterPropsMixin.ClusterRestrictedInstanceGroupProperty(*, current_count=None, environment_config=None, execution_role=None, instance_count=None, instance_group_name=None, instance_storage_configs=None, instance_type=None, on_start_deep_health_checks=None, override_vpc_config=None, threads_per_core=None, training_plan_arn=None)
Bases:
objectDetails of a restricted instance group in a SageMaker HyperPod cluster.
- Parameters:
current_count (
Union[int,float,None]) – The number of instances that are currently in the restricted instance group of a SageMaker HyperPod cluster.environment_config (
Union[IResolvable,EnvironmentConfigProperty,Dict[str,Any],None]) – The configuration for the restricted instance groups (RIG) environment.execution_role (
Optional[str]) – The execution role for the instance group to assume.instance_count (
Union[int,float,None]) – The number of instances you specified to add to the restricted instance group of a SageMaker HyperPod cluster.instance_group_name (
Optional[str]) – The name of the instance group of a SageMaker HyperPod cluster.instance_storage_configs (
Union[IResolvable,Sequence[Union[IResolvable,ClusterInstanceStorageConfigProperty,Dict[str,Any]]],None]) – The instance storage configuration for the instance group.instance_type (
Optional[str]) – The instance type of the instance group of a SageMaker HyperPod cluster.on_start_deep_health_checks (
Optional[Sequence[str]]) – Nodes will undergo advanced stress test to detect and replace faulty instances, based on the type of deep health check(s) passed in.override_vpc_config (
Union[IResolvable,VpcConfigProperty,Dict[str,Any],None]) – 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.threads_per_core (
Union[int,float,None]) – 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.training_plan_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the training plan to use for this cluster restricted instance group. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins cluster_restricted_instance_group_property = sagemaker_mixins.CfnClusterPropsMixin.ClusterRestrictedInstanceGroupProperty( current_count=123, environment_config=sagemaker_mixins.CfnClusterPropsMixin.EnvironmentConfigProperty( f_sx_lustre_config=sagemaker_mixins.CfnClusterPropsMixin.FSxLustreConfigProperty( per_unit_storage_throughput=123, size_in_gi_b=123 ) ), execution_role="executionRole", instance_count=123, instance_group_name="instanceGroupName", instance_storage_configs=[sagemaker_mixins.CfnClusterPropsMixin.ClusterInstanceStorageConfigProperty( ebs_volume_config=sagemaker_mixins.CfnClusterPropsMixin.ClusterEbsVolumeConfigProperty( root_volume=False, volume_kms_key_id="volumeKmsKeyId", volume_size_in_gb=123 ) )], instance_type="instanceType", on_start_deep_health_checks=["onStartDeepHealthChecks"], override_vpc_config=sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] ), threads_per_core=123, training_plan_arn="trainingPlanArn" )
Attributes
- current_count
The number of instances that are currently in the restricted instance group of a SageMaker HyperPod cluster.
- environment_config
The configuration for the restricted instance groups (RIG) environment.
- execution_role
The execution role for the instance group to assume.
- instance_count
The number of instances you specified to add to the restricted instance group of a SageMaker HyperPod cluster.
- instance_group_name
The name of the instance group of a SageMaker HyperPod cluster.
- instance_storage_configs
The instance storage configuration for the instance group.
- instance_type
The instance type of the instance group of a SageMaker HyperPod cluster.
- on_start_deep_health_checks
Nodes will undergo advanced stress test to detect and replace faulty instances, based on the type of deep health check(s) passed in.
- override_vpc_config
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.
- threads_per_core
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.
- training_plan_arn
The Amazon Resource Name (ARN) of the training plan to use for this cluster restricted instance group.
For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan.
DeploymentConfigProperty
- class CfnClusterPropsMixin.DeploymentConfigProperty(*, auto_rollback_configuration=None, rolling_update_policy=None, wait_interval_in_seconds=None)
Bases:
objectThe deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
- Parameters:
auto_rollback_configuration (
Union[IResolvable,Sequence[Union[IResolvable,AlarmDetailsProperty,Dict[str,Any]]],None]) – Automatic rollback configuration for handling endpoint deployment failures and recovery.rolling_update_policy (
Union[IResolvable,RollingUpdatePolicyProperty,Dict[str,Any],None]) – Specifies a rolling deployment strategy for updating a SageMaker endpoint.wait_interval_in_seconds (
Union[int,float,None]) – The duration in seconds that SageMaker waits before updating more instances in the cluster.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins deployment_config_property = sagemaker_mixins.CfnClusterPropsMixin.DeploymentConfigProperty( auto_rollback_configuration=[sagemaker_mixins.CfnClusterPropsMixin.AlarmDetailsProperty( alarm_name="alarmName" )], rolling_update_policy=sagemaker_mixins.CfnClusterPropsMixin.RollingUpdatePolicyProperty( maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ), rollback_maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ) ), wait_interval_in_seconds=123 )
Attributes
- auto_rollback_configuration
Automatic rollback configuration for handling endpoint deployment failures and recovery.
- rolling_update_policy
Specifies a rolling deployment strategy for updating a SageMaker endpoint.
- wait_interval_in_seconds
The duration in seconds that SageMaker waits before updating more instances in the cluster.
EnvironmentConfigProperty
- class CfnClusterPropsMixin.EnvironmentConfigProperty(*, f_sx_lustre_config=None)
Bases:
objectThe configuration for the restricted instance groups (RIG) environment.
- Parameters:
f_sx_lustre_config (
Union[IResolvable,FSxLustreConfigProperty,Dict[str,Any],None]) – Configuration settings for an Amazon FSx for Lustre file system to be used with the cluster.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins environment_config_property = sagemaker_mixins.CfnClusterPropsMixin.EnvironmentConfigProperty( f_sx_lustre_config=sagemaker_mixins.CfnClusterPropsMixin.FSxLustreConfigProperty( per_unit_storage_throughput=123, size_in_gi_b=123 ) )
Attributes
- f_sx_lustre_config
Configuration settings for an Amazon FSx for Lustre file system to be used with the cluster.
FSxLustreConfigProperty
- class CfnClusterPropsMixin.FSxLustreConfigProperty(*, per_unit_storage_throughput=None, size_in_gib=None)
Bases:
objectConfiguration settings for an Amazon FSx for Lustre file system to be used with the cluster.
- Parameters:
per_unit_storage_throughput (
Union[int,float,None]) – The throughput capacity of the Amazon FSx for Lustre file system, measured in MB/s per TiB of storage.size_in_gib (
Union[int,float,None]) – The storage capacity of the Amazon FSx for Lustre file system, specified in gibibytes (GiB).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins f_sx_lustre_config_property = sagemaker_mixins.CfnClusterPropsMixin.FSxLustreConfigProperty( per_unit_storage_throughput=123, size_in_gi_b=123 )
Attributes
- per_unit_storage_throughput
The throughput capacity of the Amazon FSx for Lustre file system, measured in MB/s per TiB of storage.
- size_in_gib
The storage capacity of the Amazon FSx for Lustre file system, specified in gibibytes (GiB).
OrchestratorProperty
- class CfnClusterPropsMixin.OrchestratorProperty(*, eks=None)
Bases:
objectThe orchestrator for a SageMaker HyperPod cluster.
- Parameters:
eks (
Union[IResolvable,ClusterOrchestratorEksConfigProperty,Dict[str,Any],None]) – The configuration of the Amazon EKS orchestrator cluster for the SageMaker HyperPod cluster.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins orchestrator_property = sagemaker_mixins.CfnClusterPropsMixin.OrchestratorProperty( eks=sagemaker_mixins.CfnClusterPropsMixin.ClusterOrchestratorEksConfigProperty( cluster_arn="clusterArn" ) )
Attributes
- eks
The configuration of the Amazon EKS orchestrator cluster for the SageMaker HyperPod cluster.
RollingUpdatePolicyProperty
- class CfnClusterPropsMixin.RollingUpdatePolicyProperty(*, maximum_batch_size=None, rollback_maximum_batch_size=None)
Bases:
objectSpecifies a rolling deployment strategy for updating a SageMaker endpoint.
- Parameters:
maximum_batch_size (
Union[IResolvable,CapacitySizeConfigProperty,Dict[str,Any],None]) – Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant’s total instance count.rollback_maximum_batch_size (
Union[IResolvable,CapacitySizeConfigProperty,Dict[str,Any],None]) – Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins rolling_update_policy_property = sagemaker_mixins.CfnClusterPropsMixin.RollingUpdatePolicyProperty( maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ), rollback_maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ) )
Attributes
- maximum_batch_size
Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet.
Value must be between 5% to 50% of the variant’s total instance count.
- rollback_maximum_batch_size
Batch size for rollback to the old endpoint fleet.
Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.
ScheduledUpdateConfigProperty
- class CfnClusterPropsMixin.ScheduledUpdateConfigProperty(*, deployment_config=None, schedule_expression=None)
Bases:
objectThe configuration object of the schedule that SageMaker follows when updating the AMI.
- Parameters:
deployment_config (
Union[IResolvable,DeploymentConfigProperty,Dict[str,Any],None]) – The configuration to use when updating the AMI versions.schedule_expression (
Optional[str]) – A cron expression that specifies the schedule that SageMaker follows when updating the AMI.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins scheduled_update_config_property = sagemaker_mixins.CfnClusterPropsMixin.ScheduledUpdateConfigProperty( deployment_config=sagemaker_mixins.CfnClusterPropsMixin.DeploymentConfigProperty( auto_rollback_configuration=[sagemaker_mixins.CfnClusterPropsMixin.AlarmDetailsProperty( alarm_name="alarmName" )], rolling_update_policy=sagemaker_mixins.CfnClusterPropsMixin.RollingUpdatePolicyProperty( maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ), rollback_maximum_batch_size=sagemaker_mixins.CfnClusterPropsMixin.CapacitySizeConfigProperty( type="type", value=123 ) ), wait_interval_in_seconds=123 ), schedule_expression="scheduleExpression" )
Attributes
- deployment_config
The configuration to use when updating the AMI versions.
- schedule_expression
A cron expression that specifies the schedule that SageMaker follows when updating the AMI.
TieredStorageConfigProperty
- class CfnClusterPropsMixin.TieredStorageConfigProperty(*, instance_memory_allocation_percentage=None, mode=None)
Bases:
objectConfiguration for tiered storage in the SageMaker HyperPod cluster.
- Parameters:
instance_memory_allocation_percentage (
Union[int,float,None]) – The percentage of instance memory to allocate for tiered storage.mode (
Optional[str]) – The mode of tiered storage.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins tiered_storage_config_property = sagemaker_mixins.CfnClusterPropsMixin.TieredStorageConfigProperty( instance_memory_allocation_percentage=123, mode="mode" )
Attributes
- instance_memory_allocation_percentage
The percentage of instance memory to allocate for tiered storage.
VpcConfigProperty
- class CfnClusterPropsMixin.VpcConfigProperty(*, security_group_ids=None, subnets=None)
Bases:
objectSpecifies 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 .
- Parameters:
security_group_ids (
Optional[Sequence[str]]) – The VPC security group IDs, in the formsg-xxxxxxxx. Specify the security groups for the VPC that is specified in theSubnetsfield.subnets (
Optional[Sequence[str]]) – 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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins vpc_config_property = sagemaker_mixins.CfnClusterPropsMixin.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnets=["subnets"] )
Attributes
- security_group_ids
The VPC security group IDs, in the form
sg-xxxxxxxx.Specify the security groups for the VPC that is specified in the
Subnetsfield.
- subnets
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 .