From 73bf7fce77b05c4567ccb47db52b7a913339d588 Mon Sep 17 00:00:00 2001 From: sagemaker-bot Date: Fri, 2 May 2025 10:08:32 +0000 Subject: [PATCH] Daily Sync with Botocore v1.38.7 on 2025/05/02 --- sample/sagemaker/2017-07-24/service-2.json | 161 +++++++++++++++++- .../main/code_injection/shape_dag.py | 83 ++++++++- src/sagemaker_core/main/resources.py | 16 +- src/sagemaker_core/main/shapes.py | 96 +++++++++++ 4 files changed, 341 insertions(+), 15 deletions(-) diff --git a/sample/sagemaker/2017-07-24/service-2.json b/sample/sagemaker/2017-07-24/service-2.json index ea2098e7..f7f5be43 100644 --- a/sample/sagemaker/2017-07-24/service-2.json +++ b/sample/sagemaker/2017-07-24/service-2.json @@ -447,7 +447,7 @@ {"shape":"ResourceInUse"}, {"shape":"ResourceLimitExceeded"} ], - "documentation":"

Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.

A hyperparameter tuning job automatically creates Amazon SageMaker experiments, trials, and trial components for each training job that it runs. You can view these entities in Amazon SageMaker Studio. For more information, see View Experiments, Trials, and Trial Components.

Do not include any security-sensitive information including account access IDs, secrets or tokens in any hyperparameter field. If the use of security-sensitive credentials are detected, SageMaker will reject your training job request and return an exception error.

" + "documentation":"

Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.

A hyperparameter tuning job automatically creates Amazon SageMaker experiments, trials, and trial components for each training job that it runs. You can view these entities in Amazon SageMaker Studio. For more information, see View Experiments, Trials, and Trial Components.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields..

" }, "CreateImage":{ "name":"CreateImage", @@ -857,7 +857,7 @@ {"shape":"ResourceLimitExceeded"}, {"shape":"ResourceNotFound"} ], - "documentation":"

Starts a model training job. After training completes, SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

If you choose to host your model using SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than SageMaker, provided that you know how to use them for inference.

In the request body, you provide the following:

For more information about SageMaker, see How It Works.

" + "documentation":"

Starts a model training job. After training completes, SageMaker saves the resulting model artifacts to an Amazon S3 location that you specify.

If you choose to host your model using SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts in a machine learning service other than SageMaker, provided that you know how to use them for inference.

In the request body, you provide the following:

For more information about SageMaker, see How It Works.

" }, "CreateTrainingPlan":{ "name":"CreateTrainingPlan", @@ -4728,6 +4728,17 @@ }, "documentation":"

An Amazon CloudWatch alarm configured to monitor metrics on an endpoint.

" }, + "AlarmDetails":{ + "type":"structure", + "required":["AlarmName"], + "members":{ + "AlarmName":{ + "shape":"AlarmName", + "documentation":"

The name of the alarm.

" + } + }, + "documentation":"

The details of the alarm to monitor during the AMI update.

" + }, "AlarmList":{ "type":"list", "member":{"shape":"Alarm"}, @@ -6437,6 +6448,12 @@ "max":100, "min":0 }, + "AutoRollbackAlarms":{ + "type":"list", + "member":{"shape":"AlarmDetails"}, + "max":10, + "min":1 + }, "AutoRollbackConfig":{ "type":"structure", "members":{ @@ -6992,6 +7009,24 @@ }, "documentation":"

Specifies the type and size of the endpoint capacity to activate for a blue/green deployment, a rolling deployment, or a rollback strategy. You can specify your batches as either instance count or the overall percentage or your fleet.

For a rollback strategy, if you don't specify the fields in this object, or if you set the Value to 100%, then SageMaker uses a blue/green rollback strategy and rolls all traffic back to the blue fleet.

" }, + "CapacitySizeConfig":{ + "type":"structure", + "required":[ + "Type", + "Value" + ], + "members":{ + "Type":{ + "shape":"NodeUnavailabilityType", + "documentation":"

Specifies whether SageMaker should process the update by amount or percentage of instances.

" + }, + "Value":{ + "shape":"NodeUnavailabilityValue", + "documentation":"

Specifies the amount or percentage of instances SageMaker updates at a time.

" + } + }, + "documentation":"

The 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.

" + }, "CapacitySizeType":{ "type":"string", "enum":[ @@ -7687,6 +7722,10 @@ "OverrideVpcConfig":{ "shape":"VpcConfig", "documentation":"

The customized Amazon VPC configuration at the instance group level that overrides the default Amazon VPC configuration of the SageMaker HyperPod cluster.

" + }, + "ScheduledUpdateConfig":{ + "shape":"ScheduledUpdateConfig", + "documentation":"

The configuration object of the schedule that SageMaker follows when updating the AMI.

" } }, "documentation":"

Details of an instance group in a SageMaker HyperPod cluster.

" @@ -7750,6 +7789,10 @@ "OverrideVpcConfig":{ "shape":"VpcConfig", "documentation":"

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:

Additional resources for IPv6 configuration:

" + }, + "ScheduledUpdateConfig":{ + "shape":"ScheduledUpdateConfig", + "documentation":"

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

" } }, "documentation":"

The specifications of an instance group that you need to define.

" @@ -7996,6 +8039,10 @@ "shape":"Timestamp", "documentation":"

The time when the instance is launched.

" }, + "LastSoftwareUpdateTime":{ + "shape":"Timestamp", + "documentation":"

The time of when the cluster was last updated.

" + }, "LifeCycleConfig":{ "shape":"ClusterLifeCycleConfig", "documentation":"

The LifeCycle configuration applied to the instance.

" @@ -8080,6 +8127,10 @@ "shape":"Timestamp", "documentation":"

The time when the instance is launched.

" }, + "LastSoftwareUpdateTime":{ + "shape":"Timestamp", + "documentation":"

The time of when SageMaker last updated the software of the instances in the cluster.

" + }, "InstanceStatus":{ "shape":"ClusterInstanceStatusDetails", "documentation":"

The status of the instance.

" @@ -11585,7 +11636,7 @@ }, "Environment":{ "shape":"ProcessingEnvironmentMap", - "documentation":"

The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.

" + "documentation":"

The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.

" }, "NetworkConfig":{ "shape":"NetworkConfig", @@ -11597,7 +11648,7 @@ }, "Tags":{ "shape":"TagList", - "documentation":"

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

" + "documentation":"

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request tag variable or plain text fields.

" }, "ExperimentConfig":{"shape":"ExperimentConfig"} } @@ -11749,7 +11800,7 @@ }, "HyperParameters":{ "shape":"HyperParameters", - "documentation":"

Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms.

You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint.

Do not include any security-sensitive information including account access IDs, secrets or tokens in any hyperparameter field. If the use of security-sensitive credentials are detected, SageMaker will reject your training job request and return an exception error.

" + "documentation":"

Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms.

You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields.

" }, "AlgorithmSpecification":{ "shape":"AlgorithmSpecification", @@ -11781,7 +11832,7 @@ }, "Tags":{ "shape":"TagList", - "documentation":"

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

" + "documentation":"

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields.

" }, "EnableNetworkIsolation":{ "shape":"Boolean", @@ -11813,7 +11864,7 @@ }, "Environment":{ "shape":"TrainingEnvironmentMap", - "documentation":"

The environment variables to set in the Docker container.

" + "documentation":"

The environment variables to set in the Docker container.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.

" }, "RetryStrategy":{ "shape":"RetryStrategy", @@ -12163,6 +12214,11 @@ } }, "CreationTime":{"type":"timestamp"}, + "CronScheduleExpression":{ + "type":"string", + "max":256, + "min":1 + }, "CrossAccountFilterOption":{ "type":"string", "enum":[ @@ -13580,6 +13636,24 @@ }, "documentation":"

The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.

" }, + "DeploymentConfiguration":{ + "type":"structure", + "members":{ + "RollingUpdatePolicy":{ + "shape":"RollingDeploymentPolicy", + "documentation":"

The policy that SageMaker uses when updating the AMI versions of the cluster.

" + }, + "WaitIntervalInSeconds":{ + "shape":"WaitTimeIntervalInSeconds", + "documentation":"

The duration in seconds that SageMaker waits before updating more instances in the cluster.

" + }, + "AutoRollbackConfiguration":{ + "shape":"AutoRollbackAlarms", + "documentation":"

An array that contains the alarms that SageMaker monitors to know whether to roll back the AMI update.

" + } + }, + "documentation":"

The configuration to use when updating the AMI versions.

" + }, "DeploymentRecommendation":{ "type":"structure", "required":["RecommendationStatus"], @@ -17946,7 +18020,7 @@ }, "Environment":{ "shape":"TrainingEnvironmentMap", - "documentation":"

The environment variables to set in the Docker container.

" + "documentation":"

The environment variables to set in the Docker container.

Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.

" }, "RetryStrategy":{ "shape":"RetryStrategy", @@ -31503,6 +31577,17 @@ "max":8192, "pattern":".*" }, + "NodeUnavailabilityType":{ + "type":"string", + "enum":[ + "INSTANCE_COUNT", + "CAPACITY_PERCENTAGE" + ] + }, + "NodeUnavailabilityValue":{ + "type":"integer", + "min":1 + }, "NonEmptyString256":{ "type":"string", "max":256, @@ -35995,6 +36080,21 @@ "min":20, "pattern":"^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$" }, + "RollingDeploymentPolicy":{ + "type":"structure", + "required":["MaximumBatchSize"], + "members":{ + "MaximumBatchSize":{ + "shape":"CapacitySizeConfig", + "documentation":"

The maximum amount of instances in the cluster that SageMaker can update at a time.

" + }, + "RollbackMaximumBatchSize":{ + "shape":"CapacitySizeConfig", + "documentation":"

The maximum amount of instances in the cluster that SageMaker can roll back at a time.

" + } + }, + "documentation":"

The configurations that SageMaker uses when updating the AMI versions.

" + }, "RollingUpdatePolicy":{ "type":"structure", "required":[ @@ -36328,6 +36428,21 @@ "Stopped" ] }, + "ScheduledUpdateConfig":{ + "type":"structure", + "required":["ScheduleExpression"], + "members":{ + "ScheduleExpression":{ + "shape":"CronScheduleExpression", + "documentation":"

A cron expression that specifies the schedule that SageMaker follows when updating the AMI.

" + }, + "DeploymentConfig":{ + "shape":"DeploymentConfiguration", + "documentation":"

The configuration to use when updating the AMI versions.

" + } + }, + "documentation":"

The configuration object of the schedule that SageMaker follows when updating the AMI.

" + }, "SchedulerConfig":{ "type":"structure", "members":{ @@ -40602,6 +40717,23 @@ } } }, + "UpdateClusterSoftwareInstanceGroupSpecification":{ + "type":"structure", + "required":["InstanceGroupName"], + "members":{ + "InstanceGroupName":{ + "shape":"ClusterInstanceGroupName", + "documentation":"

The name of the instance group to update.

" + } + }, + "documentation":"

The configuration that describes specifications of the instance groups to update.

" + }, + "UpdateClusterSoftwareInstanceGroups":{ + "type":"list", + "member":{"shape":"UpdateClusterSoftwareInstanceGroupSpecification"}, + "max":100, + "min":1 + }, "UpdateClusterSoftwareRequest":{ "type":"structure", "required":["ClusterName"], @@ -40609,6 +40741,14 @@ "ClusterName":{ "shape":"ClusterNameOrArn", "documentation":"

Specify the name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster you want to update for security patching.

" + }, + "InstanceGroups":{ + "shape":"UpdateClusterSoftwareInstanceGroups", + "documentation":"

The array of instance groups for which to update AMI versions.

" + }, + "DeploymentConfig":{ + "shape":"DeploymentConfiguration", + "documentation":"

The configuration to use when updating the AMI versions.

" } } }, @@ -42356,6 +42496,11 @@ "max":3600, "min":0 }, + "WaitTimeIntervalInSeconds":{ + "type":"integer", + "max":3600, + "min":0 + }, "WarmPoolResourceStatus":{ "type":"string", "enum":[ diff --git a/src/sagemaker_core/main/code_injection/shape_dag.py b/src/sagemaker_core/main/code_injection/shape_dag.py index 241ce7f1..766babff 100644 --- a/src/sagemaker_core/main/code_injection/shape_dag.py +++ b/src/sagemaker_core/main/code_injection/shape_dag.py @@ -124,6 +124,10 @@ "members": [{"name": "AlarmName", "shape": "AlarmName", "type": "string"}], "type": "structure", }, + "AlarmDetails": { + "members": [{"name": "AlarmName", "shape": "AlarmName", "type": "string"}], + "type": "structure", + }, "AlarmList": {"member_shape": "Alarm", "member_type": "structure", "type": "list"}, "AlgorithmSpecification": { "members": [ @@ -734,6 +738,11 @@ "type": "structure", }, "AutoParameters": {"member_shape": "AutoParameter", "member_type": "structure", "type": "list"}, + "AutoRollbackAlarms": { + "member_shape": "AlarmDetails", + "member_type": "structure", + "type": "list", + }, "AutoRollbackConfig": { "members": [{"name": "Alarms", "shape": "AlarmList", "type": "list"}], "type": "structure", @@ -1069,6 +1078,13 @@ ], "type": "structure", }, + "CapacitySizeConfig": { + "members": [ + {"name": "Type", "shape": "NodeUnavailabilityType", "type": "string"}, + {"name": "Value", "shape": "NodeUnavailabilityValue", "type": "integer"}, + ], + "type": "structure", + }, "CaptureContentTypeHeader": { "members": [ {"name": "CsvContentTypes", "shape": "CsvContentTypes", "type": "list"}, @@ -1272,6 +1288,11 @@ "type": "string", }, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, + { + "name": "ScheduledUpdateConfig", + "shape": "ScheduledUpdateConfig", + "type": "structure", + }, ], "type": "structure", }, @@ -1296,6 +1317,11 @@ {"name": "OnStartDeepHealthChecks", "shape": "OnStartDeepHealthChecks", "type": "list"}, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, + { + "name": "ScheduledUpdateConfig", + "shape": "ScheduledUpdateConfig", + "type": "structure", + }, ], "type": "structure", }, @@ -1352,6 +1378,7 @@ }, {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, {"name": "LaunchTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "LastSoftwareUpdateTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LifeCycleConfig", "shape": "ClusterLifeCycleConfig", "type": "structure"}, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, {"name": "ThreadsPerCore", "shape": "ClusterThreadsPerCore", "type": "integer"}, @@ -1379,6 +1406,7 @@ {"name": "InstanceId", "shape": "String", "type": "string"}, {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, {"name": "LaunchTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "LastSoftwareUpdateTime", "shape": "Timestamp", "type": "timestamp"}, { "name": "InstanceStatus", "shape": "ClusterInstanceStatusDetails", @@ -3889,6 +3917,22 @@ ], "type": "structure", }, + "DeploymentConfiguration": { + "members": [ + { + "name": "RollingUpdatePolicy", + "shape": "RollingDeploymentPolicy", + "type": "structure", + }, + { + "name": "WaitIntervalInSeconds", + "shape": "WaitTimeIntervalInSeconds", + "type": "integer", + }, + {"name": "AutoRollbackConfiguration", "shape": "AutoRollbackAlarms", "type": "list"}, + ], + "type": "structure", + }, "DeploymentRecommendation": { "members": [ {"name": "RecommendationStatus", "shape": "RecommendationStatus", "type": "string"}, @@ -13174,6 +13218,17 @@ ], "type": "structure", }, + "RollingDeploymentPolicy": { + "members": [ + {"name": "MaximumBatchSize", "shape": "CapacitySizeConfig", "type": "structure"}, + { + "name": "RollbackMaximumBatchSize", + "shape": "CapacitySizeConfig", + "type": "structure", + }, + ], + "type": "structure", + }, "RollingUpdatePolicy": { "members": [ {"name": "MaximumBatchSize", "shape": "CapacitySize", "type": "structure"}, @@ -13280,6 +13335,13 @@ ], "type": "structure", }, + "ScheduledUpdateConfig": { + "members": [ + {"name": "ScheduleExpression", "shape": "CronScheduleExpression", "type": "string"}, + {"name": "DeploymentConfig", "shape": "DeploymentConfiguration", "type": "structure"}, + ], + "type": "structure", + }, "SchedulerConfig": { "members": [ {"name": "PriorityClasses", "shape": "PriorityClassList", "type": "list"}, @@ -14856,8 +14918,27 @@ ], "type": "structure", }, + "UpdateClusterSoftwareInstanceGroupSpecification": { + "members": [ + {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"} + ], + "type": "structure", + }, + "UpdateClusterSoftwareInstanceGroups": { + "member_shape": "UpdateClusterSoftwareInstanceGroupSpecification", + "member_type": "structure", + "type": "list", + }, "UpdateClusterSoftwareRequest": { - "members": [{"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}], + "members": [ + {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, + { + "name": "InstanceGroups", + "shape": "UpdateClusterSoftwareInstanceGroups", + "type": "list", + }, + {"name": "DeploymentConfig", "shape": "DeploymentConfiguration", "type": "structure"}, + ], "type": "structure", }, "UpdateClusterSoftwareResponse": { diff --git a/src/sagemaker_core/main/resources.py b/src/sagemaker_core/main/resources.py index c29f1199..8fa3ecef 100644 --- a/src/sagemaker_core/main/resources.py +++ b/src/sagemaker_core/main/resources.py @@ -3833,6 +3833,7 @@ def get_all_nodes( @Base.add_validate_call def update_software( self, + deployment_config: Optional[shapes.DeploymentConfiguration] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> None: @@ -3840,6 +3841,7 @@ def update_software( Updates the platform software of a SageMaker HyperPod cluster for security patching. Parameters: + deployment_config: The configuration to use when updating the AMI versions. session: Boto3 session. region: Region name. @@ -3859,6 +3861,8 @@ def update_software( operation_input_args = { "ClusterName": self.cluster_name, + "InstanceGroups": self.instance_groups, + "DeploymentConfig": deployment_config, } # serialize the input request operation_input_args = serialize(operation_input_args) @@ -25812,9 +25816,9 @@ def create( processing_inputs: An array of inputs configuring the data to download into the processing container. processing_output_config: Output configuration for the processing job. stopping_condition: The time limit for how long the processing job is allowed to run. - environment: The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported. + environment: The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields. network_config: Networking options for a processing job, such as whether to allow inbound and outbound network calls to and from processing containers, and the VPC subnets and security groups to use for VPC-enabled processing jobs. - tags: (Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide. + tags: (Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request tag variable or plain text fields. experiment_config: session: Boto3 session. region: Region name. @@ -27979,7 +27983,7 @@ class TrainingJob(Base): profiler_rule_configurations: Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics. profiler_rule_evaluation_statuses: Evaluation status of Amazon SageMaker Debugger rules for profiling on a training job. profiling_status: Profiling status of a training job. - environment: The environment variables to set in the Docker container. + environment: The environment variables to set in the Docker container. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields. retry_strategy: The number of times to retry the job when the job fails due to an InternalServerError. remote_debug_config: Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging. infra_check_config: Contains information about the infrastructure health check configuration for the training job. @@ -28122,10 +28126,10 @@ def create( output_data_config: Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts. resource_config: The resources, including the ML compute instances and ML storage volumes, to use for model training. ML storage volumes store model artifacts and incremental states. Training algorithms might also use ML storage volumes for scratch space. If you want SageMaker to use the ML storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1. stopping_condition: Specifies a limit to how long a model training job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use this API to cap model training costs. To stop a job, SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts, so the results of training are not lost. - hyper_parameters: Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms. You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint. Do not include any security-sensitive information including account access IDs, secrets or tokens in any hyperparameter field. If the use of security-sensitive credentials are detected, SageMaker will reject your training job request and return an exception error. + hyper_parameters: Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms. You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields. input_data_config: An array of Channel objects. Each channel is a named input source. InputDataConfig describes the input data and its location. Algorithms can accept input data from one or more channels. For example, an algorithm might have two channels of input data, training_data and validation_data. The configuration for each channel provides the S3, EFS, or FSx location where the input data is stored. It also provides information about the stored data: the MIME type, compression method, and whether the data is wrapped in RecordIO format. Depending on the input mode that the algorithm supports, SageMaker either copies input data files from an S3 bucket to a local directory in the Docker container, or makes it available as input streams. For example, if you specify an EFS location, input data files are available as input streams. They do not need to be downloaded. Your input must be in the same Amazon Web Services region as your training job. vpc_config: A VpcConfig object that specifies the VPC that you want your training job to connect to. Control access to and from your training container by configuring the VPC. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud. - tags: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources. + tags: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request tag variable or plain text fields. enable_network_isolation: Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If you enable network isolation for training jobs that are configured to use a VPC, SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access. enable_inter_container_traffic_encryption: To encrypt all communications between ML compute instances in distributed training, choose True. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training. For more information, see Protect Communications Between ML Compute Instances in a Distributed Training Job. enable_managed_spot_training: To train models using managed spot training, choose True. Managed spot training provides a fully managed and scalable infrastructure for training machine learning models. this option is useful when training jobs can be interrupted and when there is flexibility when the training job is run. The complete and intermediate results of jobs are stored in an Amazon S3 bucket, and can be used as a starting point to train models incrementally. Amazon SageMaker provides metrics and logs in CloudWatch. They can be used to see when managed spot training jobs are running, interrupted, resumed, or completed. @@ -28136,7 +28140,7 @@ def create( experiment_config: profiler_config: profiler_rule_configurations: Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics. - environment: The environment variables to set in the Docker container. + environment: The environment variables to set in the Docker container. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields. retry_strategy: The number of times to retry the job when the job fails due to an InternalServerError. remote_debug_config: Configuration for remote debugging. To learn more about the remote debugging functionality of SageMaker, see Access a training container through Amazon Web Services Systems Manager (SSM) for remote debugging. infra_check_config: Contains information about the infrastructure health check configuration for the training job. diff --git a/src/sagemaker_core/main/shapes.py b/src/sagemaker_core/main/shapes.py index 5a3508d0..0135d277 100644 --- a/src/sagemaker_core/main/shapes.py +++ b/src/sagemaker_core/main/shapes.py @@ -712,6 +712,19 @@ class Alarm(Base): alarm_name: Optional[str] = Unassigned() +class AlarmDetails(Base): + """ + AlarmDetails + The details of the alarm to monitor during the AMI update. + + Attributes + ---------------------- + alarm_name: The name of the alarm. + """ + + alarm_name: str + + class MetricDefinition(Base): """ MetricDefinition @@ -2873,6 +2886,21 @@ class CanvasAppSettings(Base): emr_serverless_settings: Optional[EmrServerlessSettings] = Unassigned() +class CapacitySizeConfig(Base): + """ + CapacitySizeConfig + The 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. + + 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. + """ + + type: str + value: int + + class CaptureContentTypeHeader(Base): """ CaptureContentTypeHeader @@ -3153,6 +3181,53 @@ class ClusterInstanceStorageConfig(Base): ebs_volume_config: Optional[ClusterEbsVolumeConfig] = Unassigned() +class RollingDeploymentPolicy(Base): + """ + RollingDeploymentPolicy + The configurations that SageMaker uses when updating the AMI versions. + + Attributes + ---------------------- + maximum_batch_size: The maximum amount of instances in the cluster that SageMaker can update at a time. + rollback_maximum_batch_size: The maximum amount of instances in the cluster that SageMaker can roll back at a time. + """ + + maximum_batch_size: CapacitySizeConfig + rollback_maximum_batch_size: Optional[CapacitySizeConfig] = Unassigned() + + +class DeploymentConfiguration(Base): + """ + DeploymentConfiguration + The configuration to use when updating the AMI versions. + + Attributes + ---------------------- + rolling_update_policy: The policy that SageMaker uses when updating the AMI versions of the cluster. + wait_interval_in_seconds: The duration in seconds that SageMaker waits before updating more instances in the cluster. + auto_rollback_configuration: An array that contains the alarms that SageMaker monitors to know whether to roll back the AMI update. + """ + + rolling_update_policy: Optional[RollingDeploymentPolicy] = Unassigned() + wait_interval_in_seconds: Optional[int] = Unassigned() + auto_rollback_configuration: Optional[List[AlarmDetails]] = Unassigned() + + +class ScheduledUpdateConfig(Base): + """ + ScheduledUpdateConfig + The configuration object of the schedule that SageMaker follows when updating the AMI. + + Attributes + ---------------------- + schedule_expression: A cron expression that specifies the schedule that SageMaker follows when updating the AMI. + deployment_config: The configuration to use when updating the AMI versions. + """ + + schedule_expression: str + deployment_config: Optional[DeploymentConfiguration] = Unassigned() + + class ClusterInstanceGroupDetails(Base): """ ClusterInstanceGroupDetails @@ -3173,6 +3248,7 @@ class ClusterInstanceGroupDetails(Base): training_plan_arn: The Amazon Resource Name (ARN); of the training plan associated with 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 . training_plan_status: The current status of the training plan associated with this cluster instance group. 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. """ current_count: Optional[int] = Unassigned() @@ -3188,6 +3264,7 @@ class ClusterInstanceGroupDetails(Base): training_plan_arn: Optional[str] = Unassigned() training_plan_status: Optional[str] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() class ClusterInstanceGroupSpecification(Base): @@ -3207,6 +3284,7 @@ class ClusterInstanceGroupSpecification(Base): on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated. 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 . override_vpc_config: 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: 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. + scheduled_update_config: The configuration object of the schedule that SageMaker uses to update the AMI. """ instance_count: int @@ -3219,6 +3297,7 @@ class ClusterInstanceGroupSpecification(Base): on_start_deep_health_checks: Optional[List[str]] = Unassigned() training_plan_arn: Optional[str] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() class ClusterInstancePlacement(Base): @@ -3263,6 +3342,7 @@ class ClusterNodeDetails(Base): instance_status: The status of the instance. instance_type: The type of the instance. launch_time: The time when the instance is launched. + last_software_update_time: The time of when the cluster was last updated. life_cycle_config: The LifeCycle configuration applied to the instance. 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. threads_per_core: The number of threads per CPU core you specified under CreateCluster. @@ -3278,6 +3358,7 @@ class ClusterNodeDetails(Base): instance_status: Optional[ClusterInstanceStatusDetails] = Unassigned() instance_type: Optional[str] = Unassigned() launch_time: Optional[datetime.datetime] = Unassigned() + last_software_update_time: Optional[datetime.datetime] = Unassigned() life_cycle_config: Optional[ClusterLifeCycleConfig] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() threads_per_core: Optional[int] = Unassigned() @@ -3299,6 +3380,7 @@ class ClusterNodeSummary(Base): instance_id: The ID of the instance. instance_type: The type of the instance. launch_time: The time when the instance is launched. + last_software_update_time: The time of when SageMaker last updated the software of the instances in the cluster. instance_status: The status of the instance. """ @@ -3307,6 +3389,7 @@ class ClusterNodeSummary(Base): instance_type: str launch_time: datetime.datetime instance_status: ClusterInstanceStatusDetails + last_software_update_time: Optional[datetime.datetime] = Unassigned() class ClusterOrchestratorEksConfig(Base): @@ -12600,6 +12683,19 @@ class ThroughputConfigUpdate(Base): provisioned_write_capacity_units: Optional[int] = Unassigned() +class UpdateClusterSoftwareInstanceGroupSpecification(Base): + """ + UpdateClusterSoftwareInstanceGroupSpecification + The configuration that describes specifications of the instance groups to update. + + Attributes + ---------------------- + instance_group_name: The name of the instance group to update. + """ + + instance_group_name: str + + class VariantProperty(Base): """ VariantProperty