sagemaker-core 1.0.38__py3-none-any.whl → 1.0.62__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sagemaker_core/__init__.py +0 -4
- sagemaker_core/main/code_injection/shape_dag.py +982 -3
- sagemaker_core/main/config_schema.py +2 -1
- sagemaker_core/main/resources.py +362 -24
- sagemaker_core/main/shapes.py +934 -14
- sagemaker_core/main/utils.py +2 -2
- sagemaker_core/tools/resources_codegen.py +12 -10
- {sagemaker_core-1.0.38.dist-info → sagemaker_core-1.0.62.dist-info}/METADATA +4 -4
- {sagemaker_core-1.0.38.dist-info → sagemaker_core-1.0.62.dist-info}/RECORD +12 -12
- {sagemaker_core-1.0.38.dist-info → sagemaker_core-1.0.62.dist-info}/WHEEL +0 -0
- {sagemaker_core-1.0.38.dist-info → sagemaker_core-1.0.62.dist-info}/licenses/LICENSE +0 -0
- {sagemaker_core-1.0.38.dist-info → sagemaker_core-1.0.62.dist-info}/top_level.txt +0 -0
sagemaker_core/main/resources.py
CHANGED
|
@@ -978,6 +978,7 @@ class App(Base):
|
|
|
978
978
|
user_profile_name: The user profile name.
|
|
979
979
|
space_name: The name of the space. If this value is not set, then UserProfileName must be set.
|
|
980
980
|
status: The status.
|
|
981
|
+
effective_trusted_identity_propagation_status: The effective status of Trusted Identity Propagation (TIP) for this application. When enabled, user identities from IAM Identity Center are being propagated through the application to TIP enabled Amazon Web Services services. When disabled, standard IAM role-based access is used.
|
|
981
982
|
recovery_mode: Indicates whether the application is launched in recovery mode.
|
|
982
983
|
last_health_check_timestamp: The timestamp of the last health check.
|
|
983
984
|
last_user_activity_timestamp: The timestamp of the last user's activity. LastUserActivityTimestamp is also updated when SageMaker AI performs health checks without user activity. As a result, this value is set to the same value as LastHealthCheckTimestamp.
|
|
@@ -995,6 +996,7 @@ class App(Base):
|
|
|
995
996
|
user_profile_name: Optional[str] = Unassigned()
|
|
996
997
|
space_name: Optional[str] = Unassigned()
|
|
997
998
|
status: Optional[str] = Unassigned()
|
|
999
|
+
effective_trusted_identity_propagation_status: Optional[str] = Unassigned()
|
|
998
1000
|
recovery_mode: Optional[bool] = Unassigned()
|
|
999
1001
|
last_health_check_timestamp: Optional[datetime.datetime] = Unassigned()
|
|
1000
1002
|
last_user_activity_timestamp: Optional[datetime.datetime] = Unassigned()
|
|
@@ -3219,9 +3221,14 @@ class Cluster(Base):
|
|
|
3219
3221
|
cluster_name: The name of the SageMaker HyperPod cluster.
|
|
3220
3222
|
creation_time: The time when the SageMaker Cluster is created.
|
|
3221
3223
|
failure_message: The failure message of the SageMaker HyperPod cluster.
|
|
3224
|
+
restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.
|
|
3222
3225
|
vpc_config:
|
|
3223
3226
|
orchestrator: The type of orchestrator used for the SageMaker HyperPod cluster.
|
|
3227
|
+
tiered_storage_config: The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage.
|
|
3224
3228
|
node_recovery: The node recovery mode configured for the SageMaker HyperPod cluster.
|
|
3229
|
+
node_provisioning_mode: The mode used for provisioning nodes in the cluster.
|
|
3230
|
+
cluster_role: The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations.
|
|
3231
|
+
auto_scaling: The current autoscaling configuration and status for the autoscaler.
|
|
3225
3232
|
|
|
3226
3233
|
"""
|
|
3227
3234
|
|
|
@@ -3231,9 +3238,16 @@ class Cluster(Base):
|
|
|
3231
3238
|
creation_time: Optional[datetime.datetime] = Unassigned()
|
|
3232
3239
|
failure_message: Optional[str] = Unassigned()
|
|
3233
3240
|
instance_groups: Optional[List[shapes.ClusterInstanceGroupDetails]] = Unassigned()
|
|
3241
|
+
restricted_instance_groups: Optional[List[shapes.ClusterRestrictedInstanceGroupDetails]] = (
|
|
3242
|
+
Unassigned()
|
|
3243
|
+
)
|
|
3234
3244
|
vpc_config: Optional[shapes.VpcConfig] = Unassigned()
|
|
3235
3245
|
orchestrator: Optional[shapes.ClusterOrchestrator] = Unassigned()
|
|
3246
|
+
tiered_storage_config: Optional[shapes.ClusterTieredStorageConfig] = Unassigned()
|
|
3236
3247
|
node_recovery: Optional[str] = Unassigned()
|
|
3248
|
+
node_provisioning_mode: Optional[str] = Unassigned()
|
|
3249
|
+
cluster_role: Optional[str] = Unassigned()
|
|
3250
|
+
auto_scaling: Optional[shapes.ClusterAutoScalingConfigOutput] = Unassigned()
|
|
3237
3251
|
|
|
3238
3252
|
def get_name(self) -> str:
|
|
3239
3253
|
attributes = vars(self)
|
|
@@ -3258,7 +3272,8 @@ class Cluster(Base):
|
|
|
3258
3272
|
"vpc_config": {
|
|
3259
3273
|
"security_group_ids": {"type": "array", "items": {"type": "string"}},
|
|
3260
3274
|
"subnets": {"type": "array", "items": {"type": "string"}},
|
|
3261
|
-
}
|
|
3275
|
+
},
|
|
3276
|
+
"cluster_role": {"type": "string"},
|
|
3262
3277
|
}
|
|
3263
3278
|
return create_func(
|
|
3264
3279
|
*args,
|
|
@@ -3275,11 +3290,18 @@ class Cluster(Base):
|
|
|
3275
3290
|
def create(
|
|
3276
3291
|
cls,
|
|
3277
3292
|
cluster_name: str,
|
|
3278
|
-
instance_groups: List[shapes.ClusterInstanceGroupSpecification],
|
|
3293
|
+
instance_groups: Optional[List[shapes.ClusterInstanceGroupSpecification]] = Unassigned(),
|
|
3294
|
+
restricted_instance_groups: Optional[
|
|
3295
|
+
List[shapes.ClusterRestrictedInstanceGroupSpecification]
|
|
3296
|
+
] = Unassigned(),
|
|
3279
3297
|
vpc_config: Optional[shapes.VpcConfig] = Unassigned(),
|
|
3280
3298
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
3281
3299
|
orchestrator: Optional[shapes.ClusterOrchestrator] = Unassigned(),
|
|
3282
3300
|
node_recovery: Optional[str] = Unassigned(),
|
|
3301
|
+
tiered_storage_config: Optional[shapes.ClusterTieredStorageConfig] = Unassigned(),
|
|
3302
|
+
node_provisioning_mode: Optional[str] = Unassigned(),
|
|
3303
|
+
cluster_role: Optional[str] = Unassigned(),
|
|
3304
|
+
auto_scaling: Optional[shapes.ClusterAutoScalingConfig] = Unassigned(),
|
|
3283
3305
|
session: Optional[Session] = None,
|
|
3284
3306
|
region: Optional[str] = None,
|
|
3285
3307
|
) -> Optional["Cluster"]:
|
|
@@ -3289,10 +3311,15 @@ class Cluster(Base):
|
|
|
3289
3311
|
Parameters:
|
|
3290
3312
|
cluster_name: The name for the new SageMaker HyperPod cluster.
|
|
3291
3313
|
instance_groups: The instance groups to be created in the SageMaker HyperPod cluster.
|
|
3314
|
+
restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.
|
|
3292
3315
|
vpc_config: 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.
|
|
3293
3316
|
tags: 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.
|
|
3294
|
-
orchestrator: The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is "eks", which is to use an Amazon Elastic Kubernetes Service
|
|
3317
|
+
orchestrator: The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, the only supported value is "eks", which is to use an Amazon Elastic Kubernetes Service cluster as the orchestrator.
|
|
3295
3318
|
node_recovery: 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 to None, cluster administrators will need to manually manage any faulty cluster instances.
|
|
3319
|
+
tiered_storage_config: 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.
|
|
3320
|
+
node_provisioning_mode: 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 InService while scaling. This mode is only supported for EKS orchestrated clusters.
|
|
3321
|
+
cluster_role: The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes to perform cluster autoscaling operations. This role must have permissions for sagemaker:BatchAddClusterNodes and sagemaker:BatchDeleteClusterNodes. This is only required when autoscaling is enabled and when HyperPod is performing autoscaling operations.
|
|
3322
|
+
auto_scaling: The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system.
|
|
3296
3323
|
session: Boto3 session.
|
|
3297
3324
|
region: Region name.
|
|
3298
3325
|
|
|
@@ -3324,10 +3351,15 @@ class Cluster(Base):
|
|
|
3324
3351
|
operation_input_args = {
|
|
3325
3352
|
"ClusterName": cluster_name,
|
|
3326
3353
|
"InstanceGroups": instance_groups,
|
|
3354
|
+
"RestrictedInstanceGroups": restricted_instance_groups,
|
|
3327
3355
|
"VpcConfig": vpc_config,
|
|
3328
3356
|
"Tags": tags,
|
|
3329
3357
|
"Orchestrator": orchestrator,
|
|
3330
3358
|
"NodeRecovery": node_recovery,
|
|
3359
|
+
"TieredStorageConfig": tiered_storage_config,
|
|
3360
|
+
"NodeProvisioningMode": node_provisioning_mode,
|
|
3361
|
+
"ClusterRole": cluster_role,
|
|
3362
|
+
"AutoScaling": auto_scaling,
|
|
3331
3363
|
}
|
|
3332
3364
|
|
|
3333
3365
|
operation_input_args = Base.populate_chained_attributes(
|
|
@@ -3437,9 +3469,15 @@ class Cluster(Base):
|
|
|
3437
3469
|
@Base.add_validate_call
|
|
3438
3470
|
def update(
|
|
3439
3471
|
self,
|
|
3440
|
-
instance_groups: List[shapes.ClusterInstanceGroupSpecification],
|
|
3472
|
+
instance_groups: Optional[List[shapes.ClusterInstanceGroupSpecification]] = Unassigned(),
|
|
3473
|
+
restricted_instance_groups: Optional[
|
|
3474
|
+
List[shapes.ClusterRestrictedInstanceGroupSpecification]
|
|
3475
|
+
] = Unassigned(),
|
|
3476
|
+
tiered_storage_config: Optional[shapes.ClusterTieredStorageConfig] = Unassigned(),
|
|
3441
3477
|
node_recovery: Optional[str] = Unassigned(),
|
|
3442
3478
|
instance_groups_to_delete: Optional[List[str]] = Unassigned(),
|
|
3479
|
+
cluster_role: Optional[str] = Unassigned(),
|
|
3480
|
+
auto_scaling: Optional[shapes.ClusterAutoScalingConfig] = Unassigned(),
|
|
3443
3481
|
) -> Optional["Cluster"]:
|
|
3444
3482
|
"""
|
|
3445
3483
|
Update a Cluster resource
|
|
@@ -3471,8 +3509,12 @@ class Cluster(Base):
|
|
|
3471
3509
|
operation_input_args = {
|
|
3472
3510
|
"ClusterName": self.cluster_name,
|
|
3473
3511
|
"InstanceGroups": instance_groups,
|
|
3512
|
+
"RestrictedInstanceGroups": restricted_instance_groups,
|
|
3513
|
+
"TieredStorageConfig": tiered_storage_config,
|
|
3474
3514
|
"NodeRecovery": node_recovery,
|
|
3475
3515
|
"InstanceGroupsToDelete": instance_groups_to_delete,
|
|
3516
|
+
"ClusterRole": cluster_role,
|
|
3517
|
+
"AutoScaling": auto_scaling,
|
|
3476
3518
|
}
|
|
3477
3519
|
logger.debug(f"Input request: {operation_input_args}")
|
|
3478
3520
|
# serialize the input request
|
|
@@ -3664,7 +3706,7 @@ class Cluster(Base):
|
|
|
3664
3706
|
Parameters:
|
|
3665
3707
|
creation_time_after: Set a start time for the time range during which you want to list SageMaker HyperPod clusters. Timestamps are formatted according to the ISO 8601 standard. Acceptable formats include: YYYY-MM-DDThh:mm:ss.sssTZD (UTC), for example, 2014-10-01T20:30:00.000Z YYYY-MM-DDThh:mm:ss.sssTZD (with offset), for example, 2014-10-01T12:30:00.000-08:00 YYYY-MM-DD, for example, 2014-10-01 Unix time in seconds, for example, 1412195400. This is also referred to as Unix Epoch time and represents the number of seconds since midnight, January 1, 1970 UTC. For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide.
|
|
3666
3708
|
creation_time_before: Set an end time for the time range during which you want to list SageMaker HyperPod clusters. A filter that returns nodes in a SageMaker HyperPod cluster created before the specified time. The acceptable formats are the same as the timestamp formats for CreationTimeAfter. For more information about the timestamp format, see Timestamp in the Amazon Web Services Command Line Interface User Guide.
|
|
3667
|
-
max_results:
|
|
3709
|
+
max_results: Specifies the maximum number of clusters to evaluate for the operation (not necessarily the number of matching items). After SageMaker processes the number of clusters up to MaxResults, it stops the operation and returns the matching clusters up to that point. If all the matching clusters are desired, SageMaker will go through all the clusters until NextToken is empty.
|
|
3668
3710
|
name_contains: Set the maximum number of instances to print in the list.
|
|
3669
3711
|
next_token: Set the next token to retrieve the list of SageMaker HyperPod clusters.
|
|
3670
3712
|
sort_by: The field by which to sort results. The default value is CREATION_TIME.
|
|
@@ -3717,7 +3759,8 @@ class Cluster(Base):
|
|
|
3717
3759
|
@Base.add_validate_call
|
|
3718
3760
|
def get_node(
|
|
3719
3761
|
self,
|
|
3720
|
-
node_id: str,
|
|
3762
|
+
node_id: Optional[str] = Unassigned(),
|
|
3763
|
+
node_logical_id: Optional[str] = Unassigned(),
|
|
3721
3764
|
session: Optional[Session] = None,
|
|
3722
3765
|
region: Optional[str] = None,
|
|
3723
3766
|
) -> Optional[shapes.ClusterNodeDetails]:
|
|
@@ -3726,6 +3769,7 @@ class Cluster(Base):
|
|
|
3726
3769
|
|
|
3727
3770
|
Parameters:
|
|
3728
3771
|
node_id: The ID of the SageMaker HyperPod cluster node.
|
|
3772
|
+
node_logical_id: The logical identifier of the node to describe. You can specify either NodeLogicalId or InstanceId, but not both. NodeLogicalId can be used to describe nodes that are still being provisioned and don't yet have an InstanceId assigned.
|
|
3729
3773
|
session: Boto3 session.
|
|
3730
3774
|
region: Region name.
|
|
3731
3775
|
|
|
@@ -3748,6 +3792,7 @@ class Cluster(Base):
|
|
|
3748
3792
|
operation_input_args = {
|
|
3749
3793
|
"ClusterName": self.cluster_name,
|
|
3750
3794
|
"NodeId": node_id,
|
|
3795
|
+
"NodeLogicalId": node_logical_id,
|
|
3751
3796
|
}
|
|
3752
3797
|
# serialize the input request
|
|
3753
3798
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -3772,6 +3817,7 @@ class Cluster(Base):
|
|
|
3772
3817
|
instance_group_name_contains: Optional[str] = Unassigned(),
|
|
3773
3818
|
sort_by: Optional[str] = Unassigned(),
|
|
3774
3819
|
sort_order: Optional[str] = Unassigned(),
|
|
3820
|
+
include_node_logical_ids: Optional[bool] = Unassigned(),
|
|
3775
3821
|
session: Optional[Session] = None,
|
|
3776
3822
|
region: Optional[str] = None,
|
|
3777
3823
|
) -> ResourceIterator[shapes.ClusterNodeDetails]:
|
|
@@ -3786,6 +3832,7 @@ class Cluster(Base):
|
|
|
3786
3832
|
next_token: If the result of the previous ListClusterNodes request was truncated, the response includes a NextToken. To retrieve the next set of cluster nodes, use the token in the next request.
|
|
3787
3833
|
sort_by: The field by which to sort results. The default value is CREATION_TIME.
|
|
3788
3834
|
sort_order: The sort order for results. The default value is Ascending.
|
|
3835
|
+
include_node_logical_ids: Specifies whether to include nodes that are still being provisioned in the response. When set to true, the response includes all nodes regardless of their provisioning status. When set to False (default), only nodes with assigned InstanceIds are returned.
|
|
3789
3836
|
session: Boto3 session.
|
|
3790
3837
|
region: Region name.
|
|
3791
3838
|
|
|
@@ -3812,6 +3859,7 @@ class Cluster(Base):
|
|
|
3812
3859
|
"InstanceGroupNameContains": instance_group_name_contains,
|
|
3813
3860
|
"SortBy": sort_by,
|
|
3814
3861
|
"SortOrder": sort_order,
|
|
3862
|
+
"IncludeNodeLogicalIds": include_node_logical_ids,
|
|
3815
3863
|
}
|
|
3816
3864
|
# serialize the input request
|
|
3817
3865
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -3834,6 +3882,7 @@ class Cluster(Base):
|
|
|
3834
3882
|
def update_software(
|
|
3835
3883
|
self,
|
|
3836
3884
|
deployment_config: Optional[shapes.DeploymentConfiguration] = Unassigned(),
|
|
3885
|
+
image_id: Optional[str] = Unassigned(),
|
|
3837
3886
|
session: Optional[Session] = None,
|
|
3838
3887
|
region: Optional[str] = None,
|
|
3839
3888
|
) -> None:
|
|
@@ -3842,6 +3891,7 @@ class Cluster(Base):
|
|
|
3842
3891
|
|
|
3843
3892
|
Parameters:
|
|
3844
3893
|
deployment_config: The configuration to use when updating the AMI versions.
|
|
3894
|
+
image_id: When configuring your HyperPod cluster, you can specify an image ID using one of the following options: HyperPodPublicAmiId: Use a HyperPod public AMI CustomAmiId: Use your custom AMI default: Use the default latest system image If you choose to use a custom AMI (CustomAmiId), ensure it meets the following requirements: Encryption: The custom AMI must be unencrypted. Ownership: The custom AMI must be owned by the same Amazon Web Services account that is creating the HyperPod cluster. Volume support: Only the primary AMI snapshot volume is supported; additional AMI volumes are not supported. When updating the instance group's AMI through the UpdateClusterSoftware operation, if an instance group uses a custom AMI, you must provide an ImageId or use the default as input. Note that if you don't specify an instance group in your UpdateClusterSoftware request, then all of the instance groups are patched with the specified image.
|
|
3845
3895
|
session: Boto3 session.
|
|
3846
3896
|
region: Region name.
|
|
3847
3897
|
|
|
@@ -3863,6 +3913,7 @@ class Cluster(Base):
|
|
|
3863
3913
|
"ClusterName": self.cluster_name,
|
|
3864
3914
|
"InstanceGroups": self.instance_groups,
|
|
3865
3915
|
"DeploymentConfig": deployment_config,
|
|
3916
|
+
"ImageId": image_id,
|
|
3866
3917
|
}
|
|
3867
3918
|
# serialize the input request
|
|
3868
3919
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -3879,7 +3930,8 @@ class Cluster(Base):
|
|
|
3879
3930
|
@Base.add_validate_call
|
|
3880
3931
|
def batch_delete_nodes(
|
|
3881
3932
|
self,
|
|
3882
|
-
node_ids: List[str],
|
|
3933
|
+
node_ids: Optional[List[str]] = Unassigned(),
|
|
3934
|
+
node_logical_ids: Optional[List[str]] = Unassigned(),
|
|
3883
3935
|
session: Optional[Session] = None,
|
|
3884
3936
|
region: Optional[str] = None,
|
|
3885
3937
|
) -> Optional[shapes.BatchDeleteClusterNodesResponse]:
|
|
@@ -3888,6 +3940,7 @@ class Cluster(Base):
|
|
|
3888
3940
|
|
|
3889
3941
|
Parameters:
|
|
3890
3942
|
node_ids: A list of node IDs to be deleted from the specified cluster. For SageMaker HyperPod clusters using the Slurm workload manager, you cannot remove instances that are configured as Slurm controller nodes. If you need to delete more than 99 instances, contact Support for assistance.
|
|
3943
|
+
node_logical_ids: A list of NodeLogicalIds identifying the nodes to be deleted. You can specify up to 50 NodeLogicalIds. You must specify either NodeLogicalIds, InstanceIds, or both, with a combined maximum of 50 identifiers.
|
|
3891
3944
|
session: Boto3 session.
|
|
3892
3945
|
region: Region name.
|
|
3893
3946
|
|
|
@@ -3910,6 +3963,7 @@ class Cluster(Base):
|
|
|
3910
3963
|
operation_input_args = {
|
|
3911
3964
|
"ClusterName": self.cluster_name,
|
|
3912
3965
|
"NodeIds": node_ids,
|
|
3966
|
+
"NodeLogicalIds": node_logical_ids,
|
|
3913
3967
|
}
|
|
3914
3968
|
# serialize the input request
|
|
3915
3969
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -7402,9 +7456,9 @@ class Domain(Base):
|
|
|
7402
7456
|
domain_name: str,
|
|
7403
7457
|
auth_mode: str,
|
|
7404
7458
|
default_user_settings: shapes.UserSettings,
|
|
7405
|
-
subnet_ids: List[str],
|
|
7406
|
-
vpc_id: str,
|
|
7407
7459
|
domain_settings: Optional[shapes.DomainSettings] = Unassigned(),
|
|
7460
|
+
subnet_ids: Optional[List[str]] = Unassigned(),
|
|
7461
|
+
vpc_id: Optional[str] = Unassigned(),
|
|
7408
7462
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
7409
7463
|
app_network_access_type: Optional[str] = Unassigned(),
|
|
7410
7464
|
home_efs_file_system_kms_key_id: Optional[str] = Unassigned(),
|
|
@@ -7422,9 +7476,9 @@ class Domain(Base):
|
|
|
7422
7476
|
domain_name: A name for the domain.
|
|
7423
7477
|
auth_mode: The mode of authentication that members use to access the domain.
|
|
7424
7478
|
default_user_settings: The default settings to use to create a user profile when UserSettings isn't specified in the call to the CreateUserProfile API. SecurityGroups is aggregated when specified in both calls. For all other settings in UserSettings, the values specified in CreateUserProfile take precedence over those specified in CreateDomain.
|
|
7425
|
-
subnet_ids: The VPC subnets that the domain uses for communication.
|
|
7426
|
-
vpc_id: The ID of the Amazon Virtual Private Cloud (VPC) that the domain uses for communication.
|
|
7427
7479
|
domain_settings: A collection of Domain settings.
|
|
7480
|
+
subnet_ids: The VPC subnets that the domain uses for communication. The field is optional when the AppNetworkAccessType parameter is set to PublicInternetOnly for domains created from Amazon SageMaker Unified Studio.
|
|
7481
|
+
vpc_id: The ID of the Amazon Virtual Private Cloud (VPC) that the domain uses for communication. The field is optional when the AppNetworkAccessType parameter is set to PublicInternetOnly for domains created from Amazon SageMaker Unified Studio.
|
|
7428
7482
|
tags: Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API. Tags that you specify for the Domain are also added to all Apps that the Domain launches.
|
|
7429
7483
|
app_network_access_type: Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly. PublicInternetOnly - Non-EFS traffic is through a VPC managed by Amazon SageMaker AI, which allows direct internet access VpcOnly - All traffic is through the specified VPC and subnets
|
|
7430
7484
|
home_efs_file_system_kms_key_id: Use KmsKeyId.
|
|
@@ -9394,20 +9448,20 @@ class Endpoint(Base):
|
|
|
9394
9448
|
region: Optional[str] = None,
|
|
9395
9449
|
) -> Optional[shapes.InvokeEndpointOutput]:
|
|
9396
9450
|
"""
|
|
9397
|
-
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
|
|
9451
|
+
After you deploy a model into production using Amazon SageMaker AI hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
|
|
9398
9452
|
|
|
9399
9453
|
Parameters:
|
|
9400
|
-
body: Provides input data, in the format specified in the ContentType request header. Amazon SageMaker passes all of the data in the body to the model. For information about the format of the request body, see Common Data Formats-Inference.
|
|
9454
|
+
body: Provides input data, in the format specified in the ContentType request header. Amazon SageMaker AI passes all of the data in the body to the model. For information about the format of the request body, see Common Data Formats-Inference.
|
|
9401
9455
|
content_type: The MIME type of the input data in the request body.
|
|
9402
9456
|
accept: The desired MIME type of the inference response from the model container.
|
|
9403
|
-
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
|
|
9457
|
+
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
|
|
9404
9458
|
target_model: The model to request for inference when invoking a multi-model endpoint.
|
|
9405
9459
|
target_variant: Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights. For information about how to use variant targeting to perform a/b testing, see Test models in production
|
|
9406
9460
|
target_container_hostname: If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.
|
|
9407
9461
|
inference_id: If you provide a value, it is added to the captured data when you enable data capture on the endpoint. For information about data capture, see Capture Data.
|
|
9408
9462
|
enable_explanations: An optional JMESPath expression used to override the EnableExplanations parameter of the ClarifyExplainerConfig API. See the EnableExplanations section in the developer guide for more information.
|
|
9409
9463
|
inference_component_name: If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke.
|
|
9410
|
-
session_id: Creates a stateful session or identifies an existing one. You can do one of the following: Create a stateful session by specifying the value NEW_SESSION. Send your request to an existing stateful session by specifying the ID of that session. With a stateful session, you can send multiple requests to a stateful model. When you create a session with a stateful model, the model must create the session ID and set the expiration time. The model must also provide that information in the response to your request. You can get the ID and timestamp from the NewSessionId response parameter. For any subsequent request where you specify that session ID, SageMaker routes the request to the same instance that supports the session.
|
|
9464
|
+
session_id: Creates a stateful session or identifies an existing one. You can do one of the following: Create a stateful session by specifying the value NEW_SESSION. Send your request to an existing stateful session by specifying the ID of that session. With a stateful session, you can send multiple requests to a stateful model. When you create a session with a stateful model, the model must create the session ID and set the expiration time. The model must also provide that information in the response to your request. You can get the ID and timestamp from the NewSessionId response parameter. For any subsequent request where you specify that session ID, SageMaker AI routes the request to the same instance that supports the session.
|
|
9411
9465
|
session: Boto3 session.
|
|
9412
9466
|
region: Region name.
|
|
9413
9467
|
|
|
@@ -9475,14 +9529,14 @@ class Endpoint(Base):
|
|
|
9475
9529
|
region: Optional[str] = None,
|
|
9476
9530
|
) -> Optional[shapes.InvokeEndpointAsyncOutput]:
|
|
9477
9531
|
"""
|
|
9478
|
-
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint in an asynchronous manner.
|
|
9532
|
+
After you deploy a model into production using Amazon SageMaker AI hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint in an asynchronous manner.
|
|
9479
9533
|
|
|
9480
9534
|
Parameters:
|
|
9481
9535
|
input_location: The Amazon S3 URI where the inference request payload is stored.
|
|
9482
9536
|
content_type: The MIME type of the input data in the request body.
|
|
9483
9537
|
accept: The desired MIME type of the inference response from the model container.
|
|
9484
|
-
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
|
|
9485
|
-
inference_id: The identifier for the inference request. Amazon SageMaker will generate an identifier for you if none is specified.
|
|
9538
|
+
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
|
|
9539
|
+
inference_id: The identifier for the inference request. Amazon SageMaker AI will generate an identifier for you if none is specified.
|
|
9486
9540
|
request_ttl_seconds: Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.
|
|
9487
9541
|
invocation_timeout_seconds: Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.
|
|
9488
9542
|
session: Boto3 session.
|
|
@@ -9550,10 +9604,10 @@ class Endpoint(Base):
|
|
|
9550
9604
|
Invokes a model at the specified endpoint to return the inference response as a stream.
|
|
9551
9605
|
|
|
9552
9606
|
Parameters:
|
|
9553
|
-
body: Provides input data, in the format specified in the ContentType request header. Amazon SageMaker passes all of the data in the body to the model. For information about the format of the request body, see Common Data Formats-Inference.
|
|
9607
|
+
body: Provides input data, in the format specified in the ContentType request header. Amazon SageMaker AI passes all of the data in the body to the model. For information about the format of the request body, see Common Data Formats-Inference.
|
|
9554
9608
|
content_type: The MIME type of the input data in the request body.
|
|
9555
9609
|
accept: The desired MIME type of the inference response from the model container.
|
|
9556
|
-
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.
|
|
9610
|
+
custom_attributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function. This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
|
|
9557
9611
|
target_variant: Specify the production variant to send the inference request to when invoking an endpoint that is running two or more variants. Note that this parameter overrides the default behavior for the endpoint, which is to distribute the invocation traffic based on the variant weights. For information about how to use variant targeting to perform a/b testing, see Test models in production
|
|
9558
9612
|
target_container_hostname: If the endpoint hosts multiple containers and is configured to use direct invocation, this parameter specifies the host name of the container to invoke.
|
|
9559
9613
|
inference_id: An identifier that you assign to your request.
|
|
@@ -9578,7 +9632,7 @@ class Endpoint(Base):
|
|
|
9578
9632
|
InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support.
|
|
9579
9633
|
InternalStreamFailure: The stream processing failed because of an unknown error, exception or failure. Try your request again.
|
|
9580
9634
|
ModelError: Model (owned by the customer in the container) returned 4xx or 5xx error code.
|
|
9581
|
-
ModelStreamError: An error occurred while streaming the response body. This error can have the following error codes: ModelInvocationTimeExceeded The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker. StreamBroken The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.
|
|
9635
|
+
ModelStreamError: An error occurred while streaming the response body. This error can have the following error codes: ModelInvocationTimeExceeded The model failed to finish sending the response within the timeout period allowed by Amazon SageMaker AI. StreamBroken The Transmission Control Protocol (TCP) connection between the client and the model was reset or closed.
|
|
9582
9636
|
ServiceUnavailable: The service is currently unavailable.
|
|
9583
9637
|
ValidationError: There was an error validating your request.
|
|
9584
9638
|
"""
|
|
@@ -12765,6 +12819,116 @@ class HubContent(Base):
|
|
|
12765
12819
|
)
|
|
12766
12820
|
|
|
12767
12821
|
|
|
12822
|
+
class HubContentPresignedUrls(Base):
|
|
12823
|
+
"""
|
|
12824
|
+
Class representing resource HubContentPresignedUrls
|
|
12825
|
+
|
|
12826
|
+
Attributes:
|
|
12827
|
+
hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub.
|
|
12828
|
+
hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference.
|
|
12829
|
+
hub_content_name: The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.
|
|
12830
|
+
authorized_url_configs: An array of authorized URL configurations, each containing a presigned URL and its corresponding local file path for proper file organization during download.
|
|
12831
|
+
hub_content_version: The version of the hub content. If not specified, the latest version is used.
|
|
12832
|
+
access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation.
|
|
12833
|
+
max_results: The maximum number of presigned URLs to return in the response. Default value is 100. Large models may contain hundreds of files, requiring pagination to retrieve all URLs.
|
|
12834
|
+
next_token: A token for pagination. If present, indicates that more presigned URLs are available. Use this token in a subsequent request to retrieve additional URLs.
|
|
12835
|
+
|
|
12836
|
+
"""
|
|
12837
|
+
|
|
12838
|
+
hub_name: Union[str, object]
|
|
12839
|
+
hub_content_type: str
|
|
12840
|
+
hub_content_name: Union[str, object]
|
|
12841
|
+
authorized_url_configs: List[shapes.AuthorizedUrl]
|
|
12842
|
+
hub_content_version: Optional[str] = Unassigned()
|
|
12843
|
+
access_config: Optional[shapes.PresignedUrlAccessConfig] = Unassigned()
|
|
12844
|
+
max_results: Optional[int] = Unassigned()
|
|
12845
|
+
next_token: Optional[str] = Unassigned()
|
|
12846
|
+
|
|
12847
|
+
def get_name(self) -> str:
|
|
12848
|
+
attributes = vars(self)
|
|
12849
|
+
resource_name = "hub_content_presigned_urls_name"
|
|
12850
|
+
resource_name_split = resource_name.split("_")
|
|
12851
|
+
attribute_name_candidates = []
|
|
12852
|
+
|
|
12853
|
+
l = len(resource_name_split)
|
|
12854
|
+
for i in range(0, l):
|
|
12855
|
+
attribute_name_candidates.append("_".join(resource_name_split[i:l]))
|
|
12856
|
+
|
|
12857
|
+
for attribute, value in attributes.items():
|
|
12858
|
+
if attribute == "name" or attribute in attribute_name_candidates:
|
|
12859
|
+
return value
|
|
12860
|
+
logger.error("Name attribute not found for object hub_content_presigned_urls")
|
|
12861
|
+
return None
|
|
12862
|
+
|
|
12863
|
+
@classmethod
|
|
12864
|
+
@Base.add_validate_call
|
|
12865
|
+
def create(
|
|
12866
|
+
cls,
|
|
12867
|
+
hub_name: Union[str, object],
|
|
12868
|
+
hub_content_type: str,
|
|
12869
|
+
hub_content_name: Union[str, object],
|
|
12870
|
+
hub_content_version: Optional[str] = Unassigned(),
|
|
12871
|
+
access_config: Optional[shapes.PresignedUrlAccessConfig] = Unassigned(),
|
|
12872
|
+
max_results: Optional[int] = Unassigned(),
|
|
12873
|
+
next_token: Optional[str] = Unassigned(),
|
|
12874
|
+
) -> Optional["HubContentPresignedUrls"]:
|
|
12875
|
+
"""
|
|
12876
|
+
Create a HubContentPresignedUrls resource
|
|
12877
|
+
|
|
12878
|
+
Parameters:
|
|
12879
|
+
hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub.
|
|
12880
|
+
hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference.
|
|
12881
|
+
hub_content_name: The name of the hub content for which to generate presigned URLs. This identifies the specific model or content within the hub.
|
|
12882
|
+
hub_content_version: The version of the hub content. If not specified, the latest version is used.
|
|
12883
|
+
access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation.
|
|
12884
|
+
max_results: The maximum number of presigned URLs to return in the response. Default value is 100. Large models may contain hundreds of files, requiring pagination to retrieve all URLs.
|
|
12885
|
+
next_token: A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated.
|
|
12886
|
+
session: Boto3 session.
|
|
12887
|
+
region: Region name.
|
|
12888
|
+
|
|
12889
|
+
Returns:
|
|
12890
|
+
The HubContentPresignedUrls resource.
|
|
12891
|
+
|
|
12892
|
+
Raises:
|
|
12893
|
+
botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
|
|
12894
|
+
The error message and error code can be parsed from the exception as follows:
|
|
12895
|
+
```
|
|
12896
|
+
try:
|
|
12897
|
+
# AWS service call here
|
|
12898
|
+
except botocore.exceptions.ClientError as e:
|
|
12899
|
+
error_message = e.response['Error']['Message']
|
|
12900
|
+
error_code = e.response['Error']['Code']
|
|
12901
|
+
```
|
|
12902
|
+
ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema
|
|
12903
|
+
LocalConfigNotFoundError: Raised when a configuration file is not found in local file system
|
|
12904
|
+
S3ConfigNotFoundError: Raised when a configuration file is not found in S3
|
|
12905
|
+
"""
|
|
12906
|
+
|
|
12907
|
+
operation_input_args = {
|
|
12908
|
+
"HubName": hub_name,
|
|
12909
|
+
"HubContentType": hub_content_type,
|
|
12910
|
+
"HubContentName": hub_content_name,
|
|
12911
|
+
"HubContentVersion": hub_content_version,
|
|
12912
|
+
"AccessConfig": access_config,
|
|
12913
|
+
"MaxResults": max_results,
|
|
12914
|
+
"NextToken": next_token,
|
|
12915
|
+
}
|
|
12916
|
+
# serialize the input request
|
|
12917
|
+
operation_input_args = serialize(operation_input_args)
|
|
12918
|
+
logger.debug(f"Serialized input request: {operation_input_args}")
|
|
12919
|
+
|
|
12920
|
+
client = Base.get_sagemaker_client(
|
|
12921
|
+
session=session, region_name=region, service_name="sagemaker"
|
|
12922
|
+
)
|
|
12923
|
+
|
|
12924
|
+
logger.debug(f"Calling create_hub_content_presigned_urls API")
|
|
12925
|
+
response = client.create_hub_content_presigned_urls(**operation_input_args)
|
|
12926
|
+
logger.debug(f"Response: {response}")
|
|
12927
|
+
|
|
12928
|
+
transformed_response = transform(response, "CreateHubContentPresignedUrlsResponse")
|
|
12929
|
+
return cls(**operation_input_args, **transformed_response)
|
|
12930
|
+
|
|
12931
|
+
|
|
12768
12932
|
class HubContentReference(Base):
|
|
12769
12933
|
"""
|
|
12770
12934
|
Class representing resource HubContentReference
|
|
@@ -16793,7 +16957,7 @@ class LabelingJob(Base):
|
|
|
16793
16957
|
|
|
16794
16958
|
Parameters:
|
|
16795
16959
|
labeling_job_name: The name of the labeling job. This name is used to identify the job in a list of labeling jobs. Labeling job names must be unique within an Amazon Web Services account and region. LabelingJobName is not case sensitive. For example, Example-job and example-job are considered the same labeling job name by Ground Truth.
|
|
16796
|
-
label_attribute_name: The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The LabelAttributeName must meet the following requirements. The name can't end with "-metadata". If you are using one of the
|
|
16960
|
+
label_attribute_name: The attribute name to use for the label in the output manifest file. This is the key for the key/value pair formed with the label that a worker assigns to the object. The LabelAttributeName must meet the following requirements. The name can't end with "-metadata". If you are using one of the built-in task types or one of the following, the attribute name must end with "-ref". Image semantic segmentation (SemanticSegmentation) and adjustment (AdjustmentSemanticSegmentation) labeling jobs for this task type. One exception is that verification (VerificationSemanticSegmentation) must not end with -"ref". Video frame object detection (VideoObjectDetection), and adjustment and verification (AdjustmentVideoObjectDetection) labeling jobs for this task type. Video frame object tracking (VideoObjectTracking), and adjustment and verification (AdjustmentVideoObjectTracking) labeling jobs for this task type. 3D point cloud semantic segmentation (3DPointCloudSemanticSegmentation), and adjustment and verification (Adjustment3DPointCloudSemanticSegmentation) labeling jobs for this task type. 3D point cloud object tracking (3DPointCloudObjectTracking), and adjustment and verification (Adjustment3DPointCloudObjectTracking) labeling jobs for this task type. If you are creating an adjustment or verification labeling job, you must use a different LabelAttributeName than the one used in the original labeling job. The original labeling job is the Ground Truth labeling job that produced the labels that you want verified or adjusted. To learn more about adjustment and verification labeling jobs, see Verify and Adjust Labels.
|
|
16797
16961
|
input_config: Input data for the labeling job, such as the Amazon S3 location of the data objects and the location of the manifest file that describes the data objects. You must specify at least one of the following: S3DataSource or SnsDataSource. Use SnsDataSource to specify an SNS input topic for a streaming labeling job. If you do not specify and SNS input topic ARN, Ground Truth will create a one-time labeling job that stops after all data objects in the input manifest file have been labeled. Use S3DataSource to specify an input manifest file for both streaming and one-time labeling jobs. Adding an S3DataSource is optional if you use SnsDataSource to create a streaming labeling job. If you use the Amazon Mechanical Turk workforce, your input data should not include confidential information, personal information or protected health information. Use ContentClassifiers to specify that your data is free of personally identifiable information and adult content.
|
|
16798
16962
|
output_config: The location of the output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any.
|
|
16799
16963
|
role_arn: The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform tasks on your behalf during data labeling. You must grant this role the necessary permissions so that Amazon SageMaker can successfully complete data labeling.
|
|
@@ -22387,6 +22551,7 @@ class NotebookInstance(Base):
|
|
|
22387
22551
|
failure_reason: If status is Failed, the reason it failed.
|
|
22388
22552
|
url: The URL that you use to connect to the Jupyter notebook that is running in your notebook instance.
|
|
22389
22553
|
instance_type: The type of ML compute instance running on the notebook instance.
|
|
22554
|
+
ip_address_type: The IP address type configured for the notebook instance. Returns ipv4 for IPv4-only connectivity or dualstack for both IPv4 and IPv6 connectivity.
|
|
22390
22555
|
subnet_id: The ID of the VPC subnet.
|
|
22391
22556
|
security_groups: The IDs of the VPC security groups.
|
|
22392
22557
|
role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the instance.
|
|
@@ -22412,6 +22577,7 @@ class NotebookInstance(Base):
|
|
|
22412
22577
|
failure_reason: Optional[str] = Unassigned()
|
|
22413
22578
|
url: Optional[str] = Unassigned()
|
|
22414
22579
|
instance_type: Optional[str] = Unassigned()
|
|
22580
|
+
ip_address_type: Optional[str] = Unassigned()
|
|
22415
22581
|
subnet_id: Optional[str] = Unassigned()
|
|
22416
22582
|
security_groups: Optional[List[str]] = Unassigned()
|
|
22417
22583
|
role_arn: Optional[str] = Unassigned()
|
|
@@ -22475,6 +22641,7 @@ class NotebookInstance(Base):
|
|
|
22475
22641
|
role_arn: str,
|
|
22476
22642
|
subnet_id: Optional[str] = Unassigned(),
|
|
22477
22643
|
security_group_ids: Optional[List[str]] = Unassigned(),
|
|
22644
|
+
ip_address_type: Optional[str] = Unassigned(),
|
|
22478
22645
|
kms_key_id: Optional[str] = Unassigned(),
|
|
22479
22646
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
22480
22647
|
lifecycle_config_name: Optional[str] = Unassigned(),
|
|
@@ -22500,6 +22667,7 @@ class NotebookInstance(Base):
|
|
|
22500
22667
|
role_arn: When you send any requests to Amazon Web Services resources from the notebook instance, SageMaker AI assumes this role to perform tasks on your behalf. You must grant this role necessary permissions so SageMaker AI can perform these tasks. The policy must allow the SageMaker AI service principal (sagemaker.amazonaws.com) permissions to assume this role. For more information, see SageMaker AI Roles. To be able to pass this role to SageMaker AI, the caller of this API must have the iam:PassRole permission.
|
|
22501
22668
|
subnet_id: The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance.
|
|
22502
22669
|
security_group_ids: The VPC security group IDs, in the form sg-xxxxxxxx. The security groups must be for the same VPC as specified in the subnet.
|
|
22670
|
+
ip_address_type: The IP address type for the notebook instance. Specify ipv4 for IPv4-only connectivity or dualstack for both IPv4 and IPv6 connectivity. When you specify dualstack, the subnet must support IPv6 CIDR blocks. If not specified, defaults to ipv4.
|
|
22503
22671
|
kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker AI uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the Amazon Web Services Key Management Service Developer Guide.
|
|
22504
22672
|
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.
|
|
22505
22673
|
lifecycle_config_name: The name of a lifecycle configuration to associate with the notebook instance. For information about lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance.
|
|
@@ -22509,7 +22677,7 @@ class NotebookInstance(Base):
|
|
|
22509
22677
|
default_code_repository: A Git repository to associate with the notebook instance as its default code repository. This can be either the name of a Git repository stored as a resource in your account, or the URL of a Git repository in Amazon Web Services CodeCommit or in any other Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances.
|
|
22510
22678
|
additional_code_repositories: An array of up to three Git repositories to associate with the notebook instance. These can be either the names of Git repositories stored as resources in your account, or the URL of Git repositories in Amazon Web Services CodeCommit or in any other Git repository. These repositories are cloned at the same level as the default repository of your notebook instance. For more information, see Associating Git Repositories with SageMaker AI Notebook Instances.
|
|
22511
22679
|
root_access: Whether root access is enabled or disabled for users of the notebook instance. The default value is Enabled. Lifecycle configurations need root access to be able to set up a notebook instance. Because of this, lifecycle configurations associated with a notebook instance always run with root access even if you disable root access for users.
|
|
22512
|
-
platform_identifier: The platform identifier of the notebook instance runtime environment.
|
|
22680
|
+
platform_identifier: The platform identifier of the notebook instance runtime environment. The default value is notebook-al2-v2.
|
|
22513
22681
|
instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance
|
|
22514
22682
|
session: Boto3 session.
|
|
22515
22683
|
region: Region name.
|
|
@@ -22543,6 +22711,7 @@ class NotebookInstance(Base):
|
|
|
22543
22711
|
"InstanceType": instance_type,
|
|
22544
22712
|
"SubnetId": subnet_id,
|
|
22545
22713
|
"SecurityGroupIds": security_group_ids,
|
|
22714
|
+
"IpAddressType": ip_address_type,
|
|
22546
22715
|
"RoleArn": role_arn,
|
|
22547
22716
|
"KmsKeyId": kms_key_id,
|
|
22548
22717
|
"Tags": tags,
|
|
@@ -22665,6 +22834,8 @@ class NotebookInstance(Base):
|
|
|
22665
22834
|
def update(
|
|
22666
22835
|
self,
|
|
22667
22836
|
instance_type: Optional[str] = Unassigned(),
|
|
22837
|
+
ip_address_type: Optional[str] = Unassigned(),
|
|
22838
|
+
platform_identifier: Optional[str] = Unassigned(),
|
|
22668
22839
|
role_arn: Optional[str] = Unassigned(),
|
|
22669
22840
|
lifecycle_config_name: Optional[str] = Unassigned(),
|
|
22670
22841
|
disassociate_lifecycle_config: Optional[bool] = Unassigned(),
|
|
@@ -22712,6 +22883,8 @@ class NotebookInstance(Base):
|
|
|
22712
22883
|
operation_input_args = {
|
|
22713
22884
|
"NotebookInstanceName": self.notebook_instance_name,
|
|
22714
22885
|
"InstanceType": instance_type,
|
|
22886
|
+
"IpAddressType": ip_address_type,
|
|
22887
|
+
"PlatformIdentifier": platform_identifier,
|
|
22715
22888
|
"RoleArn": role_arn,
|
|
22716
22889
|
"LifecycleConfigName": lifecycle_config_name,
|
|
22717
22890
|
"DisassociateLifecycleConfig": disassociate_lifecycle_config,
|
|
@@ -23826,7 +23999,7 @@ class PartnerApp(Base):
|
|
|
23826
23999
|
arn: The ARN of the SageMaker Partner AI App that was described.
|
|
23827
24000
|
name: The name of the SageMaker Partner AI App.
|
|
23828
24001
|
type: The type of SageMaker Partner AI App. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler.
|
|
23829
|
-
status: The status of the SageMaker Partner AI App.
|
|
24002
|
+
status: The status of the SageMaker Partner AI App. Creating: SageMaker AI is creating the partner AI app. The partner AI app is not available during creation. Updating: SageMaker AI is updating the partner AI app. The partner AI app is not available when updating. Deleting: SageMaker AI is deleting the partner AI app. The partner AI app is not available during deletion. Available: The partner AI app is provisioned and accessible. Failed: The partner AI app is in a failed state and isn't available. SageMaker AI is investigating the issue. For further guidance, contact Amazon Web Services Support. UpdateFailed: The partner AI app couldn't be updated but is available. Deleted: The partner AI app is permanently deleted and not available.
|
|
23830
24003
|
creation_time: The time that the SageMaker Partner AI App was created.
|
|
23831
24004
|
last_modified_time: The time that the SageMaker Partner AI App was last modified.
|
|
23832
24005
|
execution_role_arn: The ARN of the IAM role associated with the SageMaker Partner AI App.
|
|
@@ -24428,6 +24601,8 @@ class Pipeline(Base):
|
|
|
24428
24601
|
created_by:
|
|
24429
24602
|
last_modified_by:
|
|
24430
24603
|
parallelism_configuration: Lists the parallelism configuration applied to the pipeline.
|
|
24604
|
+
pipeline_version_display_name: The display name of the pipeline version.
|
|
24605
|
+
pipeline_version_description: The description of the pipeline version.
|
|
24431
24606
|
|
|
24432
24607
|
"""
|
|
24433
24608
|
|
|
@@ -24444,6 +24619,8 @@ class Pipeline(Base):
|
|
|
24444
24619
|
created_by: Optional[shapes.UserContext] = Unassigned()
|
|
24445
24620
|
last_modified_by: Optional[shapes.UserContext] = Unassigned()
|
|
24446
24621
|
parallelism_configuration: Optional[shapes.ParallelismConfiguration] = Unassigned()
|
|
24622
|
+
pipeline_version_display_name: Optional[str] = Unassigned()
|
|
24623
|
+
pipeline_version_description: Optional[str] = Unassigned()
|
|
24447
24624
|
|
|
24448
24625
|
def get_name(self) -> str:
|
|
24449
24626
|
attributes = vars(self)
|
|
@@ -24567,6 +24744,7 @@ class Pipeline(Base):
|
|
|
24567
24744
|
def get(
|
|
24568
24745
|
cls,
|
|
24569
24746
|
pipeline_name: str,
|
|
24747
|
+
pipeline_version_id: Optional[int] = Unassigned(),
|
|
24570
24748
|
session: Optional[Session] = None,
|
|
24571
24749
|
region: Optional[str] = None,
|
|
24572
24750
|
) -> Optional["Pipeline"]:
|
|
@@ -24575,6 +24753,7 @@ class Pipeline(Base):
|
|
|
24575
24753
|
|
|
24576
24754
|
Parameters:
|
|
24577
24755
|
pipeline_name: The name or Amazon Resource Name (ARN) of the pipeline to describe.
|
|
24756
|
+
pipeline_version_id: The ID of the pipeline version to describe.
|
|
24578
24757
|
session: Boto3 session.
|
|
24579
24758
|
region: Region name.
|
|
24580
24759
|
|
|
@@ -24596,6 +24775,7 @@ class Pipeline(Base):
|
|
|
24596
24775
|
|
|
24597
24776
|
operation_input_args = {
|
|
24598
24777
|
"PipelineName": pipeline_name,
|
|
24778
|
+
"PipelineVersionId": pipeline_version_id,
|
|
24599
24779
|
}
|
|
24600
24780
|
# serialize the input request
|
|
24601
24781
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -24616,6 +24796,7 @@ class Pipeline(Base):
|
|
|
24616
24796
|
@Base.add_validate_call
|
|
24617
24797
|
def refresh(
|
|
24618
24798
|
self,
|
|
24799
|
+
pipeline_version_id: Optional[int] = Unassigned(),
|
|
24619
24800
|
) -> Optional["Pipeline"]:
|
|
24620
24801
|
"""
|
|
24621
24802
|
Refresh a Pipeline resource
|
|
@@ -24638,6 +24819,7 @@ class Pipeline(Base):
|
|
|
24638
24819
|
|
|
24639
24820
|
operation_input_args = {
|
|
24640
24821
|
"PipelineName": self.pipeline_name,
|
|
24822
|
+
"PipelineVersionId": pipeline_version_id,
|
|
24641
24823
|
}
|
|
24642
24824
|
# serialize the input request
|
|
24643
24825
|
operation_input_args = serialize(operation_input_args)
|
|
@@ -24943,6 +25125,7 @@ class PipelineExecution(Base):
|
|
|
24943
25125
|
last_modified_by:
|
|
24944
25126
|
parallelism_configuration: The parallelism configuration applied to the pipeline.
|
|
24945
25127
|
selective_execution_config: The selective execution configuration applied to the pipeline run.
|
|
25128
|
+
pipeline_version_id: The ID of the pipeline version.
|
|
24946
25129
|
|
|
24947
25130
|
"""
|
|
24948
25131
|
|
|
@@ -24959,6 +25142,7 @@ class PipelineExecution(Base):
|
|
|
24959
25142
|
last_modified_by: Optional[shapes.UserContext] = Unassigned()
|
|
24960
25143
|
parallelism_configuration: Optional[shapes.ParallelismConfiguration] = Unassigned()
|
|
24961
25144
|
selective_execution_config: Optional[shapes.SelectiveExecutionConfig] = Unassigned()
|
|
25145
|
+
pipeline_version_id: Optional[int] = Unassigned()
|
|
24962
25146
|
|
|
24963
25147
|
def get_name(self) -> str:
|
|
24964
25148
|
attributes = vars(self)
|
|
@@ -26126,6 +26310,40 @@ class ProcessingJob(Base):
|
|
|
26126
26310
|
transform(response, "DescribeProcessingJobResponse", self)
|
|
26127
26311
|
return self
|
|
26128
26312
|
|
|
26313
|
+
@Base.add_validate_call
|
|
26314
|
+
def delete(
|
|
26315
|
+
self,
|
|
26316
|
+
) -> None:
|
|
26317
|
+
"""
|
|
26318
|
+
Delete a ProcessingJob resource
|
|
26319
|
+
|
|
26320
|
+
Raises:
|
|
26321
|
+
botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
|
|
26322
|
+
The error message and error code can be parsed from the exception as follows:
|
|
26323
|
+
```
|
|
26324
|
+
try:
|
|
26325
|
+
# AWS service call here
|
|
26326
|
+
except botocore.exceptions.ClientError as e:
|
|
26327
|
+
error_message = e.response['Error']['Message']
|
|
26328
|
+
error_code = e.response['Error']['Code']
|
|
26329
|
+
```
|
|
26330
|
+
ResourceInUse: Resource being accessed is in use.
|
|
26331
|
+
ResourceNotFound: Resource being access is not found.
|
|
26332
|
+
"""
|
|
26333
|
+
|
|
26334
|
+
client = Base.get_sagemaker_client()
|
|
26335
|
+
|
|
26336
|
+
operation_input_args = {
|
|
26337
|
+
"ProcessingJobName": self.processing_job_name,
|
|
26338
|
+
}
|
|
26339
|
+
# serialize the input request
|
|
26340
|
+
operation_input_args = serialize(operation_input_args)
|
|
26341
|
+
logger.debug(f"Serialized input request: {operation_input_args}")
|
|
26342
|
+
|
|
26343
|
+
client.delete_processing_job(**operation_input_args)
|
|
26344
|
+
|
|
26345
|
+
logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}")
|
|
26346
|
+
|
|
26129
26347
|
@Base.add_validate_call
|
|
26130
26348
|
def stop(self) -> None:
|
|
26131
26349
|
"""
|
|
@@ -26320,6 +26538,7 @@ class Project(Base):
|
|
|
26320
26538
|
project_description: The description of the project.
|
|
26321
26539
|
service_catalog_provisioning_details: Information used to provision a service catalog product. For information, see What is Amazon Web Services Service Catalog.
|
|
26322
26540
|
service_catalog_provisioned_product_details: Information about a provisioned service catalog product.
|
|
26541
|
+
template_provider_details: An array of template providers associated with the project.
|
|
26323
26542
|
created_by:
|
|
26324
26543
|
last_modified_time: The timestamp when project was last modified.
|
|
26325
26544
|
last_modified_by:
|
|
@@ -26337,6 +26556,7 @@ class Project(Base):
|
|
|
26337
26556
|
shapes.ServiceCatalogProvisionedProductDetails
|
|
26338
26557
|
] = Unassigned()
|
|
26339
26558
|
project_status: Optional[str] = Unassigned()
|
|
26559
|
+
template_provider_details: Optional[List[shapes.TemplateProviderDetail]] = Unassigned()
|
|
26340
26560
|
created_by: Optional[shapes.UserContext] = Unassigned()
|
|
26341
26561
|
creation_time: Optional[datetime.datetime] = Unassigned()
|
|
26342
26562
|
last_modified_time: Optional[datetime.datetime] = Unassigned()
|
|
@@ -26368,6 +26588,7 @@ class Project(Base):
|
|
|
26368
26588
|
shapes.ServiceCatalogProvisioningDetails
|
|
26369
26589
|
] = Unassigned(),
|
|
26370
26590
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
26591
|
+
template_providers: Optional[List[shapes.CreateTemplateProvider]] = Unassigned(),
|
|
26371
26592
|
session: Optional[Session] = None,
|
|
26372
26593
|
region: Optional[str] = None,
|
|
26373
26594
|
) -> Optional["Project"]:
|
|
@@ -26379,6 +26600,7 @@ class Project(Base):
|
|
|
26379
26600
|
project_description: A description for the project.
|
|
26380
26601
|
service_catalog_provisioning_details: The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see What is Amazon Web Services Service Catalog.
|
|
26381
26602
|
tags: An array of key-value pairs that you want to use to organize and track your Amazon Web Services resource costs. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.
|
|
26603
|
+
template_providers: An array of template provider configurations for creating infrastructure resources for the project.
|
|
26382
26604
|
session: Boto3 session.
|
|
26383
26605
|
region: Region name.
|
|
26384
26606
|
|
|
@@ -26411,6 +26633,7 @@ class Project(Base):
|
|
|
26411
26633
|
"ProjectDescription": project_description,
|
|
26412
26634
|
"ServiceCatalogProvisioningDetails": service_catalog_provisioning_details,
|
|
26413
26635
|
"Tags": tags,
|
|
26636
|
+
"TemplateProviders": template_providers,
|
|
26414
26637
|
}
|
|
26415
26638
|
|
|
26416
26639
|
operation_input_args = Base.populate_chained_attributes(
|
|
@@ -26522,6 +26745,7 @@ class Project(Base):
|
|
|
26522
26745
|
shapes.ServiceCatalogProvisioningUpdateDetails
|
|
26523
26746
|
] = Unassigned(),
|
|
26524
26747
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
26748
|
+
template_providers_to_update: Optional[List[shapes.UpdateTemplateProvider]] = Unassigned(),
|
|
26525
26749
|
) -> Optional["Project"]:
|
|
26526
26750
|
"""
|
|
26527
26751
|
Update a Project resource
|
|
@@ -26529,6 +26753,7 @@ class Project(Base):
|
|
|
26529
26753
|
Parameters:
|
|
26530
26754
|
service_catalog_provisioning_update_details: The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see What is Amazon Web Services Service Catalog.
|
|
26531
26755
|
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. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see Amazon Web Services Service Catalog Tag Update Constraints.
|
|
26756
|
+
template_providers_to_update: The template providers to update in the project.
|
|
26532
26757
|
|
|
26533
26758
|
Returns:
|
|
26534
26759
|
The Project resource.
|
|
@@ -26554,6 +26779,7 @@ class Project(Base):
|
|
|
26554
26779
|
"ProjectDescription": project_description,
|
|
26555
26780
|
"ServiceCatalogProvisioningUpdateDetails": service_catalog_provisioning_update_details,
|
|
26556
26781
|
"Tags": tags,
|
|
26782
|
+
"TemplateProvidersToUpdate": template_providers_to_update,
|
|
26557
26783
|
}
|
|
26558
26784
|
logger.debug(f"Input request: {operation_input_args}")
|
|
26559
26785
|
# serialize the input request
|
|
@@ -28518,6 +28744,40 @@ class TrainingJob(Base):
|
|
|
28518
28744
|
|
|
28519
28745
|
return self
|
|
28520
28746
|
|
|
28747
|
+
@Base.add_validate_call
|
|
28748
|
+
def delete(
|
|
28749
|
+
self,
|
|
28750
|
+
) -> None:
|
|
28751
|
+
"""
|
|
28752
|
+
Delete a TrainingJob resource
|
|
28753
|
+
|
|
28754
|
+
Raises:
|
|
28755
|
+
botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
|
|
28756
|
+
The error message and error code can be parsed from the exception as follows:
|
|
28757
|
+
```
|
|
28758
|
+
try:
|
|
28759
|
+
# AWS service call here
|
|
28760
|
+
except botocore.exceptions.ClientError as e:
|
|
28761
|
+
error_message = e.response['Error']['Message']
|
|
28762
|
+
error_code = e.response['Error']['Code']
|
|
28763
|
+
```
|
|
28764
|
+
ResourceInUse: Resource being accessed is in use.
|
|
28765
|
+
ResourceNotFound: Resource being access is not found.
|
|
28766
|
+
"""
|
|
28767
|
+
|
|
28768
|
+
client = Base.get_sagemaker_client()
|
|
28769
|
+
|
|
28770
|
+
operation_input_args = {
|
|
28771
|
+
"TrainingJobName": self.training_job_name,
|
|
28772
|
+
}
|
|
28773
|
+
# serialize the input request
|
|
28774
|
+
operation_input_args = serialize(operation_input_args)
|
|
28775
|
+
logger.debug(f"Serialized input request: {operation_input_args}")
|
|
28776
|
+
|
|
28777
|
+
client.delete_training_job(**operation_input_args)
|
|
28778
|
+
|
|
28779
|
+
logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}")
|
|
28780
|
+
|
|
28521
28781
|
@Base.add_validate_call
|
|
28522
28782
|
def stop(self) -> None:
|
|
28523
28783
|
"""
|
|
@@ -28632,6 +28892,69 @@ class TrainingJob(Base):
|
|
|
28632
28892
|
raise TimeoutExceededError(resouce_type="TrainingJob", status=current_status)
|
|
28633
28893
|
time.sleep(poll)
|
|
28634
28894
|
|
|
28895
|
+
@Base.add_validate_call
|
|
28896
|
+
def wait_for_delete(
|
|
28897
|
+
self,
|
|
28898
|
+
poll: int = 5,
|
|
28899
|
+
timeout: Optional[int] = None,
|
|
28900
|
+
) -> None:
|
|
28901
|
+
"""
|
|
28902
|
+
Wait for a TrainingJob resource to be deleted.
|
|
28903
|
+
|
|
28904
|
+
Parameters:
|
|
28905
|
+
poll: The number of seconds to wait between each poll.
|
|
28906
|
+
timeout: The maximum number of seconds to wait before timing out.
|
|
28907
|
+
|
|
28908
|
+
Raises:
|
|
28909
|
+
botocore.exceptions.ClientError: This exception is raised for AWS service related errors.
|
|
28910
|
+
The error message and error code can be parsed from the exception as follows:
|
|
28911
|
+
```
|
|
28912
|
+
try:
|
|
28913
|
+
# AWS service call here
|
|
28914
|
+
except botocore.exceptions.ClientError as e:
|
|
28915
|
+
error_message = e.response['Error']['Message']
|
|
28916
|
+
error_code = e.response['Error']['Code']
|
|
28917
|
+
```
|
|
28918
|
+
TimeoutExceededError: If the resource does not reach a terminal state before the timeout.
|
|
28919
|
+
DeleteFailedStatusError: If the resource reaches a failed state.
|
|
28920
|
+
WaiterError: Raised when an error occurs while waiting.
|
|
28921
|
+
"""
|
|
28922
|
+
start_time = time.time()
|
|
28923
|
+
|
|
28924
|
+
progress = Progress(
|
|
28925
|
+
SpinnerColumn("bouncingBar"),
|
|
28926
|
+
TextColumn("{task.description}"),
|
|
28927
|
+
TimeElapsedColumn(),
|
|
28928
|
+
)
|
|
28929
|
+
progress.add_task("Waiting for TrainingJob to be deleted...")
|
|
28930
|
+
status = Status("Current status:")
|
|
28931
|
+
|
|
28932
|
+
with Live(
|
|
28933
|
+
Panel(
|
|
28934
|
+
Group(progress, status),
|
|
28935
|
+
title="Wait Log Panel",
|
|
28936
|
+
border_style=Style(color=Color.BLUE.value),
|
|
28937
|
+
)
|
|
28938
|
+
):
|
|
28939
|
+
while True:
|
|
28940
|
+
try:
|
|
28941
|
+
self.refresh()
|
|
28942
|
+
current_status = self.training_job_status
|
|
28943
|
+
status.update(f"Current status: [bold]{current_status}")
|
|
28944
|
+
|
|
28945
|
+
if timeout is not None and time.time() - start_time >= timeout:
|
|
28946
|
+
raise TimeoutExceededError(
|
|
28947
|
+
resouce_type="TrainingJob", status=current_status
|
|
28948
|
+
)
|
|
28949
|
+
except botocore.exceptions.ClientError as e:
|
|
28950
|
+
error_code = e.response["Error"]["Code"]
|
|
28951
|
+
|
|
28952
|
+
if "ResourceNotFound" in error_code or "ValidationException" in error_code:
|
|
28953
|
+
logger.info("Resource was not found. It may have been deleted.")
|
|
28954
|
+
return
|
|
28955
|
+
raise e
|
|
28956
|
+
time.sleep(poll)
|
|
28957
|
+
|
|
28635
28958
|
@classmethod
|
|
28636
28959
|
@Base.add_validate_call
|
|
28637
28960
|
def get_all(
|
|
@@ -28732,6 +29055,9 @@ class TrainingPlan(Base):
|
|
|
28732
29055
|
total_instance_count: The total number of instances reserved in this training plan.
|
|
28733
29056
|
available_instance_count: The number of instances currently available for use in this training plan.
|
|
28734
29057
|
in_use_instance_count: The number of instances currently in use from this training plan.
|
|
29058
|
+
unhealthy_instance_count: The number of instances in the training plan that are currently in an unhealthy state.
|
|
29059
|
+
available_spare_instance_count: The number of available spare instances in the training plan.
|
|
29060
|
+
total_ultra_server_count: The total number of UltraServers reserved to this training plan.
|
|
28735
29061
|
target_resources: The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod) that can use this training plan. Training plans are specific to their target resource. A training plan designed for SageMaker training jobs can only be used to schedule and run training jobs. A training plan for HyperPod clusters can be used exclusively to provide compute resources to a cluster's instance group.
|
|
28736
29062
|
reserved_capacity_summaries: The list of Reserved Capacity providing the underlying compute resources of the plan.
|
|
28737
29063
|
|
|
@@ -28750,6 +29076,9 @@ class TrainingPlan(Base):
|
|
|
28750
29076
|
total_instance_count: Optional[int] = Unassigned()
|
|
28751
29077
|
available_instance_count: Optional[int] = Unassigned()
|
|
28752
29078
|
in_use_instance_count: Optional[int] = Unassigned()
|
|
29079
|
+
unhealthy_instance_count: Optional[int] = Unassigned()
|
|
29080
|
+
available_spare_instance_count: Optional[int] = Unassigned()
|
|
29081
|
+
total_ultra_server_count: Optional[int] = Unassigned()
|
|
28753
29082
|
target_resources: Optional[List[str]] = Unassigned()
|
|
28754
29083
|
reserved_capacity_summaries: Optional[List[shapes.ReservedCapacitySummary]] = Unassigned()
|
|
28755
29084
|
|
|
@@ -28775,6 +29104,7 @@ class TrainingPlan(Base):
|
|
|
28775
29104
|
cls,
|
|
28776
29105
|
training_plan_name: str,
|
|
28777
29106
|
training_plan_offering_id: str,
|
|
29107
|
+
spare_instance_count_per_ultra_server: Optional[int] = Unassigned(),
|
|
28778
29108
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
28779
29109
|
session: Optional[Session] = None,
|
|
28780
29110
|
region: Optional[str] = None,
|
|
@@ -28785,6 +29115,7 @@ class TrainingPlan(Base):
|
|
|
28785
29115
|
Parameters:
|
|
28786
29116
|
training_plan_name: The name of the training plan to create.
|
|
28787
29117
|
training_plan_offering_id: The unique identifier of the training plan offering to use for creating this plan.
|
|
29118
|
+
spare_instance_count_per_ultra_server: Number of spare instances to reserve per UltraServer for enhanced resiliency. Default is 1.
|
|
28788
29119
|
tags: An array of key-value pairs to apply to this training plan.
|
|
28789
29120
|
session: Boto3 session.
|
|
28790
29121
|
region: Region name.
|
|
@@ -28818,6 +29149,7 @@ class TrainingPlan(Base):
|
|
|
28818
29149
|
operation_input_args = {
|
|
28819
29150
|
"TrainingPlanName": training_plan_name,
|
|
28820
29151
|
"TrainingPlanOfferingId": training_plan_offering_id,
|
|
29152
|
+
"SpareInstanceCountPerUltraServer": spare_instance_count_per_ultra_server,
|
|
28821
29153
|
"Tags": tags,
|
|
28822
29154
|
}
|
|
28823
29155
|
|
|
@@ -31119,6 +31451,7 @@ class Workforce(Base):
|
|
|
31119
31451
|
source_ip_config: Optional[shapes.SourceIpConfig] = Unassigned(),
|
|
31120
31452
|
tags: Optional[List[shapes.Tag]] = Unassigned(),
|
|
31121
31453
|
workforce_vpc_config: Optional[shapes.WorkforceVpcConfigRequest] = Unassigned(),
|
|
31454
|
+
ip_address_type: Optional[str] = Unassigned(),
|
|
31122
31455
|
session: Optional[Session] = None,
|
|
31123
31456
|
region: Optional[str] = None,
|
|
31124
31457
|
) -> Optional["Workforce"]:
|
|
@@ -31132,6 +31465,7 @@ class Workforce(Base):
|
|
|
31132
31465
|
source_ip_config:
|
|
31133
31466
|
tags: An array of key-value pairs that contain metadata to help you categorize and organize our workforce. Each tag consists of a key and a value, both of which you define.
|
|
31134
31467
|
workforce_vpc_config: Use this parameter to configure a workforce using VPC.
|
|
31468
|
+
ip_address_type: Use this parameter to specify whether you want IPv4 only or dualstack (IPv4 and IPv6) to support your labeling workforce.
|
|
31135
31469
|
session: Boto3 session.
|
|
31136
31470
|
region: Region name.
|
|
31137
31471
|
|
|
@@ -31165,6 +31499,7 @@ class Workforce(Base):
|
|
|
31165
31499
|
"WorkforceName": workforce_name,
|
|
31166
31500
|
"Tags": tags,
|
|
31167
31501
|
"WorkforceVpcConfig": workforce_vpc_config,
|
|
31502
|
+
"IpAddressType": ip_address_type,
|
|
31168
31503
|
}
|
|
31169
31504
|
|
|
31170
31505
|
operation_input_args = Base.populate_chained_attributes(
|
|
@@ -31275,6 +31610,7 @@ class Workforce(Base):
|
|
|
31275
31610
|
source_ip_config: Optional[shapes.SourceIpConfig] = Unassigned(),
|
|
31276
31611
|
oidc_config: Optional[shapes.OidcConfig] = Unassigned(),
|
|
31277
31612
|
workforce_vpc_config: Optional[shapes.WorkforceVpcConfigRequest] = Unassigned(),
|
|
31613
|
+
ip_address_type: Optional[str] = Unassigned(),
|
|
31278
31614
|
) -> Optional["Workforce"]:
|
|
31279
31615
|
"""
|
|
31280
31616
|
Update a Workforce resource
|
|
@@ -31283,6 +31619,7 @@ class Workforce(Base):
|
|
|
31283
31619
|
source_ip_config: A list of one to ten worker IP address ranges (CIDRs) that can be used to access tasks assigned to this workforce. Maximum: Ten CIDR values
|
|
31284
31620
|
oidc_config: Use this parameter to update your OIDC Identity Provider (IdP) configuration for a workforce made using your own IdP.
|
|
31285
31621
|
workforce_vpc_config: Use this parameter to update your VPC configuration for a workforce.
|
|
31622
|
+
ip_address_type: Use this parameter to specify whether you want IPv4 only or dualstack (IPv4 and IPv6) to support your labeling workforce.
|
|
31286
31623
|
|
|
31287
31624
|
Returns:
|
|
31288
31625
|
The Workforce resource.
|
|
@@ -31308,6 +31645,7 @@ class Workforce(Base):
|
|
|
31308
31645
|
"SourceIpConfig": source_ip_config,
|
|
31309
31646
|
"OidcConfig": oidc_config,
|
|
31310
31647
|
"WorkforceVpcConfig": workforce_vpc_config,
|
|
31648
|
+
"IpAddressType": ip_address_type,
|
|
31311
31649
|
}
|
|
31312
31650
|
logger.debug(f"Input request: {operation_input_args}")
|
|
31313
31651
|
# serialize the input request
|