diff --git a/sagemaker-core/resource_plan.csv b/sagemaker-core/resource_plan.csv index c1e4082f9c..d692b3bf63 100644 --- a/sagemaker-core/resource_plan.csv +++ b/sagemaker-core/resource_plan.csv @@ -1,28 +1,22 @@ resource_name,type,class_methods,object_methods,chain_resource_name,additional_methods,raw_actions,resource_status_chain,resource_states +AIBenchmarkJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateAIBenchmarkJob', 'DeleteAIBenchmarkJob', 'DescribeAIBenchmarkJob', 'ListAIBenchmarkJobs', 'StopAIBenchmarkJob']","[{'name': 'AIBenchmarkJobStatus', 'shape_name': 'AIBenchmarkJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" +AIRecommendationJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateAIRecommendationJob', 'DeleteAIRecommendationJob', 'DescribeAIRecommendationJob', 'ListAIRecommendationJobs', 'StopAIRecommendationJob']","[{'name': 'AIRecommendationJobStatus', 'shape_name': 'AIRecommendationJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" +AIWorkloadConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateAIWorkloadConfig', 'DeleteAIWorkloadConfig', 'DescribeAIWorkloadConfig', 'ListAIWorkloadConfigs']",[],[] Action,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateAction', 'DeleteAction', 'DescribeAction', 'ListActions', 'UpdateAction']","[{'name': 'Status', 'shape_name': 'ActionStatus'}]","['Unknown', 'InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" -ActionInternal,resource,['create'],[],['Action'],[],['CreateActionInternal'],[],[] Algorithm,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateAlgorithm', 'DeleteAlgorithm', 'DescribeAlgorithm', 'ListAlgorithms']","[{'name': 'AlgorithmStatus', 'shape_name': 'AlgorithmStatus'}]","['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting']" -App,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']","['Space', 'UserProfile']",[],"['CreateApp', 'DeleteApp', 'DescribeApp', 'ListApps', 'UpdateApp']","[{'name': 'Status', 'shape_name': 'AppStatus'}]","['Deleted', 'Deleting', 'Failed', 'InService', 'Pending']" +App,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']","['Space', 'UserProfile']",[],"['CreateApp', 'DeleteApp', 'DescribeApp', 'ListApps']","[{'name': 'Status', 'shape_name': 'AppStatus'}]","['Deleted', 'Deleting', 'Failed', 'InService', 'Pending']" AppImageConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateAppImageConfig', 'DeleteAppImageConfig', 'DescribeAppImageConfig', 'ListAppImageConfigs', 'UpdateAppImageConfig']",[],[] Artifact,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateArtifact', 'DeleteArtifact', 'DescribeArtifact', 'ListArtifacts', 'UpdateArtifact']",[],[] -ArtifactInternal,resource,['create'],[],['Artifact'],[],['CreateArtifactInternal'],[],[] Association,resource,['get_all'],['delete'],[],[],"['DeleteAssociation', 'ListAssociations']",[],[] -AssociationInternal,resource,['add'],[],[],[],['AddAssociationInternal'],[],[] -AutoMLJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],"['ListAutoMLTasksForAutoMLJob', 'ListComponentJobsForAutoMLJob']","['CreateAutoMLJob', 'DeleteAutoMLJob', 'DescribeAutoMLJob', 'ListAutoMLJobs', 'ListAutoMLTasksForAutoMLJob', 'ListComponentJobsForAutoMLJob', 'StopAutoMLJob']","[{'name': 'AutoMLJobStatus', 'shape_name': 'AutoMLJobStatus'}]","['Completed', 'InProgress', 'Failed', 'Stopped', 'Stopping']" +AutoMLJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait']",[],[],"['CreateAutoMLJob', 'DescribeAutoMLJob', 'ListAutoMLJobs', 'StopAutoMLJob']","[{'name': 'AutoMLJobStatus', 'shape_name': 'AutoMLJobStatus'}]","['Completed', 'InProgress', 'Failed', 'Stopped', 'Stopping']" AutoMLJobV2,resource,"['create', 'get']","['refresh', 'wait']",['AutoMLJob'],[],"['CreateAutoMLJobV2', 'DescribeAutoMLJobV2']","[{'name': 'AutoMLJobStatus', 'shape_name': 'AutoMLJobStatus'}]","['Completed', 'InProgress', 'Failed', 'Stopped', 'Stopping']" -AutoMLTask,resource,"['create', 'get']","['refresh', 'wait_for_status']",['AutoMLJob'],[],"['CreateAutoMLTask', 'DescribeAutoMLTask']","[{'name': 'AutoMLTaskStatus', 'shape_name': 'AutoMLTaskStatus'}]","['Completed', 'InProgress', 'Failed', 'Stopped', 'Stopping']" -CapacitySchedule,resource,"['create', 'get', 'get_all', 'import']","['refresh', 'stop', 'update', 'wait_for_status']",[],[],"['CreateCapacitySchedule', 'DescribeCapacitySchedule', 'ImportCapacitySchedule', 'ListCapacitySchedules', 'StopCapacitySchedule', 'UpdateCapacitySchedule']","[{'name': 'Status', 'shape_name': 'CapacityScheduleStatus'}]","['Pending', 'Confirmed', 'Active', 'Updating', 'Stopping', 'Stopped', 'Rejected', 'Withdrawn']" Cluster,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],"['DescribeClusterNode', 'ListClusterNodes']","['CreateCluster', 'DeleteCluster', 'DescribeCluster', 'ListClusters', 'UpdateCluster']","[{'name': 'ClusterStatus', 'shape_name': 'ClusterStatus'}]","['Creating', 'Deleting', 'Failed', 'InService', 'RollingBack', 'SystemUpdating', 'Updating']" ClusterHealthCheck,resource,[],['start'],[],[],['StartClusterHealthCheck'],[],[] -ClusterNode,resource,[],"['start', 'stop']",[],[],"['StartClusterNode', 'StopClusterNode']",[],[] ClusterSchedulerConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateClusterSchedulerConfig', 'DeleteClusterSchedulerConfig', 'DescribeClusterSchedulerConfig', 'ListClusterSchedulerConfigs', 'UpdateClusterSchedulerConfig']","[{'name': 'Status', 'shape_name': 'SchedulerResourceStatus'}]","['Creating', 'CreateFailed', 'CreateRollbackFailed', 'Created', 'Updating', 'UpdateFailed', 'UpdateRollbackFailed', 'Updated', 'Deleting', 'DeleteFailed', 'DeleteRollbackFailed', 'Deleted']" CodeRepository,resource,"['create', 'get']","['delete', 'refresh', 'update']",[],[],"['CreateCodeRepository', 'DeleteCodeRepository', 'DescribeCodeRepository', 'UpdateCodeRepository']",[],[] CompilationJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateCompilationJob', 'DeleteCompilationJob', 'DescribeCompilationJob', 'ListCompilationJobs', 'StopCompilationJob']","[{'name': 'CompilationJobStatus', 'shape_name': 'CompilationJobStatus'}]","['INPROGRESS', 'COMPLETED', 'FAILED', 'STARTING', 'STOPPING', 'STOPPED']" ComputeQuota,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateComputeQuota', 'DeleteComputeQuota', 'DescribeComputeQuota', 'ListComputeQuotas', 'UpdateComputeQuota']","[{'name': 'Status', 'shape_name': 'SchedulerResourceStatus'}]","['Creating', 'CreateFailed', 'CreateRollbackFailed', 'Created', 'Updating', 'UpdateFailed', 'UpdateRollbackFailed', 'Updated', 'Deleting', 'DeleteFailed', 'DeleteRollbackFailed', 'Deleted']" Context,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateContext', 'DeleteContext', 'DescribeContext', 'ListContexts', 'UpdateContext']",[],[] -ContextInternal,resource,['create'],[],['Context'],[],['CreateContextInternal'],[],[] -CrossAccountTrainingJob,resource,['create'],[],['TrainingJob'],[],['CreateCrossAccountTrainingJob'],[],[] -CustomMonitoringJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateCustomMonitoringJobDefinition', 'DeleteCustomMonitoringJobDefinition', 'DescribeCustomMonitoringJobDefinition', 'ListCustomMonitoringJobDefinitions']",[],[] DataQualityJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateDataQualityJobDefinition', 'DeleteDataQualityJobDefinition', 'DescribeDataQualityJobDefinition', 'ListDataQualityJobDefinitions']",[],[] Device,resource,"['get', 'get_all']",['refresh'],[],[],"['DescribeDevice', 'ListDevices']",[],[] DeviceFleet,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateDeviceFleet', 'DeleteDeviceFleet', 'DescribeDeviceFleet', 'ListDeviceFleets', 'UpdateDeviceFleet']",[],[] @@ -31,82 +25,60 @@ EdgeDeploymentPlan,resource,"['create', 'get', 'get_all']","['delete', 'refresh' EdgePackagingJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait']","['CompilationJob', 'Model']",[],"['CreateEdgePackagingJob', 'DescribeEdgePackagingJob', 'ListEdgePackagingJobs', 'StopEdgePackagingJob']","[{'name': 'EdgePackagingJobStatus', 'shape_name': 'EdgePackagingJobStatus'}]","['STARTING', 'INPROGRESS', 'COMPLETED', 'FAILED', 'STOPPING', 'STOPPED']" Endpoint,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",['EndpointConfig'],[],"['CreateEndpoint', 'DeleteEndpoint', 'DescribeEndpoint', 'ListEndpoints', 'UpdateEndpoint']","[{'name': 'EndpointStatus', 'shape_name': 'EndpointStatus'}]","['OutOfService', 'Creating', 'Updating', 'SystemUpdating', 'RollingBack', 'InService', 'Deleting', 'Failed', 'UpdateRollbackFailed']" EndpointConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateEndpointConfig', 'DeleteEndpointConfig', 'DescribeEndpointConfig', 'ListEndpointConfigs']",[],[] -EndpointConfigInternal,resource,['create'],['delete'],[],[],"['CreateEndpointConfigInternal', 'DeleteEndpointConfigInternal']",[],[] -EndpointInternal,resource,['create'],['delete'],[],[],"['CreateEndpointInternal', 'DeleteEndpointInternal']",[],[] -EvaluationJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateEvaluationJob', 'DeleteEvaluationJob', 'DescribeEvaluationJob', 'ListEvaluationJobs', 'StopEvaluationJob']","[{'name': 'EvaluationJobStatus', 'shape_name': 'EvaluationJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" Experiment,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateExperiment', 'DeleteExperiment', 'DescribeExperiment', 'ListExperiments', 'UpdateExperiment']",[],[] -ExperimentInternal,resource,['create'],[],['Experiment'],[],['CreateExperimentInternal'],[],[] FeatureGroup,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateFeatureGroup', 'DeleteFeatureGroup', 'DescribeFeatureGroup', 'ListFeatureGroups', 'UpdateFeatureGroup']","[{'name': 'FeatureGroupStatus', 'shape_name': 'FeatureGroupStatus'}]","['Creating', 'Created', 'CreateFailed', 'Deleting', 'DeleteFailed']" -FeatureGroupInternal,resource,['create'],[],['FeatureGroup'],[],['CreateFeatureGroupInternal'],[],[] FeatureMetadata,resource,['get'],"['refresh', 'update']",[],[],"['DescribeFeatureMetadata', 'UpdateFeatureMetadata']",[],[] FlowDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateFlowDefinition', 'DeleteFlowDefinition', 'DescribeFlowDefinition', 'ListFlowDefinitions']","[{'name': 'FlowDefinitionStatus', 'shape_name': 'FlowDefinitionStatus'}]","['Initializing', 'Active', 'Failed', 'Deleting']" -GroundTruthJob,resource,"['create', 'get', 'get_all']","['refresh', 'wait']","['GroundTruthProject', 'GroundTruthWorkflow']",[],"['CreateGroundTruthJob', 'DescribeGroundTruthJob', 'ListGroundTruthJobs']","[{'name': 'GroundTruthJobStatus', 'shape_name': 'GroundTruthJobStatus'}]","['Initializing', 'InProgress', 'Completed', 'Failed']" -GroundTruthProject,resource,"['create', 'get', 'get_all']","['refresh', 'wait_for_status']",[],[],"['CreateGroundTruthProject', 'DescribeGroundTruthProject', 'ListGroundTruthProjects']","[{'name': 'GroundTruthProjectStatus', 'shape_name': 'GroundTruthProjectStatus'}]","['Pending', 'Active']" -GroundTruthWorkflow,resource,"['create', 'get', 'get_all']",['refresh'],['GroundTruthProject'],[],"['CreateGroundTruthWorkflow', 'DescribeGroundTruthWorkflow', 'ListGroundTruthWorkflows']",[],[] Hub,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateHub', 'DeleteHub', 'DescribeHub', 'ListHubs', 'UpdateHub']","[{'name': 'HubStatus', 'shape_name': 'HubStatus'}]","['InService', 'Creating', 'Updating', 'Deleting', 'CreateFailed', 'UpdateFailed', 'DeleteFailed']" HubContent,resource,"['get', 'get_all', 'import']","['delete', 'refresh', 'update', 'wait_for_status']",[],[],"['DeleteHubContent', 'DescribeHubContent', 'ImportHubContent', 'ListHubContents', 'UpdateHubContent']","[{'name': 'SupportStatus', 'shape_name': 'HubContentSupportStatus'}]","['Supported', 'Deprecated', 'Restricted']" HubContentPresignedUrls,resource,['create'],[],"['Hub', 'HubContent']",[],['CreateHubContentPresignedUrls'],[],[] HubContentReference,resource,['create'],"['delete', 'update']","['Hub', 'HubContent']",[],"['CreateHubContentReference', 'DeleteHubContentReference', 'UpdateHubContentReference']",[],[] -HumanTaskUi,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateHumanTaskUi', 'DeleteHumanTaskUi', 'DescribeHumanTaskUi', 'ListHumanTaskUis', 'UpdateHumanTaskUi']","[{'name': 'HumanTaskUiStatus', 'shape_name': 'HumanTaskUiStatus'}]","['Active', 'Deleting']" +HumanTaskUi,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateHumanTaskUi', 'DeleteHumanTaskUi', 'DescribeHumanTaskUi', 'ListHumanTaskUis']","[{'name': 'HumanTaskUiStatus', 'shape_name': 'HumanTaskUiStatus'}]","['Active', 'Deleting']" HyperParameterTuningJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait', 'wait_for_delete']",[],[],"['CreateHyperParameterTuningJob', 'DeleteHyperParameterTuningJob', 'DescribeHyperParameterTuningJob', 'ListHyperParameterTuningJobs', 'StopHyperParameterTuningJob']","[{'name': 'HyperParameterTuningJobStatus', 'shape_name': 'HyperParameterTuningJobStatus'}]","['Completed', 'InProgress', 'Failed', 'Stopped', 'Stopping', 'Deleting', 'DeleteFailed']" -HyperParameterTuningJobInternal,resource,['create'],['stop'],['HyperParameterTuningJob'],[],"['CreateHyperParameterTuningJobInternal', 'StopHyperParameterTuningJobInternal']",[],[] Image,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateImage', 'DeleteImage', 'DescribeImage', 'ListImages', 'UpdateImage']","[{'name': 'ImageStatus', 'shape_name': 'ImageStatus'}]","['CREATING', 'CREATED', 'CREATE_FAILED', 'UPDATING', 'UPDATE_FAILED', 'DELETING', 'DELETE_FAILED']" ImageVersion,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",['Image'],[],"['CreateImageVersion', 'DeleteImageVersion', 'DescribeImageVersion', 'ListImageVersions', 'UpdateImageVersion']","[{'name': 'ImageVersionStatus', 'shape_name': 'ImageVersionStatus'}]","['CREATING', 'CREATED', 'CREATE_FAILED', 'DELETING', 'DELETE_FAILED']" InferenceComponent,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",['Endpoint'],[],"['CreateInferenceComponent', 'DeleteInferenceComponent', 'DescribeInferenceComponent', 'ListInferenceComponents', 'UpdateInferenceComponent']","[{'name': 'InferenceComponentStatus', 'shape_name': 'InferenceComponentStatus'}]","['InService', 'Creating', 'Updating', 'Failed', 'Deleting']" InferenceExperiment,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_status']",['Endpoint'],[],"['CreateInferenceExperiment', 'DeleteInferenceExperiment', 'DescribeInferenceExperiment', 'ListInferenceExperiments', 'StartInferenceExperiment', 'StopInferenceExperiment', 'UpdateInferenceExperiment']","[{'name': 'Status', 'shape_name': 'InferenceExperimentStatus'}]","['Creating', 'Created', 'Updating', 'Running', 'Starting', 'Stopping', 'Completed', 'Cancelled']" -InferenceRecommendationsJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait', 'wait_for_delete']",[],[],"['CreateInferenceRecommendationsJob', 'DeleteInferenceRecommendationsJob', 'DescribeInferenceRecommendationsJob', 'ListInferenceRecommendationsJobs', 'StopInferenceRecommendationsJob']","[{'name': 'Status', 'shape_name': 'RecommendationJobStatus'}]","['PENDING', 'IN_PROGRESS', 'COMPLETED', 'FAILED', 'STOPPING', 'STOPPED', 'DELETING', 'DELETED']" -LabelingJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateLabelingJob', 'DeleteLabelingJob', 'DescribeLabelingJob', 'ListLabelingJobs', 'StopLabelingJob']","[{'name': 'LabelingJobStatus', 'shape_name': 'LabelingJobStatus'}]","['Initializing', 'InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" -LineageGroup,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateLineageGroup', 'DeleteLineageGroup', 'DescribeLineageGroup', 'ListLineageGroups']",[],[] -LineageGroupInternal,resource,['create'],[],['LineageGroup'],[],['CreateLineageGroupInternal'],[],[] +InferenceRecommendationsJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait', 'wait_for_delete']",[],[],"['CreateInferenceRecommendationsJob', 'DescribeInferenceRecommendationsJob', 'ListInferenceRecommendationsJobs', 'StopInferenceRecommendationsJob']","[{'name': 'Status', 'shape_name': 'RecommendationJobStatus'}]","['PENDING', 'IN_PROGRESS', 'COMPLETED', 'FAILED', 'STOPPING', 'STOPPED', 'DELETING', 'DELETED']" +LabelingJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait']",[],[],"['CreateLabelingJob', 'DescribeLabelingJob', 'ListLabelingJobs', 'StopLabelingJob']","[{'name': 'LabelingJobStatus', 'shape_name': 'LabelingJobStatus'}]","['Initializing', 'InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" +LineageGroup,resource,"['get', 'get_all']",['refresh'],[],[],"['DescribeLineageGroup', 'ListLineageGroups']",[],[] MlflowApp,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateMlflowApp', 'DeleteMlflowApp', 'DescribeMlflowApp', 'ListMlflowApps', 'UpdateMlflowApp']","[{'name': 'Status', 'shape_name': 'MlflowAppStatus'}]","['Creating', 'Created', 'CreateFailed', 'Updating', 'Updated', 'UpdateFailed', 'Deleting', 'DeleteFailed', 'Deleted']" -MlflowTrackingServer,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateMlflowTrackingServer', 'DeleteMlflowTrackingServer', 'DescribeMlflowTrackingServer', 'ListMlflowTrackingServers', 'StartMlflowTrackingServer', 'StopMlflowTrackingServer', 'UpdateMlflowTrackingServer']","[{'name': 'TrackingServerStatus', 'shape_name': 'TrackingServerStatus'}]","['Creating', 'Created', 'CreateFailed', 'Updating', 'Updated', 'UpdateFailed', 'Deleting', 'DeleteFailed', 'Stopping', 'Stopped', 'StopFailed', 'Starting', 'Started', 'StartFailed', 'MaintenanceInProgress', 'MaintenanceComplete', 'MaintenanceFailed', 'Upgrading', 'Upgraded', 'UpgradeFailed', 'RollingBack', 'RolledBack', 'RollbackFailed']" +MlflowTrackingServer,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateMlflowTrackingServer', 'DeleteMlflowTrackingServer', 'DescribeMlflowTrackingServer', 'ListMlflowTrackingServers', 'StartMlflowTrackingServer', 'StopMlflowTrackingServer', 'UpdateMlflowTrackingServer']","[{'name': 'TrackingServerStatus', 'shape_name': 'TrackingServerStatus'}]","['Creating', 'Created', 'CreateFailed', 'Updating', 'Updated', 'UpdateFailed', 'Deleting', 'DeleteFailed', 'Stopping', 'Stopped', 'StopFailed', 'Starting', 'Started', 'StartFailed', 'MaintenanceInProgress', 'MaintenanceComplete', 'MaintenanceFailed']" Model,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateModel', 'DeleteModel', 'DescribeModel', 'ListModels']",[],[] ModelBiasJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateModelBiasJobDefinition', 'DeleteModelBiasJobDefinition', 'DescribeModelBiasJobDefinition', 'ListModelBiasJobDefinitions']",[],[] ModelCard,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_status']",[],[],"['CreateModelCard', 'DeleteModelCard', 'DescribeModelCard', 'ListModelCards', 'UpdateModelCard']","[{'name': 'ModelCardStatus', 'shape_name': 'ModelCardStatus'}]","['Draft', 'PendingReview', 'Approved', 'Archived']" ModelCardExportJob,resource,"['create', 'get', 'get_all']","['refresh', 'wait']",['ModelCard'],[],"['CreateModelCardExportJob', 'DescribeModelCardExportJob', 'ListModelCardExportJobs']","[{'name': 'Status', 'shape_name': 'ModelCardExportJobStatus'}]","['InProgress', 'Completed', 'Failed']" ModelExplainabilityJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateModelExplainabilityJobDefinition', 'DeleteModelExplainabilityJobDefinition', 'DescribeModelExplainabilityJobDefinition', 'ListModelExplainabilityJobDefinitions']",[],[] -ModelInternal,resource,['create'],['delete'],[],[],"['CreateModelInternal', 'DeleteModelInternal']",[],[] ModelPackage,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",['ModelPackageGroup'],[],"['CreateModelPackage', 'DeleteModelPackage', 'DescribeModelPackage', 'ListModelPackages', 'UpdateModelPackage']","[{'name': 'ModelPackageStatus', 'shape_name': 'ModelPackageStatus'}]","['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting']" ModelPackageGroup,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateModelPackageGroup', 'DeleteModelPackageGroup', 'DescribeModelPackageGroup', 'ListModelPackageGroups']","[{'name': 'ModelPackageGroupStatus', 'shape_name': 'ModelPackageGroupStatus'}]","['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting', 'DeleteFailed']" ModelQualityJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateModelQualityJobDefinition', 'DeleteModelQualityJobDefinition', 'DescribeModelQualityJobDefinition', 'ListModelQualityJobDefinitions']",[],[] MonitoringAlert,resource,['get_all'],['update'],[],[],"['ListMonitoringAlerts', 'UpdateMonitoringAlert']",[],[] -MonitoringExecution,resource,"['get', 'get_all']","['refresh', 'wait_for_status']",[],[],"['DescribeMonitoringExecution', 'ListMonitoringExecutions']","[{'name': 'MonitoringExecutionStatus', 'shape_name': 'ExecutionStatus'}]","['Pending', 'Completed', 'CompletedWithViolations', 'InProgress', 'Failed', 'Stopping', 'Stopped']" +MonitoringExecution,resource,['get_all'],[],[],[],['ListMonitoringExecutions'],[],[] MonitoringSchedule,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_status']",[],[],"['CreateMonitoringSchedule', 'DeleteMonitoringSchedule', 'DescribeMonitoringSchedule', 'ListMonitoringSchedules', 'StartMonitoringSchedule', 'StopMonitoringSchedule', 'UpdateMonitoringSchedule']","[{'name': 'MonitoringScheduleStatus', 'shape_name': 'ScheduleStatus'}]","['Pending', 'Failed', 'Scheduled', 'Stopped']" NotebookInstance,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateNotebookInstance', 'DeleteNotebookInstance', 'DescribeNotebookInstance', 'ListNotebookInstances', 'StartNotebookInstance', 'StopNotebookInstance', 'UpdateNotebookInstance']","[{'name': 'NotebookInstanceStatus', 'shape_name': 'NotebookInstanceStatus'}]","['Pending', 'InService', 'Stopping', 'Stopped', 'Failed', 'Deleting', 'Updating']" NotebookInstanceLifecycleConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateNotebookInstanceLifecycleConfig', 'DeleteNotebookInstanceLifecycleConfig', 'DescribeNotebookInstanceLifecycleConfig', 'ListNotebookInstanceLifecycleConfigs', 'UpdateNotebookInstanceLifecycleConfig']",[],[] OptimizationJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateOptimizationJob', 'DeleteOptimizationJob', 'DescribeOptimizationJob', 'ListOptimizationJobs', 'StopOptimizationJob']","[{'name': 'OptimizationJobStatus', 'shape_name': 'OptimizationJobStatus'}]","['INPROGRESS', 'COMPLETED', 'FAILED', 'STARTING', 'STOPPING', 'STOPPED']" -PartnerApp,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'start', 'stop', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreatePartnerApp', 'DeletePartnerApp', 'DescribePartnerApp', 'ListPartnerApps', 'StartPartnerApp', 'StopPartnerApp', 'UpdatePartnerApp']","[{'name': 'Status', 'shape_name': 'PartnerAppStatus'}]","['Creating', 'Updating', 'Deleting', 'Available', 'Failed', 'UpdateFailed', 'Deleted']" +PartnerApp,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreatePartnerApp', 'DeletePartnerApp', 'DescribePartnerApp', 'ListPartnerApps', 'UpdatePartnerApp']","[{'name': 'Status', 'shape_name': 'PartnerAppStatus'}]","['Creating', 'Updating', 'Deleting', 'Available', 'Failed', 'UpdateFailed', 'Deleted']" PartnerAppPresignedUrl,resource,['create'],[],[],[],['CreatePartnerAppPresignedUrl'],[],[] -PersistentVolume,resource,"['create', 'get']","['delete', 'refresh', 'wait_for_delete', 'wait_for_status']",[],[],"['CreatePersistentVolume', 'DeletePersistentVolume', 'DescribePersistentVolume']","[{'name': 'Status', 'shape_name': 'PersistentVolumeStatus'}]","['Creating', 'Available', 'Attaching', 'InUse', 'Deleting', 'Failed']" Pipeline,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreatePipeline', 'DeletePipeline', 'DescribePipeline', 'ListPipelines', 'UpdatePipeline']","[{'name': 'PipelineStatus', 'shape_name': 'PipelineStatus'}]","['Active', 'Deleting']" PipelineExecution,resource,"['get', 'get_all']","['refresh', 'start', 'stop', 'update', 'wait_for_status']",[],[],"['DescribePipelineExecution', 'ListPipelineExecutions', 'StartPipelineExecution', 'StopPipelineExecution', 'UpdatePipelineExecution']","[{'name': 'PipelineExecutionStatus', 'shape_name': 'PipelineExecutionStatus'}]","['Executing', 'Stopping', 'Stopped', 'Failed', 'Succeeded']" PresignedDomainUrl,resource,['create'],[],"['Space', 'UserProfile']",[],['CreatePresignedDomainUrl'],[],[] -PresignedDomainUrlWithPrincipalTag,resource,['create'],[],[],[],['CreatePresignedDomainUrlWithPrincipalTag'],[],[] PresignedMlflowAppUrl,resource,['create'],[],[],[],['CreatePresignedMlflowAppUrl'],[],[] PresignedMlflowTrackingServerUrl,resource,['create'],[],[],[],['CreatePresignedMlflowTrackingServerUrl'],[],[] PresignedNotebookInstanceUrl,resource,['create'],[],['NotebookInstance'],[],['CreatePresignedNotebookInstanceUrl'],[],[] ProcessingJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",[],[],"['CreateProcessingJob', 'DeleteProcessingJob', 'DescribeProcessingJob', 'ListProcessingJobs', 'StopProcessingJob']","[{'name': 'ProcessingJobStatus', 'shape_name': 'ProcessingJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" -ProcessingJobInternal,resource,['create'],"['delete', 'stop']",['ProcessingJob'],[],"['CreateProcessingJobInternal', 'DeleteProcessingJobInternal', 'StopProcessingJobInternal']",[],[] Project,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_status']",[],[],"['CreateProject', 'DeleteProject', 'DescribeProject', 'ListProjects', 'UpdateProject']","[{'name': 'ProjectStatus', 'shape_name': 'ProjectStatus'}]","['Pending', 'CreateInProgress', 'CreateCompleted', 'CreateFailed', 'DeleteInProgress', 'DeleteFailed', 'DeleteCompleted', 'UpdateInProgress', 'UpdateCompleted', 'UpdateFailed']" -QuotaAllocation,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateQuotaAllocation', 'DeleteQuotaAllocation', 'DescribeQuotaAllocation', 'ListQuotaAllocations', 'UpdateQuotaAllocation']","[{'name': 'QuotaAllocationStatus', 'shape_name': 'SchedulerResourceStatus'}]","['Creating', 'CreateFailed', 'CreateRollbackFailed', 'Created', 'Updating', 'UpdateFailed', 'UpdateRollbackFailed', 'Updated', 'Deleting', 'DeleteFailed', 'DeleteRollbackFailed', 'Deleted']" ResourceCatalog,resource,['get_all'],[],[],[],['ListResourceCatalogs'],[],[] SagemakerServicecatalogPortfolio,resource,[],[],[],[],[],[],[] -Session,resource,[],['start'],[],[],['StartSession'],[],[] -SharedModel,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",['Model'],['CopySharedModel'],"['CopySharedModel', 'CreateSharedModel', 'DeleteSharedModel', 'DescribeSharedModel', 'ListSharedModels', 'UpdateSharedModel']",[],[] -SharedModelReviewers,resource,['add'],[],[],['RemoveSharedModelReviewers'],"['AddSharedModelReviewers', 'RemoveSharedModelReviewers']",[],[] Space,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateSpace', 'DeleteSpace', 'DescribeSpace', 'ListSpaces', 'UpdateSpace']","[{'name': 'Status', 'shape_name': 'SpaceStatus'}]","['Deleting', 'Failed', 'InService', 'Pending', 'Updating', 'Update_Failed', 'Delete_Failed']" StudioLifecycleConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh']",[],[],"['CreateStudioLifecycleConfig', 'DeleteStudioLifecycleConfig', 'DescribeStudioLifecycleConfig', 'ListStudioLifecycleConfigs']",[],[] SubscribedWorkteam,resource,"['get', 'get_all']",['refresh'],[],[],"['DescribeSubscribedWorkteam', 'ListSubscribedWorkteams']",[],[] Tag,resource,['get_all'],[],[],[],['ListTags'],[],[] TrainingJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'update', 'wait', 'wait_for_delete']",[],[],"['CreateTrainingJob', 'DeleteTrainingJob', 'DescribeTrainingJob', 'ListTrainingJobs', 'StopTrainingJob', 'UpdateTrainingJob']","[{'name': 'TrainingJobStatus', 'shape_name': 'TrainingJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped', 'Deleting']" -TrainingJobInternal,resource,['create'],"['delete', 'stop']",['TrainingJob'],[],"['CreateTrainingJobInternal', 'DeleteTrainingJobInternal', 'StopTrainingJobInternal']",[],[] -TrainingPlan,resource,"['create', 'get', 'get_all', 'import']","['refresh', 'stop', 'update', 'wait_for_status']",[],[],"['CreateTrainingPlan', 'DescribeTrainingPlan', 'ImportTrainingPlan', 'ListTrainingPlans', 'StopTrainingPlan', 'UpdateTrainingPlan']","[{'name': 'Status', 'shape_name': 'TrainingPlanStatus'}]","['Pending', 'Active', 'Scheduled', 'Expired', 'Failed']" -TransformJob,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait']",['Model'],[],"['CreateTransformJob', 'DeleteTransformJob', 'DescribeTransformJob', 'ListTransformJobs', 'StopTransformJob']","[{'name': 'TransformJobStatus', 'shape_name': 'TransformJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" -TransformJobInternal,resource,['create'],['stop'],"['Model', 'TransformJob']",[],"['CreateTransformJobInternal', 'StopTransformJobInternal']",[],[] +TrainingPlan,resource,"['create', 'get', 'get_all']","['refresh', 'wait_for_status']",[],['ExtendTrainingPlan'],"['CreateTrainingPlan', 'DescribeTrainingPlan', 'ExtendTrainingPlan', 'ListTrainingPlans']","[{'name': 'Status', 'shape_name': 'TrainingPlanStatus'}]","['Pending', 'Active', 'Scheduled', 'Expired', 'Failed']" +TransformJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait']",['Model'],[],"['CreateTransformJob', 'DescribeTransformJob', 'ListTransformJobs', 'StopTransformJob']","[{'name': 'TransformJobStatus', 'shape_name': 'TransformJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" Trial,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",['Experiment'],[],"['CreateTrial', 'DeleteTrial', 'DescribeTrial', 'ListTrials', 'UpdateTrial']",[],[] -TrialComponent,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateTrialComponent', 'DeleteTrialComponent', 'DescribeTrialComponent', 'ListTrialComponents', 'UpdateTrialComponent']","[{'name': 'Status', 'shape_name': 'TrialComponentStatus'}, {'name': 'PrimaryStatus', 'shape_name': 'TrialComponentPrimaryStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped', 'Deleting', 'DeleteFailed']" -TrialComponentInternal,resource,['create'],['update'],['TrialComponent'],['AssociateTrialComponentInternal'],"['AssociateTrialComponentInternal', 'CreateTrialComponentInternal', 'UpdateTrialComponentInternal']",[],[] -TrialInternal,resource,['create'],[],"['Experiment', 'Trial']",[],['CreateTrialInternal'],[],[] +TrialComponent,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_status']",[],[],"['CreateTrialComponent', 'DeleteTrialComponent', 'DescribeTrialComponent', 'ListTrialComponents', 'UpdateTrialComponent']","[{'name': 'Status', 'shape_name': 'TrialComponentStatus'}, {'name': 'PrimaryStatus', 'shape_name': 'TrialComponentPrimaryStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']" UserProfile,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateUserProfile', 'DeleteUserProfile', 'DescribeUserProfile', 'ListUserProfiles', 'UpdateUserProfile']","[{'name': 'Status', 'shape_name': 'UserProfileStatus'}]","['Deleting', 'Failed', 'InService', 'Pending', 'Updating', 'Update_Failed', 'Delete_Failed']" Workforce,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateWorkforce', 'DeleteWorkforce', 'DescribeWorkforce', 'ListWorkforces', 'UpdateWorkforce']","[{'name': 'Workforce', 'shape_name': 'Workforce'}, {'name': 'Status', 'shape_name': 'WorkforceStatus'}]","['Initializing', 'Updating', 'Deleting', 'Failed', 'Active']" Workteam,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",['Workforce'],[],"['CreateWorkteam', 'DeleteWorkteam', 'DescribeWorkteam', 'ListWorkteams', 'UpdateWorkteam']",[],[] diff --git a/sagemaker-core/sample/sagemaker/2017-07-24/service-2.json b/sagemaker-core/sample/sagemaker/2017-07-24/service-2.json index 128a70388c..a7640e3f46 100644 --- a/sagemaker-core/sample/sagemaker/2017-07-24/service-2.json +++ b/sagemaker-core/sample/sagemaker/2017-07-24/service-2.json @@ -2,6 +2,7 @@ "version":"2.0", "metadata":{ "apiVersion":"2017-07-24", + "auth":["aws.auth#sigv4"], "endpointPrefix":"api.sagemaker", "jsonVersion":"1.1", "protocol":"json", @@ -12,8 +13,7 @@ "signatureVersion":"v4", "signingName":"sagemaker", "targetPrefix":"SageMaker", - "uid":"sagemaker-2017-07-24", - "auth":["aws.auth#sigv4"] + "uid":"sagemaker-2017-07-24" }, "operations":{ "AddAssociation":{ @@ -30,30 +30,6 @@ ], "documentation":"
Creates an association between the source and the destination. A source can be associated with multiple destinations, and a destination can be associated with multiple sources. An association is a lineage tracking entity. For more information, see Amazon SageMaker ML Lineage Tracking.
" }, - "AddAssociationInternal":{ - "name":"AddAssociationInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"AddAssociationInternalRequest"}, - "output":{"shape":"AddAssociationInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "AddSharedModelReviewers":{ - "name":"AddSharedModelReviewers", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"AddSharedModelReviewersRequest"}, - "output":{"shape":"AddSharedModelReviewersResponse"}, - "internalonly":true - }, "AddTags":{ "name":"AddTags", "http":{ @@ -78,20 +54,6 @@ ], "documentation":"Associates a trial component with a trial. A trial component can be associated with multiple trials. To disassociate a trial component from a trial, call the DisassociateTrialComponent API.
" }, - "AssociateTrialComponentInternal":{ - "name":"AssociateTrialComponentInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"AssociateTrialComponentInternalRequest"}, - "output":{"shape":"AssociateTrialComponentInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "AttachClusterNodeVolume":{ "name":"AttachClusterNodeVolume", "http":{ @@ -101,8 +63,7 @@ "input":{"shape":"AttachClusterNodeVolumeRequest"}, "output":{"shape":"AttachClusterNodeVolumeResponse"}, "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} + {"shape":"ResourceNotFound"} ], "documentation":"Attaches your Amazon Elastic Block Store (Amazon EBS) volume to a node in your EKS orchestrated HyperPod cluster.
This API works with the Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver to manage the lifecycle of persistent storage in your HyperPod EKS clusters.
" }, @@ -116,7 +77,6 @@ "output":{"shape":"BatchAddClusterNodesResponse"}, "errors":[ {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"}, {"shape":"ResourceLimitExceeded"} ], "documentation":"Adds nodes to a HyperPod cluster by incrementing the target count for one or more instance groups. This operation returns a unique NodeLogicalId for each node being added, which can be used to track the provisioning status of the node. This API provides a safer alternative to UpdateCluster for scaling operations by avoiding unintended configuration changes.
This API is only supported for clusters using Continuous as the NodeProvisioningMode.
Deletes specific nodes within a SageMaker HyperPod cluster. BatchDeleteClusterNodes accepts a cluster name and a list of node IDs.
To safeguard your work, back up your data to Amazon S3 or an FSx for Lustre file system before invoking the API on a worker node group. This will help prevent any potential data loss from the instance root volume. For more information about backup, see Use the backup script provided by SageMaker HyperPod.
If you want to invoke this API on an existing cluster, you'll first need to patch the cluster by running the UpdateClusterSoftware API. For more information about patching a cluster, see Update the SageMaker HyperPod platform software of a cluster.
This action batch describes a list of versioned model packages
" }, - "BatchGetMetrics":{ - "name":"BatchGetMetrics", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"BatchGetMetricsRequest"}, - "output":{"shape":"BatchGetMetricsResponse"}, - "internalonly":true - }, - "BatchPutMetrics":{ - "name":"BatchPutMetrics", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"BatchPutMetricsRequest"}, - "output":{"shape":"BatchPutMetricsResponse"}, - "internalonly":true - }, "BatchRebootClusterNodes":{ "name":"BatchRebootClusterNodes", "http":{ @@ -174,72 +113,79 @@ "input":{"shape":"BatchRebootClusterNodesRequest"}, "output":{"shape":"BatchRebootClusterNodesResponse"}, "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} - ] + {"shape":"ResourceNotFound"} + ], + "documentation":"Reboots specific nodes within a SageMaker HyperPod cluster using a soft recovery mechanism. BatchRebootClusterNodes performs a graceful reboot of the specified nodes by calling the Amazon Elastic Compute Cloud RebootInstances API, which attempts to cleanly shut down the operating system before restarting the instance.
This operation is useful for recovering from transient issues or applying certain configuration changes that require a restart.
Rebooting a node may cause temporary service interruption for workloads running on that node. Ensure your workloads can handle node restarts or use appropriate scheduling to minimize impact.
You can reboot up to 25 nodes in a single request.
For SageMaker HyperPod clusters using the Slurm workload manager, ensure rebooting nodes will not disrupt critical cluster operations.
Replaces specific nodes within a SageMaker HyperPod cluster with new hardware. BatchReplaceClusterNodes terminates the specified instances and provisions new replacement instances with the same configuration but fresh hardware. The Amazon Machine Image (AMI) and instance configuration remain the same.
This operation is useful for recovering from hardware failures or persistent issues that cannot be resolved through a reboot.
Data Loss Warning: Replacing nodes destroys all instance volumes, including both root and secondary volumes. All data stored on these volumes will be permanently lost and cannot be recovered.
To safeguard your work, back up your data to Amazon S3 or an FSx for Lustre file system before invoking the API on a worker node group. This will help prevent any potential data loss from the instance root volume. For more information about backup, see Use the backup script provided by SageMaker HyperPod.
If you want to invoke this API on an existing cluster, you'll first need to patch the cluster by running the UpdateClusterSoftware API. For more information about patching a cluster, see Update the SageMaker HyperPod platform software of a cluster.
You can replace up to 25 nodes in a single request.
Creates a benchmark job that runs performance benchmarks against inference infrastructure using a predefined AI workload configuration. The benchmark job measures metrics such as latency, throughput, and cost for your generative AI inference endpoints.
" }, - "CopySharedModel":{ - "name":"CopySharedModel", + "CreateAIRecommendationJob":{ + "name":"CreateAIRecommendationJob", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"CopySharedModelRequest"}, - "output":{"shape":"CopySharedModelResponse"}, - "internalonly":true + "input":{"shape":"CreateAIRecommendationJobRequest"}, + "output":{"shape":"CreateAIRecommendationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFound"}, + {"shape":"ResourceInUse"}, + {"shape":"ResourceLimitExceeded"} + ], + "documentation":"Creates a recommendation job that generates intelligent optimization recommendations for generative AI inference deployments. The job analyzes your model, workload configuration, and performance targets to recommend optimal instance types, model optimization techniques (such as quantization and speculative decoding), and deployment configurations.
" }, - "CreateAction":{ - "name":"CreateAction", + "CreateAIWorkloadConfig":{ + "name":"CreateAIWorkloadConfig", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"CreateActionRequest"}, - "output":{"shape":"CreateActionResponse"}, + "input":{"shape":"CreateAIWorkloadConfigRequest"}, + "output":{"shape":"CreateAIWorkloadConfigResponse"}, "errors":[ + {"shape":"ResourceInUse"}, {"shape":"ResourceLimitExceeded"} ], - "documentation":"Creates an action. An action is a lineage tracking entity that represents an action or activity. For example, a model deployment or an HPO job. Generally, an action involves at least one input or output artifact. For more information, see Amazon SageMaker ML Lineage Tracking.
" + "documentation":"Creates a reusable AI workload configuration that defines datasets, data sources, and benchmark tool settings for consistent performance testing of generative AI inference deployments on Amazon SageMaker AI.
" }, - "CreateActionInternal":{ - "name":"CreateActionInternal", + "CreateAction":{ + "name":"CreateAction", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"CreateActionInternalRequest"}, - "output":{"shape":"CreateActionInternalResponse"}, + "input":{"shape":"CreateActionRequest"}, + "output":{"shape":"CreateActionResponse"}, "errors":[ {"shape":"ResourceLimitExceeded"} ], - "internalonly":true + "documentation":"Creates an action. An action is a lineage tracking entity that represents an action or activity. For example, a model deployment or an HPO job. Generally, an action involves at least one input or output artifact. For more information, see Amazon SageMaker ML Lineage Tracking.
" }, "CreateAlgorithm":{ "name":"CreateAlgorithm", @@ -291,19 +237,6 @@ ], "documentation":"Creates an artifact. An artifact is a lineage tracking entity that represents a URI addressable object or data. Some examples are the S3 URI of a dataset and the ECR registry path of an image. For more information, see Amazon SageMaker ML Lineage Tracking.
" }, - "CreateArtifactInternal":{ - "name":"CreateArtifactInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateArtifactInternalRequest"}, - "output":{"shape":"CreateArtifactInternalResponse"}, - "errors":[ - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreateAutoMLJob":{ "name":"CreateAutoMLJob", "http":{ @@ -332,35 +265,6 @@ ], "documentation":"Creates an Autopilot job also referred to as Autopilot experiment or AutoML job V2.
An AutoML job in SageMaker AI is a fully automated process that allows you to build machine learning models with minimal effort and machine learning expertise. When initiating an AutoML job, you provide your data and optionally specify parameters tailored to your use case. SageMaker AI then automates the entire model development lifecycle, including data preprocessing, model training, tuning, and evaluation. AutoML jobs are designed to simplify and accelerate the model building process by automating various tasks and exploring different combinations of machine learning algorithms, data preprocessing techniques, and hyperparameter values. The output of an AutoML job comprises one or more trained models ready for deployment and inference. Additionally, SageMaker AI AutoML jobs generate a candidate model leaderboard, allowing you to select the best-performing model for deployment.
For more information about AutoML jobs, see https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html in the SageMaker AI developer guide.
AutoML jobs V2 support various problem types such as regression, binary, and multiclass classification with tabular data, text and image classification, time-series forecasting, and fine-tuning of large language models (LLMs) for text generation.
CreateAutoMLJobV2 and DescribeAutoMLJobV2 are new versions of CreateAutoMLJob and DescribeAutoMLJob which offer backward compatibility.
CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as time-series forecasting, non-tabular problem types such as image or text classification, and text generation (LLMs fine-tuning).
Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.
For the list of available problem types supported by CreateAutoMLJobV2, see AutoMLProblemTypeConfig.
You can find the best-performing model after you run an AutoML job V2 by calling DescribeAutoMLJobV2.
" }, - "CreateAutoMLTask":{ - "name":"CreateAutoMLTask", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateAutoMLTaskRequest"}, - "output":{"shape":"CreateAutoMLTaskResponse"}, - "errors":[ - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "CreateCapacitySchedule":{ - "name":"CreateCapacitySchedule", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateCapacityScheduleRequest"}, - "output":{"shape":"CreateCapacityScheduleResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreateCluster":{ "name":"CreateCluster", "http":{ @@ -370,11 +274,10 @@ "input":{"shape":"CreateClusterRequest"}, "output":{"shape":"CreateClusterResponse"}, "errors":[ - {"shape":"DryRunOperation"}, {"shape":"ResourceInUse"}, {"shape":"ResourceLimitExceeded"} ], - "documentation":"Creates a SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide.
" + "documentation":"Creates an Amazon SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide.
" }, "CreateClusterSchedulerConfig":{ "name":"CreateClusterSchedulerConfig", @@ -386,7 +289,6 @@ "output":{"shape":"CreateClusterSchedulerConfigResponse"}, "errors":[ {"shape":"ConflictException"}, - {"shape":"DryRunOperation"}, {"shape":"ResourceLimitExceeded"} ], "documentation":"Create cluster policy configuration. This policy is used for task prioritization and fair-share allocation of idle compute. This helps prioritize critical workloads and distributes idle compute across entities.
" @@ -425,7 +327,6 @@ "output":{"shape":"CreateComputeQuotaResponse"}, "errors":[ {"shape":"ConflictException"}, - {"shape":"DryRunOperation"}, {"shape":"ResourceLimitExceeded"} ], "documentation":"Create compute allocation definition. This defines how compute is allocated, shared, and borrowed for specified entities. Specifically, how to lend and borrow idle compute and assign a fair-share weight to the specified entities.
" @@ -443,47 +344,6 @@ ], "documentation":"Creates a context. A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking.
" }, - "CreateContextInternal":{ - "name":"CreateContextInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateContextInternalRequest"}, - "output":{"shape":"CreateContextInternalResponse"}, - "errors":[ - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "CreateCrossAccountTrainingJob":{ - "name":"CreateCrossAccountTrainingJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateCrossAccountTrainingJobRequest"}, - "output":{"shape":"CreateCrossAccountTrainingJobResponse"}, - "errors":[ - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "CreateCustomMonitoringJobDefinition":{ - "name":"CreateCustomMonitoringJobDefinition", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateCustomMonitoringJobDefinitionRequest"}, - "output":{"shape":"CreateCustomMonitoringJobDefinitionResponse"}, - "errors":[ - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreateDataQualityJobDefinition":{ "name":"CreateDataQualityJobDefinition", "http":{ @@ -588,40 +448,6 @@ ], "documentation":"Creates an endpoint configuration that SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want SageMaker to provision. Then you call the CreateEndpoint API.
Use this API if you want to use SageMaker hosting services to deploy models into production.
In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want SageMaker to provision. This includes the number and type of ML compute instances to deploy.
If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.
When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.
Creates a SageMaker experiment. An experiment is a collection of trials that are observed, compared and evaluated as a group. A trial is a set of steps, called trial components, that produce a machine learning model.
In the Studio UI, trials are referred to as run groups and trial components are referred to as runs.
The goal of an experiment is to determine the components that produce the best model. Multiple trials are performed, each one isolating and measuring the impact of a change to one or more inputs, while keeping the remaining inputs constant.
When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.
You can add tags to experiments, trials, trial components and then use the Search API to search for the tags.
To add a description to an experiment, specify the optional Description parameter. To add a description later, or to change the description, call the UpdateExperiment API.
To get a list of all your experiments, call the ListExperiments API. To view an experiment's properties, call the DescribeExperiment API. To get a list of all the trials associated with an experiment, call the ListTrials API. To create a trial call the CreateTrial API.
" }, - "CreateExperimentInternal":{ - "name":"CreateExperimentInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateExperimentInternalRequest"}, - "output":{"shape":"CreateExperimentInternalResponse"}, - "errors":[ - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreateFeatureGroup":{ "name":"CreateFeatureGroup", "http":{ @@ -662,20 +475,6 @@ ], "documentation":"Create a new FeatureGroup. A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record.
The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features, a RecordIdentifierFeatureName, an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore. Check Amazon Web Services service quotas to see the FeatureGroups quota for your Amazon Web Services account.
Note that it can take approximately 10-15 minutes to provision an OnlineStore FeatureGroup with the InMemory StorageType.
You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup.
Creates a flow definition.
" }, - "CreateGroundTruthJob":{ - "name":"CreateGroundTruthJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateGroundTruthJobRequest"}, - "output":{"shape":"CreateGroundTruthJobResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "CreateGroundTruthProject":{ - "name":"CreateGroundTruthProject", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateGroundTruthProjectRequest"}, - "output":{"shape":"CreateGroundTruthProjectResponse"}, - "errors":[ - {"shape":"ConflictException"} - ], - "internalonly":true - }, - "CreateGroundTruthWorkflow":{ - "name":"CreateGroundTruthWorkflow", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateGroundTruthWorkflowRequest"}, - "output":{"shape":"CreateGroundTruthWorkflowResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "CreateHub":{ "name":"CreateHub", "http":{ @@ -798,20 +556,6 @@ ], "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..
Creates a job that uses workers to label the data objects in your input dataset. You can use the labeled data to train machine learning models.
You can select your workforce from one of three providers:
A private workforce that you create. It can include employees, contractors, and outside experts. Use a private workforce when want the data to stay within your organization or when a specific set of skills is required.
One or more vendors that you select from the Amazon Web Services Marketplace. Vendors provide expertise in specific areas.
The Amazon Mechanical Turk workforce. This is the largest workforce, but it should only be used for public data or data that has been stripped of any personally identifiable information.
You can also use automated data labeling to reduce the number of data objects that need to be labeled by a human. Automated data labeling uses active learning to determine if a data object can be labeled by machine or if it needs to be sent to a human worker. For more information, see Using Automated Data Labeling.
The data objects to be labeled are contained in an Amazon S3 bucket. You create a manifest file that describes the location of each object. For more information, see Using Input and Output Data.
The output can be used as the manifest file for another labeling job or as training data for your machine learning models.
You can use this operation to create a static labeling job or a streaming labeling job. A static labeling job stops if all data objects in the input manifest file identified in ManifestS3Uri have been labeled. A streaming labeling job runs perpetually until it is manually stopped, or remains idle for 10 days. You can send new data objects to an active (InProgress) streaming labeling job in real time. To learn how to create a static labeling job, see Create a Labeling Job (API) in the Amazon SageMaker Developer Guide. To learn how to create a streaming labeling job, see Create a Streaming Labeling Job.
Creates an MLflow Tracking Server using a general purpose Amazon S3 bucket as the artifact store.
" }, "CreateMlflowTrackingServer":{ "name":"CreateMlflowTrackingServer", @@ -1018,16 +736,6 @@ ], "documentation":"Creates the definition for a model explainability job.
" }, - "CreateModelInternal":{ - "name":"CreateModelInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateModelInternalInput"}, - "output":{"shape":"CreateModelInternalOutput"}, - "internalonly":true - }, "CreateModelPackage":{ "name":"CreateModelPackage", "http":{ @@ -1107,7 +815,7 @@ "errors":[ {"shape":"ResourceLimitExceeded"} ], - "documentation":"Creates a lifecycle configuration that you can associate with a notebook instance. A lifecycle configuration is a collection of shell scripts that run when you create or start a notebook instance.
Each lifecycle configuration script has a limit of 16384 characters.
The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin.
View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook].
Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.
For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance.
" + "documentation":"Creates a lifecycle configuration that you can associate with a notebook instance. A lifecycle configuration is a collection of shell scripts that run when you create or start a notebook instance.
Each lifecycle configuration script has a limit of 16384 characters.
The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin.
View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook].
Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started.
For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance.
Lifecycle configuration scripts execute with root access and the notebook instance's IAM execution role privileges. Grant this permission only to trusted principals. See Customize a Notebook Instance Using a Lifecycle Configuration Script for security best practices.
Creates a presigned URL to access an Amazon SageMaker Partner AI App.
" }, - "CreatePersistentVolume":{ - "name":"CreatePersistentVolume", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreatePersistentVolumeRequest"}, - "output":{"shape":"CreatePersistentVolumeResponse"}, - "errors":[ - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreatePipeline":{ "name":"CreatePipeline", "http":{ @@ -1193,19 +886,6 @@ ], "documentation":"Creates a URL for a specified UserProfile in a Domain. When accessed in a web browser, the user will be automatically signed in to the domain, and granted access to all of the Apps and files associated with the Domain's Amazon Elastic File System volume. This operation can only be called when the authentication mode equals IAM.
The IAM role or user passed to this API defines the permissions to access the app. Once the presigned URL is created, no additional permission is required to access this URL. IAM authorization policies for this API are also enforced for every HTTP request and WebSocket frame that attempts to connect to the app.
You can restrict access to this API and to the URL that it returns to a list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you specify. For more information, see Connect to Amazon SageMaker AI Studio Through an Interface VPC Endpoint .
The URL that you get from a call to CreatePresignedDomainUrl has a default timeout of 5 minutes. You can configure this value using ExpiresInSeconds. If you try to use the URL after the timeout limit expires, you are directed to the Amazon Web Services console sign-in page.
The JupyterLab session default expiration time is 12 hours. You can configure this value using SessionExpirationDurationInSeconds.
Returns a presigned URL that you can use to connect to the MLflow UI attached to your MLflow App. For more information, see Launch the MLflow UI using a presigned URL.
" }, "CreatePresignedMlflowTrackingServerUrl":{ "name":"CreatePresignedMlflowTrackingServerUrl", @@ -1257,20 +937,6 @@ ], "documentation":"Creates a processing job.
" }, - "CreateProcessingJobInternal":{ - "name":"CreateProcessingJobInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateProcessingJobInternalRequest"}, - "output":{"shape":"CreateProcessingJobInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "CreateProject":{ "name":"CreateProject", "http":{ @@ -1284,30 +950,6 @@ ], "documentation":"Creates a machine learning (ML) project that can contain one or more templates that set up an ML pipeline from training to deploying an approved model.
" }, - "CreateQuotaAllocation":{ - "name":"CreateQuotaAllocation", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateQuotaAllocationRequest"}, - "output":{"shape":"CreateQuotaAllocationResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "CreateSharedModel":{ - "name":"CreateSharedModel", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateSharedModelRequest"}, - "output":{"shape":"CreateSharedModelResponse"}, - "internalonly":true - }, "CreateSpace":{ "name":"CreateSpace", "http":{ @@ -1350,20 +992,6 @@ ], "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:
AlgorithmSpecification - Identifies the training algorithm to use.
HyperParameters - Specify these algorithm-specific parameters to enable the estimation of model parameters during training. Hyperparameters can be tuned to optimize this learning process. For a list of hyperparameters for each training algorithm provided by SageMaker, see Algorithms.
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 security-sensitive information included in the request hyperparameter variable or plain text fields.
InputDataConfig - Describes the input required by the training job and the Amazon S3, EFS, or FSx location where it is stored.
OutputDataConfig - Identifies the Amazon S3 bucket where you want SageMaker to save the results of model training.
ResourceConfig - Identifies the resources, ML compute instances, and ML storage volumes to deploy for model training. In distributed training, you specify more than one instance.
EnableManagedSpotTraining - Optimize the cost of training machine learning models by up to 80% by using Amazon EC2 Spot instances. For more information, see Managed Spot Training.
RoleArn - The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during model training. You must grant this role the necessary permissions so that SageMaker can successfully complete model training.
StoppingCondition - To help cap training costs, use MaxRuntimeInSeconds to set a time limit for training. Use MaxWaitTimeInSeconds to specify how long a managed spot training job has to complete.
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.
RetryStrategy - The number of times to retry the job when the job fails due to an InternalServerError.
For more information about SageMaker, see How It Works.
" }, - "CreateTrainingJobInternal":{ - "name":"CreateTrainingJobInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateTrainingJobInternalRequest"}, - "output":{"shape":"CreateTrainingJobInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "CreateTrainingPlan":{ "name":"CreateTrainingPlan", "http":{ @@ -1394,20 +1022,6 @@ ], "documentation":"Starts a transform job. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify.
To perform batch transformations, you create a transform job and use the data that you have readily available.
In the request body, you provide the following:
TransformJobName - Identifies the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account.
ModelName - Identifies the model to use. ModelName must be the name of an existing Amazon SageMaker model in the same Amazon Web Services Region and Amazon Web Services account. For information on creating a model, see CreateModel.
TransformInput - Describes the dataset to be transformed and the Amazon S3 location where it is stored.
TransformOutput - Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job.
TransformResources - Identifies the ML compute instances and AMI image versions for the transform job.
For more information about how batch transformation works, see Batch Transform.
" }, - "CreateTransformJobInternal":{ - "name":"CreateTransformJobInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateTransformJobInternalRequest"}, - "output":{"shape":"CreateTransformJobInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "CreateTrial":{ "name":"CreateTrial", "http":{ @@ -1435,33 +1049,6 @@ ], "documentation":"Creates a trial component, which is a stage of a machine learning trial. A trial is composed of one or more trial components. A trial component can be used in multiple trials.
Trial components include pre-processing jobs, training jobs, and batch transform jobs.
When you use SageMaker Studio or the SageMaker Python SDK, all experiments, trials, and trial components are automatically tracked, logged, and indexed. When you use the Amazon Web Services SDK for Python (Boto), you must use the logging APIs provided by the SDK.
You can add tags to a trial component and then use the Search API to search for the tags.
" }, - "CreateTrialComponentInternal":{ - "name":"CreateTrialComponentInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateTrialComponentInternalRequest"}, - "output":{"shape":"CreateTrialComponentInternalResponse"}, - "errors":[ - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, - "CreateTrialInternal":{ - "name":"CreateTrialInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"CreateTrialInternalRequest"}, - "output":{"shape":"CreateTrialInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "CreateUserProfile":{ "name":"CreateUserProfile", "http":{ @@ -1472,8 +1059,7 @@ "output":{"shape":"CreateUserProfileResponse"}, "errors":[ {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"}, - {"shape":"AccessDeniedException"} + {"shape":"ResourceLimitExceeded"} ], "documentation":"Creates a user profile. A user profile represents a single user within a domain, and is the main way to reference a \"person\" for the purposes of sharing, reporting, and other user-oriented features. This entity is created when a user onboards to a domain. If an administrator invites a person by email or imports them from IAM Identity Center, a user profile is automatically created. A user profile is the primary holder of settings for an individual user and has a reference to the user's private Amazon Elastic File System home directory.
" }, @@ -1501,6 +1087,46 @@ ], "documentation":"Creates a new work team for labeling your data. A work team is defined by one or more Amazon Cognito user pools. You must first create the user pools before you can create a work team.
You cannot create more than 25 work teams in an account and region.
" }, + "DeleteAIBenchmarkJob":{ + "name":"DeleteAIBenchmarkJob", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteAIBenchmarkJobRequest"}, + "output":{"shape":"DeleteAIBenchmarkJobResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Deletes the specified AI benchmark job.
" + }, + "DeleteAIRecommendationJob":{ + "name":"DeleteAIRecommendationJob", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteAIRecommendationJobRequest"}, + "output":{"shape":"DeleteAIRecommendationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Deletes the specified AI recommendation job.
" + }, + "DeleteAIWorkloadConfig":{ + "name":"DeleteAIWorkloadConfig", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DeleteAIWorkloadConfigRequest"}, + "output":{"shape":"DeleteAIWorkloadConfigResponse"}, + "errors":[ + {"shape":"ResourceNotFound"}, + {"shape":"ResourceInUse"} + ], + "documentation":"Deletes the specified AI workload configuration. You cannot delete a configuration that is referenced by an active benchmark job.
" + }, "DeleteAction":{ "name":"DeleteAction", "http":{ @@ -1577,20 +1203,6 @@ ], "documentation":"Deletes an association.
" }, - "DeleteAutoMLJob":{ - "name":"DeleteAutoMLJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteAutoMLJobRequest"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"}, - {"shape":"AccessDeniedException"} - ], - "internalonly":true - }, "DeleteCluster":{ "name":"DeleteCluster", "http":{ @@ -1601,8 +1213,7 @@ "output":{"shape":"DeleteClusterResponse"}, "errors":[ {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} + {"shape":"ResourceNotFound"} ], "documentation":"Delete a SageMaker HyperPod cluster.
" }, @@ -1614,8 +1225,7 @@ }, "input":{"shape":"DeleteClusterSchedulerConfigRequest"}, "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} + {"shape":"ResourceNotFound"} ], "documentation":"Deletes the cluster policy of the cluster.
" }, @@ -1648,8 +1258,7 @@ }, "input":{"shape":"DeleteComputeQuotaRequest"}, "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} + {"shape":"ResourceNotFound"} ], "documentation":"Deletes the compute allocation from the cluster.
" }, @@ -1666,18 +1275,6 @@ ], "documentation":"Deletes an context.
" }, - "DeleteCustomMonitoringJobDefinition":{ - "name":"DeleteCustomMonitoringJobDefinition", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteCustomMonitoringJobDefinitionRequest"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DeleteDataQualityJobDefinition":{ "name":"DeleteDataQualityJobDefinition", "http":{ @@ -1757,37 +1354,6 @@ "input":{"shape":"DeleteEndpointConfigInput"}, "documentation":"Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration.
You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.
Deletes an inference experiment.
This operation does not delete your endpoint, variants, or any underlying resources. This operation only deletes the metadata of your experiment.
Deletes an MLflow App.
" }, "DeleteMlflowTrackingServer":{ "name":"DeleteMlflowTrackingServer", @@ -2083,15 +1576,6 @@ ], "documentation":"Deletes an Amazon SageMaker AI model explainability job definition.
" }, - "DeleteModelInternal":{ - "name":"DeleteModelInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteModelInputInternal"}, - "internalonly":true - }, "DeleteModelPackage":{ "name":"DeleteModelPackage", "http":{ @@ -2193,32 +1677,6 @@ ], "documentation":"Deletes a SageMaker Partner AI App.
" }, - "DeletePartnerAppPolicy":{ - "name":"DeletePartnerAppPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeletePartnerAppPolicyRequest"}, - "output":{"shape":"DeletePartnerAppPolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DeletePersistentVolume":{ - "name":"DeletePersistentVolume", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeletePersistentVolumeRequest"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "DeletePipeline":{ "name":"DeletePipeline", "http":{ @@ -2233,20 +1691,6 @@ ], "documentation":"Deletes a pipeline if there are no running instances of the pipeline. To delete a pipeline, you must stop all running instances of the pipeline using the StopPipelineExecution API. When you delete a pipeline, all instances of the pipeline are deleted.
Deletes a processing job. After Amazon SageMaker deletes a processing job, all of the metadata for the processing job is lost. You can delete only processing jobs that are in a terminal state (Stopped, Failed, or Completed). You cannot delete a job that is in the InProgress or Stopping state. After deleting the job, you can reuse its name to create another processing job.
Delete the specified project.
" }, - "DeleteQuotaAllocation":{ - "name":"DeleteQuotaAllocation", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteQuotaAllocationRequest"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DeleteResourcePolicy":{ - "name":"DeleteResourcePolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteResourcePolicyRequest"}, - "output":{"shape":"DeleteResourcePolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DeleteSharedModel":{ - "name":"DeleteSharedModel", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DeleteSharedModelRequest"}, - "output":{"shape":"DeleteSharedModelResponse"}, - "internalonly":true - }, "DeleteSpace":{ "name":"DeleteSpace", "http":{ @@ -2369,32 +1765,6 @@ ], "documentation":"Deletes a training job. After SageMaker deletes a training job, all of the metadata for the training job is lost. You can delete only training jobs that are in a terminal state (Stopped, Failed, or Completed) and don't retain an Available managed warm pool. You cannot delete a job that is in the InProgress or Stopping state. After deleting the job, you can reuse its name to create another training job.
Deregisters the specified devices. After you deregister a device, you will need to re-register the devices.
" }, + "DescribeAIBenchmarkJob":{ + "name":"DescribeAIBenchmarkJob", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAIBenchmarkJobRequest"}, + "output":{"shape":"DescribeAIBenchmarkJobResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Returns details of an AI benchmark job, including its status, configuration, target endpoint, and timing information.
" + }, + "DescribeAIRecommendationJob":{ + "name":"DescribeAIRecommendationJob", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAIRecommendationJobRequest"}, + "output":{"shape":"DescribeAIRecommendationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Returns details of an AI recommendation job, including its status, model source, performance targets, optimization recommendations, and deployment configurations.
" + }, + "DescribeAIWorkloadConfig":{ + "name":"DescribeAIWorkloadConfig", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeAIWorkloadConfigRequest"}, + "output":{"shape":"DescribeAIWorkloadConfigResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Returns details of an AI workload configuration, including the dataset configuration, benchmark tool settings, tags, and creation time.
" + }, "DescribeAction":{ "name":"DescribeAction", "http":{ @@ -2554,32 +1963,6 @@ ], "documentation":"Returns information about an AutoML job created by calling CreateAutoMLJobV2 or CreateAutoMLJob.
" }, - "DescribeAutoMLTask":{ - "name":"DescribeAutoMLTask", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeAutoMLTaskRequest"}, - "output":{"shape":"DescribeAutoMLTaskResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DescribeCapacitySchedule":{ - "name":"DescribeCapacitySchedule", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeCapacityScheduleRequest"}, - "output":{"shape":"DescribeCapacityScheduleResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeCluster":{ "name":"DescribeCluster", "http":{ @@ -2606,19 +1989,6 @@ ], "documentation":"Retrieves detailed information about a specific event for a given HyperPod cluster. This functionality is only supported when the NodeProvisioningMode is set to Continuous.
Describes a context.
" }, - "DescribeCustomMonitoringJobDefinition":{ - "name":"DescribeCustomMonitoringJobDefinition", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeCustomMonitoringJobDefinitionRequest"}, - "output":{"shape":"DescribeCustomMonitoringJobDefinitionResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeDataQualityJobDefinition":{ "name":"DescribeDataQualityJobDefinition", "http":{ @@ -2805,19 +2162,6 @@ "output":{"shape":"DescribeEndpointConfigOutput"}, "documentation":"Returns the description of an endpoint configuration created using the CreateEndpointConfig API.
Returns information about the specified flow definition.
" }, - "DescribeGroundTruthJob":{ - "name":"DescribeGroundTruthJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeGroundTruthJobRequest"}, - "output":{"shape":"DescribeGroundTruthJobResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DescribeGroundTruthProject":{ - "name":"DescribeGroundTruthProject", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeGroundTruthProjectRequest"}, - "output":{"shape":"DescribeGroundTruthProjectResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "DescribeGroundTruthWorkflow":{ - "name":"DescribeGroundTruthWorkflow", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeGroundTruthWorkflowRequest"}, - "output":{"shape":"DescribeGroundTruthWorkflowResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeHub":{ "name":"DescribeHub", "http":{ @@ -3023,19 +2328,6 @@ ], "documentation":"Provides the results of the Inference Recommender job. One or more recommendation jobs are returned.
" }, - "DescribeInternal":{ - "name":"DescribeInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeInternalRequest"}, - "output":{"shape":"DescribeInternalResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeLabelingJob":{ "name":"DescribeLabelingJob", "http":{ @@ -3073,7 +2365,7 @@ "errors":[ {"shape":"ResourceNotFound"} ], - "internalonly":true + "documentation":"Returns information about an MLflow App.
" }, "DescribeMlflowTrackingServer":{ "name":"DescribeMlflowTrackingServer", @@ -3183,19 +2475,6 @@ ], "documentation":"Returns a description of a model quality job definition.
" }, - "DescribeMonitoringExecution":{ - "name":"DescribeMonitoringExecution", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeMonitoringExecutionRequest"}, - "output":{"shape":"DescribeMonitoringExecutionResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeMonitoringSchedule":{ "name":"DescribeMonitoringSchedule", "http":{ @@ -3255,19 +2534,6 @@ ], "documentation":"Gets information about a SageMaker Partner AI App.
" }, - "DescribePersistentVolume":{ - "name":"DescribePersistentVolume", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribePersistentVolumeRequest"}, - "output":{"shape":"DescribePersistentVolumeResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribePipeline":{ "name":"DescribePipeline", "http":{ @@ -3330,19 +2596,6 @@ "output":{"shape":"DescribeProjectOutput"}, "documentation":"Describes the details of a project.
" }, - "DescribeQuotaAllocation":{ - "name":"DescribeQuotaAllocation", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeQuotaAllocationRequest"}, - "output":{"shape":"DescribeQuotaAllocationResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "DescribeReservedCapacity":{ "name":"DescribeReservedCapacity", "http":{ @@ -3356,16 +2609,6 @@ ], "documentation":"Retrieves details about a reserved capacity.
" }, - "DescribeSharedModel":{ - "name":"DescribeSharedModel", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"DescribeSharedModelRequest"}, - "output":{"shape":"DescribeSharedModelResponse"}, - "internalonly":true - }, "DescribeSpace":{ "name":"DescribeSpace", "http":{ @@ -3428,6 +2671,19 @@ ], "documentation":"Retrieves detailed information about a specific training plan.
" }, + "DescribeTrainingPlanExtensionHistory":{ + "name":"DescribeTrainingPlanExtensionHistory", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeTrainingPlanExtensionHistoryRequest"}, + "output":{"shape":"DescribeTrainingPlanExtensionHistoryResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Retrieves the extension history for a specified training plan. The response includes details about each extension, such as the offering ID, start and end dates, status, payment status, and cost information.
" + }, "DescribeTransformJob":{ "name":"DescribeTransformJob", "http":{ @@ -3477,8 +2733,7 @@ "output":{"shape":"DescribeUserProfileResponse"}, "errors":[ {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"}, - {"shape":"AccessDeniedException"} + {"shape":"ResourceLimitExceeded"} ], "documentation":"Describes a user profile. For more information, see CreateUserProfile.
Detaches your Amazon Elastic Block Store (Amazon EBS) volume from a node in your EKS orchestrated SageMaker HyperPod cluster.
This API works with the Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver to manage the lifecycle of persistent storage in your HyperPod EKS clusters.
" }, @@ -3549,25 +2803,28 @@ "output":{"shape":"EnableSagemakerServicecatalogPortfolioOutput"}, "documentation":"Enables using Service Catalog in SageMaker. Service Catalog is used to create SageMaker projects.
" }, - "GetDeviceFleetReport":{ - "name":"GetDeviceFleetReport", + "ExtendTrainingPlan":{ + "name":"ExtendTrainingPlan", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"GetDeviceFleetReportRequest"}, - "output":{"shape":"GetDeviceFleetReportResponse"}, - "documentation":"Describes a fleet.
" + "input":{"shape":"ExtendTrainingPlanRequest"}, + "output":{"shape":"ExtendTrainingPlanResponse"}, + "errors":[ + {"shape":"ResourceNotFound"} + ], + "documentation":"Extends an existing training plan by purchasing an extension offering. This allows you to add additional compute capacity time to your training plan without creating a new plan or reconfiguring your workloads.
To find available extension offerings, use the SearchTrainingPlanOfferings API with the TrainingPlanArn parameter.
To view the history of extensions for a training plan, use the DescribeTrainingPlanExtensionHistory API.
Describes a fleet.
" }, "GetLineageGroupPolicy":{ "name":"GetLineageGroupPolicy", @@ -3582,19 +2839,6 @@ ], "documentation":"The resource policy for the lineage group.
" }, - "GetMlflowAppPolicy":{ - "name":"GetMlflowAppPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetMlflowAppPolicyRequest"}, - "output":{"shape":"GetMlflowAppPolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "GetModelPackageGroupPolicy":{ "name":"GetModelPackageGroupPolicy", "http":{ @@ -3605,46 +2849,6 @@ "output":{"shape":"GetModelPackageGroupPolicyOutput"}, "documentation":"Gets a resource policy that manages access for a model group. For information about resource policies, see Identity-based policies and resource-based policies in the Amazon Web Services Identity and Access Management User Guide..
" }, - "GetPartnerAppPolicy":{ - "name":"GetPartnerAppPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetPartnerAppPolicyRequest"}, - "output":{"shape":"GetPartnerAppPolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "GetPipelinePolicy":{ - "name":"GetPipelinePolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetPipelinePolicyRequest"}, - "output":{"shape":"GetPipelinePolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "deprecated":true, - "internalonly":true - }, - "GetResourcePolicy":{ - "name":"GetResourcePolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"GetResourcePolicyRequest"}, - "output":{"shape":"GetResourcePolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "GetSagemakerServicecatalogPortfolioStatus":{ "name":"GetSagemakerServicecatalogPortfolioStatus", "http":{ @@ -3678,22 +2882,6 @@ "output":{"shape":"GetSearchSuggestionsResponse"}, "documentation":"An auto-complete API for the search functionality in the SageMaker console. It returns suggestions of possible matches for the property name to use in Search queries. Provides suggestions for HyperParameters, Tags, and Metrics.
Import hub content.
" }, - "ImportTrainingPlan":{ - "name":"ImportTrainingPlan", + "ListAIBenchmarkJobs":{ + "name":"ListAIBenchmarkJobs", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"ImportTrainingPlanRequest"}, - "output":{"shape":"ImportTrainingPlanResponse"}, - "errors":[ - {"shape":"ResourceAlreadyExists"}, - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true + "input":{"shape":"ListAIBenchmarkJobsRequest"}, + "output":{"shape":"ListAIBenchmarkJobsResponse"}, + "documentation":"Returns a list of AI benchmark jobs in your account. You can filter the results by name, status, and creation time, and sort the results. The response is paginated.
" + }, + "ListAIRecommendationJobs":{ + "name":"ListAIRecommendationJobs", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListAIRecommendationJobsRequest"}, + "output":{"shape":"ListAIRecommendationJobsResponse"}, + "documentation":"Returns a list of AI recommendation jobs in your account. You can filter the results by name, status, and creation time, and sort the results. The response is paginated.
" + }, + "ListAIWorkloadConfigs":{ + "name":"ListAIWorkloadConfigs", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"ListAIWorkloadConfigsRequest"}, + "output":{"shape":"ListAIWorkloadConfigsResponse"}, + "documentation":"Returns a list of AI workload configurations in your account. You can filter the results by name and creation time, and sort the results. The response is paginated.
" }, "ListActions":{ "name":"ListActions", @@ -3817,19 +3019,6 @@ "output":{"shape":"ListAutoMLJobsResponse"}, "documentation":"Request a list of jobs.
" }, - "ListAutoMLTasksForAutoMLJob":{ - "name":"ListAutoMLTasksForAutoMLJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListAutoMLTasksForAutoMLJobRequest"}, - "output":{"shape":"ListAutoMLTasksForAutoMLJobResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "ListCandidatesForAutoMLJob":{ "name":"ListCandidatesForAutoMLJob", "http":{ @@ -3843,26 +3032,6 @@ ], "documentation":"List the candidates created for the job.
" }, - "ListCapacityScheduleOfferings":{ - "name":"ListCapacityScheduleOfferings", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListCapacityScheduleOfferingsRequest"}, - "output":{"shape":"ListCapacityScheduleOfferingsResponse"}, - "internalonly":true - }, - "ListCapacitySchedules":{ - "name":"ListCapacitySchedules", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListCapacitySchedulesRequest"}, - "output":{"shape":"ListCapacitySchedulesResponse"}, - "internalonly":true - }, "ListClusterEvents":{ "name":"ListClusterEvents", "http":{ @@ -3929,19 +3098,6 @@ "output":{"shape":"ListCompilationJobsResponse"}, "documentation":"Lists model compilation jobs that satisfy various filters.
To create a model compilation job, use CreateCompilationJob. To get information about a particular model compilation job you have created, use DescribeCompilationJob.
" }, - "ListComponentJobsForAutoMLJob":{ - "name":"ListComponentJobsForAutoMLJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListComponentJobsForAutoMLJobRequest"}, - "output":{"shape":"ListComponentJobsForAutoMLJobResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "ListComputeQuotas":{ "name":"ListComputeQuotas", "http":{ @@ -3965,16 +3121,6 @@ ], "documentation":"Lists the contexts in your account and their properties.
" }, - "ListCustomMonitoringJobDefinitions":{ - "name":"ListCustomMonitoringJobDefinitions", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListCustomMonitoringJobDefinitionsRequest"}, - "output":{"shape":"ListCustomMonitoringJobDefinitionsResponse"}, - "internalonly":true - }, "ListDataQualityJobDefinitions":{ "name":"ListDataQualityJobDefinitions", "http":{ @@ -4055,16 +3201,6 @@ "output":{"shape":"ListEndpointsOutput"}, "documentation":"Lists endpoints.
" }, - "ListEvaluationJobs":{ - "name":"ListEvaluationJobs", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListEvaluationJobsRequest"}, - "output":{"shape":"ListEvaluationJobsResponse"}, - "internalonly":true - }, "ListExperiments":{ "name":"ListExperiments", "http":{ @@ -4095,39 +3231,6 @@ "output":{"shape":"ListFlowDefinitionsResponse"}, "documentation":"Returns information about the flow definitions in your account.
" }, - "ListGroundTruthJobs":{ - "name":"ListGroundTruthJobs", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListGroundTruthJobsRequest"}, - "output":{"shape":"ListGroundTruthJobsResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "ListGroundTruthProjects":{ - "name":"ListGroundTruthProjects", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListGroundTruthProjectsRequest"}, - "output":{"shape":"ListGroundTruthProjectsResponse"}, - "internalonly":true - }, - "ListGroundTruthWorkflows":{ - "name":"ListGroundTruthWorkflows", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListGroundTruthWorkflowsRequest"}, - "output":{"shape":"ListGroundTruthWorkflowsResponse"}, - "internalonly":true - }, "ListHubContentVersions":{ "name":"ListHubContentVersions", "http":{ @@ -4291,7 +3394,7 @@ }, "input":{"shape":"ListMlflowAppsRequest"}, "output":{"shape":"ListMlflowAppsResponse"}, - "internalonly":true + "documentation":"Lists all MLflow Apps
" }, "ListMlflowTrackingServers":{ "name":"ListMlflowTrackingServers", @@ -4574,16 +3677,6 @@ "output":{"shape":"ListProjectsOutput"}, "documentation":"Gets a list of the projects in an Amazon Web Services account.
" }, - "ListQuotaAllocations":{ - "name":"ListQuotaAllocations", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListQuotaAllocationsRequest"}, - "output":{"shape":"ListQuotaAllocationsResponse"}, - "internalonly":true - }, "ListResourceCatalogs":{ "name":"ListResourceCatalogs", "http":{ @@ -4594,36 +3687,6 @@ "output":{"shape":"ListResourceCatalogsResponse"}, "documentation":" Lists Amazon SageMaker Catalogs based on given filters and orders. The maximum number of ResourceCatalogs viewable is 1000.
Returns the tags for the specified SageMaker resource.
" }, - "ListTagsInternal":{ - "name":"ListTagsInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"ListTagsInternalInput"}, - "output":{"shape":"ListTagsInternalOutput"}, - "internalonly":true - }, "ListTrainingJobs":{ "name":"ListTrainingJobs", "http":{ @@ -4743,19 +3796,6 @@ ], "documentation":"Lists the trial components in your account. You can sort the list by trial component name or creation time. You can filter the list to show only components that were created in a specific time range. You can also filter on one of the following:
ExperimentName
SourceArn
TrialName
Gets a list of private work teams that you have defined in a region. The list may be empty if no work team satisfies the filter specified in the NameContains parameter.
Adds a resouce policy to control access to a model group. For information about resoure policies, see Identity-based policies and resource-based policies in the Amazon Web Services Identity and Access Management User Guide..
" }, - "PutPartnerAppPolicy":{ - "name":"PutPartnerAppPolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutPartnerAppPolicyRequest"}, - "output":{"shape":"PutPartnerAppPolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, - "PutPipelinePolicy":{ - "name":"PutPipelinePolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutPipelinePolicyRequest"}, - "output":{"shape":"PutPipelinePolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "deprecated":true, - "internalonly":true - }, - "PutResourcePolicy":{ - "name":"PutResourcePolicy", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"PutResourcePolicyRequest"}, - "output":{"shape":"PutResourcePolicyResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "QueryLineage":{ "name":"QueryLineage", "http":{ @@ -4926,16 +3890,6 @@ ], "documentation":"Register devices.
" }, - "RemoveSharedModelReviewers":{ - "name":"RemoveSharedModelReviewers", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"RemoveSharedModelReviewersRequest"}, - "output":{"shape":"RemoveSharedModelReviewersResponse"}, - "internalonly":true - }, "RenderUiTemplate":{ "name":"RenderUiTemplate", "http":{ @@ -4964,20 +3918,6 @@ ], "documentation":"Retry the execution of the pipeline.
" }, - "RollbackMlflowTrackingServerUpgrade":{ - "name":"RollbackMlflowTrackingServerUpgrade", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"RollbackMlflowTrackingServerUpgradeRequest"}, - "output":{"shape":"RollbackMlflowTrackingServerUpgradeResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "Search":{ "name":"Search", "http":{ @@ -5031,16 +3971,6 @@ ], "documentation":"Notifies the pipeline that the execution of a callback step succeeded and provides a list of the step's output parameters. When a callback step is run, the pipeline generates a callback token and includes the token in a message sent to Amazon Simple Queue Service (Amazon SQS).
" }, - "SendSharedModelEvent":{ - "name":"SendSharedModelEvent", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"SendSharedModelEventRequest"}, - "output":{"shape":"SendSharedModelEventResponse"}, - "internalonly":true - }, "StartClusterHealthCheck":{ "name":"StartClusterHealthCheck", "http":{ @@ -5050,23 +3980,9 @@ "input":{"shape":"StartClusterHealthCheckRequest"}, "output":{"shape":"StartClusterHealthCheckResponse"}, "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} - ], - "internalonly":true - }, - "StartClusterNode":{ - "name":"StartClusterNode", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"StartClusterNodeRequest"}, - "errors":[ - {"shape":"ConflictException"}, {"shape":"ResourceNotFound"} ], - "internalonly":true + "documentation":"Start deep health checks for a SageMaker HyperPod cluster. You can use DescribeClusterNode API to track progress of the deep health checks. The unhealthy nodes will be automatically rebooted or replaced. Please see Resilience-related Kubernetes labels by SageMaker HyperPod for details.
" }, "StartEdgeDeploymentStage":{ "name":"StartEdgeDeploymentStage", @@ -5129,19 +4045,6 @@ ], "documentation":"Launches an ML compute instance with the latest version of the libraries and attaches your ML storage volume. After configuring the notebook instance, SageMaker AI sets the notebook instance status to InService. A notebook instance's status must be InService before you can connect to your Jupyter notebook.
Initiates a remote connection session between a local integrated development environments (IDEs) and a remote SageMaker space.
" }, - "StopAutoMLJob":{ - "name":"StopAutoMLJob", + "StopAIBenchmarkJob":{ + "name":"StopAIBenchmarkJob", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"StopAutoMLJobRequest"}, + "input":{"shape":"StopAIBenchmarkJobRequest"}, + "output":{"shape":"StopAIBenchmarkJobResponse"}, "errors":[ {"shape":"ResourceNotFound"} ], - "documentation":"A method for forcing a running job to shut down.
" + "documentation":"Stops a running AI benchmark job.
" }, - "StopCapacitySchedule":{ - "name":"StopCapacitySchedule", + "StopAIRecommendationJob":{ + "name":"StopAIRecommendationJob", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"StopCapacityScheduleRequest"}, - "output":{"shape":"StopCapacityScheduleResponse"}, + "input":{"shape":"StopAIRecommendationJobRequest"}, + "output":{"shape":"StopAIRecommendationJobResponse"}, "errors":[ {"shape":"ResourceNotFound"} ], - "internalonly":true + "documentation":"Stops a running AI recommendation job.
" }, - "StopClusterNode":{ - "name":"StopClusterNode", + "StopAutoMLJob":{ + "name":"StopAutoMLJob", "http":{ "method":"POST", "requestUri":"/" }, - "input":{"shape":"StopClusterNodeRequest"}, + "input":{"shape":"StopAutoMLJobRequest"}, "errors":[ - {"shape":"ConflictException"}, {"shape":"ResourceNotFound"} ], - "internalonly":true + "documentation":"A method for forcing a running job to shut down.
" }, "StopCompilationJob":{ "name":"StopCompilationJob", @@ -5239,18 +4142,6 @@ "input":{"shape":"StopEdgePackagingJobRequest"}, "documentation":"Request to stop an edge packaging job.
" }, - "StopEvaluationJob":{ - "name":"StopEvaluationJob", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"StopEvaluationJobRequest"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "StopHyperParameterTuningJob":{ "name":"StopHyperParameterTuningJob", "http":{ @@ -5263,18 +4154,6 @@ ], "documentation":"Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched.
All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the Stopped state, it releases all reserved resources for the tuning job.
Ends a running inference optimization job.
" }, - "StopPartnerApp":{ - "name":"StopPartnerApp", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"StopPartnerAppRequest"}, - "output":{"shape":"StopPartnerAppResponse"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "StopPipelineExecution":{ "name":"StopPipelineExecution", "http":{ @@ -5399,18 +4265,6 @@ ], "documentation":"Stops a processing job.
" }, - "StopProcessingJobInternal":{ - "name":"StopProcessingJobInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"StopProcessingJobInternalRequest"}, - "errors":[ - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "StopTrainingJob":{ "name":"StopTrainingJob", "http":{ @@ -5423,31 +4277,6 @@ ], "documentation":"Stops a training job. To stop a job, SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms might use this 120-second window to save the model artifacts, so the results of the training is not lost.
When it receives a StopTrainingJob request, SageMaker changes the status of the job to Stopping. After SageMaker stops the job, it sets the status to Stopped.
Stops a batch transform job.
When Amazon SageMaker receives a StopTransformJob request, the status of the job changes to Stopping. After Amazon SageMaker stops the job, the status is set to Stopped. When you stop a batch transform job before it is completed, Amazon SageMaker doesn't store the job's output in Amazon S3.
Updates an action.
" }, - "UpdateApp":{ - "name":"UpdateApp", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateAppRequest"}, - "output":{"shape":"UpdateAppResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "UpdateAppImageConfig":{ "name":"UpdateAppImageConfig", "http":{ @@ -5542,20 +4330,6 @@ ], "documentation":"Updates an artifact.
" }, - "UpdateCapacitySchedule":{ - "name":"UpdateCapacitySchedule", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateCapacityScheduleRequest"}, - "output":{"shape":"UpdateCapacityScheduleResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "UpdateCluster":{ "name":"UpdateCluster", "http":{ @@ -5567,26 +4341,10 @@ "errors":[ {"shape":"ConflictException"}, {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"}, {"shape":"ResourceLimitExceeded"} ], "documentation":"Updates a SageMaker HyperPod cluster.
" }, - "UpdateClusterInference":{ - "name":"UpdateClusterInference", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateClusterInferenceRequest"}, - "output":{"shape":"UpdateClusterInferenceResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} - ], - "internalonly":true - }, "UpdateClusterSchedulerConfig":{ "name":"UpdateClusterSchedulerConfig", "http":{ @@ -5598,7 +4356,6 @@ "errors":[ {"shape":"ConflictException"}, {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"}, {"shape":"ResourceLimitExceeded"} ], "documentation":"Update the cluster policy configuration.
" @@ -5613,8 +4370,7 @@ "output":{"shape":"UpdateClusterSoftwareResponse"}, "errors":[ {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"}, - {"shape":"DryRunOperation"} + {"shape":"ResourceNotFound"} ], "documentation":"Updates the platform software of a SageMaker HyperPod cluster for security patching. To learn how to use this API, see Update the SageMaker HyperPod platform software of a cluster.
The UpgradeClusterSoftware API call may impact your SageMaker HyperPod cluster uptime and availability. Plan accordingly to mitigate potential disruptions to your workloads.
Update the compute allocation definition.
" @@ -5804,20 +4559,6 @@ ], "documentation":"Updates the contents of a SageMaker hub for a ModelReference resource. A ModelReference allows you to access public SageMaker JumpStart models from within your private hub.
When using this API, you can update the MinVersion field for additional flexibility in the model version. You shouldn't update any additional fields when using this API, because the metadata in your private hub should match the public JumpStart model's metadata.
If you want to update a Model or Notebook resource in your hub, use the UpdateHubContent API instead.
For more information about adding model references to your hub, see Add models to a private hub.
" }, - "UpdateHumanTaskUi":{ - "name":"UpdateHumanTaskUi", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateHumanTaskUiRequest"}, - "output":{"shape":"UpdateHumanTaskUiResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceInUse"} - ], - "internalonly":true - }, "UpdateImage":{ "name":"UpdateImage", "http":{ @@ -5898,7 +4639,7 @@ {"shape":"ConflictException"}, {"shape":"ResourceNotFound"} ], - "internalonly":true + "documentation":"Updates an MLflow App.
" }, "UpdateMlflowTrackingServer":{ "name":"UpdateMlflowTrackingServer", @@ -5982,7 +4723,7 @@ "errors":[ {"shape":"ResourceLimitExceeded"} ], - "documentation":"Updates a notebook instance. NotebookInstance updates include upgrading or downgrading the ML compute instance used for your notebook instance to accommodate changes in your workload requirements.
" + "documentation":"Updates a notebook instance. NotebookInstance updates include upgrading or downgrading the ML compute instance used for your notebook instance to accommodate changes in your workload requirements.
This API can attach lifecycle configurations to notebook instances. Lifecycle configuration scripts execute with root access and the notebook instance's IAM execution role privileges. Principals with this permission and access to lifecycle configurations can execute code with the execution role's credentials. See Customize a Notebook Instance Using a Lifecycle Configuration Script for security best practices.
Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig API.
" + "documentation":"Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig API.
Updates to lifecycle configurations affect all notebook instances using that configuration upon their next start. Lifecycle configuration scripts execute with root access and the notebook instance's IAM execution role privileges. Grant this permission only to trusted principals. See Customize a Notebook Instance Using a Lifecycle Configuration Script for security best practices.
Updates a machine learning (ML) project that is created from a template that sets up an ML pipeline from training to deploying an approved model.
You must not update a project that is in use. If you update the ServiceCatalogProvisioningUpdateDetails of a project that is active or being created, or updated, you may lose resources already created by the project.
Update a model training job to request a new Debugger profiling configuration or to change warm pool retention length.
" }, - "UpdateTrainingPlan":{ - "name":"UpdateTrainingPlan", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateTrainingPlanRequest"}, - "output":{"shape":"UpdateTrainingPlanResponse"}, - "errors":[ - {"shape":"ResourceNotFound"}, - {"shape":"ResourceLimitExceeded"} - ], - "internalonly":true - }, "UpdateTrial":{ "name":"UpdateTrial", "http":{ @@ -6162,20 +4864,6 @@ ], "documentation":"Updates one or more properties of a trial component.
" }, - "UpdateTrialComponentInternal":{ - "name":"UpdateTrialComponentInternal", - "http":{ - "method":"POST", - "requestUri":"/" - }, - "input":{"shape":"UpdateTrialComponentInternalRequest"}, - "output":{"shape":"UpdateTrialComponentInternalResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"} - ], - "internalonly":true - }, "UpdateUserProfile":{ "name":"UpdateUserProfile", "http":{ @@ -6216,41 +4904,728 @@ {"shape":"ResourceLimitExceeded"} ], "documentation":"Updates an existing work team with new member definitions or description.
" + } + }, + "shapes":{ + "AIBenchmarkEndpoint":{ + "type":"structure", + "required":["Identifier"], + "members":{ + "Identifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the SageMaker endpoint to benchmark.
" + }, + "TargetContainerHostname":{ + "shape":"String", + "documentation":"The hostname of the specific container to target within a multi-container endpoint.
" + }, + "InferenceComponents":{ + "shape":"AIBenchmarkInferenceComponentList", + "documentation":"The list of inference components to benchmark on the endpoint.
" + } + }, + "documentation":"The SageMaker endpoint configuration for benchmarking.
" }, - "UpgradeMlflowTrackingServerVersion":{ - "name":"UpgradeMlflowTrackingServerVersion", - "http":{ - "method":"POST", - "requestUri":"/" + "AIBenchmarkInferenceComponent":{ + "type":"structure", + "required":["Identifier"], + "members":{ + "Identifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the inference component.
" + } }, - "input":{"shape":"UpgradeMlflowTrackingServerVersionRequest"}, - "output":{"shape":"UpgradeMlflowTrackingServerVersionResponse"}, - "errors":[ - {"shape":"ConflictException"}, - {"shape":"ResourceNotFound"} + "documentation":"An inference component to benchmark.
" + }, + "AIBenchmarkInferenceComponentList":{ + "type":"list", + "member":{"shape":"AIBenchmarkInferenceComponent"} + }, + "AIBenchmarkJobArn":{ + "type":"string", + "max":256, + "min":0, + "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:ai-benchmark-job/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" + }, + "AIBenchmarkJobStatus":{ + "type":"string", + "enum":[ + "InProgress", + "Completed", + "Failed", + "Stopping", + "Stopped" + ] + }, + "AIBenchmarkJobSummary":{ + "type":"structure", + "required":[ + "AIBenchmarkJobName", + "AIBenchmarkJobArn", + "AIBenchmarkJobStatus", + "CreationTime" ], - "internalonly":true + "members":{ + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the benchmark job.
" + }, + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the benchmark job.
" + }, + "AIBenchmarkJobStatus":{ + "shape":"AIBenchmarkJobStatus", + "documentation":"The status of the benchmark job.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the benchmark job was created.
" + }, + "EndTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the benchmark job completed.
" + }, + "AIWorkloadConfigName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI workload configuration used by the benchmark job.
" + } + }, + "documentation":"Summary information about an AI benchmark job.
" }, - "VerifyResourcesExistForTagris":{ - "name":"VerifyResourcesExistForTagris", - "http":{ - "method":"POST", - "requestUri":"/" + "AIBenchmarkJobSummaryList":{ + "type":"list", + "member":{"shape":"AIBenchmarkJobSummary"} + }, + "AIBenchmarkNetworkConfig":{ + "type":"structure", + "members":{ + "VpcConfig":{ + "shape":"VpcConfig", + "documentation":"The VPC configuration, including security group IDs and subnet IDs.
" + } }, - "input":{"shape":"TagrisVerifyResourcesExistInput"}, - "output":{"shape":"TagrisVerifyResourcesExistOutput"}, - "errors":[ - {"shape":"TagrisInvalidParameterException"}, - {"shape":"TagrisAccessDeniedException"}, - {"shape":"TagrisInvalidArnException"}, - {"shape":"TagrisInternalServiceException"}, - {"shape":"TagrisPartialResourcesExistResultsException"}, - {"shape":"TagrisThrottledException"} + "documentation":"The network configuration for an AI benchmark job.
" + }, + "AIBenchmarkOutputConfig":{ + "type":"structure", + "required":["S3OutputLocation"], + "members":{ + "S3OutputLocation":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI where benchmark results are stored.
" + } + }, + "documentation":"The output configuration for an AI benchmark job.
" + }, + "AIBenchmarkOutputResult":{ + "type":"structure", + "required":["S3OutputLocation"], + "members":{ + "S3OutputLocation":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI where benchmark results are stored.
" + }, + "CloudWatchLogs":{ + "shape":"AICloudWatchLogsList", + "documentation":"The CloudWatch log information for the benchmark job.
" + } + }, + "documentation":"The output result of an AI benchmark job, including the Amazon S3 location and CloudWatch log information.
" + }, + "AIBenchmarkTarget":{ + "type":"structure", + "members":{ + "Endpoint":{ + "shape":"AIBenchmarkEndpoint", + "documentation":"The SageMaker endpoint to benchmark.
" + } + }, + "documentation":"The target for an AI benchmark job. This is a union type — specify one of the members.
", + "union":true + }, + "AICapacityReservationConfig":{ + "type":"structure", + "members":{ + "CapacityReservationPreference":{ + "shape":"AICapacityReservationPreference", + "documentation":"The capacity reservation preference. The only valid value is capacity-reservations-only.
The list of ML reservation ARNs to use.
" + } + }, + "documentation":"The capacity reservation configuration for an AI recommendation job.
" + }, + "AICapacityReservationPreference":{ + "type":"string", + "enum":["capacity-reservations-only"] + }, + "AIChannelName":{ + "type":"string", + "max":64, + "min":1, + "pattern":"[A-Za-z0-9\\.\\-_]+" + }, + "AICloudWatchLogs":{ + "type":"structure", + "members":{ + "LogGroupArn":{ + "shape":"String", + "documentation":"The Amazon Resource Name (ARN) of the CloudWatch log group.
" + }, + "LogStreamName":{ + "shape":"String", + "documentation":"The name of the CloudWatch log stream.
" + } + }, + "documentation":"CloudWatch log information for an AI benchmark or recommendation job.
" + }, + "AICloudWatchLogsList":{ + "type":"list", + "member":{"shape":"AICloudWatchLogs"} + }, + "AIDatasetConfig":{ + "type":"structure", + "members":{ + "InputDataConfig":{ + "shape":"AIWorkloadInputDataConfigList", + "documentation":"An array of input data channel configurations for the workload.
" + } + }, + "documentation":"The dataset configuration for an AI workload. This is a union type — specify one of the members.
", + "union":true + }, + "AIEntityName":{ + "type":"string", + "max":63, + "min":1, + "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" + }, + "AIInferenceSpecificationName":{ + "type":"string", + "max":63, + "min":0, + "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" + }, + "AIMlReservationArn":{ + "type":"string", + "max":256, + "min":0, + "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:[a-z0-9\\-]{1,14}/.*" + }, + "AIMlReservationArnList":{ + "type":"list", + "member":{"shape":"AIMlReservationArn"} + }, + "AIModelSource":{ + "type":"structure", + "members":{ + "S3":{ + "shape":"AIModelSourceS3", + "documentation":"The Amazon S3 location of the model artifacts.
" + } + }, + "documentation":"The source of the model for an AI recommendation job. This is a union type.
", + "union":true + }, + "AIModelSourceS3":{ + "type":"structure", + "members":{ + "S3Uri":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI of the model artifacts.
" + } + }, + "documentation":"The Amazon S3 model source configuration.
" + }, + "AIRecommendation":{ + "type":"structure", + "members":{ + "RecommendationDescription":{ + "shape":"String", + "documentation":"A description of the recommendation.
" + }, + "OptimizationDetails":{ + "shape":"AIRecommendationOptimizationDetailList", + "documentation":"The optimization techniques applied in this recommendation.
" + }, + "ModelDetails":{ + "shape":"AIRecommendationModelDetails", + "documentation":"Details about the model package associated with this recommendation.
" + }, + "DeploymentConfiguration":{ + "shape":"AIRecommendationDeploymentConfiguration", + "documentation":"The deployment configuration for this recommendation, including the container image, instance type, instance count, and environment variables.
" + }, + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the benchmark job associated with this recommendation.
" + }, + "ExpectedPerformance":{ + "shape":"ExpectedPerformanceList", + "documentation":"The expected performance metrics for this recommendation.
" + } + }, + "documentation":"An optimization recommendation generated by an AI recommendation job.
" + }, + "AIRecommendationAllowOptimization":{ + "type":"boolean", + "box":true + }, + "AIRecommendationComputeSpec":{ + "type":"structure", + "members":{ + "InstanceTypes":{ + "shape":"AIRecommendationInstanceTypeList", + "documentation":"The list of instance types to consider for recommendations. You can specify up to 3 instance types.
" + }, + "CapacityReservationConfig":{ + "shape":"AICapacityReservationConfig", + "documentation":"The capacity reservation configuration.
" + } + }, + "documentation":"The compute resource specification for an AI recommendation job.
" + }, + "AIRecommendationConstraint":{ + "type":"structure", + "required":["Metric"], + "members":{ + "Metric":{ + "shape":"AIRecommendationMetric", + "documentation":"The performance metric. Valid values are ttft-ms (time to first token in milliseconds), throughput, and cost.
A performance constraint for an AI recommendation job.
" + }, + "AIRecommendationConstraintList":{ + "type":"list", + "member":{"shape":"AIRecommendationConstraint"} + }, + "AIRecommendationCopyCountPerInstance":{ + "type":"integer", + "box":true + }, + "AIRecommendationDeploymentConfiguration":{ + "type":"structure", + "members":{ + "S3":{ + "shape":"AIRecommendationDeploymentS3ChannelList", + "documentation":"The Amazon S3 data channels for the deployment.
" + }, + "ImageUri":{ + "shape":"String", + "documentation":"The URI of the container image for the deployment.
" + }, + "InstanceType":{ + "shape":"AIRecommendationInstanceType", + "documentation":"The recommended instance type for the deployment.
" + }, + "InstanceCount":{ + "shape":"AIRecommendationInstanceCount", + "documentation":"The recommended number of instances for the deployment.
" + }, + "CopyCountPerInstance":{ + "shape":"AIRecommendationCopyCountPerInstance", + "documentation":"The number of model copies per instance.
" + }, + "EnvironmentVariables":{ + "shape":"EnvironmentMap", + "documentation":"The environment variables for the deployment.
" + } + }, + "documentation":"The deployment configuration for a recommendation.
" + }, + "AIRecommendationDeploymentS3Channel":{ + "type":"structure", + "members":{ + "ChannelName":{ + "shape":"AIChannelName", + "documentation":"A custom name for this Amazon S3 data channel.
" + }, + "Uri":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI of the data for this channel.
" + } + }, + "documentation":"An Amazon S3 data channel for a recommended deployment configuration, containing model artifacts or optimized model outputs.
" + }, + "AIRecommendationDeploymentS3ChannelList":{ + "type":"list", + "member":{"shape":"AIRecommendationDeploymentS3Channel"} + }, + "AIRecommendationInferenceFramework":{ + "type":"string", + "enum":[ + "LMI", + "VLLM" + ] + }, + "AIRecommendationInferenceSpecification":{ + "type":"structure", + "members":{ + "Framework":{ + "shape":"AIRecommendationInferenceFramework", + "documentation":"The inference framework. Valid values are LMI and VLLM.
The inference framework for an AI recommendation job.
" + }, + "AIRecommendationInstanceCount":{ + "type":"integer", + "box":true + }, + "AIRecommendationInstanceDetail":{ + "type":"structure", + "members":{ + "InstanceType":{ + "shape":"AIRecommendationInstanceType", + "documentation":"The recommended instance type.
" + }, + "InstanceCount":{ + "shape":"AIRecommendationInstanceCount", + "documentation":"The recommended number of instances.
" + }, + "CopyCountPerInstance":{ + "shape":"AIRecommendationCopyCountPerInstance", + "documentation":"The number of model copies per instance.
" + } + }, + "documentation":"Instance details for a recommendation.
" + }, + "AIRecommendationInstanceDetailList":{ + "type":"list", + "member":{"shape":"AIRecommendationInstanceDetail"} + }, + "AIRecommendationInstanceType":{ + "type":"string", + "enum":[ + "ml.g5.xlarge", + "ml.g5.2xlarge", + "ml.g5.4xlarge", + "ml.g5.8xlarge", + "ml.g5.12xlarge", + "ml.g5.16xlarge", + "ml.g5.24xlarge", + "ml.g5.48xlarge", + "ml.g6.xlarge", + "ml.g6.2xlarge", + "ml.g6.4xlarge", + "ml.g6.8xlarge", + "ml.g6.12xlarge", + "ml.g6.16xlarge", + "ml.g6.24xlarge", + "ml.g6.48xlarge", + "ml.g6e.xlarge", + "ml.g6e.2xlarge", + "ml.g6e.4xlarge", + "ml.g6e.8xlarge", + "ml.g6e.12xlarge", + "ml.g6e.16xlarge", + "ml.g6e.24xlarge", + "ml.g6e.48xlarge", + "ml.g7e.2xlarge", + "ml.g7e.4xlarge", + "ml.g7e.8xlarge", + "ml.g7e.12xlarge", + "ml.g7e.24xlarge", + "ml.g7e.48xlarge", + "ml.p3.2xlarge", + "ml.p3.8xlarge", + "ml.p3.16xlarge", + "ml.p4d.24xlarge", + "ml.p4de.24xlarge", + "ml.p5.4xlarge", + "ml.p5.48xlarge", + "ml.p5e.48xlarge", + "ml.p5en.48xlarge" + ] + }, + "AIRecommendationInstanceTypeList":{ + "type":"list", + "member":{"shape":"AIRecommendationInstanceType"}, + "max":3, + "min":0 + }, + "AIRecommendationJobArn":{ + "type":"string", + "max":256, + "min":0, + "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:ai-recommendation-job/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" + }, + "AIRecommendationJobStatus":{ + "type":"string", + "enum":[ + "InProgress", + "Completed", + "Failed", + "Stopping", + "Stopped" + ] + }, + "AIRecommendationJobSummary":{ + "type":"structure", + "required":[ + "AIRecommendationJobName", + "AIRecommendationJobArn", + "AIRecommendationJobStatus", + "CreationTime" ], - "internalonly":true - } - }, - "shapes":{ + "members":{ + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the recommendation job.
" + }, + "AIRecommendationJobArn":{ + "shape":"AIRecommendationJobArn", + "documentation":"The Amazon Resource Name (ARN) of the recommendation job.
" + }, + "AIRecommendationJobStatus":{ + "shape":"AIRecommendationJobStatus", + "documentation":"The status of the recommendation job.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the recommendation job was created.
" + }, + "EndTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the recommendation job completed.
" + } + }, + "documentation":"Summary information about an AI recommendation job.
" + }, + "AIRecommendationJobSummaryList":{ + "type":"list", + "member":{"shape":"AIRecommendationJobSummary"} + }, + "AIRecommendationList":{ + "type":"list", + "member":{"shape":"AIRecommendation"} + }, + "AIRecommendationMetric":{ + "type":"string", + "enum":[ + "ttft-ms", + "throughput", + "cost" + ] + }, + "AIRecommendationModelDetails":{ + "type":"structure", + "members":{ + "ModelPackageArn":{ + "shape":"ModelPackageArn", + "documentation":"The Amazon Resource Name (ARN) of the model package.
" + }, + "InferenceSpecificationName":{ + "shape":"AIInferenceSpecificationName", + "documentation":"The name of the inference specification within the model package.
" + }, + "InstanceDetails":{ + "shape":"AIRecommendationInstanceDetailList", + "documentation":"The instance details for this recommendation, including instance type, count, and model copies per instance.
" + } + }, + "documentation":"Details about the model package in a recommendation.
" + }, + "AIRecommendationOptimizationConfigMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"} + }, + "AIRecommendationOptimizationDetail":{ + "type":"structure", + "required":["OptimizationType"], + "members":{ + "OptimizationType":{ + "shape":"AIRecommendationOptimizationType", + "documentation":"The type of optimization. Valid values are SpeculativeDecoding and KernelTuning.
A map of configuration parameters for the optimization technique.
" + } + }, + "documentation":"Details about an optimization technique applied in a recommendation.
" + }, + "AIRecommendationOptimizationDetailList":{ + "type":"list", + "member":{"shape":"AIRecommendationOptimizationDetail"} + }, + "AIRecommendationOptimizationType":{ + "type":"string", + "enum":[ + "SpeculativeDecoding", + "KernelTuning" + ] + }, + "AIRecommendationOutputConfig":{ + "type":"structure", + "members":{ + "S3OutputLocation":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI where recommendation results are stored.
" + }, + "ModelPackageGroupIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the model package group where the optimized model is registered as a new model package version.
" + } + }, + "documentation":"The output configuration for an AI recommendation job.
" + }, + "AIRecommendationOutputResult":{ + "type":"structure", + "required":["S3OutputLocation"], + "members":{ + "S3OutputLocation":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI where the recommendation job writes its output results.
" + }, + "ModelPackageGroupIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the model package group where deployment-ready model packages are registered.
" + } + }, + "documentation":"The output configuration for an AI recommendation job, including the S3 location for results and the model package group for deployment.
" + }, + "AIRecommendationPerformanceMetric":{ + "type":"structure", + "required":[ + "Metric", + "Value" + ], + "members":{ + "Metric":{ + "shape":"String", + "documentation":"The name of the performance metric.
" + }, + "Stat":{ + "shape":"String", + "documentation":"The statistical measure for the metric.
" + }, + "Value":{ + "shape":"String", + "documentation":"The value of the metric.
" + }, + "Unit":{ + "shape":"String", + "documentation":"The unit of the metric value.
" + } + }, + "documentation":"An expected performance metric for a recommendation.
" + }, + "AIRecommendationPerformanceTarget":{ + "type":"structure", + "required":["Constraints"], + "members":{ + "Constraints":{ + "shape":"AIRecommendationConstraintList", + "documentation":"An array of performance constraints that define the optimization objectives.
" + } + }, + "documentation":"The performance targets for an AI recommendation job.
" + }, + "AIResourceIdentifier":{ + "type":"string", + "max":256, + "min":1, + "pattern":"(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:[a-z\\-]*/)?([a-zA-Z0-9]([a-zA-Z0-9\\-]){0,62})(?The name of the AI workload configuration." + }, + "AIWorkloadConfigArn":{ + "shape":"AIWorkloadConfigArn", + "documentation":"The Amazon Resource Name (ARN) of the AI workload configuration.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the configuration was created.
" + } + }, + "documentation":"Summary information about an AI workload configuration.
" + }, + "AIWorkloadConfigSummaryList":{ + "type":"list", + "member":{"shape":"AIWorkloadConfigSummary"} + }, + "AIWorkloadConfigs":{ + "type":"structure", + "required":["WorkloadSpec"], + "members":{ + "WorkloadSpec":{ + "shape":"WorkloadSpec", + "documentation":"The workload specification that defines benchmark parameters.
" + } + }, + "documentation":"The benchmark tool configuration for an AI workload.
" + }, + "AIWorkloadDataSource":{ + "type":"structure", + "members":{ + "S3DataSource":{ + "shape":"AIWorkloadS3DataSource", + "documentation":"The Amazon S3 data source configuration.
" + } + }, + "documentation":"The data source for an AI workload input data channel.
" + }, + "AIWorkloadInputDataConfig":{ + "type":"structure", + "required":[ + "ChannelName", + "DataSource" + ], + "members":{ + "ChannelName":{ + "shape":"AIChannelName", + "documentation":"The logical name for the data channel.
" + }, + "DataSource":{ + "shape":"AIWorkloadDataSource", + "documentation":"The data source for this channel.
" + } + }, + "documentation":"A channel of input data for an AI workload configuration. Each channel has a name and a data source.
" + }, + "AIWorkloadInputDataConfigList":{ + "type":"list", + "member":{"shape":"AIWorkloadInputDataConfig"} + }, + "AIWorkloadS3DataSource":{ + "type":"structure", + "required":["S3Uri"], + "members":{ + "S3Uri":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI of the data.
" + } + }, + "documentation":"The Amazon S3 data source for an AI workload.
" + }, + "AbsoluteBorrowLimitResourceList":{ + "type":"list", + "member":{"shape":"ComputeQuotaResourceConfig"}, + "max":15, + "min":0 + }, "AcceleratorPartitionConfig":{ "type":"structure", "required":[ @@ -6258,9 +5633,17 @@ "Count" ], "members":{ - "Type":{"shape":"MIGProfileType"}, - "Count":{"shape":"AcceleratorPartitionConfigCountInteger"} - } + "Type":{ + "shape":"MIGProfileType", + "documentation":"The Multi-Instance GPU (MIG) profile type that defines the partition configuration. The profile specifies the compute and memory allocation for each partition instance. The available profile types depend on the instance type specified in the compute quota configuration.
" + }, + "Count":{ + "shape":"AcceleratorPartitionConfigCountInteger", + "documentation":"The number of accelerator partitions to allocate with the specified partition type. If you don't specify a value for vCPU and MemoryInGiB, SageMaker AI automatically allocates ratio-based values for those parameters based on the accelerator partition count you provide.
", + "box":true + } + }, + "documentation":"Configuration for allocating accelerator partitions.
" }, "AcceleratorPartitionConfigCountInteger":{ "type":"integer", @@ -6280,14 +5663,6 @@ "pattern":".*" }, "AcceptEula":{"type":"boolean"}, - "AccessDeniedException":{ - "type":"structure", - "members":{ - "Message":{"shape":"FailureReason"} - }, - "exception":true, - "internalonly":true - }, "AccountDefaultStatus":{ "type":"string", "enum":[ @@ -6382,12 +5757,6 @@ "Disabled" ] }, - "ActivationStateV1":{ - "type":"structure", - "members":{ - "Enabled":{"shape":"Boolean"} - } - }, "ActiveClusterOperationCount":{ "type":"integer", "box":true, @@ -6395,35 +5764,12 @@ }, "ActiveClusterOperationName":{ "type":"string", - "enum":["Scaling"], - "internalonly":true + "enum":["Scaling"] }, "ActiveOperations":{ "type":"map", "key":{"shape":"ActiveClusterOperationName"}, - "value":{"shape":"ActiveClusterOperationCount"}, - "internalonly":true - }, - "AddAssociationInternalRequest":{ - "type":"structure", - "required":[ - "SourceArn", - "DestinationArn", - "CustomerDetails" - ], - "members":{ - "SourceArn":{"shape":"AssociationEntityArn"}, - "DestinationArn":{"shape":"AssociationEntityArn"}, - "AssociationType":{"shape":"AssociationEdgeType"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "AddAssociationInternalResponse":{ - "type":"structure", - "members":{ - "SourceArn":{"shape":"AssociationEntityArn"}, - "DestinationArn":{"shape":"AssociationEntityArn"} - } + "value":{"shape":"ActiveClusterOperationCount"} }, "AddAssociationRequest":{ "type":"structure", @@ -6473,6 +5819,14 @@ "IncrementTargetCountBy":{ "shape":"AddClusterNodeSpecificationIncrementTargetCountByInteger", "documentation":"The number of nodes to add to the specified instance group. The total number of nodes across all instance groups in a single request cannot exceed 50.
" + }, + "AvailabilityZones":{ + "shape":"ClusterAvailabilityZones", + "documentation":"The availability zones in which to add nodes. Use this to target node placement in specific availability zones within a flexible instance group.
" + }, + "InstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The instance types to use when adding nodes. Use this to target specific instance types within a flexible instance group.
" } }, "documentation":"Specifies an instance group and the number of nodes to add to it.
" @@ -6489,37 +5843,6 @@ "max":5, "min":1 }, - "AddOnlineStoreReplicaAction":{ - "type":"structure", - "required":["RegionName"], - "members":{ - "RegionName":{"shape":"RegionName"}, - "OnlineStoreConfig":{"shape":"OnlineStoreReplicaConfig"}, - "Description":{"shape":"Description"}, - "Tags":{"shape":"TagList"} - } - }, - "AddSharedModelReviewersRequest":{ - "type":"structure", - "required":[ - "SharedModelId", - "ReviewerUserProfiles" - ], - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "ReviewerUserProfiles":{ - "shape":"UserProfileNameList", - "internalonly":true - } - } - }, - "AddSharedModelReviewersResponse":{ - "type":"structure", - "members":{} - }, "AddTagsInput":{ "type":"structure", "required":[ @@ -6652,17 +5975,9 @@ "shape":"CompressionType", "documentation":"The type of compression used for an additional data source used in inference or training. Specify None if your additional data source is not compressed.
The ETag associated with S3 URI.
" - }, - "ManifestEtag":{ - "shape":"String", - "internalonly":true } }, "documentation":"A data source used for training or inference that is in addition to the input dataset or model data.
" @@ -6687,7 +6002,8 @@ }, "AgentCount":{ "shape":"Long", - "documentation":"The number of Edge Manager agents.
" + "documentation":"The number of Edge Manager agents.
", + "box":true } }, "documentation":"Edge Manager agent version.
" @@ -6696,25 +6012,6 @@ "type":"list", "member":{"shape":"AgentVersion"} }, - "AgentsCredentialProvider":{ - "type":"structure", - "required":["TrainingImageCredentialProvider"], - "members":{ - "AlgorithmContainerCredentialProvider":{ - "shape":"CredentialProvider", - "internalonly":true - }, - "AlgorithmContainerSecondaryCredentialProvider":{ - "shape":"CredentialProvider", - "internalonly":true - }, - "TrainingImageCredentialProvider":{ - "shape":"CredentialProvider", - "internalonly":true - } - }, - "internalonly":true - }, "AggregationTransformationValue":{ "type":"string", "enum":[ @@ -6803,7 +6100,8 @@ }, "EnableSageMakerMetricsTimeSeries":{ "shape":"Boolean", - "documentation":"To generate and save time-series metrics during training, set to true. The default is false and time-series metrics aren't generated except in the following cases:
You use one of the SageMaker built-in algorithms
You use one of the following Prebuilt SageMaker Docker Images:
Tensorflow (version >= 1.15)
MXNet (version >= 1.6)
PyTorch (version >= 1.3)
You specify at least one MetricDefinition
To generate and save time-series metrics during training, set to true. The default is false and time-series metrics aren't generated except in the following cases:
You use one of the SageMaker built-in algorithms
You use one of the following Prebuilt SageMaker Docker Images:
Tensorflow (version >= 1.15)
MXNet (version >= 1.6)
PyTorch (version >= 1.3)
You specify at least one MetricDefinition
Specifies configurations for one or more training jobs that SageMaker runs to test the algorithm.
" }, - "AllFeatureParameters":{ - "type":"string", - "max":12800, - "min":0, - "pattern":".*" - }, - "AllTags":{ - "type":"string", - "max":19300, - "min":0, - "pattern":".*" - }, "AmazonQSettings":{ "type":"structure", "members":{ @@ -6989,36 +6275,6 @@ }, "documentation":"Configures how labels are consolidated across human workers and processes output data.
" }, - "App":{ - "type":"structure", - "members":{ - "AppArn":{"shape":"AppArn"}, - "AppType":{"shape":"AppType"}, - "AppName":{"shape":"AppName"}, - "DomainId":{"shape":"DomainId"}, - "UserProfileName":{"shape":"UserProfileName"}, - "SpaceName":{"shape":"SpaceName"}, - "Status":{"shape":"AppStatus"}, - "EffectiveTrustedIdentityPropagationStatus":{"shape":"FeatureStatus"}, - "RecoveryMode":{"shape":"Boolean"}, - "LastHealthCheckTimestamp":{"shape":"Timestamp"}, - "LastUserActivityTimestamp":{"shape":"Timestamp"}, - "CreationTime":{"shape":"Timestamp"}, - "RestartTime":{ - "shape":"Timestamp", - "internalonly":true - }, - "FailureReason":{"shape":"FailureReason"}, - "ResourceSpec":{"shape":"ResourceSpec"}, - "BuiltInLifecycleConfigArn":{"shape":"StudioLifecycleConfigArn"}, - "AppLaunchConfiguration":{ - "shape":"AppLaunchConfiguration", - "internalonly":true - }, - "Tags":{"shape":"TagList"} - }, - "internalonly":true - }, "AppArn":{ "type":"string", "max":256, @@ -7089,10 +6345,6 @@ "shape":"KernelGatewayImageConfig", "documentation":"The configuration for the file system and kernels in the SageMaker AI image.
" }, - "SaviturAppImageConfig":{ - "shape":"SaviturAppImageConfig", - "internalonly":true - }, "JupyterLabAppImageConfig":{ "shape":"JupyterLabAppImageConfig", "documentation":"The configuration for the file system and the runtime, such as the environment variables and entry point.
" @@ -7290,13 +6542,6 @@ "ml.r6id.32xlarge" ] }, - "AppLaunchConfiguration":{ - "type":"structure", - "members":{ - "LocalAppLaunchConfiguration":{"shape":"LocalAppLaunchConfiguration"} - }, - "internalonly":true - }, "AppLifecycleManagement":{ "type":"structure", "members":{ @@ -7318,13 +6563,6 @@ "min":0, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "AppNetworkAccess":{ - "type":"string", - "enum":[ - "DirectInternetOnly", - "VpcOnly" - ] - }, "AppNetworkAccessType":{ "type":"string", "enum":[ @@ -7332,12 +6570,6 @@ "VpcOnly" ] }, - "AppRedirectionRelativePath":{ - "type":"string", - "max":1500, - "min":0, - "pattern":"/?[^\\s]+" - }, "AppSecurityGroupManagement":{ "type":"string", "enum":[ @@ -7378,14 +6610,6 @@ "Pending" ] }, - "AppStorageType":{ - "type":"string", - "enum":[ - "EFS", - "PersistentVolume" - ], - "internalonly":true - }, "AppType":{ "type":"string", "enum":[ @@ -7397,10 +6621,7 @@ "JupyterLab", "RStudioServerPro", "RSessionGateway", - "Canvas", - "DatasetManager", - "SageMakerLite", - "Local" + "Canvas" ] }, "ApprovalDescription":{ @@ -7425,12 +6646,6 @@ "type":"string", "pattern":"[\\w:]+" }, - "ArtifactKey":{ - "type":"string", - "max":256, - "min":1, - "pattern":".*" - }, "ArtifactProperties":{ "type":"map", "key":{"shape":"StringParameterValue"}, @@ -7524,12 +6739,6 @@ }, "documentation":"Lists a summary of the properties of an artifact. An artifact represents a URI addressable object or data. Some examples are a dataset and a model.
" }, - "ArtifactValue":{ - "type":"string", - "max":8192, - "min":0, - "pattern":".*" - }, "AssemblyType":{ "type":"string", "enum":[ @@ -7543,26 +6752,6 @@ "max":10, "min":0 }, - "AssociateTrialComponentInternalRequest":{ - "type":"structure", - "required":[ - "TrialComponentName", - "TrialName", - "CustomerDetails" - ], - "members":{ - "TrialComponentName":{"shape":"ExperimentEntityName"}, - "TrialName":{"shape":"ExperimentEntityName"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "AssociateTrialComponentInternalResponse":{ - "type":"structure", - "members":{ - "TrialComponentArn":{"shape":"TrialComponentArn"}, - "TrialArn":{"shape":"TrialArn"} - } - }, "AssociateTrialComponentRequest":{ "type":"structure", "required":[ @@ -7593,12 +6782,6 @@ } } }, - "AssociatedParentJobArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:[a-zA-Z0-9\\-]*/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" - }, "AssociationEdgeType":{ "type":"string", "enum":[ @@ -7622,10 +6805,16 @@ "DestinationArn" ], "members":{ - "SourceArn":{"shape":"String2048"}, - "DestinationArn":{"shape":"String2048"} + "SourceArn":{ + "shape":"String2048", + "documentation":" The Amazon Resource Name (ARN) of the AssociationInfo source.
The Amazon Resource Name (ARN) of the AssociationInfo destination.
The data type used to describe the relationship between different sources.
" }, "AssociationInfoList":{ "type":"list", @@ -7688,10 +6877,6 @@ "MaxConcurrentInvocationsPerInstance":{ "shape":"MaxConcurrentInvocationsPerInstance", "documentation":"The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value.
" - }, - "InvocationTimeoutInSeconds":{ - "shape":"InvocationTimeoutInSeconds", - "internalonly":true } }, "documentation":"Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.
" @@ -7796,10 +6981,6 @@ "shape":"S3Uri", "documentation":"The location in Amazon S3 where Athena query results are stored.
" }, - "OutputDatasetS3Uri":{ - "shape":"S3Uri", - "internalonly":true - }, "KmsKeyId":{ "shape":"KmsKeyId", "documentation":"The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data generated from an Athena query execution.
" @@ -7862,10 +7043,6 @@ "VolumeId":{ "shape":"VolumeId", "documentation":" The unique identifier of your EBS volume to attach. The volume must be in the available state.
The properties of an AutoML candidate job.
" }, - "LocalModeEnabled":{ - "shape":"LocalModeEnabled", - "internalonly":true - }, "InferenceContainerDefinitions":{ "shape":"AutoMLInferenceContainerDefinitions", "documentation":"The mapping of all supported processing unit (CPU, GPU, etc...) to inference container definitions for the candidate. This field is populated for the AutoML jobs V2 (for example, for jobs created by calling CreateAutoMLJobV2) related to image or text classification problem types only.
A URL to the Amazon S3 data source containing selected features from the input data source to run an Autopilot job. You can input FeatureAttributeNames (optional) in JSON format as shown below:
{ \"FeatureAttributeNames\":[\"col1\", \"col2\", ...] }.
You can also specify the data type of the feature (optional) in the format shown below:
{ \"FeatureDataTypes\":{\"col1\":\"numeric\", \"col2\":\"categorical\" ... } }
These column keys may not include the target column.
In ensembling mode, Autopilot only supports the following data types: numeric, categorical, text, and datetime. In HPO mode, Autopilot can support numeric, categorical, text, datetime, and sequence.
If only FeatureDataTypes is provided, the column keys (col1, col2,..) should be a subset of the column names in the input data.
If both FeatureDataTypes and FeatureAttributeNames are provided, then the column keys should be a subset of the column names provided in FeatureAttributeNames.
The key name FeatureAttributeNames is fixed. The values listed in [\"col1\", \"col2\", ...] are case sensitive and should be a list of strings containing unique values that are a subset of the column names in the input data. The list of columns provided must not include the target column.
Stores the configuration information for the selection of algorithms trained on tabular data.
The list of available algorithms to choose from depends on the training mode set in TabularJobConfig.Mode .
AlgorithmsConfig should not be set if the training mode is set on AUTO.
When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only.
If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode.
When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode.
For the list of all algorithms per problem type and training mode, see AutoMLAlgorithmConfig.
For more information on each algorithm, see the Algorithm support section in Autopilot developer guide.
" @@ -8142,14 +7299,6 @@ "shape":"TargetAttributeName", "documentation":"The name of the target variable in supervised learning, usually represented by 'y'.
" }, - "FeatureAttributeS3Uri":{ - "shape":"S3Uri", - "internalonly":true - }, - "AutoMLDatasetDefinition":{ - "shape":"AutoMLDatasetDefinition", - "internalonly":true - }, "ContentType":{ "shape":"ContentType", "documentation":"The content type of the data from the input source. You can use text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present.
The configuration for using EMR Serverless to run the AutoML job V2.
To allow your AutoML job V2 to automatically initiate a remote job on EMR Serverless when additional compute resources are needed to process large datasets, you need to provide an EmrServerlessComputeConfig object, which includes an ExecutionRoleARN attribute, to the AutoMLComputeConfig of the AutoML job V2 input request.
By seamlessly transitioning to EMR Serverless when required, the AutoML job can handle datasets that would otherwise exceed the initially provisioned resources, without any manual intervention from you.
EMR Serverless is available for the tabular and time series problem types. We recommend setting up this option for tabular datasets larger than 5 GB and time series datasets larger than 30 GB.
" } }, - "documentation":"This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment.
Specifies the compute configuration for an AutoML job V2.
" + "documentation":"This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment.
Specifies the compute configuration for an AutoML job V2.
" }, "AutoMLContainerDefinition":{ "type":"structure", @@ -8237,8 +7366,7 @@ "S3DataSource":{ "shape":"AutoMLS3DataSource", "documentation":"The Amazon S3 location of the input data.
" - }, - "FileSystemDataSource":{"shape":"AutoMLFileSystemDataSource"} + } }, "documentation":"The data source for the Autopilot job.
" }, @@ -8252,111 +7380,11 @@ }, "documentation":"This structure specifies how to split the data into train and validation datasets.
The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size.
The data source for an AutoML channel (Required).
" - }, - "DatasetDefinition":{ - "shape":"AutoMLDatasetDefinition", - "internalonly":true } }, "documentation":"A channel is a named input source that training algorithms can consume. This channel is used for AutoML jobs V2 (jobs created by calling CreateAutoMLJobV2).
" @@ -8460,21 +7484,9 @@ "shape":"AutoMLDataSplitConfig", "documentation":"The configuration for splitting the input training dataset.
Type: AutoMLDataSplitConfig
" }, - "Engine":{ - "shape":"AutoMLEngine", - "internalonly":true - }, "Mode":{ "shape":"AutoMLMode", "documentation":"The method that Autopilot uses to train the data. You can either specify the mode manually or let Autopilot choose for you based on the dataset size by selecting AUTO. In AUTO mode, Autopilot chooses ENSEMBLING for datasets smaller than 100 MB, and HYPERPARAMETER_TUNING for larger ones.
The ENSEMBLING mode uses a multi-stack ensemble model to predict classification and regression tasks directly from your dataset. This machine learning mode combines several base models to produce an optimal predictive model. It then uses a stacking ensemble method to combine predictions from contributing members. A multi-stack ensemble model can provide better performance over a single model by combining the predictive capabilities of multiple models. See Autopilot algorithm support for a list of algorithms supported by ENSEMBLING mode.
The HYPERPARAMETER_TUNING (HPO) mode uses the best hyperparameters to train the best version of a model. HPO automatically selects an algorithm for the type of problem you want to solve. Then HPO finds the best hyperparameters according to your objective metric. See Autopilot algorithm support for a list of algorithms supported by HYPERPARAMETER_TUNING mode.
A collection of settings used for an AutoML job.
" @@ -8612,11 +7624,6 @@ "max":100, "min":1 }, - "AutoMLMaxResultsForTasks":{ - "type":"integer", - "max":100, - "min":1 - }, "AutoMLMaxResultsForTrials":{ "type":"integer", "max":300, @@ -8826,7 +7833,8 @@ }, "EnableInterContainerTrafficEncryption":{ "shape":"Boolean", - "documentation":"Whether to use traffic encryption between the container layers.
" + "documentation":"Whether to use traffic encryption between the container layers.
", + "box":true }, "VpcConfig":{ "shape":"VpcConfig", @@ -8835,29 +7843,6 @@ }, "documentation":"Security options.
" }, - "AutoMLSnowflakeDatasetDefinition":{ - "type":"structure", - "required":[ - "Warehouse", - "Database", - "Schema", - "TableName", - "SecretArn", - "OutputS3Uri", - "StorageIntegration" - ], - "members":{ - "Warehouse":{"shape":"SnowflakeObjectId"}, - "Database":{"shape":"SnowflakeObjectId"}, - "Schema":{"shape":"SnowflakeObjectId"}, - "TableName":{"shape":"SnowflakeObjectId"}, - "SnowflakeRole":{"shape":"SnowflakeObjectId"}, - "SecretArn":{"shape":"ProcessingSecretArn"}, - "OutputS3Uri":{"shape":"S3Uri"}, - "StorageIntegration":{"shape":"SnowflakeObjectId"}, - "KmsKeyId":{"shape":"KmsKeyId"} - } - }, "AutoMLSortBy":{ "type":"string", "enum":[ @@ -8873,100 +7858,6 @@ "Descending" ] }, - "AutoMLTask":{ - "type":"structure", - "required":[ - "AutoMLJobArn", - "AutoMLTaskArn", - "CandidateName", - "AutoMLTaskType", - "AutoMLTaskStatus", - "CreationTime", - "LastModifiedTime" - ], - "members":{ - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "AutoMLTaskArn":{"shape":"AutoMLTaskArn"}, - "CandidateName":{"shape":"CandidateName"}, - "AutoMLTaskType":{"shape":"AutoMLTaskType"}, - "AutoMLTaskStatus":{"shape":"AutoMLTaskStatus"}, - "CreationTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"} - } - }, - "AutoMLTaskArn":{ - "type":"string", - "max":256, - "min":1, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:automl-task/.*" - }, - "AutoMLTaskArtifactsLocation":{ - "type":"string", - "min":1 - }, - "AutoMLTaskContext":{ - "type":"structure", - "members":{ - "ExplainabilityTaskContext":{"shape":"ExplainabilityTaskContext"}, - "ModelInsightsTaskContext":{"shape":"ModelInsightsTaskContext"} - }, - "union":true - }, - "AutoMLTaskSortBy":{ - "type":"string", - "enum":[ - "TaskType", - "CreationTime", - "Status" - ] - }, - "AutoMLTaskStatus":{ - "type":"string", - "enum":[ - "Completed", - "InProgress", - "Failed", - "Stopped", - "Stopping" - ] - }, - "AutoMLTaskType":{ - "type":"string", - "enum":[ - "ModelInsights", - "Explainability" - ] - }, - "AutoMLTasks":{ - "type":"list", - "member":{"shape":"AutoMLTask"} - }, - "AutoMLTransformer":{ - "type":"string", - "enum":[ - "TfidfVectorizer", - "ImputerWithIndicator", - "Imputer", - "LogTransformerExtremeValues", - "NumericPassthrough", - "QuantileTransformerExtremeValues", - "Normalizer", - "PCA", - "DateTimeVectorizer", - "OneHotEncoder", - "OrdinalEncoder", - "KBinsDiscretizer", - "Copy", - "Drop" - ] - }, - "AutoMLTransformers":{ - "type":"list", - "member":{"shape":"AutoMLTransformer"}, - "max":15, - "min":0 - }, "AutoMountHomeEFS":{ "type":"string", "enum":[ @@ -9036,23 +7927,20 @@ "min":1, "pattern":"[a-z]+\\-[0-9a-z\\-]+" }, - "AvailabilityZoneDistribution":{ + "AvailabilityZoneBalanceEnforcementMode":{ "type":"string", - "enum":[ - "single_az", - "multi_az" - ] + "enum":["PERMISSIVE"] + }, + "AvailabilityZoneBalanceMaxImbalance":{ + "type":"integer", + "box":true, + "max":100, + "min":0 }, "AvailabilityZoneId":{ "type":"string", "pattern":"[a-z]{3}\\d-az\\d" }, - "AvailabilityZones":{ - "type":"list", - "member":{"shape":"AvailabilityZone"}, - "max":7, - "min":0 - }, "AvailableInstanceCount":{ "type":"integer", "box":true, @@ -9081,19 +7969,9 @@ "type":"string", "enum":[ "AWS/Rekognition/DetectModerationLabels/Image/V3", - "AWS/Textract/AnalyzeDocument/Forms/V1", - "AWS/Bedrock/Evaluation", - "AWS/Bedrock/ModelEvaluation", - "AWS/Textract/AnalyzeExpense", - "AWS/Handshake/VerifyIdentity" + "AWS/Textract/AnalyzeDocument/Forms/V1" ] }, - "AwsPayerToken":{ - "type":"string", - "max":256, - "min":1, - "pattern":".*" - }, "BacktestResultsLocation":{ "type":"string", "min":1 @@ -9101,11 +7979,20 @@ "BaseModel":{ "type":"structure", "members":{ - "HubContentName":{"shape":"HubContentName"}, - "HubContentVersion":{"shape":"HubContentVersion"}, - "RecipeName":{"shape":"RecipeName"} + "HubContentName":{ + "shape":"HubContentName", + "documentation":"The hub content name of the base model.
" + }, + "HubContentVersion":{ + "shape":"HubContentVersion", + "documentation":"The hub content version of the base model.
" + }, + "RecipeName":{ + "shape":"RecipeName", + "documentation":"The recipe name of the base model.
" + } }, - "internalonly":true + "documentation":"Identifies the foundation model that was used as the starting point for model customization.
" }, "BaseModelName":{ "type":"string", @@ -9133,6 +8020,14 @@ "shape":"BatchAddFailureCount", "documentation":"The number of nodes that failed to be added to the specified instance group.
" }, + "AvailabilityZones":{ + "shape":"ClusterAvailabilityZones", + "documentation":"The availability zones associated with the failed node addition request.
" + }, + "InstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The instance types associated with the failed node addition request.
" + }, "Message":{ "shape":"String", "documentation":"A descriptive message providing additional details about the error.
" @@ -9144,7 +8039,9 @@ "type":"string", "enum":[ "InstanceGroupNotFound", - "InvalidInstanceGroupStatus" + "InvalidInstanceGroupStatus", + "IncompatibleAvailabilityZones", + "IncompatibleInstanceTypes" ] }, "BatchAddClusterNodesErrorList":{ @@ -9170,10 +8067,6 @@ "NodesToAdd":{ "shape":"AddClusterNodeSpecificationList", "documentation":"A list of instance groups and the number of nodes to add to each. You can specify up to 5 instance groups in a single request, with a maximum of 50 nodes total across all instance groups.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -9219,7 +8112,8 @@ }, "GenerateInferenceId":{ "shape":"Boolean", - "documentation":"Flag that indicates whether to append inference id to the output.
" + "documentation":"Flag that indicates whether to append inference id to the output.
", + "box":true } }, "documentation":"Configuration to control how SageMaker captures inference data for batch transform jobs.
" @@ -9281,8 +8175,7 @@ "enum":[ "NodeIdNotFound", "InvalidNodeStatus", - "NodeIdInUse", - "InternalServerError" + "NodeIdInUse" ] }, "BatchDeleteClusterNodesErrorList":{ @@ -9306,10 +8199,6 @@ "NodeLogicalIds":{ "shape":"ClusterNodeLogicalIdList", "documentation":"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.
The package registration type of the model package summary.
" } }, "documentation":"Provides summary information about the model package.
" }, - "BatchGetMetricsRequest":{ - "type":"structure", - "required":["MetricQueries"], - "members":{ - "MetricQueries":{"shape":"MetricQueryList"} - } - }, - "BatchGetMetricsResponse":{ - "type":"structure", - "members":{ - "MetricQueryResults":{"shape":"MetricQueryResultList"} - } - }, - "BatchPutMetricsError":{ - "type":"structure", - "required":[ - "Code", - "Message", - "MetricIndex" - ], - "members":{ - "Code":{"shape":"PutMetricsErrorCode"}, - "Message":{"shape":"String"}, - "MetricIndex":{"shape":"Integer"} - } - }, - "BatchPutMetricsErrorList":{ - "type":"list", - "member":{"shape":"BatchPutMetricsError"}, - "max":100, - "min":1 - }, - "BatchPutMetricsRequest":{ - "type":"structure", - "required":[ - "ResourceArn", - "MetricData" - ], - "members":{ - "ResourceArn":{"shape":"SageMakerResourceArn"}, - "MetricData":{"shape":"RawMetricDataList"} - } - }, - "BatchPutMetricsResponse":{ - "type":"structure", - "members":{ - "Errors":{"shape":"BatchPutMetricsErrorList"} - } - }, "BatchRebootClusterNodeLogicalIdsError":{ "type":"structure", "required":[ @@ -9483,10 +8323,20 @@ "Message" ], "members":{ - "NodeLogicalId":{"shape":"ClusterNodeLogicalId"}, - "ErrorCode":{"shape":"BatchRebootClusterNodesErrorCode"}, - "Message":{"shape":"String"} - } + "NodeLogicalId":{ + "shape":"ClusterNodeLogicalId", + "documentation":"The logical node ID of the node that encountered an error during the reboot operation.
" + }, + "ErrorCode":{ + "shape":"BatchRebootClusterNodesErrorCode", + "documentation":"The error code associated with the error encountered when rebooting a node by logical node ID.
Possible values:
InstanceIdNotFound: The node does not exist in the specified cluster.
InvalidInstanceStatus: The node is in a state that does not allow rebooting. Wait for the node to finish any ongoing changes before retrying.
InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying.
InternalServerError: An internal error occurred while processing this node.
A human-readable message describing the error encountered when rebooting a node by logical node ID.
" + } + }, + "documentation":"Represents an error encountered when rebooting a node (identified by its logical node ID) from a SageMaker HyperPod cluster.
" }, "BatchRebootClusterNodeLogicalIdsErrors":{ "type":"list", @@ -9502,10 +8352,20 @@ "Message" ], "members":{ - "NodeId":{"shape":"ClusterNodeId"}, - "ErrorCode":{"shape":"BatchRebootClusterNodesErrorCode"}, - "Message":{"shape":"String"} - } + "NodeId":{ + "shape":"ClusterNodeId", + "documentation":"The EC2 instance ID of the node that encountered an error during the reboot operation.
" + }, + "ErrorCode":{ + "shape":"BatchRebootClusterNodesErrorCode", + "documentation":"The error code associated with the error encountered when rebooting a node.
Possible values:
InstanceIdNotFound: The instance does not exist in the specified cluster.
InvalidInstanceStatus: The instance is in a state that does not allow rebooting. Wait for the instance to finish any ongoing changes before retrying.
InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying.
InternalServerError: An internal error occurred while processing this node.
A human-readable message describing the error encountered when rebooting a node.
" + } + }, + "documentation":"Represents an error encountered when rebooting a node from a SageMaker HyperPod cluster.
" }, "BatchRebootClusterNodesErrorCode":{ "type":"string", @@ -9526,12 +8386,17 @@ "type":"structure", "required":["ClusterName"], "members":{ - "ClusterName":{"shape":"ClusterNameOrArn"}, - "NodeIds":{"shape":"BatchRebootClusterNodesRequestNodeIdsList"}, - "NodeLogicalIds":{"shape":"BatchRebootClusterNodesRequestNodeLogicalIdsList"}, - "DryRun":{ - "shape":"DryRun", - "internalonly":true + "ClusterName":{ + "shape":"ClusterNameOrArn", + "documentation":"The name or Amazon Resource Name (ARN) of the SageMaker HyperPod cluster containing the nodes to reboot.
" + }, + "NodeIds":{ + "shape":"BatchRebootClusterNodesRequestNodeIdsList", + "documentation":"A list of EC2 instance IDs to reboot using soft recovery. You can specify between 1 and 25 instance IDs.
Either NodeIds or NodeLogicalIds must be provided (or both), but at least one is required.
Each instance ID must follow the pattern i- followed by 17 hexadecimal characters (for example, i-0123456789abcdef0).
A list of logical node IDs to reboot using soft recovery. You can specify between 1 and 25 logical node IDs.
The NodeLogicalId is a unique identifier that persists throughout the node's lifecycle and can be used to track nodes that are still being provisioned and don't yet have an EC2 instance ID assigned.
This parameter is only supported for clusters using Continuous as the NodeProvisioningMode. For clusters using the default provisioning mode, use NodeIds instead.
Either NodeIds or NodeLogicalIds must be provided (or both), but at least one is required.
A list of EC2 instance IDs for which the reboot operation was successfully initiated.
" + }, + "Failed":{ + "shape":"BatchRebootClusterNodesErrors", + "documentation":"A list of errors encountered for EC2 instance IDs that could not be rebooted. Each error includes the instance ID, an error code, and a descriptive message.
" + }, + "FailedNodeLogicalIds":{ + "shape":"BatchRebootClusterNodeLogicalIdsErrors", + "documentation":"A list of errors encountered for logical node IDs that could not be rebooted. Each error includes the logical node ID, an error code, and a descriptive message. This field is only present when NodeLogicalIds were provided in the request.
A list of logical node IDs for which the reboot operation was successfully initiated. This field is only present when NodeLogicalIds were provided in the request.
The logical node ID of the node that encountered an error during the replacement operation.
" + }, + "ErrorCode":{ + "shape":"BatchReplaceClusterNodesErrorCode", + "documentation":"The error code associated with the error encountered when replacing a node by logical node ID.
Possible values:
InstanceIdNotFound: The node does not exist in the specified cluster.
InvalidInstanceStatus: The node is in a state that does not allow replacement. Wait for the node to finish any ongoing changes before retrying.
InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying.
InternalServerError: An internal error occurred while processing this node.
A human-readable message describing the error encountered when replacing a node by logical node ID.
" + } + }, + "documentation":"Represents an error encountered when replacing a node (identified by its logical node ID) in a SageMaker HyperPod cluster.
" }, "BatchReplaceClusterNodeLogicalIdsErrors":{ "type":"list", @@ -9651,10 +8470,20 @@ "Message" ], "members":{ - "NodeId":{"shape":"ClusterNodeId"}, - "ErrorCode":{"shape":"BatchReplaceClusterNodesErrorCode"}, - "Message":{"shape":"String"} - } + "NodeId":{ + "shape":"ClusterNodeId", + "documentation":"The EC2 instance ID of the node that encountered an error during the replacement operation.
" + }, + "ErrorCode":{ + "shape":"BatchReplaceClusterNodesErrorCode", + "documentation":"The error code associated with the error encountered when replacing a node.
Possible values:
InstanceIdNotFound: The instance does not exist in the specified cluster.
InvalidInstanceStatus: The instance is in a state that does not allow replacement. Wait for the instance to finish any ongoing changes before retrying.
InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying.
InternalServerError: An internal error occurred while processing this node.
A human-readable message describing the error encountered when replacing a node.
" + } + }, + "documentation":"Represents an error encountered when replacing a node in a SageMaker HyperPod cluster.
" }, "BatchReplaceClusterNodesErrorCode":{ "type":"string", @@ -9675,12 +8504,17 @@ "type":"structure", "required":["ClusterName"], "members":{ - "ClusterName":{"shape":"ClusterNameOrArn"}, - "NodeIds":{"shape":"BatchReplaceClusterNodesRequestNodeIdsList"}, - "NodeLogicalIds":{"shape":"BatchReplaceClusterNodesRequestNodeLogicalIdsList"}, - "DryRun":{ - "shape":"DryRun", - "internalonly":true + "ClusterName":{ + "shape":"ClusterNameOrArn", + "documentation":"The name or Amazon Resource Name (ARN) of the SageMaker HyperPod cluster containing the nodes to replace.
" + }, + "NodeIds":{ + "shape":"BatchReplaceClusterNodesRequestNodeIdsList", + "documentation":"A list of EC2 instance IDs to replace with new hardware. You can specify between 1 and 25 instance IDs.
Replace operations destroy all instance volumes (root and secondary). Ensure you have backed up any important data before proceeding.
Either NodeIds or NodeLogicalIds must be provided (or both), but at least one is required.
Each instance ID must follow the pattern i- followed by 17 hexadecimal characters (for example, i-0123456789abcdef0).
For SageMaker HyperPod clusters using the Slurm workload manager, you cannot replace instances that are configured as Slurm controller nodes.
A list of logical node IDs to replace with new hardware. You can specify between 1 and 25 logical node IDs.
The NodeLogicalId is a unique identifier that persists throughout the node's lifecycle and can be used to track nodes that are still being provisioned and don't yet have an EC2 instance ID assigned.
Replace operations destroy all instance volumes (root and secondary). Ensure you have backed up any important data before proceeding.
This parameter is only supported for clusters using Continuous as the NodeProvisioningMode. For clusters using the default provisioning mode, use NodeIds instead.
Either NodeIds or NodeLogicalIds must be provided (or both), but at least one is required.
A list of EC2 instance IDs for which the replacement operation was successfully initiated.
" + }, + "Failed":{ + "shape":"BatchReplaceClusterNodesErrors", + "documentation":"A list of errors encountered for EC2 instance IDs that could not be replaced. Each error includes the instance ID, an error code, and a descriptive message.
" + }, + "FailedNodeLogicalIds":{ + "shape":"BatchReplaceClusterNodeLogicalIdsErrors", + "documentation":"A list of errors encountered for logical node IDs that could not be replaced. Each error includes the logical node ID, an error code, and a descriptive message. This field is only present when NodeLogicalIds were provided in the request.
A list of logical node IDs for which the replacement operation was successfully initiated. This field is only present when NodeLogicalIds were provided in the request.
The Amazon Resource Name (ARN) for the Amazon Bedrock custom model deployment.
" } }, - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock custom model deployment.
" }, "BedrockCustomModelMetadata":{ "type":"structure", "members":{ "Arn":{ "shape":"String1024", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the Amazon Bedrock custom model.
" } }, - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock custom model.
" }, "BedrockModelImportMetadata":{ "type":"structure", "members":{ "Arn":{ "shape":"String1024", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the Amazon Bedrock model import.
" } }, - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock model import.
" }, "BedrockProvisionedModelThroughputMetadata":{ "type":"structure", "members":{ "Arn":{ "shape":"String1024", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the Amazon Bedrock provisioned model throughput.
" } }, - "internalonly":true - }, - "BenchmarkResultsOutputConfig":{ - "type":"structure", - "members":{ - "S3OutputUri":{"shape":"S3Uri"} - }, - "internalonly":true - }, - "BestEffortProvisioning":{ - "type":"boolean", - "box":true + "documentation":"The metadata of the Amazon Bedrock provisioned model throughput.
" }, "BestObjectiveNotImproving":{ "type":"structure", @@ -9860,21 +8695,6 @@ "box":true, "min":0 }, - "BillingMode":{ - "type":"string", - "enum":[ - "BillApiCaller", - "BillResourceOwner" - ], - "internalonly":true - }, - "BillingOption":{ - "type":"string", - "enum":[ - "Standard", - "FreeTierEligible" - ] - }, "BlockedReason":{ "type":"string", "max":1024, @@ -9910,7 +8730,7 @@ "BorrowLimit":{ "type":"integer", "box":true, - "max":500, + "max":10000, "min":0 }, "Branch":{ @@ -9925,37 +8745,6 @@ "min":3, "pattern":"[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]" }, - "BurstLimit":{ - "type":"structure", - "members":{ - "AllowUnlimitedBurst":{"shape":"Boolean"}, - "BurstMultiplier":{"shape":"BurstMultiplier"} - } - }, - "BurstMultiplier":{ - "type":"integer", - "box":true, - "max":100000, - "min":1 - }, - "CWLogGroup":{ - "type":"string", - "max":512, - "min":1, - "pattern":"[\\.\\-_/#A-Za-z0-9]+" - }, - "CWLogStream":{ - "type":"string", - "max":512, - "min":1, - "pattern":"[^:*]*" - }, - "CWMetricNamespace":{ - "type":"string", - "max":255, - "min":1, - "pattern":"[^:].*" - }, "CacheHitResult":{ "type":"structure", "members":{ @@ -10019,18 +8808,6 @@ "AlgorithmsConfig":{ "shape":"AutoMLAlgorithmsConfig", "documentation":"Your Autopilot job trains a default set of algorithms on your dataset. For tabular and time-series data, you can customize the algorithm list by selecting a subset of algorithms for your problem type.
AlgorithmsConfig stores the customized selection of algorithms to train on your data.
For the tabular problem type TabularJobConfig, the list of available algorithms to choose from depends on the training mode set in AutoMLJobConfig.Mode .
AlgorithmsConfig should not be set when the training mode AutoMLJobConfig.Mode is set to AUTO.
When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only.
If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode.
When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode.
For the list of all algorithms per training mode, see AlgorithmConfig.
For more information on each algorithm, see the Algorithm support section in the Autopilot developer guide.
For the time-series forecasting problem type TimeSeriesForecastingJobConfig, choose your algorithms from the list provided in AlgorithmConfig.
For more information on each algorithm, see the Algorithms support for time-series forecasting section in the Autopilot developer guide.
When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only.
If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting.
When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting.
Stores the configuration information for how model candidates are generated using an AutoML job V2.
" @@ -10062,14 +8839,6 @@ "FinalObjectiveMetricValue" ] }, - "CandidateSpecification":{ - "type":"structure", - "required":["ColumnsConfig"], - "members":{ - "Algorithm":{"shape":"AutoMLAlgorithm"}, - "ColumnsConfig":{"shape":"ColumnsConfig"} - } - }, "CandidateStatus":{ "type":"string", "enum":[ @@ -10103,12 +8872,6 @@ "type":"list", "member":{"shape":"AutoMLCandidateStep"} }, - "CandidatesSpecification":{ - "type":"list", - "member":{"shape":"CandidateSpecification"}, - "max":1, - "min":0 - }, "CanvasAppSettings":{ "type":"structure", "members":{ @@ -10143,49 +8906,10 @@ "EmrServerlessSettings":{ "shape":"EmrServerlessSettings", "documentation":"The settings for running Amazon EMR Serverless data processing jobs in SageMaker Canvas.
" - }, - "DataScienceAssistantSettings":{ - "shape":"DataScienceAssistantSettings", - "internalonly":true } }, "documentation":"The SageMaker Canvas application settings.
" }, - "CapacityBlockDurationInHours":{ - "type":"integer", - "box":true, - "max":336, - "min":1 - }, - "CapacityBlockOffering":{ - "type":"structure", - "required":[ - "CapacityBlockDurationInHours", - "UpfrontFee", - "CurrencyCode" - ], - "members":{ - "CapacityBlockDurationInHours":{"shape":"CapacityBlockDurationInHours"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "UpfrontFee":{"shape":"String256"}, - "CurrencyCode":{"shape":"CurrencyCode"}, - "AvailabilityZone":{"shape":"AvailabilityZone"} - } - }, - "CapacityBlockOfferings":{ - "type":"list", - "member":{"shape":"CapacityBlockOffering"}, - "max":5, - "min":0 - }, - "CapacityFallbackStrategy":{ - "type":"string", - "enum":[ - "OnDemand", - "None" - ] - }, "CapacityReservation":{ "type":"structure", "members":{ @@ -10200,21 +8924,6 @@ }, "documentation":"Information about the Capacity Reservation used by an instance or instance group.
" }, - "CapacityReservationId":{ - "type":"string", - "internalonly":true, - "max":128, - "min":1, - "pattern":"[\\S]+" - }, - "CapacityReservationIds":{ - "type":"list", - "member":{"shape":"CapacityReservationId"}, - "documentation":"Optional. Customer request specific ODCR to be ussed for training job.
", - "internalonly":true, - "max":10, - "min":1 - }, "CapacityReservationPreference":{ "type":"string", "enum":["capacity-reservations-only"] @@ -10226,241 +8935,6 @@ "CRG" ] }, - "CapacityResourceArn":{ - "type":"string", - "max":2048, - "min":50, - "pattern":"arn:aws[a-z\\-]*:ec2:[a-z0-9\\-]*:[0-9]{12}:capacity-reservation/cr-.*" - }, - "CapacityResources":{ - "type":"structure", - "members":{ - "CapacityBlockOfferings":{"shape":"CapacityBlockOfferings"}, - "CapacityResourceArn":{"shape":"CapacityResourceArn"} - } - }, - "CapacitySchedule":{ - "type":"structure", - "required":["CapacityScheduleArn"], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"} - } - }, - "CapacityScheduleArn":{ - "type":"string", - "max":2048, - "min":50, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:capacity-schedule/.*" - }, - "CapacityScheduleDetail":{ - "type":"structure", - "required":[ - "CapacityScheduleArn", - "CapacityScheduleType", - "InstanceType", - "TotalInstanceCount", - "Placement", - "Status", - "RequestedStartTime" - ], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"}, - "OwnerAccountId":{"shape":"AccountId"}, - "CapacityScheduleType":{"shape":"CapacityScheduleType"}, - "InstanceType":{"shape":"CapacityScheduleInstanceType"}, - "TotalInstanceCount":{"shape":"Integer"}, - "AvailableInstanceCount":{"shape":"AvailableInstanceCount"}, - "AvailabilityZoneDistribution":{"shape":"AvailabilityZoneDistribution"}, - "Placement":{"shape":"Placement"}, - "AvailabilityZone":{"shape":"AvailabilityZone"}, - "Status":{"shape":"CapacityScheduleStatus"}, - "RequestedStartTime":{"shape":"Timestamp"}, - "RequestedEndTime":{"shape":"Timestamp"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "DurationInHours":{"shape":"CapacityScheduleDurationInHours"}, - "CapacityBlockOfferings":{"shape":"CapacityBlockOfferings"}, - "CapacityResources":{"shape":"CapacityResources"}, - "TargetResources":{"shape":"SageMakerResourceNames"}, - "CapacityScheduleStatusTransitions":{"shape":"CapacityScheduleStatusTransitions"} - } - }, - "CapacityScheduleDetails":{ - "type":"list", - "member":{"shape":"CapacityScheduleDetail"} - }, - "CapacityScheduleDurationInHours":{ - "type":"long", - "box":true, - "max":87600, - "min":1 - }, - "CapacityScheduleFilter":{ - "type":"structure", - "required":[ - "Name", - "Value" - ], - "members":{ - "Name":{"shape":"CapacityScheduleFilterName"}, - "Value":{"shape":"String64"} - } - }, - "CapacityScheduleFilterName":{ - "type":"string", - "enum":[ - "Status", - "InstanceType", - "AvailabilityZone" - ] - }, - "CapacityScheduleFilters":{ - "type":"list", - "member":{"shape":"CapacityScheduleFilter"}, - "max":5, - "min":1 - }, - "CapacityScheduleInstanceCount":{ - "type":"integer", - "max":256, - "min":1 - }, - "CapacityScheduleInstanceType":{ - "type":"string", - "enum":[ - "ml.p4d.24xlarge", - "ml.p4de.24xlarge", - "ml.p5.48xlarge", - "ml.g5.xlarge", - "ml.g5.2xlarge", - "ml.g5.4xlarge", - "ml.g5.8xlarge", - "ml.g5.16xlarge", - "ml.g5.12xlarge", - "ml.g5.24xlarge", - "ml.g5.48xlarge", - "ml.t3.large", - "ml.c7g.medium" - ] - }, - "CapacityScheduleMaxWaitTimeInSeconds":{ - "type":"integer", - "box":true, - "max":604800, - "min":60 - }, - "CapacityScheduleName":{ - "type":"string", - "max":64, - "min":1, - "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,63}" - }, - "CapacityScheduleOffering":{ - "type":"structure", - "required":[ - "CapacityScheduleOfferingId", - "CapacityScheduleType", - "InstanceType", - "InstanceCount", - "RequestedStartTime" - ], - "members":{ - "CapacityScheduleOfferingId":{"shape":"CapacityScheduleOfferingId"}, - "CapacityScheduleType":{"shape":"CapacityScheduleType"}, - "EligibleResources":{"shape":"SageMakerResourceNames"}, - "InstanceType":{"shape":"CapacityScheduleInstanceType"}, - "InstanceCount":{"shape":"CapacityScheduleInstanceCount"}, - "Placement":{"shape":"Placement"}, - "RequestedStartTime":{"shape":"Timestamp"}, - "RequestedEndTime":{"shape":"Timestamp"}, - "AvailabilityZones":{"shape":"AvailabilityZones"}, - "AvailabilityZoneDistribution":{"shape":"AvailabilityZoneDistribution"}, - "DurationInHours":{"shape":"CapacityScheduleDurationInHours"}, - "CapacityBlockOfferings":{"shape":"CapacityBlockOfferings"} - } - }, - "CapacityScheduleOfferingId":{ - "type":"string", - "max":256, - "min":1, - "pattern":"[a-z0-9\\-]+" - }, - "CapacityScheduleOfferings":{ - "type":"list", - "member":{"shape":"CapacityScheduleOffering"}, - "min":0 - }, - "CapacityScheduleSortBy":{ - "type":"string", - "enum":[ - "CapacityScheduleName", - "StartTime", - "RequestedStartTime", - "Status" - ] - }, - "CapacityScheduleSortOrder":{ - "type":"string", - "enum":[ - "Ascending", - "Descending" - ] - }, - "CapacityScheduleStatus":{ - "type":"string", - "enum":[ - "Pending", - "Confirmed", - "Active", - "Updating", - "Stopping", - "Stopped", - "Rejected", - "Withdrawn" - ] - }, - "CapacityScheduleStatusTransition":{ - "type":"structure", - "required":[ - "Status", - "StartTime", - "StatusMessage" - ], - "members":{ - "Status":{"shape":"CapacityScheduleStatus"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "StatusMessage":{"shape":"String64"} - } - }, - "CapacityScheduleStatusTransitions":{ - "type":"list", - "member":{"shape":"CapacityScheduleStatusTransition"}, - "max":20, - "min":0 - }, - "CapacityScheduleType":{ - "type":"string", - "enum":[ - "Persist", - "Block", - "Byo-Persistent" - ] - }, - "CapacitySchedulesConfig":{ - "type":"structure", - "required":["CapacitySchedules"], - "members":{ - "CapacityFallbackStrategy":{"shape":"TrainingCapacityFallbackStrategy"}, - "CapacitySchedules":{"shape":"CapacitySchedulesList"} - } - }, - "CapacitySchedulesList":{ - "type":"list", - "member":{"shape":"CapacitySchedule"}, - "max":10, - "min":1 - }, "CapacitySize":{ "type":"structure", "required":[ @@ -10515,27 +8989,6 @@ "max":10000000, "min":0 }, - "CaptureBoundary":{ - "type":"string", - "enum":[ - "Endpoint", - "Container" - ], - "internalonly":true - }, - "CaptureContainerConfig":{ - "type":"structure", - "required":["ContainerHostname"], - "members":{ - "ContainerHostname":{"shape":"ContainerHostname"} - }, - "internalonly":true - }, - "CaptureContainerList":{ - "type":"list", - "member":{"shape":"CaptureContainerConfig"}, - "internalonly":true - }, "CaptureContentTypeHeader":{ "type":"structure", "members":{ @@ -10565,14 +9018,6 @@ "CaptureMode":{ "shape":"CaptureMode", "documentation":"Specify the boundary of data to capture.
" - }, - "CaptureBoundary":{ - "shape":"CaptureBoundary", - "internalonly":true - }, - "CaptureContainers":{ - "shape":"CaptureContainerList", - "internalonly":true } }, "documentation":"Specifies data Model Monitor will capture.
" @@ -10903,10 +9348,6 @@ "ShuffleConfig":{ "shape":"ShuffleConfig", "documentation":"A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType, this shuffles the results of the S3 key prefix matches. If you use ManifestFile, the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.
For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key, the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.
A channel is a named input source that training algorithms can consume.
" @@ -10935,7 +9376,8 @@ }, "IsRequired":{ "shape":"Boolean", - "documentation":"Indicates whether the channel is required by the algorithm.
" + "documentation":"Indicates whether the channel is required by the algorithm.
", + "box":true }, "SupportedContentTypes":{ "shape":"ContentTypes", @@ -11012,11 +9454,13 @@ }, "SkipCheck":{ "shape":"Boolean", - "documentation":"This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available.
This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available.
This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints property.
This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints property.
The container for the metadata for the ClarifyCheck step. For more information, see the topic on ClarifyCheck step in the Amazon SageMaker Developer Guide.
" @@ -11095,10 +9539,6 @@ "shape":"ClarifyContentTemplate", "documentation":"A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{\"myfeatures\":$features}' will format a list of features [1,2,3] into the record string '{\"myfeatures\":[1,2,3]}'. Required only when the model container input is in JSON Lines format.
The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset. A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1, the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime.
Configuration options specific to Spot instances.
" + }, + "OnDemand":{ + "shape":"ClusterOnDemandOptions", + "documentation":"Configuration options specific to On-Demand instances.
" + } }, - "internalonly":true + "documentation":"Defines the instance capacity requirements for an instance group, including configurations for both Spot and On-Demand capacity types.
" }, "ClusterCapacityType":{ "type":"string", "enum":[ "Spot", "OnDemand" - ], - "internalonly":true + ] }, "ClusterConfigMode":{ "type":"string", @@ -11461,6 +9906,12 @@ "Disable" ] }, + "ClusterDnsName":{ + "type":"string", + "max":275, + "min":16, + "pattern":"((fs|fc)i?-[0-9a-f]{8,}\\..{4,253})" + }, "ClusterEbsVolumeConfig":{ "type":"structure", "members":{ @@ -11474,7 +9925,8 @@ }, "RootVolume":{ "shape":"Boolean", - "documentation":"Specifies whether the configuration is for the cluster's root or secondary Amazon EBS volume. You can specify two ClusterEbsVolumeConfig fields to configure both the root and secondary volumes. Set the value to True if you'd like to provide your own customer managed Amazon Web Services KMS key to encrypt the root volume. When True:
The configuration is applied to the root volume.
You can't specify the VolumeSizeInGB field. The size of the root volume is determined for you.
You must specify a KMS key ID for VolumeKmsKeyId to encrypt the root volume with your own KMS key instead of an Amazon Web Services owned KMS key.
Otherwise, by default, the value is False, and the following applies:
The configuration is applied to the secondary volume, while the root volume is encrypted with an Amazon Web Services owned key.
You must specify the VolumeSizeInGB field.
You can optionally specify the VolumeKmsKeyId to encrypt the secondary volume with your own KMS key instead of an Amazon Web Services owned KMS key.
Specifies whether the configuration is for the cluster's root or secondary Amazon EBS volume. You can specify two ClusterEbsVolumeConfig fields to configure both the root and secondary volumes. Set the value to True if you'd like to provide your own customer managed Amazon Web Services KMS key to encrypt the root volume. When True:
The configuration is applied to the root volume.
You can't specify the VolumeSizeInGB field. The size of the root volume is determined for you.
You must specify a KMS key ID for VolumeKmsKeyId to encrypt the root volume with your own KMS key instead of an Amazon Web Services owned KMS key.
Otherwise, by default, the value is False, and the following applies:
The configuration is applied to the secondary volume, while the root volume is encrypted with an Amazon Web Services owned key.
You must specify the VolumeSizeInGB field.
You can optionally specify the VolumeKmsKeyId to encrypt the secondary volume with your own KMS key instead of an Amazon Web Services owned KMS key.
Defines the configuration for attaching an additional Amazon Elastic Block Store (EBS) volume to each instance of the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.
" @@ -11599,12 +10051,48 @@ }, "documentation":"A summary of an event in a HyperPod cluster.
" }, - "ClusterId":{ + "ClusterFsxLustreConfig":{ + "type":"structure", + "required":[ + "DnsName", + "MountName" + ], + "members":{ + "DnsName":{ + "shape":"ClusterDnsName", + "documentation":"The DNS name of the Amazon FSx for Lustre file system.
" + }, + "MountName":{ + "shape":"ClusterMountName", + "documentation":"The mount name of the Amazon FSx for Lustre file system.
" + }, + "MountPath":{ + "shape":"ClusterFsxMountPath", + "documentation":"The local path where the Amazon FSx for Lustre file system is mounted on instances.
" + } + }, + "documentation":"Defines the configuration for attaching an Amazon FSx for Lustre file system to instances in a SageMaker HyperPod cluster instance group.
" + }, + "ClusterFsxMountPath":{ "type":"string", - "documentation":"An internal identifier for a training cluster.
", - "max":2048, + "max":1024, "min":1, - "pattern":".+" + "pattern":"/[a-zA-Z0-9._/-]+" + }, + "ClusterFsxOpenZfsConfig":{ + "type":"structure", + "required":["DnsName"], + "members":{ + "DnsName":{ + "shape":"ClusterDnsName", + "documentation":"The DNS name of the Amazon FSx for OpenZFS file system.
" + }, + "MountPath":{ + "shape":"ClusterFsxMountPath", + "documentation":"The local path where the Amazon FSx for OpenZFS file system is mounted on instances.
" + } + }, + "documentation":"Defines the configuration for attaching an Amazon FSx for OpenZFS file system to instances in a SageMaker HyperPod cluster instance group.
" }, "ClusterInstanceCount":{ "type":"integer", @@ -11625,7 +10113,7 @@ }, "MinCount":{ "shape":"ClusterInstanceCount", - "internalonly":true + "documentation":"The minimum number of instances that must be available in the instance group of a SageMaker HyperPod cluster before it transitions to InService status.
The instance type of the instance group of a SageMaker HyperPod cluster.
" }, + "InstanceRequirements":{ + "shape":"ClusterInstanceRequirementDetails", + "documentation":"The instance requirements for the instance group, including the current and desired instance types. This field is present for flexible instance groups that support multiple instance types.
" + }, + "InstanceTypeDetails":{ + "shape":"ClusterInstanceTypeDetails", + "documentation":"Details about the instance types in the instance group, including the count and configuration of each instance type. This field is present for flexible instance groups that support multiple instance types.
" + }, "LifeCycleConfig":{ "shape":"ClusterLifeCycleConfig", "documentation":"Details of LifeCycle configuration for the instance group.
" @@ -11651,14 +10147,6 @@ "shape":"ClusterInstanceStorageConfigs", "documentation":"The additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.
" }, - "EnableBurnInTest":{ - "shape":"EnableBurnInTest", - "internalonly":true - }, - "OnStartDeepHealthCheck":{ - "shape":"OnStartDeepHealthCheck", - "internalonly":true - }, "OnStartDeepHealthChecks":{ "shape":"OnStartDeepHealthChecks", "documentation":"A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.
" @@ -11667,16 +10155,6 @@ "shape":"InstanceGroupStatus", "documentation":"The current status of the cluster instance group.
InService: The instance group is active and healthy.
Creating: The instance group is being provisioned.
Updating: The instance group is being updated.
Failed: The instance group has failed to provision or is no longer healthy.
Degraded: The instance group is degraded, meaning that some instances have failed to provision or are no longer healthy.
Deleting: The instance group is being deleted.
If the instance group is in a Failed or Degraded state, this field contains a list of failure messages that explain why the instances failed to provision or are no longer healthy. Each message includes a description of the issue.
The actual scaling configuration applied to an existing instance group, reflecting the current provisioning state and scaling characteristics.
", - "internalonly":true - }, "TrainingPlanArn":{ "shape":"TrainingPlanArn", "documentation":"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 .
The customized Amazon VPC configuration at the instance group level that overrides the default Amazon VPC configuration of the SageMaker HyperPod cluster.
" }, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true - }, "ScheduledUpdateConfig":{ "shape":"ScheduledUpdateConfig", "documentation":"The configuration object of the schedule that SageMaker follows when updating the AMI.
" @@ -11707,29 +10181,33 @@ }, "ActiveOperations":{ "shape":"ActiveOperations", - "internalonly":true + "documentation":"A map indicating active operations currently in progress for the instance group of a SageMaker HyperPod cluster. When there is a scaling operation in progress, this map contains a key Scaling with value 1.
The Kubernetes configuration for the instance group that contains labels and taints to be applied for the nodes in this instance group.
" }, "CapacityRequirements":{ "shape":"ClusterCapacityRequirements", - "internalonly":true + "documentation":"The instance capacity requirements for the instance group.
" }, "TargetStateCount":{ "shape":"ClusterInstanceCount", - "documentation":"The number of nodes running a specific image ID since the last software update request.
" + "documentation":"Represents the number of running nodes using the desired Image ID.
During software update operations: This count shows the number of nodes running on the desired Image ID. If a rollback occurs, the current image ID and desired image ID (both included in the describe cluster response) swap values. The TargetStateCount then shows the number of nodes running on the newly designated desired image ID (which was previously the current image ID).
During simultaneous scaling and software update operations: This count shows the number of instances running on the desired image ID, including any new instances created as part of the scaling request. New nodes are always created using the desired image ID, so TargetStateCount reflects the total count of nodes running on the desired image ID, even during rollback scenarios.
Status of the last software udpate request.
" + "documentation":"Status of the last software udpate request.
Status transitions follow these possible sequences:
Pending -> InProgress -> Succeeded
Pending -> InProgress -> RollbackInProgress -> RollbackComplete
Pending -> InProgress -> RollbackInProgress -> Failed
The Slurm configuration for the instance group.
" + }, + "NetworkInterface":{ + "shape":"ClusterNetworkInterfaceDetails", + "documentation":"The network interface configuration for the instance group.
" + } }, "documentation":"Details of an instance group in a SageMaker HyperPod cluster.
" }, @@ -11748,8 +10226,6 @@ "required":[ "InstanceCount", "InstanceGroupName", - "InstanceType", - "LifeCycleConfig", "ExecutionRole" ], "members":{ @@ -11759,7 +10235,7 @@ }, "MinInstanceCount":{ "shape":"ClusterInstanceCount", - "internalonly":true + "documentation":"Defines the minimum number of instances required for an instance group to become InService. If this threshold isn't met within 3 hours, the instance group rolls back to its previous state - zero instances for new instance groups, or previous settings for existing instance groups. MinInstanceCount only affects the initial transition to InService and does not guarantee maintaining this minimum afterward.
Specifies the instance type of the instance group.
" }, + "InstanceRequirements":{ + "shape":"ClusterInstanceRequirements", + "documentation":"The instance requirements for the instance group, including the instance types to use. Use this to create a flexible instance group that supports multiple instance types. The InstanceType and InstanceRequirements properties are mutually exclusive.
Specifies the LifeCycle configuration for the instance group.
" @@ -11785,23 +10265,10 @@ "shape":"ClusterInstanceStorageConfigs", "documentation":"Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group.
" }, - "EnableBurnInTest":{ - "shape":"EnableBurnInTest", - "internalonly":true - }, - "OnStartDeepHealthCheck":{ - "shape":"OnStartDeepHealthCheck", - "internalonly":true - }, "OnStartDeepHealthChecks":{ "shape":"OnStartDeepHealthChecks", "documentation":"A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated.
" }, - "ScalingConfig":{ - "shape":"ScalingConfig", - "documentation":"The scaling and provisioning strategy for a planned instance group, specifying how instances should be allocated and handled during cluster creation.
", - "internalonly":true - }, "TrainingPlanArn":{ "shape":"TrainingPlanArn", "documentation":"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 .
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.
The configuration object of the schedule that SageMaker uses to update the AMI.
" @@ -11824,15 +10287,19 @@ }, "KubernetesConfig":{ "shape":"ClusterKubernetesConfig", - "internalonly":true + "documentation":"Specifies the Kubernetes configuration for the instance group. You describe what you want the labels and taints to look like, and the cluster works to reconcile the actual state with the declared state for nodes in this instance group.
" }, - "CapacityType":{ - "shape":"ClusterCapacityType", - "internalonly":true + "SlurmConfig":{ + "shape":"ClusterSlurmConfig", + "documentation":"Specifies the Slurm configuration for the instance group.
" }, "CapacityRequirements":{ "shape":"ClusterCapacityRequirements", - "internalonly":true + "documentation":"Specifies the capacity requirements for the instance group.
" + }, + "NetworkInterface":{ + "shape":"ClusterNetworkInterface", + "documentation":"The network interface configuration for the instance group.
" } }, "documentation":"The specifications of an instance group that you need to define.
" @@ -11869,6 +10336,31 @@ }, "documentation":"Specifies the placement details for the node in the SageMaker HyperPod cluster, including the Availability Zone and the unique identifier (ID) of the Availability Zone.
" }, + "ClusterInstanceRequirementDetails":{ + "type":"structure", + "members":{ + "CurrentInstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The instance types currently in use by the instance group.
" + }, + "DesiredInstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The desired instance types for the instance group, as specified in the most recent update request.
" + } + }, + "documentation":"The instance requirement details for a flexible instance group, including the current and desired instance types.
" + }, + "ClusterInstanceRequirements":{ + "type":"structure", + "required":["InstanceTypes"], + "members":{ + "InstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The list of instance types that the instance group can use. The order of instance types determines the priority—HyperPod attempts to provision instances using the first instance type in the list and falls back to subsequent types if capacity is unavailable.
" + } + }, + "documentation":"The instance requirements for a flexible instance group. Use this to specify multiple instance types that the instance group can use. The order of instance types in the list determines the priority for instance provisioning.
" + }, "ClusterInstanceStatus":{ "type":"string", "enum":[ @@ -11902,6 +10394,14 @@ "EbsVolumeConfig":{ "shape":"ClusterEbsVolumeConfig", "documentation":"Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker.
Defines the configuration for attaching an Amazon FSx for Lustre file system to the instances in the SageMaker HyperPod cluster instance group.
" + }, + "FsxOpenZfsConfig":{ + "shape":"ClusterFsxOpenZfsConfig", + "documentation":"Defines the configuration for attaching an Amazon FSx for OpenZFS file system to the instances in the SageMaker HyperPod cluster instance group.
" } }, "documentation":"Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024.
", @@ -11910,7 +10410,7 @@ "ClusterInstanceStorageConfigs":{ "type":"list", "member":{"shape":"ClusterInstanceStorageConfig"}, - "max":2, + "max":4, "min":0 }, "ClusterInstanceType":{ @@ -11919,6 +10419,7 @@ "ml.p4d.24xlarge", "ml.p4de.24xlarge", "ml.p5.48xlarge", + "ml.p5.4xlarge", "ml.p6e-gb200.36xlarge", "ml.trn1.32xlarge", "ml.trn1n.32xlarge", @@ -12030,8 +10531,7 @@ "ml.r7i.16xlarge", "ml.r7i.24xlarge", "ml.r7i.48xlarge", - "ml.g5g.xlarge", - "ml.p5.4xlarge", + "ml.r5d.16xlarge", "ml.g7e.2xlarge", "ml.g7e.4xlarge", "ml.g7e.8xlarge", @@ -12041,44 +10541,109 @@ "ml.p6-b300.48xlarge" ] }, + "ClusterInstanceTypeDetail":{ + "type":"structure", + "members":{ + "InstanceType":{ + "shape":"ClusterInstanceType", + "documentation":"The instance type.
" + }, + "CurrentCount":{ + "shape":"ClusterNonNegativeInstanceCount", + "documentation":"The number of instances of this type currently running in the instance group.
" + }, + "ThreadsPerCore":{ + "shape":"ClusterThreadsPerCore", + "documentation":"The number of threads per CPU core for this instance type.
" + } + }, + "documentation":"Details about a specific instance type within a flexible instance group, including the count and configuration.
" + }, + "ClusterInstanceTypeDetails":{ + "type":"list", + "member":{"shape":"ClusterInstanceTypeDetail"}, + "max":20, + "min":0 + }, + "ClusterInstanceTypes":{ + "type":"list", + "member":{"shape":"ClusterInstanceType"}, + "max":20, + "min":1 + }, + "ClusterInterfaceType":{ + "type":"string", + "enum":[ + "efa", + "efa-only" + ] + }, "ClusterKubernetesConfig":{ "type":"structure", "members":{ - "Labels":{"shape":"ClusterKubernetesLabels"}, - "Taints":{"shape":"ClusterKubernetesTaints"} + "Labels":{ + "shape":"ClusterKubernetesLabels", + "documentation":"Key-value pairs of labels to be applied to cluster nodes.
" + }, + "Taints":{ + "shape":"ClusterKubernetesTaints", + "documentation":"List of taints to be applied to cluster nodes.
" + } }, - "internalonly":true + "documentation":"Kubernetes configuration that specifies labels and taints to be applied to cluster nodes in an instance group.
" }, "ClusterKubernetesConfigDetails":{ "type":"structure", "members":{ - "CurrentLabels":{"shape":"ClusterKubernetesLabels"}, - "DesiredLabels":{"shape":"ClusterKubernetesLabels"}, - "CurrentTaints":{"shape":"ClusterKubernetesTaints"}, - "DesiredTaints":{"shape":"ClusterKubernetesTaints"} + "CurrentLabels":{ + "shape":"ClusterKubernetesLabels", + "documentation":"The current labels applied to cluster nodes of an instance group.
" + }, + "DesiredLabels":{ + "shape":"ClusterKubernetesLabels", + "documentation":"The desired labels to be applied to cluster nodes of an instance group.
" + }, + "CurrentTaints":{ + "shape":"ClusterKubernetesTaints", + "documentation":"The current taints applied to cluster nodes of an instance group.
" + }, + "DesiredTaints":{ + "shape":"ClusterKubernetesTaints", + "documentation":"The desired taints to be applied to cluster nodes of an instance group.
" + } }, - "internalonly":true + "documentation":"Detailed Kubernetes configuration showing both the current and desired state of labels and taints for cluster nodes.
" }, "ClusterKubernetesConfigNodeDetails":{ "type":"structure", "members":{ - "CurrentLabels":{"shape":"ClusterKubernetesLabels"}, - "DesiredLabels":{"shape":"ClusterKubernetesLabels"}, - "CurrentTaints":{"shape":"ClusterKubernetesTaints"}, - "DesiredTaints":{"shape":"ClusterKubernetesTaints"} + "CurrentLabels":{ + "shape":"ClusterKubernetesLabels", + "documentation":"The current labels applied to the cluster node.
" + }, + "DesiredLabels":{ + "shape":"ClusterKubernetesLabels", + "documentation":"The desired labels to be applied to the cluster node.
" + }, + "CurrentTaints":{ + "shape":"ClusterKubernetesTaints", + "documentation":"The current taints applied to the cluster node.
" + }, + "DesiredTaints":{ + "shape":"ClusterKubernetesTaints", + "documentation":"The desired taints to be applied to the cluster node.
" + } }, - "internalonly":true + "documentation":"Node-specific Kubernetes configuration showing both current and desired state of labels and taints for an individual cluster node.
" }, "ClusterKubernetesLabelKey":{ "type":"string", - "internalonly":true, "max":317, "min":1, "pattern":"([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]*[A-Za-z0-9])?" }, "ClusterKubernetesLabelValue":{ "type":"string", - "internalonly":true, "max":63, "min":1, "pattern":"(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?" @@ -12087,7 +10652,6 @@ "type":"map", "key":{"shape":"ClusterKubernetesLabelKey"}, "value":{"shape":"ClusterKubernetesLabelValue"}, - "internalonly":true, "max":50, "min":0 }, @@ -12098,11 +10662,20 @@ "Effect" ], "members":{ - "Key":{"shape":"ClusterKubernetesTaintKey"}, - "Value":{"shape":"ClusterKubernetesTaintValue"}, - "Effect":{"shape":"ClusterKubernetesTaintEffect"} + "Key":{ + "shape":"ClusterKubernetesTaintKey", + "documentation":"The key of the taint.
" + }, + "Value":{ + "shape":"ClusterKubernetesTaintValue", + "documentation":"The value of the taint.
" + }, + "Effect":{ + "shape":"ClusterKubernetesTaintEffect", + "documentation":"The effect of the taint. Valid values are NoSchedule, PreferNoSchedule, and NoExecute.
A Kubernetes taint that can be applied to cluster nodes.
" }, "ClusterKubernetesTaintEffect":{ "type":"string", @@ -12110,19 +10683,16 @@ "NoSchedule", "PreferNoSchedule", "NoExecute" - ], - "internalonly":true + ] }, "ClusterKubernetesTaintKey":{ "type":"string", - "internalonly":true, "max":317, "min":1, "pattern":"([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]*[A-Za-z0-9])?" }, "ClusterKubernetesTaintValue":{ "type":"string", - "internalonly":true, "max":63, "min":1, "pattern":"(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?" @@ -12130,16 +10700,11 @@ "ClusterKubernetesTaints":{ "type":"list", "member":{"shape":"ClusterKubernetesTaint"}, - "internalonly":true, "max":50, "min":0 }, "ClusterLifeCycleConfig":{ "type":"structure", - "required":[ - "SourceS3Uri", - "OnCreate" - ], "members":{ "SourceS3Uri":{ "shape":"S3Uri", @@ -12148,6 +10713,10 @@ "OnCreate":{ "shape":"ClusterLifeCycleConfigFileName", "documentation":"The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This entrypoint script runs during cluster creation.
The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This script runs on the node after the AMI-based initialization is complete.
The lifecycle configuration for a SageMaker HyperPod cluster.
" @@ -12176,6 +10745,12 @@ }, "documentation":"Metadata information about a HyperPod cluster showing information about the cluster level operations, such as creating, updating, and deleting.
" }, + "ClusterMountName":{ + "type":"string", + "max":8, + "min":1, + "pattern":"([A-Za-z0-9_-]{1,8})" + }, "ClusterName":{ "type":"string", "max":63, @@ -12188,6 +10763,26 @@ "min":0, "pattern":"(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:cluster/[a-z0-9]{12})|([a-zA-Z0-9](-*[a-zA-Z0-9]){0,62})" }, + "ClusterNetworkInterface":{ + "type":"structure", + "members":{ + "InterfaceType":{ + "shape":"ClusterInterfaceType", + "documentation":"The type of network interface for the instance group. Valid values:
efa – An EFA with ENA interface, which provides both the EFA device for low-latency, high-throughput communication and the ENA device for IP networking.
efa-only – An EFA-only interface, which provides only the EFA device capabilities without the ENA device for traditional IP networking.
For more information, see Elastic Fabric Adapter.
" + } + }, + "documentation":"The network interface configuration for a Amazon SageMaker HyperPod cluster instance group.
" + }, + "ClusterNetworkInterfaceDetails":{ + "type":"structure", + "members":{ + "InterfaceType":{ + "shape":"ClusterInterfaceType", + "documentation":"The type of network interface for the instance group. Valid values are efa and efa-only.
The network interface configuration details for a Amazon SageMaker HyperPod cluster instance group.
" + }, "ClusterNodeDetails":{ "type":"structure", "members":{ @@ -12251,10 +10846,6 @@ "shape":"ClusterInstancePlacement", "documentation":"The placement details of the SageMaker HyperPod cluster node.
" }, - "HealthInfo":{ - "shape":"HealthInfo", - "internalonly":true - }, "CurrentImageId":{ "shape":"ImageId", "documentation":"The ID of the Amazon Machine Image (AMI) currently in use by the node.
" @@ -12269,11 +10860,15 @@ }, "KubernetesConfig":{ "shape":"ClusterKubernetesConfigNodeDetails", - "internalonly":true + "documentation":"The Kubernetes configuration applied to this node, showing both the current and desired state of labels and taints. The cluster works to reconcile the actual state with the declared state.
" }, "CapacityType":{ "shape":"ClusterCapacityType", - "internalonly":true + "documentation":"The capacity type of the node. Valid values are OnDemand and Spot. When set to OnDemand, the node is launched as an On-Demand instance. When set to Spot, the node is launched as a Spot instance.
The network interface configuration for the cluster node.
" } }, "documentation":"Details of an instance (also called a node interchangeably) in a SageMaker HyperPod cluster.
" @@ -12290,12 +10885,6 @@ "max":3000, "min":1 }, - "ClusterNodeIdsForBatchRepair":{ - "type":"list", - "member":{"shape":"ClusterNodeId"}, - "max":99, - "min":1 - }, "ClusterNodeLogicalId":{ "type":"string", "max":128, @@ -12361,26 +10950,17 @@ "shape":"ClusterInstanceStatusDetails", "documentation":"The status of the instance.
" }, - "HealthInfo":{ - "shape":"ClusterNodeSummaryHealthInfo", - "internalonly":true - }, "UltraServerInfo":{ "shape":"UltraServerInfo", "documentation":"Contains information about the UltraServer.
" }, - "PrivateDnsHostname":{"shape":"ClusterPrivateDnsHostname"} + "PrivateDnsHostname":{ + "shape":"ClusterPrivateDnsHostname", + "documentation":"The private DNS hostname of the SageMaker HyperPod cluster node.
" + } }, "documentation":"Lists a summary of the properties of an instance (also called a node interchangeably) of a SageMaker HyperPod cluster.
" }, - "ClusterNodeSummaryHealthInfo":{ - "type":"structure", - "members":{ - "HealthStatus":{"shape":"HealthStatus"}, - "HealthStatusReason":{"shape":"String"} - }, - "internalonly":true - }, "ClusterNonNegativeInstanceCount":{ "type":"integer", "box":true, @@ -12389,15 +10969,18 @@ "ClusterOnDemandOptions":{ "type":"structure", "members":{}, - "internalonly":true + "documentation":"Configuration options specific to On-Demand instances.
" }, "ClusterOrchestrator":{ "type":"structure", - "required":["Eks"], "members":{ "Eks":{ "shape":"ClusterOrchestratorEksConfig", "documentation":"The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster.
" + }, + "Slurm":{ + "shape":"ClusterOrchestratorSlurmConfig", + "documentation":"The Slurm orchestrator configuration for the SageMaker HyperPod cluster.
" } }, "documentation":"The type of orchestrator used for the SageMaker HyperPod cluster.
" @@ -12413,6 +10996,28 @@ }, "documentation":"The configuration settings for the Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster.
" }, + "ClusterOrchestratorSlurmConfig":{ + "type":"structure", + "members":{ + "SlurmConfigStrategy":{ + "shape":"ClusterSlurmConfigStrategy", + "documentation":"The strategy for managing partitions for the Slurm configuration. Valid values are Managed, Overwrite, and Merge.
The configuration settings for the Slurm orchestrator used with the SageMaker HyperPod cluster.
" + }, + "ClusterPartitionName":{ + "type":"string", + "max":1024, + "min":0, + "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9])*" + }, + "ClusterPartitionNames":{ + "type":"list", + "member":{"shape":"ClusterPartitionName"}, + "max":1, + "min":0 + }, "ClusterPrivateDnsHostname":{ "type":"string", "pattern":"ip-((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)-?\\b){4}\\..*" @@ -12422,12 +11027,6 @@ "pattern":"((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}" }, "ClusterPrivatePrimaryIpv6":{"type":"string"}, - "ClusterResilienceConfig":{ - "type":"structure", - "members":{ - "EnableNodeAutoRecovery":{"shape":"EnableNodeAutoRecovery"} - } - }, "ClusterRestrictedInstanceGroupDetails":{ "type":"structure", "members":{ @@ -12459,14 +11058,6 @@ "shape":"ClusterInstanceStorageConfigs", "documentation":"The additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group.
" }, - "EnableBurnInTest":{ - "shape":"EnableBurnInTest", - "internalonly":true - }, - "OnStartDeepHealthCheck":{ - "shape":"OnStartDeepHealthCheck", - "internalonly":true - }, "OnStartDeepHealthChecks":{ "shape":"OnStartDeepHealthChecks", "documentation":"A flag indicating whether deep health checks should be performed when the cluster's restricted instance group is created or updated.
" @@ -12475,14 +11066,6 @@ "shape":"InstanceGroupStatus", "documentation":"The current status of the cluster's restricted instance group.
InService: The restricted instance group is active and healthy.
Creating: The restricted instance group is being provisioned.
Updating: The restricted instance group is being updated.
Failed: The restricted instance group has failed to provision or is no longer healthy.
Degraded: The restricted instance group is degraded, meaning that some instances have failed to provision or are no longer healthy.
Deleting: The restricted instance group is being deleted.
The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .
The current status of the training plan associated with this cluster restricted instance group.
" }, "OverrideVpcConfig":{"shape":"VpcConfig"}, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true - }, "ScheduledUpdateConfig":{"shape":"ScheduledUpdateConfig"}, - "TrustedEnvironment":{ - "shape":"TrustedEnvironmentDetails", - "internalonly":true - }, "EnvironmentConfig":{ "shape":"EnvironmentConfigDetails", "documentation":"The configuration for the restricted instance groups (RIG) environment.
" @@ -12546,36 +11121,16 @@ "shape":"ClusterInstanceStorageConfigs", "documentation":"Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group.
" }, - "EnableBurnInTest":{ - "shape":"EnableBurnInTest", - "internalonly":true - }, - "OnStartDeepHealthCheck":{ - "shape":"OnStartDeepHealthCheck", - "internalonly":true - }, "OnStartDeepHealthChecks":{ "shape":"OnStartDeepHealthChecks", "documentation":"A flag indicating whether deep health checks should be performed when the cluster restricted instance group is created or updated.
" }, - "ScalingConfig":{ - "shape":"ScalingConfig", - "internalonly":true - }, "TrainingPlanArn":{ "shape":"TrainingPlanArn", "documentation":"The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .
The configuration for the restricted instance groups (RIG) environment.
" @@ -12621,7 +11176,8 @@ }, "ClusterSchedulerConfigVersion":{ "shape":"Integer", - "documentation":"Version of the cluster policy.
" + "documentation":"Version of the cluster policy.
", + "box":true }, "Name":{ "shape":"EntityName", @@ -12656,6 +11212,52 @@ "type":"string", "pattern":"[a-z0-9]([-a-z0-9]*[a-z0-9]){0,39}?" }, + "ClusterSlurmConfig":{ + "type":"structure", + "required":["NodeType"], + "members":{ + "NodeType":{ + "shape":"ClusterSlurmNodeType", + "documentation":"The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login.
The list of Slurm partition names that the instance group belongs to.
" + } + }, + "documentation":"The Slurm configuration for an instance group in a SageMaker HyperPod cluster.
" + }, + "ClusterSlurmConfigDetails":{ + "type":"structure", + "required":["NodeType"], + "members":{ + "NodeType":{ + "shape":"ClusterSlurmNodeType", + "documentation":"The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login.
The list of Slurm partition names that the instance group belongs to.
" + } + }, + "documentation":"The Slurm configuration details for an instance group in a SageMaker HyperPod cluster.
" + }, + "ClusterSlurmConfigStrategy":{ + "type":"string", + "enum":[ + "Overwrite", + "Managed", + "Merge" + ] + }, + "ClusterSlurmNodeType":{ + "type":"string", + "enum":[ + "Controller", + "Login", + "Compute" + ] + }, "ClusterSortBy":{ "type":"string", "enum":[ @@ -12666,7 +11268,7 @@ "ClusterSpotOptions":{ "type":"structure", "members":{}, - "internalonly":true + "documentation":"Configuration options specific to Spot instances.
" }, "ClusterStatus":{ "type":"string", @@ -12897,10 +11499,6 @@ "ClientId":{ "shape":"ClientId", "documentation":"An identifier for an application client. You must create the app client ID using Amazon Cognito.
" - }, - "MemberDefinitionId":{ - "shape":"MemberDefinitionId", - "internalonly":true } }, "documentation":"Identifies a Amazon Cognito user group. A user group can be used in on or more work teams.
" @@ -12969,44 +11567,6 @@ "Vector" ] }, - "ColumnConfig":{ - "type":"structure", - "required":["Transformers"], - "members":{ - "ColumnType":{"shape":"AutoMLColumnType"}, - "ColumnNames":{"shape":"AutoMLColumnNames"}, - "Transformers":{"shape":"Transformers"} - } - }, - "ColumnsConfig":{ - "type":"list", - "member":{"shape":"ColumnConfig"}, - "max":10, - "min":0 - }, - "Command":{ - "type":"list", - "member":{"shape":"String2048"} - }, - "Comment":{ - "type":"string", - "max":1024, - "min":0 - }, - "CommentEntity":{ - "type":"structure", - "members":{ - "Publisher":{"shape":"UserProfileName"}, - "Comment":{"shape":"Comment"}, - "CreationTime":{"shape":"Timestamp"} - } - }, - "Comments":{ - "type":"list", - "member":{"shape":"CommentEntity"}, - "max":20, - "min":0 - }, "CompilationJobArn":{ "type":"string", "max":256, @@ -13024,16 +11584,6 @@ "STOPPED" ] }, - "CompilationJobStepMetadata":{ - "type":"structure", - "members":{ - "Arn":{ - "shape":"CompilationJobArn", - "internalonly":true - } - }, - "internalonly":true - }, "CompilationJobSummaries":{ "type":"list", "member":{"shape":"CompilationJobSummary"} @@ -13107,68 +11657,6 @@ "Enabled" ] }, - "CompletedObjects":{ - "type":"long", - "box":true, - "min":0 - }, - "ComponentJobArn":{ - "type":"string", - "max":256, - "min":1, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:.*/.*" - }, - "ComponentJobDescription":{ - "type":"string", - "max":3072, - "min":0 - }, - "ComponentJobName":{ - "type":"string", - "max":64, - "min":1 - }, - "ComponentJobStatus":{ - "type":"string", - "enum":[ - "Completed", - "Pending", - "InProgress", - "Failed", - "Stopping", - "Stopped" - ] - }, - "ComponentJobSummaries":{ - "type":"list", - "member":{"shape":"ComponentJobSummary"} - }, - "ComponentJobSummary":{ - "type":"structure", - "members":{ - "AutoMLJobName":{"shape":"AutoMLJobName"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "Status":{"shape":"ComponentJobStatus"}, - "CreationTime":{"shape":"Timestamp"}, - "ComponentJobType":{"shape":"ComponentJobType"}, - "ComponentJobName":{"shape":"ComponentJobName"}, - "ComponentJobArn":{"shape":"ComponentJobArn"}, - "EndTime":{"shape":"Timestamp"}, - "FailureReason":{"shape":"AutoMLFailureReason"}, - "Description":{"shape":"ComponentJobDescription"} - } - }, - "ComponentJobType":{ - "type":"string", - "enum":[ - "AWS::Sagemaker::Training", - "AWS::SageMaker::HyperParameterTuning", - "AWS::SageMaker::Transform", - "AWS::SageMaker::Processing", - "AWS::SageMaker::Deploy" - ] - }, "CompressionType":{ "type":"string", "enum":[ @@ -13232,7 +11720,10 @@ "shape":"MemoryInGiBAmount", "documentation":"The amount of memory in GiB to allocate. If you specify a value only for this parameter, SageMaker AI automatically allocates a ratio-based value for vCPU based on this memory that you provide. For example, if you allocate 200 out of 400 total memory in GiB, SageMaker AI uses the ratio of 0.5 and allocates values to vCPU. Accelerators are set to 0.
" }, - "AcceleratorPartition":{"shape":"AcceleratorPartitionConfig"} + "AcceleratorPartition":{ + "shape":"AcceleratorPartitionConfig", + "documentation":"The accelerator partition configuration for fractional GPU allocation.
" + } }, "documentation":"Configuration of the resources used for the compute allocation definition.
" }, @@ -13267,7 +11758,8 @@ }, "ComputeQuotaVersion":{ "shape":"Integer", - "documentation":"Version of the compute allocation definition.
" + "documentation":"Version of the compute allocation definition.
", + "box":true }, "Status":{ "shape":"SchedulerResourceStatus", @@ -13325,19 +11817,6 @@ "type":"string", "pattern":"[a-z0-9]([-a-z0-9]*[a-z0-9]){0,39}?" }, - "Concurrencies":{ - "type":"list", - "member":{"shape":"Concurrency"}, - "internalonly":true - }, - "Concurrency":{ - "type":"structure", - "members":{ - "NumberOfConcurrentUsers":{"shape":"NumberOfConcurrentUsers"}, - "DurationInSeconds":{"shape":"TrafficDurationInSeconds"} - }, - "internalonly":true - }, "ConditionOutcome":{ "type":"string", "enum":[ @@ -13602,15 +12081,6 @@ }, "documentation":"Lists a summary of the properties of a context. A context provides a logical grouping of other entities.
" }, - "ContinuousParameter":{ - "type":"structure", - "members":{ - "Name":{"shape":"String64"}, - "MinValue":{"shape":"Double"}, - "MaxValue":{"shape":"Double"}, - "ScalingType":{"shape":"ScalingType"} - } - }, "ContinuousParameterRange":{ "type":"structure", "required":[ @@ -13662,11 +12132,6 @@ "max":30, "min":0 }, - "ContinuousParameters":{ - "type":"list", - "member":{"shape":"ContinuousParameter"} - }, - "ContinuousUpload":{"type":"boolean"}, "ConvergenceDetected":{ "type":"structure", "members":{ @@ -13677,78 +12142,155 @@ }, "documentation":"A flag to indicating that automatic model tuning (AMT) has detected model convergence, defined as a lack of significant improvement (1% or less) against an objective metric.
" }, - "CopySharedModelRequest":{ + "CountryCode":{ + "type":"string", + "max":2, + "min":2, + "pattern":"[A-Z]{2}" + }, + "CreateAIBenchmarkJobRequest":{ "type":"structure", "required":[ - "SharedModelId", - "SharedModelVersion" + "AIBenchmarkJobName", + "BenchmarkTarget", + "OutputConfig", + "AIWorkloadConfigIdentifier", + "RoleArn" ], "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI benchmark job. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region.
" }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true + "BenchmarkTarget":{ + "shape":"AIBenchmarkTarget", + "documentation":"The target endpoint to benchmark. Specify a SageMaker endpoint by providing its name or Amazon Resource Name (ARN).
" + }, + "OutputConfig":{ + "shape":"AIBenchmarkOutputConfig", + "documentation":"The output configuration for the benchmark job, including the Amazon S3 location where benchmark results are stored.
" + }, + "AIWorkloadConfigIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the AI workload configuration to use for this benchmark job.
" + }, + "RoleArn":{ + "shape":"RoleArn", + "documentation":"The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.
" + }, + "NetworkConfig":{ + "shape":"AIBenchmarkNetworkConfig", + "documentation":"The network configuration for the benchmark job, including VPC settings.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define.
" } } }, - "CopySharedModelResponse":{ + "CreateAIBenchmarkJobResponse":{ "type":"structure", + "required":["AIBenchmarkJobArn"], "members":{ - "S3OutputUri":{ - "shape":"S3OutputUri", - "internalonly":true + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the created benchmark job.
" } } }, - "CostPerMillionInputTokens":{ - "type":"float", - "box":true, - "min":0.0 - }, - "CostPerMillionOutputTokens":{ - "type":"float", - "box":true, - "min":0.0 - }, - "CostPerMillionTokens":{ - "type":"float", - "box":true, - "min":0.0 - }, - "CountryCode":{ - "type":"string", - "max":2, - "min":2, - "pattern":"[A-Z]{2}" - }, - "CreateActionInternalRequest":{ + "CreateAIRecommendationJobRequest":{ "type":"structure", "required":[ - "ActionName", - "Source", - "ActionType", - "CustomerDetails" + "AIRecommendationJobName", + "ModelSource", + "OutputConfig", + "AIWorkloadConfigIdentifier", + "PerformanceTarget", + "RoleArn" ], "members":{ - "ActionName":{"shape":"ExperimentEntityName"}, - "Source":{"shape":"ActionSource"}, - "CreationTime":{"shape":"Timestamp"}, - "ActionType":{"shape":"String64"}, - "Description":{"shape":"ExperimentDescription"}, - "Status":{"shape":"ActionStatus"}, - "Properties":{"shape":"LineageEntityParameters"}, - "MetadataProperties":{"shape":"MetadataProperties"}, - "Tags":{"shape":"TagList"}, - "CustomerDetails":{"shape":"CustomerDetails"} + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI recommendation job. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region.
" + }, + "ModelSource":{ + "shape":"AIModelSource", + "documentation":"The source of the model to optimize. Specify the Amazon S3 location of the model artifacts.
" + }, + "OutputConfig":{ + "shape":"AIRecommendationOutputConfig", + "documentation":"The output configuration for the recommendation job, including the Amazon S3 location for results and an optional model package group where the optimized model is registered.
" + }, + "AIWorkloadConfigIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the AI workload configuration to use for this recommendation job.
" + }, + "PerformanceTarget":{ + "shape":"AIRecommendationPerformanceTarget", + "documentation":"The performance targets for the recommendation job. Specify constraints on metrics such as time to first token (ttft-ms), throughput, or cost.
The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.
" + }, + "InferenceSpecification":{ + "shape":"AIRecommendationInferenceSpecification", + "documentation":"The inference framework configuration. Specify the framework (such as LMI or vLLM) for the recommendation job.
" + }, + "OptimizeModel":{ + "shape":"AIRecommendationAllowOptimization", + "documentation":"Whether to allow model optimization techniques such as quantization, speculative decoding, and kernel tuning. The default is true.
The compute resource specification for the recommendation job. You can specify up to 3 instance types to consider, and optionally provide capacity reservation configuration.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The metadata that you apply to Amazon Web Services resources to help you categorize and organize them.
" + } } }, - "CreateActionInternalResponse":{ + "CreateAIRecommendationJobResponse":{ "type":"structure", + "required":["AIRecommendationJobArn"], "members":{ - "ActionArn":{"shape":"ActionArn"} + "AIRecommendationJobArn":{ + "shape":"AIRecommendationJobArn", + "documentation":"The Amazon Resource Name (ARN) of the created recommendation job.
" + } + } + }, + "CreateAIWorkloadConfigRequest":{ + "type":"structure", + "required":["AIWorkloadConfigName"], + "members":{ + "AIWorkloadConfigName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI workload configuration. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region.
" + }, + "DatasetConfig":{ + "shape":"AIDatasetConfig", + "documentation":"The dataset configuration for the workload. Specify input data channels with their data sources for benchmark workloads.
" + }, + "AIWorkloadConfigs":{ + "shape":"AIWorkloadConfigs", + "documentation":"The benchmark tool configuration and workload specification. Provide the specification as an inline YAML or JSON string.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
" + } + } + }, + "CreateAIWorkloadConfigResponse":{ + "type":"structure", + "required":["AIWorkloadConfigArn"], + "members":{ + "AIWorkloadConfigArn":{ + "shape":"AIWorkloadConfigArn", + "documentation":"The Amazon Resource Name (ARN) of the created AI workload configuration.
" + } } }, "CreateActionRequest":{ @@ -13828,15 +12370,8 @@ }, "CertifyForMarketplace":{ "shape":"CertifyForMarketplace", - "documentation":"Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace.
" - }, - "RequireImageScan":{ - "shape":"RequireImageScan", - "internalonly":true - }, - "WorkflowDisabled":{ - "shape":"Boolean", - "internalonly":true + "documentation":"Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace.
", + "box":true }, "Tags":{ "shape":"TagList", @@ -13870,10 +12405,6 @@ "shape":"KernelGatewayImageConfig", "documentation":"The KernelGatewayImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel will be shown to users before the image starts. Once the image runs, all kernels are visible in JupyterLab.
" }, - "SaviturAppImageConfig":{ - "shape":"SaviturAppImageConfig", - "internalonly":true - }, "JupyterLabAppImageConfig":{ "shape":"JupyterLabAppImageConfig", "documentation":"The JupyterLabAppImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel is shown to users before the image starts. After the image runs, all kernels are visible in JupyterLab.
The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance.
The value of InstanceType passed as part of the ResourceSpec in the CreateApp call overrides the value passed as part of the ResourceSpec configured for the user profile or the domain. If InstanceType is not specified in any of those three ResourceSpec values for a KernelGateway app, the CreateApp call fails with a request validation error.
Indicates whether the application is launched in recovery mode.
" + "documentation":"Indicates whether the application is launched in recovery mode.
", + "box":true } } }, @@ -13952,30 +12476,6 @@ } } }, - "CreateArtifactInternalRequest":{ - "type":"structure", - "required":[ - "Source", - "ArtifactType", - "CustomerDetails" - ], - "members":{ - "ArtifactName":{"shape":"ExperimentEntityName"}, - "CreationTime":{"shape":"Timestamp"}, - "Source":{"shape":"ArtifactSource"}, - "ArtifactType":{"shape":"String256"}, - "Properties":{"shape":"LineageEntityParameters"}, - "MetadataProperties":{"shape":"MetadataProperties"}, - "Tags":{"shape":"TagList"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "CreateArtifactInternalResponse":{ - "type":"structure", - "members":{ - "ArtifactArn":{"shape":"ArtifactArn"} - } - }, "CreateArtifactRequest":{ "type":"structure", "required":[ @@ -14054,16 +12554,13 @@ }, "GenerateCandidateDefinitionsOnly":{ "shape":"GenerateCandidateDefinitionsOnly", - "documentation":"Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.
" + "documentation":"Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.
", + "box":true }, "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 ServicesResources. Tag keys must be unique per resource.
" }, - "ImageUrlOverrides":{ - "shape":"ImageUrlOverrides", - "internalonly":true - }, "ModelDeployConfig":{ "shape":"ModelDeployConfig", "documentation":"Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.
" @@ -14126,22 +12623,10 @@ "shape":"ModelDeployConfig", "documentation":"Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.
" }, - "ImageUrlOverrides":{ - "shape":"ImageUrlOverrides", - "internalonly":true - }, "DataSplitConfig":{ "shape":"AutoMLDataSplitConfig", "documentation":"This structure specifies how to split the data into train and validation datasets.
The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size.
This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically splits the input dataset into training and validation sets.
Specifies the compute configuration for the AutoML job V2.
" @@ -14158,46 +12643,6 @@ } } }, - "CreateAutoMLTaskRequest":{ - "type":"structure", - "required":[ - "AutoMLJobName", - "AutoMLTaskContext", - "AutoMLTaskType" - ], - "members":{ - "AutoMLJobName":{"shape":"AutoMLJobName"}, - "AutoMLTaskContext":{"shape":"AutoMLTaskContext"}, - "AutoMLTaskType":{"shape":"AutoMLTaskType"} - } - }, - "CreateAutoMLTaskResponse":{ - "type":"structure", - "required":["AutoMLTaskArn"], - "members":{ - "AutoMLTaskArn":{"shape":"AutoMLTaskArn"} - } - }, - "CreateCapacityScheduleRequest":{ - "type":"structure", - "required":[ - "CapacityScheduleName", - "CapacityScheduleOfferingId" - ], - "members":{ - "CapacityScheduleName":{"shape":"CapacityScheduleName"}, - "CapacityScheduleOfferingId":{"shape":"CapacityScheduleOfferingId"}, - "TargetServices":{"shape":"SageMakerResourceNames"}, - "MaxWaitTimeInSeconds":{"shape":"CapacityScheduleMaxWaitTimeInSeconds"} - } - }, - "CreateCapacityScheduleResponse":{ - "type":"structure", - "required":["CapacityScheduleArn"], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"} - } - }, "CreateClusterRequest":{ "type":"structure", "required":["ClusterName"], @@ -14224,11 +12669,7 @@ }, "Orchestrator":{ "shape":"ClusterOrchestrator", - "documentation":"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.
The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, supported values are \"Eks\" and \"Slurm\", which is to use an Amazon Elastic Kubernetes Service or Slurm cluster as the orchestrator.
If you specify the Orchestrator field, you must provide exactly one orchestrator configuration: either Eks or Slurm. Specifying both or providing an empty configuration returns a validation error.
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.
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.
The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system.
" - }, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true } } }, @@ -14297,10 +12730,6 @@ "Tags":{ "shape":"TagList", "documentation":"Tags of the cluster policy.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -14381,10 +12810,6 @@ "shape":"OutputConfig", "documentation":"Provides information about the output location for the compiled model and the target device the model runs on.
" }, - "ResourceConfig":{ - "shape":"NeoResourceConfig", - "internalonly":true - }, "VpcConfig":{ "shape":"NeoVpcConfig", "documentation":"A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.
" @@ -14445,10 +12870,6 @@ "Tags":{ "shape":"TagList", "documentation":"Tags of the compute allocation definition.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -14469,31 +12890,6 @@ } } }, - "CreateContextInternalRequest":{ - "type":"structure", - "required":[ - "ContextName", - "Source", - "ContextType", - "CustomerDetails" - ], - "members":{ - "ContextName":{"shape":"ContextName"}, - "Source":{"shape":"ContextSource"}, - "CreationTime":{"shape":"Timestamp"}, - "ContextType":{"shape":"String64"}, - "Description":{"shape":"ExperimentDescription"}, - "Properties":{"shape":"LineageEntityParameters"}, - "Tags":{"shape":"TagList"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "CreateContextInternalResponse":{ - "type":"structure", - "members":{ - "ContextArn":{"shape":"ContextArn"} - } - }, "CreateContextRequest":{ "type":"structure", "required":[ @@ -14537,68 +12933,6 @@ } } }, - "CreateCrossAccountTrainingJobRequest":{ - "type":"structure", - "required":[ - "TrainingJobName", - "AlgorithmSpecification", - "CrossAccountRoleArn", - "InputDataConfig", - "OutputDataConfig", - "ResourceConfig", - "StoppingCondition" - ], - "members":{ - "TrainingJobName":{"shape":"TrainingJobName"}, - "HyperParameters":{"shape":"HyperParameters"}, - "AlgorithmSpecification":{"shape":"AlgorithmSpecification"}, - "CrossAccountRoleArn":{"shape":"RoleArn"}, - "InputDataConfig":{"shape":"InputDataConfig"}, - "OutputDataConfig":{"shape":"OutputDataConfig"}, - "ResourceConfig":{"shape":"ResourceConfig"}, - "VpcConfig":{"shape":"VpcConfig"}, - "StoppingCondition":{"shape":"StoppingCondition"}, - "Tags":{"shape":"TagList"}, - "Environment":{"shape":"TrainingEnvironmentMap"}, - "SourceArn":{"shape":"IoTAnalyticsDatasetArn"}, - "SourceAccount":{"shape":"AccountId"} - } - }, - "CreateCrossAccountTrainingJobResponse":{ - "type":"structure", - "required":["TrainingJobArn"], - "members":{ - "TrainingJobArn":{"shape":"TrainingJobArn"} - } - }, - "CreateCustomMonitoringJobDefinitionRequest":{ - "type":"structure", - "required":[ - "JobDefinitionName", - "CustomMonitoringAppSpecification", - "CustomMonitoringJobInput", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CustomMonitoringAppSpecification":{"shape":"CustomMonitoringAppSpecification"}, - "CustomMonitoringJobInput":{"shape":"CustomMonitoringJobInput"}, - "CustomMonitoringJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"}, - "Tags":{"shape":"TagList"} - } - }, - "CreateCustomMonitoringJobDefinitionResponse":{ - "type":"structure", - "required":["JobDefinitionArn"], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"} - } - }, "CreateDataQualityJobDefinitionRequest":{ "type":"structure", "required":[ @@ -14722,10 +13056,6 @@ "shape":"TagList", "documentation":"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.
" }, - "AppNetworkAccess":{ - "shape":"AppNetworkAccess", - "internalonly":true - }, "AppNetworkAccessType":{ "shape":"AppNetworkAccessType", "documentation":"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
The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided. If setting up the domain for use with RStudio, this value must be set to Service.
Indicates whether custom tag propagation is supported for the domain. Defaults to DISABLED.
Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
" + "documentation":"Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
", + "box":true }, "MetricsConfig":{ "shape":"MetricsConfig", - "documentation":"The Configuration parameters for Utilization metrics.
" + "documentation":"The configuration parameters for utilization metrics.
" } } }, - "CreateEndpointConfigInputInternal":{ - "type":"structure", - "required":[ - "EndpointConfigInput", - "AccountId" - ], - "members":{ - "EndpointConfigInput":{"shape":"CreateEndpointConfigInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"} - } - }, "CreateEndpointConfigOutput":{ "type":"structure", "required":["EndpointConfigArn"], @@ -14950,12 +13265,6 @@ } } }, - "CreateEndpointConfigOutputInternal":{ - "type":"structure", - "members":{ - "EndpointConfigOutput":{"shape":"CreateEndpointConfigOutput"} - } - }, "CreateEndpointInput":{ "type":"structure", "required":[ @@ -14971,14 +13280,6 @@ "shape":"EndpointConfigName", "documentation":"The name of an endpoint configuration. For more information, see CreateEndpointConfig.
" }, - "GraphConfigName":{ - "shape":"GraphConfigName", - "internalonly":true - }, - "DeletionCondition":{ - "shape":"EndpointDeletionCondition", - "internalonly":true - }, "DeploymentConfig":{"shape":"DeploymentConfig"}, "Tags":{ "shape":"TagList", @@ -14986,21 +13287,6 @@ } } }, - "CreateEndpointInputInternal":{ - "type":"structure", - "required":[ - "EndpointInput", - "AccountId" - ], - "members":{ - "EndpointInput":{"shape":"CreateEndpointInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "FasCredentials":{"shape":"FasCredentials"}, - "EncryptedFasCredentials":{"shape":"EncryptedFasCredentials"}, - "BillingMode":{"shape":"BillingMode"} - } - }, "CreateEndpointOutput":{ "type":"structure", "required":["EndpointArn"], @@ -15011,67 +13297,6 @@ } } }, - "CreateEndpointOutputInternal":{ - "type":"structure", - "members":{ - "EndpointOutput":{"shape":"CreateEndpointOutput"} - } - }, - "CreateEvaluationJobRequest":{ - "type":"structure", - "required":[ - "EvaluationJobName", - "EvaluationMethod", - "OutputDataConfig", - "InputDataConfig", - "EvaluationConfig", - "RoleArn" - ], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"}, - "Description":{"shape":"EvaluationJobDescription"}, - "EvaluationMethod":{"shape":"EvaluationJobEvaluationMethod"}, - "Tags":{"shape":"TagList"}, - "ModelConfig":{"shape":"EvaluationJobModelConfig"}, - "OutputDataConfig":{"shape":"EvaluationJobOutputDataConfig"}, - "InputDataConfig":{"shape":"EvaluationJobInputDataConfig"}, - "EvaluationConfig":{"shape":"EvaluationJobEvaluationConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "UpstreamPlatformConfig":{ - "shape":"EvaluationJobUpstreamPlatformConfig", - "internalonly":true - } - } - }, - "CreateEvaluationJobResponse":{ - "type":"structure", - "required":["EvaluationJobArn"], - "members":{ - "EvaluationJobArn":{"shape":"EvaluationJobArn"} - } - }, - "CreateExperimentInternalRequest":{ - "type":"structure", - "required":[ - "ExperimentName", - "CustomerDetails" - ], - "members":{ - "ExperimentName":{"shape":"ExperimentEntityName"}, - "DisplayName":{"shape":"ExperimentEntityName"}, - "Description":{"shape":"ExperimentDescription"}, - "Source":{"shape":"InputExperimentSource"}, - "CreationTime":{"shape":"Timestamp"}, - "Tags":{"shape":"TagList"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "CreateExperimentInternalResponse":{ - "type":"structure", - "members":{ - "ExperimentArn":{"shape":"ExperimentArn"} - } - }, "CreateExperimentRequest":{ "type":"structure", "required":["ExperimentName"], @@ -15103,45 +13328,6 @@ } } }, - "CreateFeatureGroupInternalRequest":{ - "type":"structure", - "required":[ - "FeatureGroupName", - "RecordIdentifierFeatureName", - "EventTimeFeatureName", - "FeatureDefinitions" - ], - "members":{ - "FeatureGroupName":{"shape":"FeatureGroupName"}, - "RecordIdentifierFeatureName":{"shape":"FeatureName"}, - "EventTimeFeatureName":{"shape":"FeatureName"}, - "FeatureDefinitions":{"shape":"FeatureDefinitions"}, - "OnlineStoreConfig":{"shape":"OnlineStoreConfig"}, - "OfflineStoreConfig":{"shape":"OfflineStoreConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "Description":{"shape":"Description"}, - "Tags":{"shape":"TagList"}, - "UsePreProdOfflineStoreReplicatorLambda":{ - "shape":"Boolean", - "internalonly":true - }, - "AccountId":{"shape":"AccountId"}, - "AwsPayerToken":{"shape":"AwsPayerToken"}, - "FasCredentials":{"shape":"FasCredentials"}, - "CreatedBy":{"shape":"UserContext"}, - "IgnoreSweeperExecution":{"shape":"Boolean"}, - "StorageAccountStageTestOverride":{"shape":"Stage"}, - "OnlineStoreMetadata":{"shape":"OnlineStoreMetadata"}, - "OnlineStoreReplicaMetadata":{"shape":"OnlineStoreReplicaMetadata"} - } - }, - "CreateFeatureGroupInternalResponse":{ - "type":"structure", - "required":["FeatureGroupArn"], - "members":{ - "FeatureGroupArn":{"shape":"FeatureGroupArn"} - } - }, "CreateFeatureGroupRequest":{ "type":"structure", "required":[ @@ -15187,10 +13373,6 @@ "Tags":{ "shape":"TagList", "documentation":"Tags used to identify Features in each FeatureGroup.
An object containing information about the tasks the human reviewers will perform.
" }, - "WorkflowSteps":{ - "shape":"WorkflowSteps", - "internalonly":true - }, "OutputConfig":{ "shape":"FlowDefinitionOutputConfig", "documentation":"An object containing information about where the human review results will be uploaded.
" @@ -15240,14 +13418,6 @@ "shape":"RoleArn", "documentation":"The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298.
An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define.
" @@ -15264,69 +13434,6 @@ } } }, - "CreateGroundTruthJobRequest":{ - "type":"structure", - "required":[ - "GroundTruthProjectName", - "GroundTruthWorkflowName", - "GroundTruthJobName", - "InputConfig", - "OutputConfig" - ], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"}, - "GroundTruthJobName":{"shape":"GroundTruthJobName"}, - "GroundTruthJobDescription":{"shape":"GroundTruthJobDescription"}, - "InputConfig":{"shape":"GroundTruthJobInputConfig"}, - "OutputConfig":{"shape":"GroundTruthJobOutputConfig"} - } - }, - "CreateGroundTruthJobResponse":{ - "type":"structure", - "required":["GroundTruthJobArn"], - "members":{ - "GroundTruthJobArn":{"shape":"GroundTruthJobArn"} - } - }, - "CreateGroundTruthProjectRequest":{ - "type":"structure", - "required":["GroundTruthProjectName"], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthProjectDescription":{"shape":"GroundTruthProjectDescription"}, - "PointOfContact":{"shape":"GroundTruthProjectPointOfContact"} - } - }, - "CreateGroundTruthProjectResponse":{ - "type":"structure", - "required":["GroundTruthProjectArn"], - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"} - } - }, - "CreateGroundTruthWorkflowRequest":{ - "type":"structure", - "required":[ - "GroundTruthProjectName", - "GroundTruthWorkflowName", - "GroundTruthWorkflowDefinitionSpec", - "ExecutionRoleArn" - ], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"}, - "GroundTruthWorkflowDefinitionSpec":{"shape":"GroundTruthWorkflowDefinitionSpec"}, - "ExecutionRoleArn":{"shape":"RoleArn"} - } - }, - "CreateGroundTruthWorkflowResponse":{ - "type":"structure", - "required":["GroundTruthWorkflowArn"], - "members":{ - "GroundTruthWorkflowArn":{"shape":"GroundTruthWorkflowArn"} - } - }, "CreateHubContentPresignedUrlsRequest":{ "type":"structure", "required":[ @@ -15480,10 +13587,6 @@ "documentation":"The name of the user interface you are creating.
" }, "UiTemplate":{"shape":"UiTemplate"}, - "KmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - }, "Tags":{ "shape":"TagList", "documentation":"An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define.
" @@ -15500,36 +13603,6 @@ } } }, - "CreateHyperParameterTuningJobInternalRequest":{ - "type":"structure", - "required":[ - "HyperParameterTuningJobName", - "HyperParameterTuningJobConfig", - "CustomerDetails" - ], - "members":{ - "HyperParameterTuningJobName":{"shape":"HyperParameterTuningJobName"}, - "HyperParameterTuningJobConfig":{"shape":"HyperParameterTuningJobConfig"}, - "TrainingJobDefinition":{"shape":"HyperParameterTrainingJobDefinition"}, - "TrainingJobDefinitions":{"shape":"HyperParameterTrainingJobDefinitions"}, - "WarmStartConfig":{"shape":"HyperParameterTuningJobWarmStartConfig"}, - "Tags":{"shape":"TagList"}, - "Autotune":{"shape":"Autotune"}, - "FasCredentials":{"shape":"FasCredentials"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "BillingMode":{"shape":"BillingMode"}, - "SourceIdentity":{"shape":"String256"}, - "IdentityCenterUserToken":{"shape":"IdentityCenterUserToken"} - } - }, - "CreateHyperParameterTuningJobInternalResponse":{ - "type":"structure", - "required":["HyperParameterTuningJobArn"], - "members":{ - "HyperParameterTuningJobArn":{"shape":"HyperParameterTuningJobArn"} - } - }, "CreateHyperParameterTuningJobRequest":{ "type":"structure", "required":[ @@ -15662,11 +13735,8 @@ }, "Horovod":{ "shape":"Horovod", - "documentation":"Indicates Horovod compatibility.
" - }, - "OverrideAliasImageVersion":{ - "shape":"OverrideAliasImageVersion", - "internalonly":true + "documentation":"Indicates Horovod compatibility.
", + "box":true }, "ReleaseNotes":{ "shape":"ReleaseNotes", @@ -15687,8 +13757,7 @@ "type":"structure", "required":[ "InferenceComponentName", - "EndpointName", - "Specification" + "EndpointName" ], "members":{ "InferenceComponentName":{ @@ -15827,10 +13896,6 @@ "shape":"RecommendationJobStoppingConditions", "documentation":"A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically stopped.
" }, - "EndpointConfigurationTuning":{ - "shape":"RecommendationJobEndpointConfigurationTuning", - "internalonly":true - }, "OutputConfig":{ "shape":"RecommendationJobOutputConfig", "documentation":"Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption.
" @@ -15882,10 +13947,6 @@ "shape":"RoleArn", "documentation":"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.
" }, - "TaskRenderingRoleArn":{ - "shape":"RoleArn", - "internalonly":true - }, "LabelCategoryConfigS3Uri":{ "shape":"S3Uri", "documentation":"The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects.
For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs.
For named entity recognition jobs, in addition to \"labels\", you must provide worker instructions in the label category configuration file using the \"instructions\" parameter: \"instructions\": {\"shortInstruction\":\"<h1>Add header</h1><p>Add Instructions</p>\", \"fullInstruction\":\"<p>Add additional instructions.</p>\"}. For details and an example, see Create a Named Entity Recognition Labeling Job (API) .
For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1, label_2,...,label_n with your label categories.
{
\"document-version\": \"2018-11-28\",
\"labels\": [{\"label\": \"label_1\"},{\"label\": \"label_2\"},...{\"label\": \"label_n\"}]
}
Note the following about the label category configuration file:
For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one.
Each label category must be unique, you cannot specify duplicate label categories.
If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include auditLabelAttributeName in the label category configuration. Use this parameter to enter the LabelAttributeName of the labeling job you want to adjust or verify annotations of.
A string identifying the MLflow app name. This string is not part of the tracking server ARN.
" + }, + "ArtifactStoreUri":{ + "shape":"S3Uri", + "documentation":"The S3 URI for a general purpose bucket to use as the MLflow App artifact store.
" + }, + "RoleArn":{ + "shape":"RoleArn", + "documentation":"The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3. The role should have the AmazonS3FullAccess permission.
Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to AutoModelRegistrationEnabled. To disable automatic model registration, set this value to AutoModelRegistrationDisabled. If not specified, AutomaticModelRegistration defaults to AutoModelRegistrationDisabled.
The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30.
" + }, + "AccountDefaultStatus":{ + "shape":"AccountDefaultStatus", + "documentation":"Indicates whether this MLflow app is the default for the entire account.
" + }, + "DefaultDomainIdList":{ + "shape":"DefaultDomainIdList", + "documentation":"List of SageMaker domain IDs for which this MLflow App is used as the default.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"Tags consisting of key-value pairs used to manage metadata for the MLflow App.
" + } } }, "CreateMlflowAppResponse":{ "type":"structure", "members":{ - "Arn":{"shape":"MlflowAppArn"} + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the MLflow App.
" + } } }, "CreateMlflowTrackingServerRequest":{ @@ -16009,7 +14060,8 @@ }, "AutomaticModelRegistration":{ "shape":"Boolean", - "documentation":"Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False.
Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False.
Tags consisting of key-value pairs used to manage metadata for the tracking server.
" + }, + "S3BucketOwnerAccountId":{ + "shape":"AccountId", + "documentation":"Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. Defaults to caller's account ID if not provided.
" + }, + "S3BucketOwnerVerification":{ + "shape":"Boolean", + "documentation":"Enable Amazon S3 Ownership checks when interacting with Amazon S3 buckets from a SageMaker Managed MLflow Tracking Server. Defaults to True if not provided.
The version of the model card to export. If a version is not provided, then the latest version of the model card is exported.
" + "documentation":"The version of the model card to export. If a version is not provided, then the latest version of the model card is exported.
", + "box":true }, "ModelCardExportJobName":{ "shape":"EntityName", @@ -16248,25 +14310,11 @@ }, "EnableNetworkIsolation":{ "shape":"Boolean", - "documentation":"Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
" + "documentation":"Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
", + "box":true } } }, - "CreateModelInternalInput":{ - "type":"structure", - "required":["ModelInput"], - "members":{ - "ModelInput":{"shape":"CreateModelInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"} - } - }, - "CreateModelInternalOutput":{ - "type":"structure", - "members":{ - "ModelOutput":{"shape":"CreateModelOutput"} - } - }, "CreateModelOutput":{ "type":"structure", "required":["ModelArn"], @@ -16322,7 +14370,7 @@ }, "ModelPackageRegistrationType":{ "shape":"ModelPackageRegistrationType", - "internalonly":true + "documentation":"The package registration type of the model package input.
" }, "InferenceSpecification":{ "shape":"InferenceSpecification", @@ -16338,15 +14386,8 @@ }, "CertifyForMarketplace":{ "shape":"CertifyForMarketplace", - "documentation":"Whether to certify the model package for listing on Amazon Web Services Marketplace.
This parameter is optional for unversioned models, and does not apply to versioned models.
" - }, - "RequireImageScan":{ - "shape":"RequireImageScan", - "internalonly":true - }, - "WorkflowDisabled":{ - "shape":"Boolean", - "internalonly":true + "documentation":"Whether to certify the model package for listing on Amazon Web Services Marketplace.
This parameter is optional for unversioned models, and does not apply to versioned models.
", + "box":true }, "Tags":{ "shape":"TagList", @@ -16361,10 +14402,6 @@ "shape":"ModelMetrics", "documentation":"A structure that contains model metrics reports.
" }, - "DeploymentSpecification":{ - "shape":"DeploymentSpecification", - "internalonly":true - }, "ClientToken":{ "shape":"ClientToken", "documentation":"A unique token that guarantees that the call to this API is idempotent.
", @@ -16382,10 +14419,6 @@ "shape":"S3Uri", "documentation":"The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the InvokeEndpoint call.
" }, - "SamplePayloadContentType":{ - "shape":"String", - "internalonly":true - }, "CustomerMetadataProperties":{ "shape":"CustomerMetadataMap", "documentation":"The metadata properties associated with the model package versions.
" @@ -16663,7 +14696,7 @@ }, "MaxInstanceCount":{ "shape":"OptimizationJobMaxInstanceCount", - "internalonly":true + "documentation":"The maximum number of instances to use for the optimization job.
" }, "OptimizationEnvironment":{ "shape":"OptimizationJobEnvironmentVariables", @@ -16759,10 +14792,6 @@ "shape":"NonEmptyString64", "documentation":"Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App.
" }, - "Version":{ - "shape":"NonEmptyString64", - "internalonly":true - }, "ApplicationConfig":{ "shape":"PartnerAppConfig", "documentation":"Configuration settings for the SageMaker Partner AI App.
" @@ -16773,11 +14802,13 @@ }, "EnableIamSessionBasedIdentity":{ "shape":"Boolean", - "documentation":"When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.
When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.
When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available. Default is FALSE.
When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available. Default is FALSE.
The number of seconds until the pre-signed URL expires. This value defaults to 300.
" }, - "AppType":{ - "shape":"AppType", - "internalonly":true - }, - "AppRedirectionRelativePath":{ - "shape":"AppRedirectionRelativePath", - "internalonly":true - }, "SpaceName":{ "shape":"SpaceName", "documentation":"The name of the space.
" @@ -16914,10 +14916,6 @@ "LandingUri":{ "shape":"LandingUri", "documentation":"The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are:
studio::relative/path: Directs users to the relative path in Studio.
app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application.
app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application.
app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application.
app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application.
app:Canvas:relative/path: Directs users to the relative path in the Canvas application.
The ARN of the MLflow App to connect to your MLflow UI.
" + }, + "ExpiresInSeconds":{ + "shape":"ExpiresInSeconds", + "documentation":"The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.
" + }, + "SessionExpirationDurationInSeconds":{ + "shape":"SessionExpirationDurationInSeconds", + "documentation":"The duration in seconds that your presigned URL is valid. The presigned URL can be used only once.
" + } } }, "CreatePresignedMlflowAppUrlResponse":{ "type":"structure", "members":{ - "AuthorizedUrl":{"shape":"MlflowAppUrl"} + "AuthorizedUrl":{ + "shape":"MlflowAppUrl", + "documentation":"A presigned URL with an authorization token.
" + } } }, "CreatePresignedMlflowTrackingServerUrlRequest":{ @@ -17014,54 +15005,6 @@ } } }, - "CreateProcessingJobInternalRequest":{ - "type":"structure", - "required":[ - "ProcessingJobName", - "ProcessingResources", - "AppSpecification", - "RoleArn", - "CustomerDetails" - ], - "members":{ - "ProcessingInputs":{"shape":"ProcessingInputsInternal"}, - "ProcessingOutputConfig":{"shape":"ProcessingOutputConfig"}, - "ProcessingJobName":{"shape":"ProcessingJobName"}, - "ProcessingResources":{"shape":"ProcessingResources"}, - "StoppingCondition":{"shape":"ProcessingStoppingCondition"}, - "AppSpecification":{"shape":"AppSpecification"}, - "Environment":{"shape":"ProcessingEnvironmentMap"}, - "NetworkConfig":{"shape":"NetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "Tags":{"shape":"TagList"}, - "BillingOption":{"shape":"BillingOption"}, - "BillingMode":{"shape":"BillingMode"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "UpstreamProcessingOutputConfig":{"shape":"UpstreamProcessingOutputConfig"}, - "MonitoringScheduleArn":{"shape":"MonitoringScheduleArn"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "TrainingJobArn":{"shape":"TrainingJobArn"}, - "StateMachineArnProviderLambdaArn":{"shape":"ProcessingStateMachineArnProviderLambdaArn"}, - "FasCredentials":{"shape":"FasCredentials"}, - "PlatformCredentialToken":{"shape":"ProxyToken"}, - "CustomerCredentialToken":{"shape":"ProxyToken"}, - "CredentialProviderFunction":{"shape":"CredentialProviderLambdaFunctionArn"}, - "CredentialProviderEncryptionKey":{"shape":"KmsKeyId"}, - "WorkflowType":{"shape":"WorkflowType"}, - "SessionTags":{"shape":"TagList"}, - "SourceIdentity":{"shape":"String256"}, - "FasSourceArn":{"shape":"SourceArn"}, - "FasSourceAccount":{"shape":"AccountId"}, - "ExperimentConfig":{"shape":"ExperimentConfig"}, - "IdentityCenterUserToken":{"shape":"IdentityCenterUserToken"} - } - }, - "CreateProcessingJobInternalResponse":{ - "type":"structure", - "members":{ - "ProcessingJobResponse":{"shape":"CreateProcessingJobResponse"} - } - }, "CreateProcessingJobRequest":{ "type":"structure", "required":[ @@ -17111,10 +15054,6 @@ "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.
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.
An array of template provider configurations for creating infrastructure resources for the project.
" - }, - "WorkflowDisabled":{ - "shape":"Boolean", - "internalonly":true } } }, @@ -17175,79 +15110,6 @@ } } }, - "CreateQuotaAllocationRequest":{ - "type":"structure", - "required":[ - "QuotaAllocationName", - "ClusterArn", - "QuotaResources", - "QuotaAllocationTarget" - ], - "members":{ - "QuotaAllocationName":{"shape":"EntityName"}, - "ClusterArn":{"shape":"ClusterArn"}, - "QuotaResources":{"shape":"QuotaResourceConfigList"}, - "OverQuota":{"shape":"OverQuota"}, - "QuotaAllocationTarget":{"shape":"QuotaAllocationTarget"}, - "PreemptionConfig":{"shape":"PreemptionConfig"}, - "ActivationState":{"shape":"ActivationStateV1"}, - "QuotaAllocationDescription":{"shape":"EntityDescription"}, - "Tags":{"shape":"TagList"} - } - }, - "CreateQuotaAllocationResponse":{ - "type":"structure", - "required":[ - "QuotaAllocationArn", - "QuotaId" - ], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"}, - "QuotaId":{"shape":"QuotaId"} - } - }, - "CreateSharedModelRequest":{ - "type":"structure", - "required":[ - "ReviewerUserProfiles", - "ModelArtifacts" - ], - "members":{ - "ReviewerUserProfiles":{ - "shape":"UserProfileNameList", - "internalonly":true - }, - "ModelArtifacts":{ - "shape":"SharedModelArtifacts", - "internalonly":true - }, - "Comment":{ - "shape":"Comment", - "internalonly":true - }, - "ModelName":{ - "shape":"SharedModelName", - "internalonly":true - }, - "Origin":{ - "shape":"Origin", - "internalonly":true - } - } - }, - "CreateSharedModelResponse":{ - "type":"structure", - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - } - } - }, "CreateSpaceRequest":{ "type":"structure", "required":[ @@ -17345,61 +15207,6 @@ "max":1, "min":1 }, - "CreateTrainingJobInternalRequest":{ - "type":"structure", - "required":[ - "TrainingJobName", - "AlgorithmSpecification", - "RoleArn", - "OutputDataConfig", - "ResourceConfig", - "StoppingCondition" - ], - "members":{ - "TrainingJobName":{"shape":"TrainingJobName"}, - "HyperParameters":{"shape":"HyperParameters"}, - "AlgorithmSpecification":{"shape":"AlgorithmSpecification"}, - "RoleArn":{"shape":"RoleArn"}, - "ChainedCustomerRoleArn":{"shape":"RoleArn"}, - "InputDataConfig":{"shape":"InputDataConfig"}, - "OutputDataConfig":{"shape":"OutputDataConfig"}, - "ResourceConfig":{"shape":"ResourceConfig"}, - "VpcConfig":{"shape":"VpcConfig"}, - "StoppingCondition":{"shape":"StoppingCondition"}, - "Tags":{"shape":"TagList"}, - "ResourceTags":{"shape":"ResourceTags"}, - "EnableNetworkIsolation":{"shape":"Boolean"}, - "EnableInterContainerTrafficEncryption":{"shape":"Boolean"}, - "EnableManagedSpotTraining":{"shape":"Boolean"}, - "CheckpointConfig":{"shape":"CheckpointConfig"}, - "Environment":{"shape":"TrainingEnvironmentMap"}, - "RetryStrategy":{"shape":"RetryStrategy"}, - "ProcessingJobConfig":{"shape":"ProcessingJobConfig"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "ProcessingJobArn":{"shape":"ProcessingJobArn"}, - "TuningJobArn":{"shape":"HyperParameterTuningJobArn"}, - "LabelingJobArn":{"shape":"LabelingJobArn"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "FasCredentials":{"shape":"FasCredentials"}, - "StateMachineArn":{"shape":"StateMachineArn"}, - "ExperimentConfig":{"shape":"ExperimentConfig"}, - "UpstreamPlatformConfig":{"shape":"UpstreamPlatformConfig"}, - "DisableEFA":{"shape":"Boolean"}, - "BillingMode":{"shape":"BillingMode"}, - "SessionTags":{"shape":"TagList"}, - "SourceIdentity":{"shape":"String256"}, - "FasSourceArn":{"shape":"SourceArn"}, - "FasSourceAccount":{"shape":"AccountId"}, - "StsContextMap":{"shape":"StsContextMap"}, - "IdentityCenterUserToken":{"shape":"IdentityCenterUserToken"} - } - }, - "CreateTrainingJobInternalResponse":{ - "type":"structure", - "members":{ - "TrainingJobResponse":{"shape":"CreateTrainingJobResponse"} - } - }, "CreateTrainingJobRequest":{ "type":"structure", "required":[ @@ -17424,10 +15231,6 @@ "shape":"RoleArn", "documentation":"The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf.
During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see SageMaker Roles.
To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission.
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.
" @@ -17452,21 +15255,20 @@ "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.
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.
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.
" + "documentation":"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.
", + "box":true }, "EnableInterContainerTrafficEncryption":{ "shape":"Boolean", - "documentation":"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.
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.
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.
" + "documentation":"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.
", + "box":true }, "CheckpointConfig":{ "shape":"CheckpointConfig", @@ -17479,19 +15281,11 @@ }, "TensorBoardOutputConfig":{"shape":"TensorBoardOutputConfig"}, "ExperimentConfig":{"shape":"ExperimentConfig"}, - "UpstreamPlatformConfig":{ - "shape":"UpstreamPlatformConfig", - "internalonly":true - }, "ProfilerConfig":{"shape":"ProfilerConfig"}, "ProfilerRuleConfigurations":{ "shape":"ProfilerRuleConfigurations", "documentation":"Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics.
" }, - "DisableEFA":{ - "shape":"Boolean", - "internalonly":true - }, "Environment":{ "shape":"TrainingEnvironmentMap", "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.
The number of times to retry the job when the job fails due to an InternalServerError.
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.
" @@ -17534,19 +15308,15 @@ }, "ServerlessJobConfig":{ "shape":"ServerlessJobConfig", - "internalonly":true + "documentation":"The configuration for serverless training jobs.
" }, "MlflowConfig":{ "shape":"MlflowConfig", - "internalonly":true - }, - "WithWarmPoolValidationError":{ - "shape":"Boolean", - "internalonly":true + "documentation":"The MLflow configuration using SageMaker managed MLflow.
" }, "ModelPackageConfig":{ "shape":"ModelPackageConfig", - "internalonly":true + "documentation":"The configuration for the model package.
" } } }, @@ -17595,53 +15365,6 @@ } } }, - "CreateTransformJobInternalRequest":{ - "type":"structure", - "required":[ - "TransformJobName", - "ModelName", - "TransformInput", - "TransformOutput", - "TransformResources", - "CustomerDetails" - ], - "members":{ - "TransformJobName":{"shape":"TransformJobName"}, - "ModelName":{"shape":"ModelName"}, - "MaxConcurrentTransforms":{"shape":"MaxConcurrentTransforms"}, - "MaxPayloadInMB":{"shape":"MaxPayloadInMB"}, - "ModelClientConfig":{"shape":"ModelClientConfig"}, - "BatchStrategy":{"shape":"BatchStrategy"}, - "Environment":{"shape":"TransformEnvironmentMap"}, - "TransformInput":{"shape":"TransformInput"}, - "TransformOutput":{"shape":"TransformOutput"}, - "DataCaptureConfig":{"shape":"BatchDataCaptureConfig"}, - "TransformResources":{"shape":"TransformResources"}, - "DataProcessing":{"shape":"DataProcessing"}, - "Tags":{"shape":"TagList"}, - "ExperimentConfig":{"shape":"ExperimentConfig"}, - "StateMachineArnProviderLambdaArn":{"shape":"StateMachineArnProviderLambdaArn"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "FasCredentials":{"shape":"FasCredentials"}, - "LabelingJobArn":{"shape":"LabelingJobArn"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "PlatformCredentialToken":{"shape":"ProxyToken"}, - "CustomerCredentialToken":{"shape":"ProxyToken"}, - "DataAccessCredentialToken":{"shape":"ProxyToken"}, - "DataAccessVpcConfig":{"shape":"VpcConfig"}, - "CredentialProviderFunction":{"shape":"CredentialProviderLambdaFunctionArn"}, - "CredentialProviderEncryptionKey":{"shape":"KmsKeyId"}, - "BillingMode":{"shape":"BillingMode"}, - "FasSourceArn":{"shape":"SourceArn"}, - "FasSourceAccount":{"shape":"AccountId"} - } - }, - "CreateTransformJobInternalResponse":{ - "type":"structure", - "members":{ - "TransformJobResponse":{"shape":"CreateTransformJobResponse"} - } - }, "CreateTransformJobRequest":{ "type":"structure", "required":[ @@ -17704,30 +15427,6 @@ "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.
" }, - "PlatformCredentialToken":{ - "shape":"ProxyToken", - "internalonly":true - }, - "CustomerCredentialToken":{ - "shape":"ProxyToken", - "internalonly":true - }, - "DataAccessCredentialToken":{ - "shape":"ProxyToken", - "internalonly":true - }, - "DataAccessVpcConfig":{ - "shape":"VpcConfig", - "internalonly":true - }, - "CredentialProviderFunction":{ - "shape":"CredentialProviderLambdaFunctionArn", - "internalonly":true - }, - "CredentialProviderEncryptionKey":{ - "shape":"KmsKeyId", - "internalonly":true - }, "ExperimentConfig":{"shape":"ExperimentConfig"} } }, @@ -17741,34 +15440,6 @@ } } }, - "CreateTrialComponentInternalRequest":{ - "type":"structure", - "required":[ - "TrialComponentName", - "CustomerDetails" - ], - "members":{ - "TrialComponentName":{"shape":"ExperimentEntityName"}, - "DisplayName":{"shape":"ExperimentEntityName"}, - "CreationTime":{"shape":"Timestamp"}, - "Source":{"shape":"InputTrialComponentSource"}, - "Status":{"shape":"TrialComponentStatus"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "Parameters":{"shape":"TrialComponentParameters"}, - "InputArtifacts":{"shape":"TrialComponentArtifacts"}, - "OutputArtifacts":{"shape":"TrialComponentArtifacts"}, - "MetadataProperties":{"shape":"MetadataProperties"}, - "Tags":{"shape":"TagList"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "CreateTrialComponentInternalResponse":{ - "type":"structure", - "members":{ - "TrialComponentArn":{"shape":"TrialComponentArn"} - } - }, "CreateTrialComponentRequest":{ "type":"structure", "required":["TrialComponentName"], @@ -17821,29 +15492,6 @@ } } }, - "CreateTrialInternalRequest":{ - "type":"structure", - "required":[ - "TrialName", - "ExperimentName" - ], - "members":{ - "TrialName":{"shape":"ExperimentEntityName"}, - "DisplayName":{"shape":"ExperimentEntityName"}, - "ExperimentName":{"shape":"ExperimentEntityName"}, - "CreationTime":{"shape":"Timestamp"}, - "Tags":{"shape":"TagList"}, - "MetadataProperties":{"shape":"MetadataProperties"}, - "Source":{"shape":"InputTrialSource"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "CreateTrialInternalResponse":{ - "type":"structure", - "members":{ - "TrialArn":{"shape":"TrialArn"} - } - }, "CreateTrialRequest":{ "type":"structure", "required":[ @@ -17906,10 +15554,6 @@ "shape":"TagList", "documentation":"Each tag consists of a key and an optional value. Tag keys must be unique per resource.
Tags that you specify for the User Profile are also added to all Apps that the User Profile launches.
" }, - "UserPolicy":{ - "shape":"String2048", - "internalonly":true - }, "UserSettings":{ "shape":"UserSettings", "documentation":"A collection of settings.
" @@ -17986,14 +15630,6 @@ "shape":"MemberDefinitions", "documentation":"A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.
Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. Do not provide input for both of these parameters in a single request.
For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools.
For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups.
A description of the work team.
" @@ -18022,65 +15658,6 @@ } }, "CreationTime":{"type":"timestamp"}, - "CredentialProvider":{ - "type":"string", - "enum":[ - "UPSTREAM_PLATFORM", - "UPSTREAM_CUSTOMER" - ] - }, - "CredentialProviderLambdaFunctionArn":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"arn:[\\p{Alnum}\\-]+:lambda:[\\p{Alnum}\\-]+:[0-9]{12}:function:.*" - }, - "CredentialProxyConfig":{ - "type":"structure", - "required":[ - "CustomerCredentialToken", - "CredentialProviderFunction" - ], - "members":{ - "PlatformCredentialToken":{ - "shape":"ProxyToken", - "internalonly":true - }, - "CustomerCredentialToken":{ - "shape":"ProxyToken", - "internalonly":true - }, - "CredentialProviderFunction":{ - "shape":"CredentialProviderLambdaFunctionArn", - "internalonly":true - }, - "PlatformCredentialProviderFunction":{ - "shape":"CredentialProviderLambdaFunctionArn", - "internalonly":true - }, - "CustomerCredentialProviderEncryptionKey":{ - "shape":"KmsKeyId", - "deprecated":true, - "deprecatedMessage":"This property is deprecated, use CustomerCredentialProviderKmsKeyId instead.", - "internalonly":true - }, - "PlatformCredentialProviderEncryptionKey":{ - "shape":"KmsKeyId", - "deprecated":true, - "deprecatedMessage":"This property is deprecated, use PlatformCredentialProviderKmsKeyId instead.", - "internalonly":true - }, - "CustomerCredentialProviderKmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - }, - "PlatformCredentialProviderKmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - } - }, - "internalonly":true - }, "CronScheduleExpression":{ "type":"string", "max":256, @@ -18203,72 +15780,6 @@ "max":200, "min":0 }, - "CustomMetadata":{ - "type":"map", - "key":{"shape":"CustomMetadataKey"}, - "value":{"shape":"CustomMetadataValue"}, - "max":10, - "min":0 - }, - "CustomMetadataKey":{ - "type":"string", - "max":2048, - "min":1, - "pattern":".*" - }, - "CustomMetadataValue":{ - "type":"string", - "max":2048, - "min":0, - "pattern":".*" - }, - "CustomMonitoringAppSpecification":{ - "type":"structure", - "required":["ImageUri"], - "members":{ - "ImageUri":{"shape":"ImageUri"}, - "ContainerEntrypoint":{"shape":"ContainerEntrypoint"}, - "ContainerArguments":{"shape":"MonitoringContainerArguments"}, - "Environment":{"shape":"MonitoringEnvironmentMap"}, - "RecordPreprocessorSourceUri":{"shape":"S3Uri"}, - "PostAnalyticsProcessorSourceUri":{"shape":"S3Uri"} - } - }, - "CustomMonitoringJobDefinition":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "CustomMonitoringAppSpecification", - "CustomMonitoringJobInput", - "CustomMonitoringJobOutputConfig", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "CustomMonitoringAppSpecification":{"shape":"CustomMonitoringAppSpecification"}, - "CustomMonitoringJobInput":{"shape":"CustomMonitoringJobInput"}, - "CustomMonitoringJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - }, - "internalonly":true - }, - "CustomMonitoringJobInput":{ - "type":"structure", - "members":{ - "ProcessingInputs":{"shape":"MonitoringProcessingInputs"}, - "EndpointInput":{"shape":"EndpointInput"}, - "BatchTransformInput":{"shape":"BatchTransformInput"}, - "GroundTruthS3Input":{"shape":"MonitoringGroundTruthS3Input"} - } - }, "CustomPosixUserConfig":{ "type":"structure", "required":[ @@ -18287,15 +15798,6 @@ }, "documentation":"Details about the POSIX identity that is used for file system operations.
" }, - "CustomerDetails":{ - "type":"structure", - "required":["AccountId"], - "members":{ - "AccountId":{"shape":"AccountId"}, - "UserContext":{"shape":"UserContext"}, - "OrganizationId":{"shape":"OrganizationId"} - } - }, "CustomerMetadataKey":{ "type":"string", "max":128, @@ -18356,7 +15858,8 @@ "members":{ "EnableCapture":{ "shape":"EnableCapture", - "documentation":"Whether data capture should be enabled or disabled (defaults to enabled).
" + "documentation":"Whether data capture should be enabled or disabled (defaults to enabled).
", + "box":true }, "InitialSamplingPercentage":{ "shape":"SamplingPercentage", @@ -18393,7 +15896,8 @@ "members":{ "EnableCapture":{ "shape":"EnableCapture", - "documentation":"Whether data capture is enabled or disabled.
" + "documentation":"Whether data capture is enabled or disabled.
", + "box":true }, "CaptureStatus":{ "shape":"CaptureStatus", @@ -18515,33 +16019,6 @@ }, "documentation":"Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically.
" }, - "DataQualityJobDefinition":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "DataQualityAppSpecification", - "DataQualityJobInput", - "DataQualityJobOutputConfig", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "DataQualityBaselineConfig":{"shape":"DataQualityBaselineConfig"}, - "DataQualityAppSpecification":{"shape":"DataQualityAppSpecification"}, - "DataQualityJobInput":{"shape":"DataQualityJobInput"}, - "DataQualityJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - }, - "internalonly":true - }, "DataQualityJobInput":{ "type":"structure", "members":{ @@ -18553,13 +16030,6 @@ }, "documentation":"The input for the data quality monitoring job. Currently endpoints are supported for input.
" }, - "DataScienceAssistantSettings":{ - "type":"structure", - "members":{ - "Status":{"shape":"FeatureStatus"}, - "CrossRegionQServiceStatus":{"shape":"FeatureStatus"} - } - }, "DataSource":{ "type":"structure", "members":{ @@ -18573,7 +16043,7 @@ }, "DatasetSource":{ "shape":"DatasetSource", - "internalonly":true + "documentation":"The dataset resource that's associated with a channel.
" } }, "documentation":"Describes the location of the channel data.
" @@ -18607,10 +16077,6 @@ "InputMode":{ "shape":"InputMode", "documentation":"Whether to use File or Pipe input mode. In File (default) mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume.
Configuration for Dataset Definition inputs. The Dataset Definition input must specify exactly one of either AthenaDatasetDefinition or RedshiftDatasetDefinition types.
The Amazon Resource Name (ARN) of the dataset resource.
" + } + }, + "documentation":"Specifies a dataset source for a channel.
" }, "DebugHookConfig":{ "type":"structure", @@ -18674,7 +16144,8 @@ }, "VolumeSizeInGB":{ "shape":"OptionalVolumeSizeInGB", - "documentation":"The size, in GB, of the ML storage volume attached to the processing instance.
" + "documentation":"The size, in GB, of the ML storage volume attached to the processing instance.
", + "box":true }, "RuleParameters":{ "shape":"RuleParameters", @@ -18724,17 +16195,8 @@ "DeepHealthCheckConfigurations":{ "type":"list", "member":{"shape":"InstanceGroupHealthCheckConfiguration"}, - "internalonly":true - }, - "DeepHealthCheckOperationStatus":{ - "type":"string", - "enum":[ - "Pending", - "InProgress", - "Completed", - "Failed" - ], - "internalonly":true + "max":99, + "min":1 }, "DeepHealthCheckType":{ "type":"string", @@ -18746,15 +16208,9 @@ "DeepHealthChecks":{ "type":"list", "member":{"shape":"DeepHealthCheckType"}, - "internalonly":true, "max":2, "min":1 }, - "DeepHealthChecksList":{ - "type":"list", - "member":{"shape":"DeepHealthCheckType"}, - "internalonly":true - }, "DefaultDomainIdList":{ "type":"list", "member":{"shape":"DomainId"} @@ -18820,6 +16276,63 @@ "max":65535, "min":0 }, + "DeleteAIBenchmarkJobRequest":{ + "type":"structure", + "required":["AIBenchmarkJobName"], + "members":{ + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI benchmark job to delete.
" + } + } + }, + "DeleteAIBenchmarkJobResponse":{ + "type":"structure", + "members":{ + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the deleted benchmark job.
" + } + } + }, + "DeleteAIRecommendationJobRequest":{ + "type":"structure", + "required":["AIRecommendationJobName"], + "members":{ + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI recommendation job to delete.
" + } + } + }, + "DeleteAIRecommendationJobResponse":{ + "type":"structure", + "members":{ + "AIRecommendationJobArn":{ + "shape":"AIRecommendationJobArn", + "documentation":"The Amazon Resource Name (ARN) of the deleted recommendation job.
" + } + } + }, + "DeleteAIWorkloadConfigRequest":{ + "type":"structure", + "required":["AIWorkloadConfigName"], + "members":{ + "AIWorkloadConfigName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI workload configuration to delete.
" + } + } + }, + "DeleteAIWorkloadConfigResponse":{ + "type":"structure", + "members":{ + "AIWorkloadConfigArn":{ + "shape":"AIWorkloadConfigArn", + "documentation":"The Amazon Resource Name (ARN) of the deleted AI workload configuration.
" + } + } + }, "DeleteActionRequest":{ "type":"structure", "required":["ActionName"], @@ -18941,13 +16454,6 @@ } } }, - "DeleteAutoMLJobRequest":{ - "type":"structure", - "required":["AutoMLJobName"], - "members":{ - "AutoMLJobName":{"shape":"AutoMLJobName"} - } - }, "DeleteClusterRequest":{ "type":"structure", "required":["ClusterName"], @@ -18955,10 +16461,6 @@ "ClusterName":{ "shape":"ClusterNameOrArn", "documentation":"The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster to delete.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -18979,10 +16481,6 @@ "ClusterSchedulerConfigId":{ "shape":"ClusterSchedulerConfigId", "documentation":"ID of the cluster policy.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -19013,10 +16511,6 @@ "ComputeQuotaId":{ "shape":"ComputeQuotaId", "documentation":"ID of the compute allocation definition.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -19039,13 +16533,6 @@ } } }, - "DeleteCustomMonitoringJobDefinitionRequest":{ - "type":"structure", - "required":["JobDefinitionName"], - "members":{ - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"} - } - }, "DeleteDataQualityJobDefinitionRequest":{ "type":"structure", "required":["JobDefinitionName"], @@ -19117,18 +16604,6 @@ } } }, - "DeleteEndpointConfigInputInternal":{ - "type":"structure", - "required":[ - "EndpointConfigInput", - "AccountId" - ], - "members":{ - "EndpointConfigInput":{"shape":"DeleteEndpointConfigInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"} - } - }, "DeleteEndpointInput":{ "type":"structure", "required":["EndpointName"], @@ -19136,32 +16611,9 @@ "EndpointName":{ "shape":"EndpointName", "documentation":"The name of the endpoint that you want to delete.
" - }, - "ForceDelete":{ - "shape":"Boolean", - "internalonly":true } } }, - "DeleteEndpointInputInternal":{ - "type":"structure", - "required":[ - "EndpointInput", - "AccountId" - ], - "members":{ - "EndpointInput":{"shape":"DeleteEndpointInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"} - } - }, - "DeleteEvaluationJobRequest":{ - "type":"structure", - "required":["EvaluationJobName"], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"} - } - }, "DeleteExperimentRequest":{ "type":"structure", "required":["ExperimentName"], @@ -19354,88 +16806,23 @@ } } }, - "DeleteInferenceRecommendationsJobRequest":{ - "type":"structure", - "required":["JobName"], - "members":{ - "JobName":{"shape":"RecommendationJobName"} - } - }, - "DeleteLabelingJobRequest":{ - "type":"structure", - "required":["LabelingJobName"], - "members":{ - "LabelingJobName":{"shape":"LabelingJobName"}, - "NameReuseEnabled":{ - "shape":"Boolean", - "internalonly":true - } - } - }, - "DeleteLabelingPortalPolicyRequest":{ - "type":"structure", - "required":["WorkforceName"], - "members":{ - "WorkforceName":{ - "shape":"WorkforceName", - "internalonly":true - } - } - }, - "DeleteLabelingPortalPolicyResponse":{ - "type":"structure", - "members":{} - }, - "DeleteLineageGroupPolicyRequest":{ - "type":"structure", - "required":["LineageGroupName"], - "members":{ - "LineageGroupName":{"shape":"LineageGroupNameOrArn"} - } - }, - "DeleteLineageGroupPolicyResponse":{ - "type":"structure", - "members":{ - "LineageGroupArn":{"shape":"LineageGroupArn"} - } - }, - "DeleteLineageGroupRequest":{ - "type":"structure", - "required":["LineageGroupName"], - "members":{ - "LineageGroupName":{"shape":"ExperimentEntityName"} - } - }, - "DeleteLineageGroupResponse":{ - "type":"structure", - "members":{ - "LineageGroupArn":{"shape":"LineageGroupArn"} - } - }, - "DeleteMlflowAppPolicyRequest":{ - "type":"structure", - "required":["Arn"], - "members":{ - "Arn":{"shape":"MlflowAppArn"} - } - }, - "DeleteMlflowAppPolicyResponse":{ - "type":"structure", - "members":{ - "Arn":{"shape":"MlflowAppArn"} - } - }, "DeleteMlflowAppRequest":{ "type":"structure", "required":["Arn"], "members":{ - "Arn":{"shape":"MlflowAppArn"} + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the MLflow App to delete.
" + } } }, "DeleteMlflowAppResponse":{ "type":"structure", "members":{ - "Arn":{"shape":"MlflowAppArn"} + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the deleted MLflow App.
" + } } }, "DeleteMlflowTrackingServerRequest":{ @@ -19497,18 +16884,6 @@ } } }, - "DeleteModelInputInternal":{ - "type":"structure", - "required":[ - "ModelInput", - "AccountId" - ], - "members":{ - "ModelInput":{"shape":"DeleteModelInput"}, - "AccountId":{"shape":"AccountId"}, - "AutoMLJobArn":{"shape":"AutoMLJobArn"} - } - }, "DeleteModelPackageGroupInput":{ "type":"structure", "required":["ModelPackageGroupName"], @@ -19526,10 +16901,6 @@ "ModelPackageGroupName":{ "shape":"EntityName", "documentation":"The name of the model group for which to delete the policy.
" - }, - "ModelPackageGroupArn":{ - "shape":"ModelPackageGroupArn", - "internalonly":true } } }, @@ -19593,19 +16964,6 @@ } } }, - "DeletePartnerAppPolicyRequest":{ - "type":"structure", - "required":["PartnerAppArn"], - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, - "DeletePartnerAppPolicyResponse":{ - "type":"structure", - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, "DeletePartnerAppRequest":{ "type":"structure", "required":["Arn"], @@ -19630,42 +16988,6 @@ } } }, - "DeletePersistentVolumeRequest":{ - "type":"structure", - "required":[ - "PersistentVolumeName", - "DomainId" - ], - "members":{ - "PersistentVolumeName":{"shape":"PersistentVolumeName"}, - "DomainId":{"shape":"DomainId"} - } - }, - "DeletePipelinePolicyRequest":{ - "type":"structure", - "required":["PipelineName"], - "members":{ - "PipelineName":{ - "shape":"PipelineNameOrArn", - "internalonly":true - }, - "ClientRequestToken":{ - "shape":"IdempotencyToken", - "idempotencyToken":true, - "internalonly":true - } - } - }, - "DeletePipelinePolicyResponse":{ - "type":"structure", - "members":{ - "PipelineArn":{ - "shape":"PipelineArn", - "internalonly":true - } - }, - "documentation":"Defines the response object for DeletePipelinePolicy API.
" - }, "DeletePipelineRequest":{ "type":"structure", "required":[ @@ -19693,19 +17015,6 @@ } } }, - "DeleteProcessingJobInternalRequest":{ - "type":"structure", - "required":[ - "ProcessingJobName", - "CustomerDetails" - ], - "members":{ - "ProcessingJobName":{"shape":"ProcessingJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "ProcessingJobArn":{"shape":"ProcessingJobArn"}, - "AssociatedParentJobArn":{"shape":"AssociatedParentJobArn"} - } - }, "DeleteProcessingJobRequest":{ "type":"structure", "required":["ProcessingJobName"], @@ -19726,59 +17035,6 @@ } } }, - "DeleteQuotaAllocationRequest":{ - "type":"structure", - "required":["QuotaAllocationArn"], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"} - } - }, - "DeleteResourcePolicyRequest":{ - "type":"structure", - "required":["ResourceArn"], - "members":{ - "ResourceArn":{ - "shape":"ResourceArn", - "internalonly":true - } - } - }, - "DeleteResourcePolicyResponse":{ - "type":"structure", - "members":{ - "ResourceArn":{ - "shape":"ResourceArn", - "internalonly":true - } - } - }, - "DeleteSharedModelRequest":{ - "type":"structure", - "required":["SharedModelId"], - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - } - } - }, - "DeleteSharedModelResponse":{ - "type":"structure", - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - } - } - }, "DeleteSpaceRequest":{ "type":"structure", "required":[ @@ -19827,19 +17083,6 @@ "type":"structure", "members":{} }, - "DeleteTrainingJobInternalRequest":{ - "type":"structure", - "required":[ - "TrainingJobName", - "CustomerDetails" - ], - "members":{ - "TrainingJobName":{"shape":"TrainingJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "TrainingJobArn":{"shape":"TrainingJobArn"}, - "AssociatedParentJobArn":{"shape":"AssociatedParentJobArn"} - } - }, "DeleteTrainingJobRequest":{ "type":"structure", "required":["TrainingJobName"], @@ -19850,13 +17093,6 @@ } } }, - "DeleteTransformJobRequest":{ - "type":"structure", - "required":["TransformJobName"], - "members":{ - "TransformJobName":{"shape":"TransformJobName"} - } - }, "DeleteTrialComponentRequest":{ "type":"structure", "required":["TrialComponentName"], @@ -19942,7 +17178,8 @@ "members":{ "Success":{ "shape":"Success", - "documentation":"Returns true if the work team was successfully deleted; otherwise, returns false.
Returns true if the work team was successfully deleted; otherwise, returns false.
A set of recommended deployment configurations for the model. To get more advanced recommendations, see CreateInferenceRecommendationsJob to create an inference recommendation job.
" }, - "DeploymentSpecification":{ - "type":"structure", - "members":{ - "TestInput":{"shape":"TestInput"}, - "HealthCheckConfig":{"shape":"HealthCheckConfig"} - }, - "internalonly":true - }, "DeploymentStage":{ "type":"structure", "required":[ @@ -20124,18 +17353,224 @@ "DerivedDataInputConfig":{ "shape":"DataInputConfig", "documentation":"The data input configuration that SageMaker Neo automatically derived for the model. When SageMaker Neo derives this information, you don't need to specify the data input configuration when you create a compilation job.
" - }, - "DerivedFramework":{ - "shape":"Framework", - "internalonly":true - }, - "DerivedFrameworkVersion":{ - "shape":"FrameworkVersion", - "internalonly":true } }, "documentation":"Information that SageMaker Neo automatically derived about the model.
" }, + "DescribeAIBenchmarkJobRequest":{ + "type":"structure", + "required":["AIBenchmarkJobName"], + "members":{ + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI benchmark job to describe.
" + } + } + }, + "DescribeAIBenchmarkJobResponse":{ + "type":"structure", + "required":[ + "AIBenchmarkJobName", + "AIBenchmarkJobArn", + "AIBenchmarkJobStatus", + "BenchmarkTarget", + "OutputConfig", + "AIWorkloadConfigIdentifier", + "RoleArn", + "CreationTime" + ], + "members":{ + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI benchmark job.
" + }, + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the AI benchmark job.
" + }, + "AIBenchmarkJobStatus":{ + "shape":"AIBenchmarkJobStatus", + "documentation":"The status of the AI benchmark job.
" + }, + "FailureReason":{ + "shape":"FailureReason", + "documentation":"If the benchmark job failed, the reason it failed.
" + }, + "BenchmarkTarget":{ + "shape":"AIBenchmarkTarget", + "documentation":"The target endpoint that was benchmarked.
" + }, + "OutputConfig":{ + "shape":"AIBenchmarkOutputResult", + "documentation":"The output configuration for the benchmark job, including the Amazon S3 output location and CloudWatch log information.
" + }, + "AIWorkloadConfigIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the AI workload configuration used for this benchmark job.
" + }, + "RoleArn":{ + "shape":"RoleArn", + "documentation":"The Amazon Resource Name (ARN) of the IAM role used by the benchmark job.
" + }, + "NetworkConfig":{ + "shape":"AIBenchmarkNetworkConfig", + "documentation":"The network configuration for the benchmark job.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the benchmark job was created.
" + }, + "StartTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the benchmark job started running.
" + }, + "EndTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the benchmark job completed.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The tags associated with the benchmark job.
" + } + } + }, + "DescribeAIRecommendationJobRequest":{ + "type":"structure", + "required":["AIRecommendationJobName"], + "members":{ + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI recommendation job to describe.
" + } + } + }, + "DescribeAIRecommendationJobResponse":{ + "type":"structure", + "required":[ + "AIRecommendationJobName", + "AIRecommendationJobArn", + "AIRecommendationJobStatus", + "ModelSource", + "OutputConfig", + "AIWorkloadConfigIdentifier", + "RoleArn", + "CreationTime" + ], + "members":{ + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI recommendation job.
" + }, + "AIRecommendationJobArn":{ + "shape":"AIRecommendationJobArn", + "documentation":"The Amazon Resource Name (ARN) of the AI recommendation job.
" + }, + "AIRecommendationJobStatus":{ + "shape":"AIRecommendationJobStatus", + "documentation":"The status of the AI recommendation job.
" + }, + "FailureReason":{ + "shape":"FailureReason", + "documentation":"If the recommendation job failed, the reason it failed.
" + }, + "ModelSource":{ + "shape":"AIModelSource", + "documentation":"The source of the model that was analyzed.
" + }, + "OutputConfig":{ + "shape":"AIRecommendationOutputResult", + "documentation":"The output configuration for the recommendation job.
" + }, + "InferenceSpecification":{ + "shape":"AIRecommendationInferenceSpecification", + "documentation":"The inference framework configuration.
" + }, + "AIWorkloadConfigIdentifier":{ + "shape":"AIResourceIdentifier", + "documentation":"The name or Amazon Resource Name (ARN) of the AI workload configuration used for this recommendation job.
" + }, + "OptimizeModel":{ + "shape":"AIRecommendationAllowOptimization", + "documentation":"Whether model optimization techniques were allowed.
" + }, + "PerformanceTarget":{ + "shape":"AIRecommendationPerformanceTarget", + "documentation":"The performance targets specified for the recommendation job.
" + }, + "Recommendations":{ + "shape":"AIRecommendationList", + "documentation":"The list of optimization recommendations generated by the job. Each recommendation includes optimization details, deployment configuration, expected performance metrics, and the associated benchmark job ARN.
" + }, + "RoleArn":{ + "shape":"RoleArn", + "documentation":"The Amazon Resource Name (ARN) of the IAM role used by the recommendation job.
" + }, + "ComputeSpec":{ + "shape":"AIRecommendationComputeSpec", + "documentation":"The compute resource specification for the recommendation job.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the recommendation job was created.
" + }, + "StartTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the recommendation job started running.
" + }, + "EndTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the recommendation job completed.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The tags associated with the recommendation job.
" + } + } + }, + "DescribeAIWorkloadConfigRequest":{ + "type":"structure", + "required":["AIWorkloadConfigName"], + "members":{ + "AIWorkloadConfigName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI workload configuration to describe.
" + } + } + }, + "DescribeAIWorkloadConfigResponse":{ + "type":"structure", + "required":[ + "AIWorkloadConfigName", + "AIWorkloadConfigArn", + "CreationTime" + ], + "members":{ + "AIWorkloadConfigName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI workload configuration.
" + }, + "AIWorkloadConfigArn":{ + "shape":"AIWorkloadConfigArn", + "documentation":"The Amazon Resource Name (ARN) of the AI workload configuration.
" + }, + "DatasetConfig":{ + "shape":"AIDatasetConfig", + "documentation":"The dataset configuration for the workload.
" + }, + "AIWorkloadConfigs":{ + "shape":"AIWorkloadConfigs", + "documentation":"The benchmark tool configuration and workload specification.
" + }, + "Tags":{ + "shape":"TagList", + "documentation":"The tags associated with the AI workload configuration.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"A timestamp that indicates when the AI workload configuration was created.
" + } + } + }, "DescribeActionRequest":{ "type":"structure", "required":["ActionName"], @@ -20257,7 +17692,8 @@ }, "CertifyForMarketplace":{ "shape":"CertifyForMarketplace", - "documentation":"Whether the algorithm is certified to be listed in Amazon Web Services Marketplace.
" + "documentation":"Whether the algorithm is certified to be listed in Amazon Web Services Marketplace.
", + "box":true } } }, @@ -20294,10 +17730,6 @@ "shape":"KernelGatewayImageConfig", "documentation":"The configuration of a KernelGateway app.
" }, - "SaviturAppImageConfig":{ - "shape":"SaviturAppImageConfig", - "internalonly":true - }, "JupyterLabAppImageConfig":{ "shape":"JupyterLabAppImageConfig", "documentation":"The configuration of the JupyterLab app.
" @@ -20375,7 +17807,8 @@ }, "RecoveryMode":{ "shape":"Boolean", - "documentation":"Indicates whether the application is launched in recovery mode.
" + "documentation":"Indicates whether the application is launched in recovery mode.
", + "box":true }, "LastHealthCheckTimestamp":{ "shape":"Timestamp", @@ -20389,10 +17822,6 @@ "shape":"Timestamp", "documentation":"The creation time of the application.
After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.
The failure reason.
" @@ -20404,10 +17833,6 @@ "BuiltInLifecycleConfigArn":{ "shape":"StudioLifecycleConfigArn", "documentation":"The lifecycle configuration that runs before the default lifecycle configuration
" - }, - "AppLaunchConfiguration":{ - "shape":"AppLaunchConfiguration", - "internalonly":true } } }, @@ -20551,16 +17976,13 @@ }, "GenerateCandidateDefinitionsOnly":{ "shape":"GenerateCandidateDefinitionsOnly", - "documentation":"Indicates whether the output for an AutoML job generates candidate definitions only.
" + "documentation":"Indicates whether the output for an AutoML job generates candidate definitions only.
", + "box":true }, "AutoMLJobArtifacts":{ "shape":"AutoMLJobArtifacts", "documentation":"Returns information on the job's artifacts found in AutoMLJobArtifacts.
Contains ProblemType, AutoMLJobObjective, and CompletionCriteria. If you do not provide these values, they are inferred.
Returns the secondary status of the AutoML job V2.
" }, "AutoMLJobArtifacts":{"shape":"AutoMLJobArtifacts"}, - "ImageUrlOverrides":{ - "shape":"ImageUrlOverrides", - "internalonly":true - }, "ResolvedAttributes":{ "shape":"AutoMLResolvedAttributes", "documentation":"Returns the resolved attributes used by the AutoML job V2.
" @@ -20688,86 +18106,12 @@ "shape":"AutoMLSecurityConfig", "documentation":"Returns the security configuration for traffic encryption or Amazon VPC settings.
" }, - "ExternalFeatureTransformers":{ - "shape":"AutoMLExternalFeatureTransformers", - "internalonly":true - }, "AutoMLComputeConfig":{ "shape":"AutoMLComputeConfig", "documentation":"The compute configuration used for the AutoML job V2.
" } } }, - "DescribeAutoMLTaskRequest":{ - "type":"structure", - "required":["AutoMLTaskArn"], - "members":{ - "AutoMLTaskArn":{"shape":"AutoMLTaskArn"} - } - }, - "DescribeAutoMLTaskResponse":{ - "type":"structure", - "required":[ - "AutoMLJobArn", - "AutoMLTaskArn", - "CandidateName", - "AutoMLTaskType", - "AutoMLTaskStatus", - "CreationTime", - "LastModifiedTime" - ], - "members":{ - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "AutoMLTaskArn":{"shape":"AutoMLTaskArn"}, - "CandidateName":{"shape":"CandidateName"}, - "AutoMLTaskType":{"shape":"AutoMLTaskType"}, - "AutoMLTaskStatus":{"shape":"AutoMLTaskStatus"}, - "CreationTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "FailureReason":{"shape":"AutoMLFailureReason"}, - "AutoMLTaskArtifactsLocation":{"shape":"AutoMLTaskArtifactsLocation"} - } - }, - "DescribeCapacityScheduleRequest":{ - "type":"structure", - "required":["CapacityScheduleName"], - "members":{ - "CapacityScheduleName":{"shape":"CapacityScheduleName"} - } - }, - "DescribeCapacityScheduleResponse":{ - "type":"structure", - "required":[ - "CapacityScheduleArn", - "CapacityScheduleType", - "InstanceType", - "TotalInstanceCount", - "Placement", - "Status", - "RequestedStartTime" - ], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"}, - "OwnerAccountId":{"shape":"AccountId"}, - "CapacityScheduleType":{"shape":"CapacityScheduleType"}, - "InstanceType":{"shape":"CapacityScheduleInstanceType"}, - "TotalInstanceCount":{"shape":"Integer"}, - "AvailableInstanceCount":{"shape":"AvailableInstanceCount"}, - "Placement":{"shape":"Placement"}, - "AvailabilityZone":{"shape":"AvailabilityZone"}, - "Status":{"shape":"CapacityScheduleStatus"}, - "RequestedStartTime":{"shape":"Timestamp"}, - "RequestedEndTime":{"shape":"Timestamp"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "DurationInHours":{"shape":"CapacityScheduleDurationInHours"}, - "CapacityBlockOfferings":{"shape":"CapacityBlockOfferings"}, - "CapacityResources":{"shape":"CapacityResources"}, - "TargetResources":{"shape":"SageMakerResourceNames"}, - "CapacityScheduleStatusTransitions":{"shape":"CapacityScheduleStatusTransitions"} - } - }, "DescribeClusterEventRequest":{ "type":"structure", "required":[ @@ -20794,24 +18138,6 @@ } } }, - "DescribeClusterInferenceRequest":{ - "type":"structure", - "required":["ClusterArn"], - "members":{ - "ClusterArn":{"shape":"ClusterArn"} - } - }, - "DescribeClusterInferenceResponse":{ - "type":"structure", - "required":[ - "ClusterArn", - "Status" - ], - "members":{ - "ClusterArn":{"shape":"ClusterArn"}, - "Status":{"shape":"Status"} - } - }, "DescribeClusterNodeRequest":{ "type":"structure", "required":["ClusterName"], @@ -20891,10 +18217,6 @@ "shape":"ClusterOrchestrator", "documentation":"The type of orchestrator used for the SageMaker HyperPod cluster.
" }, - "ResilienceConfig":{ - "shape":"ClusterResilienceConfig", - "internalonly":true - }, "TieredStorageConfig":{ "shape":"ClusterTieredStorageConfig", "documentation":"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.
" @@ -20914,10 +18236,6 @@ "AutoScaling":{ "shape":"ClusterAutoScalingConfigOutput", "documentation":"The current autoscaling configuration and status for the autoscaler.
" - }, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true } } }, @@ -20931,7 +18249,8 @@ }, "ClusterSchedulerConfigVersion":{ "shape":"Integer", - "documentation":"Version of the cluster policy.
" + "documentation":"Version of the cluster policy.
", + "box":true } } }, @@ -20960,7 +18279,8 @@ }, "ClusterSchedulerConfigVersion":{ "shape":"Integer", - "documentation":"Version of the cluster policy.
" + "documentation":"Version of the cluster policy.
", + "box":true }, "Status":{ "shape":"SchedulerResourceStatus", @@ -20970,6 +18290,10 @@ "shape":"FailureReason", "documentation":"Failure reason of the cluster policy.
" }, + "StatusDetails":{ + "shape":"StatusDetailsMap", + "documentation":"Additional details about the status of the cluster policy. This field provides context when the policy is in a non-active state, such as during creation, updates, or if failures occur.
" + }, "ClusterArn":{ "shape":"ClusterArn", "documentation":"ARN of the cluster where the cluster policy is applied.
" @@ -21125,10 +18449,6 @@ "shape":"OutputConfig", "documentation":"Information about the output location for the compiled model and the target device that the model runs on.
" }, - "ResourceConfig":{ - "shape":"NeoResourceConfig", - "internalonly":true - }, "VpcConfig":{ "shape":"NeoVpcConfig", "documentation":"A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.
" @@ -21149,7 +18469,8 @@ }, "ComputeQuotaVersion":{ "shape":"Integer", - "documentation":"Version of the compute allocation definition.
" + "documentation":"Version of the compute allocation definition.
", + "box":true } } }, @@ -21183,7 +18504,8 @@ }, "ComputeQuotaVersion":{ "shape":"Integer", - "documentation":"Version of the compute allocation definition.
" + "documentation":"Version of the compute allocation definition.
", + "box":true }, "Status":{ "shape":"SchedulerResourceStatus", @@ -21274,37 +18596,6 @@ } } }, - "DescribeCustomMonitoringJobDefinitionRequest":{ - "type":"structure", - "required":["JobDefinitionName"], - "members":{ - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"} - } - }, - "DescribeCustomMonitoringJobDefinitionResponse":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "CustomMonitoringAppSpecification", - "CustomMonitoringJobInput", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "CustomMonitoringAppSpecification":{"shape":"CustomMonitoringAppSpecification"}, - "CustomMonitoringJobInput":{"shape":"CustomMonitoringJobInput"}, - "CustomMonitoringJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - } - }, "DescribeDataQualityJobDefinitionRequest":{ "type":"structure", "required":["JobDefinitionName"], @@ -21482,7 +18773,8 @@ }, "MaxModels":{ "shape":"Integer", - "documentation":"The maximum number of models.
" + "documentation":"The maximum number of models.
", + "box":true }, "NextToken":{ "shape":"NextToken", @@ -21563,10 +18855,6 @@ "shape":"DomainSettings", "documentation":"A collection of Domain settings.
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
The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided.
Indicates whether custom tag propagation is supported for the domain.
" @@ -21625,7 +18909,8 @@ }, "MaxResults":{ "shape":"DeploymentStageMaxResults", - "documentation":"The maximum number of results to select (50 by default).
" + "documentation":"The maximum number of results to select (50 by default).
", + "box":true } } }, @@ -21657,15 +18942,18 @@ }, "EdgeDeploymentSuccess":{ "shape":"Integer", - "documentation":"The number of edge devices with the successful deployment.
" + "documentation":"The number of edge devices with the successful deployment.
", + "box":true }, "EdgeDeploymentPending":{ "shape":"Integer", - "documentation":"The number of edge devices yet to pick up deployment, or in progress.
" + "documentation":"The number of edge devices yet to pick up deployment, or in progress.
", + "box":true }, "EdgeDeploymentFailed":{ "shape":"Integer", - "documentation":"The number of edge devices that failed the deployment.
" + "documentation":"The number of edge devices that failed the deployment.
", + "box":true }, "Stages":{ "shape":"DeploymentStageStatusSummaries", @@ -21824,11 +19112,12 @@ "VpcConfig":{"shape":"VpcConfig"}, "EnableNetworkIsolation":{ "shape":"Boolean", - "documentation":"Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
" + "documentation":"Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
", + "box":true }, "MetricsConfig":{ "shape":"MetricsConfig", - "documentation":"The Configuration parameters for Utilization metrics.
" + "documentation":"The configuration parameters for utilization metrics.
" } } }, @@ -21864,10 +19153,6 @@ "shape":"EndpointConfigName", "documentation":"The name of the endpoint configuration associated with this endpoint.
" }, - "DeletionCondition":{ - "shape":"EndpointDeletionCondition", - "internalonly":true - }, "ProductionVariants":{ "shape":"ProductionVariantSummaryList", "documentation":"An array of ProductionVariantSummary objects, one for each model hosted behind this endpoint.
" @@ -21909,54 +19194,9 @@ "shape":"ProductionVariantSummaryList", "documentation":"An array of ProductionVariantSummary objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants.
The Configuration parameters for Utilization metrics.
" - } - } - }, - "DescribeEvaluationJobRequest":{ - "type":"structure", - "required":["EvaluationJobName"], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"} - } - }, - "DescribeEvaluationJobResponse":{ - "type":"structure", - "required":[ - "EvaluationJobName", - "EvaluationJobArn", - "CreationTime", - "EvaluationJobStatus", - "OutputDataConfig", - "RoleArn", - "EvaluationMethod", - "InputDataConfig", - "EvaluationConfig" - ], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"}, - "EvaluationJobArn":{"shape":"EvaluationJobArn"}, - "CreationTime":{"shape":"Timestamp"}, - "FailureReason":{"shape":"FailureReason"}, - "EvaluationJobStatus":{"shape":"EvaluationJobStatus"}, - "Description":{"shape":"EvaluationJobDescription"}, - "Tags":{"shape":"TagList"}, - "OutputDataConfig":{"shape":"EvaluationJobOutputDataConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "EvaluationMethod":{"shape":"EvaluationJobEvaluationMethod"}, - "ModelConfig":{"shape":"EvaluationJobModelConfig"}, - "InputDataConfig":{"shape":"EvaluationJobInputDataConfig"}, - "EvaluationConfig":{"shape":"EvaluationJobEvaluationConfig"}, - "JobId":{"shape":"EvaluationJobId"}, - "UpstreamPlatformConfig":{ - "shape":"EvaluationJobUpstreamPlatformConfig", - "internalonly":true + "documentation":"The configuration parameters for utilization metrics.
" } } }, @@ -22102,29 +19342,9 @@ "shape":"NextToken", "documentation":"A token to resume pagination of the list of Features (FeatureDefinitions).
The size of the OnlineStore in bytes.
The Amazon Resource Number (ARN) of the feature group that contains the feature.
" }, - "FeatureIdentifier":{ - "shape":"FeatureIdentifier", - "internalonly":true - }, "FeatureGroupName":{ "shape":"FeatureGroupName", "documentation":"The name of the feature group that you've specified.
" @@ -22243,10 +19459,6 @@ "shape":"HumanLoopConfig", "documentation":"An object containing information about who works on the task, the workforce task price, and other task details.
" }, - "WorkflowSteps":{ - "shape":"WorkflowSteps", - "internalonly":true - }, "OutputConfig":{ "shape":"FlowDefinitionOutputConfig", "documentation":"An object containing information about the output file.
" @@ -22255,114 +19467,12 @@ "shape":"RoleArn", "documentation":"The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) execution role for the flow definition.
" }, - "TaskRenderingRoleArn":{ - "shape":"RoleArn", - "internalonly":true - }, - "KmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - }, "FailureReason":{ "shape":"FailureReason", "documentation":"The reason your flow definition failed.
" } } }, - "DescribeGroundTruthJobRequest":{ - "type":"structure", - "required":[ - "GroundTruthProjectName", - "GroundTruthWorkflowName", - "GroundTruthJobName" - ], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"}, - "GroundTruthJobName":{"shape":"GroundTruthJobName"} - } - }, - "DescribeGroundTruthJobResponse":{ - "type":"structure", - "required":[ - "GroundTruthProjectArn", - "GroundTruthWorkflowArn", - "GroundTruthJobArn", - "GroundTruthJobName", - "GroundTruthJobStatus", - "InputConfig", - "OutputConfig", - "CreatedAt" - ], - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthWorkflowArn":{"shape":"GroundTruthWorkflowArn"}, - "GroundTruthJobDescription":{"shape":"GroundTruthJobDescription"}, - "GroundTruthJobArn":{"shape":"GroundTruthJobArn"}, - "GroundTruthJobName":{"shape":"GroundTruthJobName"}, - "GroundTruthJobStatus":{"shape":"GroundTruthJobStatus"}, - "InputConfig":{"shape":"GroundTruthJobInputConfig"}, - "OutputConfig":{"shape":"GroundTruthJobOutputConfig"}, - "FailureReason":{"shape":"GroundTruthJobFailureReason"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, - "DescribeGroundTruthProjectRequest":{ - "type":"structure", - "required":["GroundTruthProjectName"], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"} - } - }, - "DescribeGroundTruthProjectResponse":{ - "type":"structure", - "required":[ - "GroundTruthProjectArn", - "GroundTruthProjectName", - "GroundTruthProjectDescription", - "PointOfContact", - "GroundTruthProjectStatus", - "CreatedAt" - ], - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthProjectDescription":{"shape":"GroundTruthProjectDescription"}, - "PointOfContact":{"shape":"GroundTruthProjectPointOfContact"}, - "GroundTruthProjectStatus":{"shape":"GroundTruthProjectStatus"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, - "DescribeGroundTruthWorkflowRequest":{ - "type":"structure", - "required":[ - "GroundTruthProjectName", - "GroundTruthWorkflowName" - ], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"} - } - }, - "DescribeGroundTruthWorkflowResponse":{ - "type":"structure", - "required":[ - "GroundTruthProjectArn", - "GroundTruthWorkflowArn", - "GroundTruthWorkflowName", - "GroundTruthWorkflowDefinitionSpec", - "ExecutionRoleArn", - "CreatedAt" - ], - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthWorkflowArn":{"shape":"GroundTruthWorkflowArn"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"}, - "GroundTruthWorkflowDefinitionSpec":{"shape":"GroundTruthWorkflowDefinitionSpec"}, - "ExecutionRoleArn":{"shape":"RoleArn"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, "DescribeHubContentRequest":{ "type":"structure", "required":[ @@ -22583,11 +19693,7 @@ "shape":"Timestamp", "documentation":"The timestamp when the human task user interface was created.
" }, - "UiTemplate":{"shape":"UiTemplateInfo"}, - "KmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - } + "UiTemplate":{"shape":"UiTemplateInfo"} } }, "DescribeHyperParameterTuningJobRequest":{ @@ -22676,10 +19782,6 @@ "shape":"FailureReason", "documentation":"If the tuning job failed, the reason it failed.
" }, - "TuningJobCompletionReason":{ - "shape":"TuningJobCompletionReason", - "internalonly":true - }, "TuningJobCompletionDetails":{ "shape":"HyperParameterTuningJobCompletionDetails", "documentation":"Tuning job completion information returned as the response from a hyperparameter tuning job. This information tells if your tuning job has or has not converged. It also includes the number of training jobs that have not improved model performance as evaluated against the objective function.
" @@ -22817,15 +19919,8 @@ }, "Horovod":{ "shape":"Horovod", - "documentation":"Indicates Horovod compatibility.
" - }, - "OverrideAliasImageVersion":{ - "shape":"OverrideAliasImageVersion", - "internalonly":true - }, - "SociImage":{ - "shape":"SociImage", - "internalonly":true + "documentation":"Indicates Horovod compatibility.
", + "box":true }, "ReleaseNotes":{ "shape":"ReleaseNotes", @@ -23062,10 +20157,6 @@ "shape":"RecommendationJobStoppingConditions", "documentation":"The stopping conditions that you provided when you initiated the job.
" }, - "EndpointConfigurationTuning":{ - "shape":"RecommendationJobEndpointConfigurationTuning", - "internalonly":true - }, "InferenceRecommendations":{ "shape":"InferenceRecommendations", "documentation":"The recommendations made by Inference Recommender.
" @@ -23073,34 +20164,9 @@ "EndpointPerformances":{ "shape":"EndpointPerformances", "documentation":"The performance results from running an Inference Recommender job on an existing endpoint.
" - }, - "OutputConfig":{ - "shape":"RecommendationJobOutputConfig", - "internalonly":true } } }, - "DescribeInternalRequest":{ - "type":"structure", - "required":[ - "Arn", - "ExpectedObjectFullyQualifiedClassName" - ], - "members":{ - "Arn":{"shape":"String"}, - "ExpectedObjectFullyQualifiedClassName":{"shape":"String"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "DescribeInternalResponse":{ - "type":"structure", - "members":{ - "Arn":{"shape":"String"}, - "ObjectFullyQualifiedClassName":{"shape":"String"}, - "ObjectJson":{"shape":"String"}, - "AdditionalProperties":{"shape":"MapString256"} - } - }, "DescribeLabelingJobRequest":{ "type":"structure", "required":["LabelingJobName"], @@ -23175,10 +20241,6 @@ "shape":"RoleArn", "documentation":"The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during data labeling.
" }, - "TaskRenderingRoleArn":{ - "shape":"RoleArn", - "internalonly":true - }, "LabelCategoryConfigS3Uri":{ "shape":"S3Uri", "documentation":"The S3 location of the JSON file that defines the categories used to label data objects. Please note the following label-category limits:
Semantic segmentation labeling jobs using automated labeling: 20 labels
Box bounding labeling jobs (all): 10 labels
The file is a JSON structure in the following format:
{
\"document-version\": \"2018-11-28\"
\"labels\": [
{
\"label\": \"label 1\"
},
{
\"label\": \"label 2\"
},
...
{
\"label\": \"label n\"
}
]
}
The ARN of the MLflow App for which to get information.
" + } } }, "DescribeMlflowAppResponse":{ "type":"structure", "members":{ - "Arn":{"shape":"MlflowAppArn"}, - "Name":{"shape":"MlflowAppName"}, - "ArtifactStoreUri":{"shape":"S3Uri"}, - "MlflowVersion":{"shape":"MlflowVersion"}, - "RoleArn":{"shape":"RoleArn"}, - "Status":{"shape":"MlflowAppStatus"}, - "Url":{"shape":"MlflowAppUrl"}, - "ModelRegistrationMode":{"shape":"ModelRegistrationMode"}, - "AccountDefaultStatus":{"shape":"AccountDefaultStatus"}, - "DefaultDomainIdList":{"shape":"DefaultDomainIdList"}, - "CreationTime":{"shape":"Timestamp"}, + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the MLflow App.
" + }, + "Name":{ + "shape":"MlflowAppName", + "documentation":"The name of the MLflow App.
" + }, + "ArtifactStoreUri":{ + "shape":"S3Uri", + "documentation":"The S3 URI of the general purpose bucket used as the MLflow App artifact store.
" + }, + "MlflowVersion":{ + "shape":"MlflowVersion", + "documentation":"The MLflow version used.
" + }, + "RoleArn":{ + "shape":"RoleArn", + "documentation":"The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3.
" + }, + "Status":{ + "shape":"MlflowAppStatus", + "documentation":"The current creation status of the described MLflow App.
" + }, + "ModelRegistrationMode":{ + "shape":"ModelRegistrationMode", + "documentation":"Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled.
" + }, + "AccountDefaultStatus":{ + "shape":"AccountDefaultStatus", + "documentation":"Indicates whether this MLflow app is the default for the entire account.
" + }, + "DefaultDomainIdList":{ + "shape":"DefaultDomainIdList", + "documentation":"List of SageMaker Domain IDs for which this MLflow App is the default.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"The timestamp when the MLflow App was created.
" + }, "CreatedBy":{"shape":"UserContext"}, - "LastModifiedTime":{"shape":"Timestamp"}, + "LastModifiedTime":{ + "shape":"Timestamp", + "documentation":"The timestamp when the MLflow App was last modified.
" + }, "LastModifiedBy":{"shape":"UserContext"}, - "WeeklyMaintenanceWindowStart":{"shape":"WeeklyMaintenanceWindowStart"}, - "MaintenanceStatus":{"shape":"MaintenanceStatus"} + "WeeklyMaintenanceWindowStart":{ + "shape":"WeeklyMaintenanceWindowStart", + "documentation":"The day and time of the week when weekly maintenance occurs.
" + }, + "MaintenanceStatus":{ + "shape":"MaintenanceStatus", + "documentation":"Current maintenance status of the MLflow App.
" + } } }, "DescribeMlflowTrackingServerRequest":{ @@ -23333,7 +20436,8 @@ }, "AutomaticModelRegistration":{ "shape":"Boolean", - "documentation":"Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled.
" + "documentation":"Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled.
", + "box":true }, "CreationTime":{ "shape":"Timestamp", @@ -23345,9 +20449,14 @@ "documentation":"The timestamp of when the described MLflow Tracking Server was last modified.
" }, "LastModifiedBy":{"shape":"UserContext"}, - "UpgradeRollbackVersionDetails":{ - "shape":"UpgradeRollbackVersionDetails", - "internalonly":true + "S3BucketOwnerAccountId":{ + "shape":"AccountId", + "documentation":"Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage.
" + }, + "S3BucketOwnerVerification":{ + "shape":"Boolean", + "documentation":"Whether Amazon S3 Bucket Ownership checks are enabled whenever the tracking server interacts with Amazon Amazon S3.
", + "box":true } } }, @@ -23452,7 +20561,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"The version of the model card that the model export job exports.
" + "documentation":"The version of the model card that the model export job exports.
", + "box":true }, "OutputConfig":{ "shape":"ModelCardExportOutputConfig", @@ -23486,7 +20596,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.
" + "documentation":"The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.
", + "box":true } } }, @@ -23512,7 +20623,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"The version of the model card.
" + "documentation":"The version of the model card.
", + "box":true }, "Content":{ "shape":"ModelCardContent", @@ -23654,7 +20766,8 @@ }, "EnableNetworkIsolation":{ "shape":"Boolean", - "documentation":"If True, no inbound or outbound network calls can be made to or from the model container.
If True, no inbound or outbound network calls can be made to or from the model container.
The package registration type of the model package output.
" }, "ModelPackageArn":{ "shape":"ModelPackageArn", @@ -23775,7 +20888,8 @@ }, "CertifyForMarketplace":{ "shape":"CertifyForMarketplace", - "documentation":"Whether the model package is certified for listing on Amazon Web Services Marketplace.
" + "documentation":"Whether the model package is certified for listing on Amazon Web Services Marketplace.
", + "box":true }, "ModelApprovalStatus":{ "shape":"ModelApprovalStatus", @@ -23787,10 +20901,6 @@ "shape":"ModelMetrics", "documentation":"Metrics for the model.
" }, - "DeploymentSpecification":{ - "shape":"DeploymentSpecification", - "internalonly":true - }, "LastModifiedTime":{ "shape":"Timestamp", "documentation":"The last time that the model package was modified.
" @@ -23812,10 +20922,6 @@ "shape":"String", "documentation":"The Amazon Simple Storage Service (Amazon S3) path where the sample payload are stored. This path points to a single gzip compressed tar archive (.tar.gz suffix).
" }, - "SamplePayloadContentType":{ - "shape":"String", - "internalonly":true - }, "CustomerMetadataProperties":{ "shape":"CustomerMetadataMap", "documentation":"The metadata properties associated with the model package versions.
" @@ -23910,37 +21016,6 @@ "StoppingCondition":{"shape":"MonitoringStoppingCondition"} } }, - "DescribeMonitoringExecutionRequest":{ - "type":"structure", - "required":["MonitoringExecutionId"], - "members":{ - "MonitoringExecutionId":{"shape":"MonitoringExecutionId"} - } - }, - "DescribeMonitoringExecutionResponse":{ - "type":"structure", - "required":[ - "MonitoringExecutionId", - "MonitoringScheduleName", - "ScheduledTime", - "CreationTime", - "LastModifiedTime", - "MonitoringExecutionStatus" - ], - "members":{ - "MonitoringExecutionId":{"shape":"MonitoringExecutionId"}, - "MonitoringScheduleName":{"shape":"MonitoringScheduleName"}, - "ScheduledTime":{"shape":"Timestamp"}, - "CreationTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "MonitoringExecutionStatus":{"shape":"ExecutionStatus"}, - "ProcessingJobArn":{"shape":"ProcessingJobArn"}, - "EndpointName":{"shape":"EndpointName"}, - "MonitoringJobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "MonitoringType":{"shape":"MonitoringType"}, - "FailureReason":{"shape":"FailureReason"} - } - }, "DescribeMonitoringScheduleRequest":{ "type":"structure", "required":["MonitoringScheduleName"], @@ -24001,30 +21076,6 @@ "LastMonitoringExecutionSummary":{ "shape":"MonitoringExecutionSummary", "documentation":"Describes metadata on the last execution to run, if there was one.
" - }, - "CustomMonitoringJobDefinition":{ - "shape":"CustomMonitoringJobDefinition", - "internalonly":true - }, - "DataQualityJobDefinition":{ - "shape":"DataQualityJobDefinition", - "internalonly":true - }, - "ModelQualityJobDefinition":{ - "shape":"ModelQualityJobDefinition", - "internalonly":true - }, - "ModelBiasJobDefinition":{ - "shape":"ModelBiasJobDefinition", - "internalonly":true - }, - "ModelExplainabilityJobDefinition":{ - "shape":"ModelExplainabilityJobDefinition", - "internalonly":true - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } } }, @@ -24246,7 +21297,7 @@ }, "MaxInstanceCount":{ "shape":"OptimizationJobMaxInstanceCount", - "internalonly":true + "documentation":"The maximum number of instances to use for the optimization job.
" }, "OptimizationConfigs":{ "shape":"OptimizationConfigs", @@ -24281,7 +21332,8 @@ }, "IncludeAvailableUpgrade":{ "shape":"Boolean", - "documentation":"When set to TRUE, the response includes available upgrade information for the SageMaker Partner AI App. Default is FALSE.
When set to TRUE, the response includes available upgrade information for the SageMaker Partner AI App. Default is FALSE.
The Amazon Web Services KMS customer managed key used to encrypt the data at rest associated with SageMaker Partner AI Apps.
" }, - "SdkUrl":{ - "shape":"String2048", - "internalonly":true - }, "BaseUrl":{ "shape":"String2048", "documentation":"The URL of the SageMaker Partner AI App that the Application SDK uses to support in-app calls for the user.
" @@ -24350,7 +21398,8 @@ }, "EnableIamSessionBasedIdentity":{ "shape":"Boolean", - "documentation":"When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.
When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user.
Indicates whether the SageMaker Partner AI App is configured for automatic minor version upgrades during scheduled maintenance windows.
" + "documentation":"Indicates whether the SageMaker Partner AI App is configured for automatic minor version upgrades during scheduled maintenance windows.
", + "box":true }, "CurrentVersionEolDate":{ "shape":"Timestamp", @@ -24370,31 +21420,6 @@ } } }, - "DescribePersistentVolumeRequest":{ - "type":"structure", - "required":[ - "PersistentVolumeName", - "DomainId" - ], - "members":{ - "PersistentVolumeName":{"shape":"PersistentVolumeName"}, - "DomainId":{"shape":"DomainId"} - } - }, - "DescribePersistentVolumeResponse":{ - "type":"structure", - "members":{ - "PersistentVolumeArn":{"shape":"PersistentVolumeArn"}, - "PersistentVolumeName":{"shape":"PersistentVolumeName"}, - "DomainId":{"shape":"DomainId"}, - "Status":{"shape":"PersistentVolumeStatus"}, - "PersistentVolumeConfiguration":{"shape":"PersistentVolumeConfiguration"}, - "OwningEntityArn":{"shape":"OwningEntityArn"}, - "CreationTime":{"shape":"CreationTime"}, - "LastModifiedTime":{"shape":"LastModifiedTime"}, - "FailureReason":{"shape":"FailureReason"} - } - }, "DescribePipelineDefinitionForExecutionRequest":{ "type":"structure", "required":["PipelineExecutionArn"], @@ -24480,7 +21505,7 @@ }, "MLflowConfig":{ "shape":"MLflowConfiguration", - "internalonly":true + "documentation":"The MLflow configuration of the pipeline execution.
" } } }, @@ -24650,14 +21675,6 @@ "shape":"Timestamp", "documentation":"The time at which the processing job was created.
" }, - "LastModifiedBy":{ - "shape":"UserContext", - "internalonly":true - }, - "CreatedBy":{ - "shape":"UserContext", - "internalonly":true - }, "MonitoringScheduleArn":{ "shape":"MonitoringScheduleArn", "documentation":"The ARN of a monitoring schedule for an endpoint associated with this processing job.
" @@ -24736,51 +21753,6 @@ "LastModifiedBy":{"shape":"UserContext"} } }, - "DescribeQuotaAllocationRequest":{ - "type":"structure", - "required":["QuotaAllocationArn"], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"}, - "QuotaAllocationVersion":{"shape":"Integer"} - } - }, - "DescribeQuotaAllocationResponse":{ - "type":"structure", - "required":[ - "QuotaAllocationArn", - "QuotaId", - "QuotaAllocationName", - "QuotaAllocationVersion", - "QuotaAllocationStatus", - "ClusterArn", - "QuotaResources", - "OverQuota", - "PreemptionConfig", - "ActivationState", - "QuotaAllocationTarget", - "CreationTime", - "CreatedBy" - ], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"}, - "QuotaId":{"shape":"QuotaId"}, - "QuotaAllocationName":{"shape":"EntityName"}, - "QuotaAllocationVersion":{"shape":"Integer"}, - "QuotaAllocationStatus":{"shape":"SchedulerResourceStatus"}, - "FailureReason":{"shape":"FailureReason"}, - "ClusterArn":{"shape":"ClusterArn"}, - "QuotaResources":{"shape":"QuotaResourceConfigList"}, - "OverQuota":{"shape":"OverQuota"}, - "PreemptionConfig":{"shape":"PreemptionConfig"}, - "ActivationState":{"shape":"ActivationStateV1"}, - "QuotaAllocationTarget":{"shape":"QuotaAllocationTarget"}, - "QuotaAllocationDescription":{"shape":"EntityDescription"}, - "CreationTime":{"shape":"Timestamp"}, - "CreatedBy":{"shape":"UserContext"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "LastModifiedBy":{"shape":"UserContext"} - } - }, "DescribeReservedCapacityRequest":{ "type":"structure", "required":["ReservedCapacityArn"], @@ -24853,60 +21825,6 @@ } } }, - "DescribeSharedModelRequest":{ - "type":"structure", - "required":[ - "SharedModelId", - "SharedModelVersion" - ], - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - } - } - }, - "DescribeSharedModelResponse":{ - "type":"structure", - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - }, - "Owner":{ - "shape":"UserProfileName", - "internalonly":true - }, - "Creator":{ - "shape":"UserProfileName", - "internalonly":true - }, - "ModelArtifacts":{ - "shape":"SharedModelArtifacts", - "internalonly":true - }, - "Comments":{ - "shape":"Comments", - "internalonly":true - }, - "ModelName":{ - "shape":"SharedModelName", - "internalonly":true - }, - "Origin":{ - "shape":"Origin", - "internalonly":true - } - } - }, "DescribeSpaceRequest":{ "type":"structure", "required":[ @@ -25070,10 +21988,6 @@ "shape":"TrainingJobArn", "documentation":"The Amazon Resource Name (ARN) of the training job.
" }, - "ProcessingJobArn":{ - "shape":"ProcessingJobArn", - "internalonly":true - }, "TuningJobArn":{ "shape":"HyperParameterTuningJobArn", "documentation":"The Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job.
" @@ -25090,18 +22004,13 @@ "shape":"ModelArtifacts", "documentation":"Information about the Amazon S3 location that is configured for storing model artifacts.
" }, - "TrainingJobOutput":{ - "shape":"TrainingJobOutput", - "documentation":"Information about the S3 location that is configured for storing optional output.
", - "internalonly":true - }, "TrainingJobStatus":{ "shape":"TrainingJobStatus", "documentation":"The status of the training job.
SageMaker provides the following training job statuses:
InProgress - The training is in progress.
Completed - The training job has completed.
Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call.
Stopping - The training job is stopping.
Stopped - The training job has stopped.
For more detailed information, see SecondaryStatus.
Provides detailed information about the state of the training job. For detailed information on the secondary status of the training job, see StatusMessage under SecondaryStatusTransition.
SageMaker provides primary statuses and secondary statuses that apply to each of them:
Starting - Starting the training job.
Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes.
Training - Training is in progress.
Interrupted - The job stopped because the managed spot training instances were interrupted.
Uploading - Training is complete and the model artifacts are being uploaded to the S3 location.
Completed - The training job has completed.
Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse.
MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime.
MaxWaitTimeExceeded - The job stopped because it exceeded the maximum allowed wait time.
Stopped - The training job has stopped.
Stopping - Stopping the training job.
Valid values for SecondaryStatus are subject to change.
We no longer support the following secondary statuses:
LaunchingMLInstances
PreparingTraining
DownloadingTrainingImage
Provides detailed information about the state of the training job. For detailed information on the secondary status of the training job, see StatusMessage under SecondaryStatusTransition.
SageMaker provides primary statuses and secondary statuses that apply to each of them:
Starting - Starting the training job.
Pending - The training job is waiting for compute capacity or compute resource provision.
Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes.
Training - Training is in progress.
Interrupted - The job stopped because the managed spot training instances were interrupted.
Uploading - Training is complete and the model artifacts are being uploaded to the S3 location.
Completed - The training job has completed.
Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse.
MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime.
MaxWaitTimeExceeded - The job stopped because it exceeded the maximum allowed wait time.
Stopped - The training job has stopped.
Stopping - Stopping the training job.
Valid values for SecondaryStatus are subject to change.
We no longer support the following secondary statuses:
LaunchingMLInstances
PreparingTraining
DownloadingTrainingImage
If you want to allow inbound or outbound network calls, except for calls between peers within a training cluster for distributed training, choose True. 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.
If you want to allow inbound or outbound network calls, except for calls between peers within a training cluster for distributed training, choose True. 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.
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 algorithms in distributed training.
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 algorithms in distributed training.
A Boolean indicating whether managed spot training is enabled (True) or not (False).
A Boolean indicating whether managed spot training is enabled (True) or not (False).
The billable token count for eligible serverless training jobs.
" }, "DebugHookConfig":{"shape":"DebugHookConfig"}, "ExperimentConfig":{"shape":"ExperimentConfig"}, @@ -25203,10 +22115,6 @@ "shape":"DebugRuleEvaluationStatuses", "documentation":"Evaluation status of Amazon SageMaker Debugger rules for debugging on a training job.
" }, - "UpstreamPlatformConfig":{ - "shape":"UpstreamPlatformConfig", - "internalonly":true - }, "ProfilerConfig":{"shape":"ProfilerConfig"}, "ProfilerRuleConfigurations":{ "shape":"ProfilerRuleConfigurations", @@ -25228,61 +22136,69 @@ "shape":"RetryStrategy", "documentation":"The number of times to retry the job when the job fails due to an InternalServerError.
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.
" }, - "ResourceTags":{ - "shape":"ResourceTags", - "internalonly":true - }, "InfraCheckConfig":{ "shape":"InfraCheckConfig", "documentation":"Contains information about the infrastructure health check configuration for the training job.
" }, "ServerlessJobConfig":{ "shape":"ServerlessJobConfig", - "internalonly":true + "documentation":"The configuration for serverless training jobs.
" }, "MlflowConfig":{ "shape":"MlflowConfig", - "internalonly":true + "documentation":"The MLflow configuration using SageMaker managed MLflow.
" }, "ModelPackageConfig":{ "shape":"ModelPackageConfig", - "internalonly":true + "documentation":"The configuration for the model package.
" }, "MlflowDetails":{ "shape":"MlflowDetails", - "internalonly":true + "documentation":"The MLflow details of this job.
" }, "ProgressInfo":{ "shape":"TrainingProgressInfo", - "internalonly":true + "documentation":"The Serverless training job progress information.
" }, "OutputModelPackageArn":{ "shape":"ModelPackageArn", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the output model package containing model weights or checkpoints.
" + } + } + }, + "DescribeTrainingPlanExtensionHistoryRequest":{ + "type":"structure", + "required":["TrainingPlanArn"], + "members":{ + "TrainingPlanArn":{ + "shape":"TrainingPlanArn", + "documentation":"The Amazon Resource Name (ARN); of the training plan to retrieve extension history for.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"A token to continue pagination if more results are available.
" + }, + "MaxResults":{ + "shape":"MaxResults", + "documentation":"The maximum number of extensions to return in the response.
" + } + } + }, + "DescribeTrainingPlanExtensionHistoryResponse":{ + "type":"structure", + "required":["TrainingPlanExtensions"], + "members":{ + "TrainingPlanExtensions":{ + "shape":"TrainingPlanExtensions", + "documentation":"A list of extensions for the specified training plan.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"A token to continue pagination if more results are available.
" } } }, @@ -25370,15 +22286,11 @@ }, "TargetResources":{ "shape":"SageMakerResourceNames", - "documentation":"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.
The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) 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.
A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment.
The list of Reserved Capacity providing the underlying compute resources of the plan.
" - }, - "TrainingPlanStatusTransitions":{ - "shape":"TrainingPlanStatusTransitions", - "internalonly":true } } }, @@ -25480,20 +22392,8 @@ "shape":"AutoMLJobArn", "documentation":"The Amazon Resource Name (ARN) of the AutoML transform job.
" }, - "TransformJobProgress":{ - "shape":"TransformJobProgress", - "internalonly":true - }, "DataProcessing":{"shape":"DataProcessing"}, - "ExperimentConfig":{"shape":"ExperimentConfig"}, - "LastModifiedBy":{ - "shape":"UserContext", - "internalonly":true - }, - "CreatedBy":{ - "shape":"UserContext", - "internalonly":true - } + "ExperimentConfig":{"shape":"ExperimentConfig"} } }, "DescribeTrialComponentRequest":{ @@ -25692,10 +22592,6 @@ "shape":"String256", "documentation":"The IAM Identity Center user value.
" }, - "UserPolicy":{ - "shape":"String2048", - "internalonly":true - }, "UserSettings":{ "shape":"UserSettings", "documentation":"A collection of settings.
" @@ -25800,10 +22696,6 @@ "VolumeId":{ "shape":"VolumeId", "documentation":"The unique identifier of your EBS volume that you want to detach. Your volume must be currently attached to the specified node.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -26025,7 +22917,8 @@ }, "Percentage":{ "shape":"Percentage", - "documentation":"Percentage of devices in the fleet to deploy to the current stage.
" + "documentation":"Percentage of devices in the fleet to deploy to the current stage.
", + "box":true }, "DeviceNames":{ "shape":"DeviceNames", @@ -26047,11 +22940,13 @@ "members":{ "ConnectedDeviceCount":{ "shape":"Long", - "documentation":"The number of devices connected with a heartbeat.
" + "documentation":"The number of devices connected with a heartbeat.
", + "box":true }, "RegisteredDeviceCount":{ "shape":"Long", - "documentation":"The number of registered devices.
" + "documentation":"The number of registered devices.
", + "box":true } }, "documentation":"Status of devices.
" @@ -26155,7 +23050,6 @@ "min":0, "pattern":".*" }, - "DisableModelUpload":{"type":"boolean"}, "DisableProfiler":{"type":"boolean"}, "DisableSagemakerServicecatalogPortfolioInput":{ "type":"structure", @@ -26228,48 +23122,6 @@ "max":2, "min":0 }, - "Domain":{ - "type":"structure", - "members":{ - "DomainArn":{"shape":"DomainArn"}, - "DomainId":{"shape":"DomainId"}, - "DomainName":{"shape":"DomainName"}, - "HomeEfsFileSystemId":{"shape":"ResourceId"}, - "SingleSignOnManagedApplicationInstanceId":{"shape":"String256"}, - "SingleSignOnApplicationArn":{"shape":"SingleSignOnApplicationArn"}, - "Status":{"shape":"DomainStatus"}, - "CreationTime":{"shape":"CreationTime"}, - "LastModifiedTime":{"shape":"LastModifiedTime"}, - "FailureReason":{"shape":"FailureReason"}, - "SecurityGroupIdForDomainBoundary":{"shape":"SecurityGroupId"}, - "AuthMode":{"shape":"AuthMode"}, - "DefaultUserSettings":{"shape":"UserSettings"}, - "DomainSettings":{"shape":"DomainSettings"}, - "AppNetworkAccess":{ - "shape":"AppNetworkAccess", - "internalonly":true - }, - "AppNetworkAccessType":{"shape":"AppNetworkAccessType"}, - "HomeEfsFileSystemKmsKeyId":{ - "shape":"KmsKeyId", - "deprecated":true, - "deprecatedMessage":"This property is deprecated, use KmsKeyId instead." - }, - "SubnetIds":{"shape":"Subnets"}, - "Url":{"shape":"String1024"}, - "VpcId":{"shape":"VpcId"}, - "KmsKeyId":{"shape":"KmsKeyId"}, - "AppSecurityGroupManagement":{"shape":"AppSecurityGroupManagement"}, - "AppStorageType":{ - "shape":"AppStorageType", - "internalonly":true - }, - "TagPropagation":{"shape":"TagPropagation"}, - "DefaultSpaceSettings":{"shape":"DefaultSpaceSettings"}, - "Tags":{"shape":"TagList"} - }, - "internalonly":true - }, "DomainArn":{ "type":"string", "max":256, @@ -26312,6 +23164,7 @@ }, "DomainId":{ "type":"string", + "documentation":"Types duplicated from IronmanApiServiceModel for federation. These types are defined in other service directories and are not available via IronmanApiServiceCommonModel.
", "max":63, "min":0, "pattern":"d-(-*[a-z0-9]){1,61}" @@ -26339,10 +23192,6 @@ "shape":"DomainSecurityGroupIds", "documentation":"The security groups for the Amazon Virtual Private Cloud that the Domain uses for communication between Domain-level apps and user apps.
A collection of settings that configure the RStudioServerPro Domain-level app.
Represents the drift check model quality baselines that can be used when the model monitor is set using the model package.
" }, - "DryRun":{"type":"boolean"}, - "DryRunOperation":{ - "type":"structure", - "members":{ - "ErrorCode":{"shape":"String"}, - "Message":{"shape":"FailureReason"} - }, - "exception":true, - "internalonly":true - }, "DynamicScalingConfiguration":{ "type":"structure", "members":{ "MinCapacity":{ "shape":"Integer", - "documentation":"The recommended minimum capacity to specify for your autoscaling policy.
" + "documentation":"The recommended minimum capacity to specify for your autoscaling policy.
", + "box":true }, "MaxCapacity":{ "shape":"Integer", - "documentation":"The recommended maximum capacity to specify for your autoscaling policy.
" + "documentation":"The recommended maximum capacity to specify for your autoscaling policy.
", + "box":true }, "ScaleInCooldown":{ "shape":"Integer", - "documentation":"The recommended scale in cooldown time for your autoscaling policy.
" + "documentation":"The recommended scale in cooldown time for your autoscaling policy.
", + "box":true }, "ScaleOutCooldown":{ "shape":"Integer", - "documentation":"The recommended scale out cooldown time for your autoscaling policy.
" + "documentation":"The recommended scale out cooldown time for your autoscaling policy.
", + "box":true }, "ScalingPolicies":{ "shape":"ScalingPolicies", @@ -26547,12 +23390,6 @@ }, "documentation":"An object with the recommended values for you to specify when creating an autoscaling policy.
" }, - "DynamoDBTableName":{ - "type":"string", - "max":255, - "min":3, - "pattern":"[a-zA-Z0-9_.-]+" - }, "EFSFileSystem":{ "type":"structure", "required":["FileSystemId"], @@ -26635,12 +23472,6 @@ "documentation":"The EC2 capacity reservations that are shared to an ML capacity reservation.
" }, "Ec2CapacityReservationId":{"type":"string"}, - "Ec2CapacityReservationsIdList":{ - "type":"list", - "member":{"shape":"Ec2CapacityReservationId"}, - "max":1, - "min":0 - }, "Ec2CapacityReservationsList":{ "type":"list", "member":{"shape":"Ec2CapacityReservation"} @@ -26731,15 +23562,18 @@ }, "EdgeDeploymentSuccess":{ "shape":"Integer", - "documentation":"The number of edge devices with the successful deployment.
" + "documentation":"The number of edge devices with the successful deployment.
", + "box":true }, "EdgeDeploymentPending":{ "shape":"Integer", - "documentation":"The number of edge devices yet to pick up the deployment, or in progress.
" + "documentation":"The number of edge devices yet to pick up the deployment, or in progress.
", + "box":true }, "EdgeDeploymentFailed":{ "shape":"Integer", - "documentation":"The number of edge devices that failed the deployment.
" + "documentation":"The number of edge devices that failed the deployment.
", + "box":true }, "CreationTime":{ "shape":"Timestamp", @@ -26767,15 +23601,18 @@ }, "EdgeDeploymentSuccessInStage":{ "shape":"Integer", - "documentation":"The number of edge devices with the successful deployment in the current stage.
" + "documentation":"The number of edge devices with the successful deployment in the current stage.
", + "box":true }, "EdgeDeploymentPendingInStage":{ "shape":"Integer", - "documentation":"The number of edge devices yet to pick up the deployment in current stage, or in progress.
" + "documentation":"The number of edge devices yet to pick up the deployment in current stage, or in progress.
", + "box":true }, "EdgeDeploymentFailedInStage":{ "shape":"Integer", - "documentation":"The number of edge devices that failed the deployment in current stage.
" + "documentation":"The number of edge devices that failed the deployment in current stage.
", + "box":true }, "EdgeDeploymentStatusMessage":{ "shape":"String", @@ -26835,19 +23672,23 @@ }, "OfflineDeviceCount":{ "shape":"Long", - "documentation":"The number of devices that have this model version and do not have a heart beat.
" + "documentation":"The number of devices that have this model version and do not have a heart beat.
", + "box":true }, "ConnectedDeviceCount":{ "shape":"Long", - "documentation":"The number of devices that have this model version and have a heart beat.
" + "documentation":"The number of devices that have this model version and have a heart beat.
", + "box":true }, "ActiveDeviceCount":{ "shape":"Long", - "documentation":"The number of devices that have this model version, a heart beat, and are currently running.
" + "documentation":"The number of devices that have this model version, a heart beat, and are currently running.
", + "box":true }, "SamplingDeviceCount":{ "shape":"Long", - "documentation":"The number of devices with this model version and are producing sample data.
" + "documentation":"The number of devices with this model version and are producing sample data.
", + "box":true } }, "documentation":"Status of edge devices with this model.
" @@ -27038,12 +23879,6 @@ "type":"list", "member":{"shape":"String"} }, - "Email":{ - "type":"string", - "max":255, - "min":1, - "pattern":"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}" - }, "EmrServerlessComputeConfig":{ "type":"structure", "required":["ExecutionRoleARN"], @@ -27053,7 +23888,7 @@ "documentation":"The ARN of the IAM role granting the AutoML job V2 the necessary permissions access policies to list, connect to, or manage EMR Serverless jobs. For detailed information about the required permissions of this role, see \"How to configure AutoML to initiate a remote job on EMR Serverless for large datasets\" in Create a regression or classification job for tabular data using the AutoML API or Create an AutoML job for time-series forecasting using the API.
" } }, - "documentation":"This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment.
Specifies the compute configuration for the EMR Serverless job.
" + "documentation":"This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment.
Specifies the compute configuration for the EMR Serverless job.
" }, "EmrServerlessSettings":{ "type":"structure", @@ -27083,10 +23918,6 @@ }, "documentation":"The configuration parameters that specify the IAM roles assumed by the execution role of SageMaker (assumable roles) and the cluster instances or job execution environments (execution roles or runtime roles) to manage and access resources required for running Amazon EMR clusters or Amazon EMR Serverless applications.
" }, - "EnableBurnInTest":{ - "type":"boolean", - "box":true - }, "EnableCaching":{"type":"boolean"}, "EnableCapture":{"type":"boolean"}, "EnableEnhancedMetrics":{ @@ -27101,10 +23932,6 @@ "type":"boolean", "box":true }, - "EnableNodeAutoRecovery":{ - "type":"boolean", - "box":true - }, "EnableRemoteDebug":{ "type":"boolean", "box":true @@ -27128,16 +23955,6 @@ "Disabled" ] }, - "EncryptedFasCredentials":{ - "type":"string", - "sensitive":true - }, - "EncryptedRefreshToken":{ - "type":"string", - "max":2048, - "min":1, - "pattern":".+" - }, "Endpoint":{ "type":"structure", "required":[ @@ -27161,7 +23978,6 @@ "shape":"EndpointConfigName", "documentation":"The endpoint configuration associated with the endpoint.
" }, - "DeletionCondition":{"shape":"EndpointDeletionCondition"}, "ProductionVariants":{ "shape":"ProductionVariantSummaryList", "documentation":"A list of the production variants hosted on the endpoint. Each production variant is a model.
" @@ -27266,14 +24082,6 @@ "type":"list", "member":{"shape":"EndpointConfigSummary"} }, - "EndpointDeletionCondition":{ - "type":"structure", - "required":["MaxRuntimeInSeconds"], - "members":{ - "MaxRuntimeInSeconds":{"shape":"EndpointMaxRuntimeInSeconds"} - }, - "internalonly":true - }, "EndpointInfo":{ "type":"structure", "members":{ @@ -27331,10 +24139,6 @@ "shape":"MonitoringTimeOffsetString", "documentation":"If specified, monitoring jobs substract this time from the end time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs.
" }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true - }, "ExcludeFeaturesAttribute":{ "shape":"ExcludeFeaturesAttribute", "documentation":"The attributes of the input data to exclude from the analysis.
" @@ -27367,13 +24171,6 @@ "max":10, "min":1 }, - "EndpointMaxRuntimeInSeconds":{ - "type":"integer", - "box":true, - "internalonly":true, - "max":604800, - "min":3600 - }, "EndpointMetadata":{ "type":"structure", "required":["EndpointName"], @@ -27544,23 +24341,6 @@ "min":1, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "Entrypoint":{ - "type":"list", - "member":{"shape":"String2048"} - }, - "Environment":{ - "type":"map", - "key":{"shape":"String2048"}, - "value":{"shape":"String2048"}, - "max":10, - "min":0 - }, - "EnvironmentArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:environment/[a-z0-9]([-.]?[a-z0-9])*" - }, "EnvironmentConfig":{ "type":"structure", "members":{ @@ -27627,14 +24407,6 @@ "CategoricalParameterRanges":{ "shape":"CategoricalParameters", "documentation":"Specified a list of parameters for each category.
" - }, - "IntegerParameterRanges":{ - "shape":"IntegerParameters", - "internalonly":true - }, - "ContinuousParameterRanges":{ - "shape":"ContinuousParameters", - "internalonly":true } }, "documentation":"Specifies the range of environment parameters
" @@ -27645,26 +24417,12 @@ "max":10, "min":1 }, - "EnvironmentSettings":{ - "type":"structure", - "members":{ - "DefaultS3ArtifactPath":{"shape":"S3Uri"}, - "DefaultS3KmsKeyId":{"shape":"KmsKeyId"} - }, - "internalonly":true - }, "EnvironmentValue":{ "type":"string", "max":1024, "min":0, "pattern":"[\\S\\s]*" }, - "EnvironmentVersionArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:environment-version/[a-z0-9]([-.]?[a-z0-9])*/[0-9]+" - }, "ErrorInfo":{ "type":"structure", "members":{ @@ -27679,254 +24437,6 @@ }, "documentation":"This is an error field object that contains the error code and the reason for an operation failure.
" }, - "EvaluationJobArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:evaluation-job/.*" - }, - "EvaluationJobCredentialProxyConfig":{ - "type":"structure", - "required":[ - "UpstreamPlatformCustomerCredentialToken", - "CredentialProviderFunction" - ], - "members":{ - "UpstreamPlatformCustomerCredentialToken":{"shape":"ProxyToken"}, - "CredentialProviderFunction":{"shape":"CredentialProviderLambdaFunctionArn"} - } - }, - "EvaluationJobCustomDataset":{ - "type":"structure", - "members":{ - "DatasetName":{"shape":"EvaluationJobCustomDatasetName"}, - "S3Uri":{"shape":"EvaluationJobS3Uri"} - } - }, - "EvaluationJobCustomDatasetList":{ - "type":"list", - "member":{"shape":"EvaluationJobCustomDataset"} - }, - "EvaluationJobCustomDatasetName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[0-9a-zA-Z-_]+" - }, - "EvaluationJobDescription":{ - "type":"string", - "max":200, - "min":0, - "pattern":".+" - }, - "EvaluationJobEvaluationConfig":{ - "type":"structure", - "required":["HumanEvaluationConfig"], - "members":{ - "HumanEvaluationConfig":{"shape":"EvaluationJobHumanEvaluationConfig"} - } - }, - "EvaluationJobEvaluationMethod":{ - "type":"string", - "enum":["Human"] - }, - "EvaluationJobHumanEvaluationConfig":{ - "type":"structure", - "required":["HumanEvaluationMetrics"], - "members":{ - "HumanTaskConfig":{"shape":"EvaluationJobHumanTaskConfig"}, - "HumanWorkflowConfig":{"shape":"EvaluationJobHumanWorkflowConfig"}, - "HumanEvaluationMetrics":{"shape":"EvaluationJobHumanEvaluationMetricsList"} - } - }, - "EvaluationJobHumanEvaluationMetric":{ - "type":"structure", - "required":["MetricName"], - "members":{ - "MetricName":{"shape":"HumanEvaluationMetricName"}, - "RatingMethod":{"shape":"HumanEvaluationRatingMethod"}, - "MetricType":{ - "shape":"HumanEvaluationMetricType", - "deprecated":true, - "deprecatedMessage":"This property is deprecated, use RatingMethod instead." - }, - "Description":{"shape":"HumanEvaluationDescription"} - } - }, - "EvaluationJobHumanEvaluationMetricsList":{ - "type":"list", - "member":{"shape":"EvaluationJobHumanEvaluationMetric"} - }, - "EvaluationJobHumanTaskConfig":{ - "type":"structure", - "required":[ - "FlowDefinitionArn", - "TaskInstructions" - ], - "members":{ - "FlowDefinitionArn":{"shape":"FlowDefinitionArn"}, - "TaskInstructions":{"shape":"EvaluationJobHumanTaskInstructions"} - } - }, - "EvaluationJobHumanTaskInstructions":{ - "type":"string", - "max":32768, - "min":1, - "pattern":"[\\S\\s]+" - }, - "EvaluationJobHumanWorkflowConfig":{ - "type":"structure", - "required":[ - "FlowDefinitionArn", - "TaskInstructions" - ], - "members":{ - "FlowDefinitionArn":{"shape":"FlowDefinitionArn"}, - "TaskInstructions":{"shape":"EvaluationJobHumanTaskInstructions"} - } - }, - "EvaluationJobId":{ - "type":"string", - "max":40, - "min":0, - "pattern":"[0-9a-f]+" - }, - "EvaluationJobInputDataConfig":{ - "type":"structure", - "members":{ - "CustomDatasets":{"shape":"EvaluationJobCustomDatasetList"} - } - }, - "EvaluationJobModel":{ - "type":"structure", - "required":[ - "ModelIdentifier", - "ModelType" - ], - "members":{ - "ModelIdentifier":{"shape":"EvaluationJobModelIdentifier"}, - "ModelType":{"shape":"EvaluationJobModelType"}, - "EndpointArn":{"shape":"EvaluationJobModelEndpointArn"} - } - }, - "EvaluationJobModelConfig":{ - "type":"structure", - "required":["Models"], - "members":{ - "Models":{"shape":"ModelList"} - } - }, - "EvaluationJobModelEndpointArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:endpoint/.*" - }, - "EvaluationJobModelIdentifier":{ - "type":"string", - "max":2048, - "min":1 - }, - "EvaluationJobModelIdentifiersList":{ - "type":"list", - "member":{"shape":"EvaluationJobModelIdentifier"} - }, - "EvaluationJobModelType":{ - "type":"string", - "max":1024, - "min":1 - }, - "EvaluationJobName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-z0-9](-*[a-z0-9]){0,62}" - }, - "EvaluationJobOutputDataConfig":{ - "type":"structure", - "required":["S3Uri"], - "members":{ - "S3Uri":{"shape":"EvaluationJobS3Uri"}, - "KmsKeyId":{"shape":"KmsKeyId"} - } - }, - "EvaluationJobS3Uri":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"s3://([^/]+)/.+" - }, - "EvaluationJobSortBy":{ - "type":"string", - "enum":[ - "CreationTime", - "EvaluationJobName" - ] - }, - "EvaluationJobStatus":{ - "type":"string", - "enum":[ - "InProgress", - "Completed", - "Failed", - "Stopping", - "Stopped" - ] - }, - "EvaluationJobSummaries":{ - "type":"list", - "member":{"shape":"EvaluationJobSummary"} - }, - "EvaluationJobSummary":{ - "type":"structure", - "required":[ - "EvaluationJobName", - "EvaluationJobArn", - "EvaluationJobStatus", - "CreationTime", - "EvaluationMethod" - ], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"}, - "EvaluationJobArn":{"shape":"EvaluationJobArn"}, - "EvaluationJobStatus":{"shape":"EvaluationJobStatus"}, - "CreationTime":{"shape":"Timestamp"}, - "EvaluationMethod":{"shape":"EvaluationJobEvaluationMethod"}, - "FailureReason":{"shape":"FailureReason"}, - "ModelIdentifiers":{"shape":"EvaluationJobModelIdentifiersList"} - } - }, - "EvaluationJobUpstreamPlatformConfig":{ - "type":"structure", - "required":[ - "CredentialProxyConfig", - "UpstreamPlatformCustomerOutputDataConfig", - "UpstreamPlatformCustomerAccountId", - "UpstreamPlatformCustomerExecutionRole" - ], - "members":{ - "CredentialProxyConfig":{"shape":"EvaluationJobCredentialProxyConfig"}, - "UpstreamPlatformCustomerOutputDataConfig":{"shape":"EvaluationJobUpstreamPlatformCustomerOutputDataConfig"}, - "UpstreamPlatformCustomerAccountId":{"shape":"AccountId"}, - "UpstreamPlatformCustomerEvaluationJobArn":{"shape":"EvaluationJobUpstreamPlatformCustomerEvaluationJobArn"}, - "UpstreamPlatformCustomerExecutionRole":{"shape":"RoleArn"} - } - }, - "EvaluationJobUpstreamPlatformCustomerEvaluationJobArn":{ - "type":"string", - "max":1011, - "min":0 - }, - "EvaluationJobUpstreamPlatformCustomerOutputDataConfig":{ - "type":"structure", - "required":["S3Uri"], - "members":{ - "KmsKeyId":{"shape":"KmsKeyId"}, - "S3KmsEncryptionContext":{"shape":"S3KmsEncryptionContext"}, - "KmsEncryptionContext":{"shape":"KmsEncryptionContext"}, - "S3Uri":{"shape":"EvaluationJobS3Uri"} - } - }, "EvaluationType":{ "type":"string", "enum":[ @@ -27949,17 +24459,6 @@ }, "documentation":"Detailed information about a specific event, including event metadata.
" }, - "EventEntity":{ - "type":"structure", - "members":{ - "EventSender":{"shape":"UserProfileName"}, - "EventId":{"shape":"EventId"}, - "SharedModelId":{"shape":"SharedModelId"}, - "SharedModelVersion":{"shape":"SharedModelVersion"}, - "EventType":{"shape":"EventType"}, - "Read":{"shape":"Read"} - } - }, "EventId":{ "type":"string", "pattern":"[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" @@ -27982,9 +24481,7 @@ "Instance":{ "shape":"InstanceMetadata", "documentation":"Metadata specific to instance-level events.
" - }, - "InstanceMonitor":{"shape":"InstanceMonitorMetadata"}, - "InstanceHealth":{"shape":"InstanceHealthMetadata"} + } }, "documentation":"Metadata associated with a cluster event, which may include details about various resource types.
", "union":true @@ -27993,21 +24490,6 @@ "type":"string", "enum":["EventTime"] }, - "EventType":{ - "type":"string", - "enum":[ - "Create", - "Share", - "Revoke", - "Read", - "Delete", - "Comment" - ] - }, - "Events":{ - "type":"list", - "member":{"shape":"EventEntity"} - }, "ExcludeFeaturesAttribute":{ "type":"string", "max":100, @@ -28044,6 +24526,10 @@ "min":0, "pattern":"[\\S\\s]*" }, + "ExpectedPerformanceList":{ + "type":"list", + "member":{"shape":"AIRecommendationPerformanceMetric"} + }, "Experiment":{ "type":"structure", "members":{ @@ -28202,15 +24688,6 @@ "type":"string", "min":1 }, - "ExplainabilityTaskContext":{ - "type":"structure", - "required":["CandidateName"], - "members":{ - "CandidateName":{"shape":"CandidateName"}, - "IncludePDP":{"shape":"IncludePDP"}, - "OverwriteArtifacts":{"shape":"OverwriteArtifacts"} - } - }, "ExplainerConfig":{ "type":"structure", "members":{ @@ -28221,6 +24698,26 @@ }, "documentation":"A parameter to activate explainers.
" }, + "ExtendTrainingPlanRequest":{ + "type":"structure", + "required":["TrainingPlanExtensionOfferingId"], + "members":{ + "TrainingPlanExtensionOfferingId":{ + "shape":"TrainingPlanExtensionOfferingId", + "documentation":"The unique identifier of the extension offering to purchase. You can retrieve this ID from the TrainingPlanExtensionOfferings in the response of the SearchTrainingPlanOfferings API.
The list of extensions for the training plan, including the newly created extension.
" + } + } + }, "FSxLustreConfig":{ "type":"structure", "required":[ @@ -28287,11 +24784,6 @@ }, "documentation":"The container for the metadata for Fail step.
" }, - "FailedObjects":{ - "type":"long", - "box":true, - "min":0 - }, "FailureHandlingPolicy":{ "type":"string", "enum":[ @@ -28317,20 +24809,6 @@ "max":100, "min":0 }, - "FasCredentials":{ - "type":"string", - "sensitive":true - }, - "FaultEntity":{ - "type":"string", - "enum":[ - "Customer", - "SageMakerTrainingPlatform", - "SageMaker1PAlgorithm", - "MarketplaceAlgorithm", - "Capacity" - ] - }, "FeatureAdditions":{ "type":"list", "member":{"shape":"FeatureDefinition"}, @@ -28429,29 +24907,9 @@ "shape":"Description", "documentation":"A free form description of a FeatureGroup.
Tags used to define a FeatureGroup.
Amazon SageMaker Feature Store stores features in a collection called Feature Group. A Feature Group can be visualized as a table which has rows, with a unique identifier for each row where each column in the table is a feature. In principle, a Feature Group is composed of features and values per features.
" @@ -28546,12 +25004,6 @@ }, "documentation":"The name, ARN, CreationTime, FeatureGroup values, LastUpdatedTime and EnableOnlineStorage status of a FeatureGroup.
Optional key-value pairs that you specify to better describe the feature.
" - }, - "AllParameters":{ - "shape":"AllFeatureParameters", - "internalonly":true } }, "documentation":"The metadata for a feature. It can either be metadata that you specify, or metadata that is updated automatically.
" @@ -28804,13 +25252,6 @@ }, "documentation":"A conditional statement for a search expression that includes a resource property, a Boolean operator, and a value. Resources that match the statement are returned in the results from the Search API.
If you specify a Value, but not an Operator, SageMaker uses the equals operator.
In search, there are several property types:
To define a metric filter, enter a value using the form \"Metrics.<name>\", where <name> is a metric name. For example, the following filter searches for training jobs with an \"accuracy\" metric greater than \"0.9\":
{
\"Name\": \"Metrics.accuracy\",
\"Operator\": \"GreaterThan\",
\"Value\": \"0.9\"
}
To define a hyperparameter filter, enter a value with the form \"HyperParameters.<name>\". Decimal hyperparameter values are treated as a decimal in a comparison if the specified Value is also a decimal value. If the specified Value is an integer, the decimal hyperparameter values are treated as integers. For example, the following filter is satisfied by training jobs with a \"learning_rate\" hyperparameter that is less than \"0.5\":
{
\"Name\": \"HyperParameters.learning_rate\",
\"Operator\": \"LessThan\",
\"Value\": \"0.5\"
}
To define a tag filter, enter a value with the form Tags.<key>.
The value of the metric with the best result.
" + "documentation":"The value of the metric with the best result.
", + "box":true }, "StandardMetricName":{ "shape":"AutoMLMetricEnum", @@ -28866,7 +25308,8 @@ }, "Value":{ "shape":"MetricValue", - "documentation":"The value of the objective metric.
" + "documentation":"The value of the objective metric.
", + "box":true } }, "documentation":"Shows the latest objective metric emitted by a training job that was launched by a hyperparameter tuning job. You define the objective metric in the HyperParameterTuningJobObjective parameter of HyperParameterTuningJobConfig.
The name of the model group for which to get the resource policy.
" - }, - "ModelPackageGroupArn":{ - "shape":"ModelPackageGroupArn", - "internalonly":true } } }, @@ -29190,78 +25588,6 @@ } } }, - "GetPartnerAppPolicyRequest":{ - "type":"structure", - "required":["PartnerAppArn"], - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, - "GetPartnerAppPolicyResponse":{ - "type":"structure", - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"}, - "ResourcePolicy":{"shape":"ResourcePolicyString"} - } - }, - "GetPipelinePolicyRequest":{ - "type":"structure", - "required":["PipelineName"], - "members":{ - "PipelineName":{ - "shape":"PipelineNameOrArn", - "internalonly":true - } - } - }, - "GetPipelinePolicyResponse":{ - "type":"structure", - "members":{ - "ResourcePolicy":{ - "shape":"ResourcePolicyString", - "internalonly":true - }, - "CreatedBy":{"shape":"UserContext"}, - "LastModifiedBy":{"shape":"UserContext"}, - "CreationTime":{ - "shape":"Timestamp", - "internalonly":true - }, - "LastModifiedTime":{ - "shape":"Timestamp", - "internalonly":true - } - } - }, - "GetResourcePolicyRequest":{ - "type":"structure", - "required":["ResourceArn"], - "members":{ - "ResourceArn":{ - "shape":"ResourceArn", - "internalonly":true - } - } - }, - "GetResourcePolicyResponse":{ - "type":"structure", - "members":{ - "ResourcePolicy":{ - "shape":"ResourcePolicyString", - "internalonly":true - }, - "CreatedBy":{"shape":"UserContext"}, - "LastModifiedBy":{"shape":"UserContext"}, - "CreationTime":{ - "shape":"Timestamp", - "internalonly":true - }, - "LastModifiedTime":{ - "shape":"Timestamp", - "internalonly":true - } - } - }, "GetSagemakerServicecatalogPortfolioStatusInput":{ "type":"structure", "members":{} @@ -29272,10 +25598,6 @@ "Status":{ "shape":"SagemakerServicecatalogStatus", "documentation":"Whether Service Catalog is enabled or disabled in SageMaker.
" - }, - "PortfolioId":{ - "shape":"PortfolioId", - "internalonly":true } } }, @@ -29402,180 +25724,6 @@ "min":11, "pattern":"https://([^/]+)/?.{3,1016}" }, - "GraphConfigName":{ - "type":"string", - "max":63, - "min":0, - "pattern":"[a-zA-Z0-9]([\\-a-zA-Z0-9]*[a-zA-Z0-9])?" - }, - "GroundTruthJobArn":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:ground-truth-job/[a-z0-9](-*[a-z0-9]){0,62}/[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthJobContentClassifiers":{ - "type":"string", - "enum":["PersonallyIdentifiableInformation"] - }, - "GroundTruthJobContentClassifiersList":{ - "type":"list", - "member":{"shape":"GroundTruthJobContentClassifiers"} - }, - "GroundTruthJobDataAttributes":{ - "type":"structure", - "members":{ - "ContentClassifiers":{"shape":"GroundTruthJobContentClassifiersList"} - } - }, - "GroundTruthJobDataSource":{ - "type":"structure", - "members":{ - "S3DataSource":{"shape":"GroundTruthJobS3DataSource"} - } - }, - "GroundTruthJobDescription":{ - "type":"string", - "max":8192, - "min":1, - "pattern":".+" - }, - "GroundTruthJobFailureReason":{ - "type":"string", - "max":1024, - "min":1, - "pattern":".+" - }, - "GroundTruthJobInputConfig":{ - "type":"structure", - "members":{ - "DataAttributes":{"shape":"GroundTruthJobDataAttributes"}, - "DataSource":{"shape":"GroundTruthJobDataSource"} - } - }, - "GroundTruthJobName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthJobOutputConfig":{ - "type":"structure", - "members":{ - "S3OutputPath":{"shape":"S3Uri"} - } - }, - "GroundTruthJobS3DataSource":{ - "type":"structure", - "members":{ - "S3Uri":{"shape":"S3Uri"} - } - }, - "GroundTruthJobStatus":{ - "type":"string", - "enum":[ - "Initializing", - "InProgress", - "Completed", - "Failed" - ] - }, - "GroundTruthJobSummary":{ - "type":"structure", - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthWorkflowArn":{"shape":"GroundTruthWorkflowArn"}, - "GroundTruthJobArn":{"shape":"GroundTruthJobArn"}, - "GroundTruthJobName":{"shape":"GroundTruthJobName"}, - "GroundTruthJobStatus":{"shape":"GroundTruthJobStatus"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, - "GroundTruthJobSummaryList":{ - "type":"list", - "member":{"shape":"GroundTruthJobSummary"} - }, - "GroundTruthProjectArn":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:ground-truth-project/[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthProjectDescription":{ - "type":"string", - "max":8192, - "min":1, - "pattern":".+" - }, - "GroundTruthProjectName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthProjectPointOfContact":{ - "type":"structure", - "required":[ - "Name", - "Email" - ], - "members":{ - "Name":{"shape":"Name"}, - "Email":{"shape":"Email"} - } - }, - "GroundTruthProjectStatus":{ - "type":"string", - "enum":[ - "Pending", - "Active" - ] - }, - "GroundTruthProjectSummary":{ - "type":"structure", - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "GroundTruthProjectDescription":{"shape":"GroundTruthProjectDescription"}, - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthProjectStatus":{"shape":"GroundTruthProjectStatus"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, - "GroundTruthProjectSummaryList":{ - "type":"list", - "member":{"shape":"GroundTruthProjectSummary"} - }, - "GroundTruthWorkflowArn":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:ground-truth-workflow/[a-z0-9](-*[a-z0-9]){0,62}/[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthWorkflowDefinitionSpec":{ - "type":"string", - "max":200, - "min":2, - "pattern":"\\{.*\\}" - }, - "GroundTruthWorkflowName":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-z0-9](-*[a-z0-9]){0,62}" - }, - "GroundTruthWorkflowSummary":{ - "type":"structure", - "members":{ - "GroundTruthProjectArn":{"shape":"GroundTruthProjectArn"}, - "GroundTruthWorkflowArn":{"shape":"GroundTruthWorkflowArn"}, - "GroundTruthWorkflowName":{"shape":"GroundTruthWorkflowName"}, - "CreatedAt":{"shape":"Timestamp"} - } - }, - "GroundTruthWorkflowSummaryList":{ - "type":"list", - "member":{"shape":"GroundTruthWorkflowSummary"} - }, "Group":{ "type":"string", "max":63, @@ -29611,32 +25759,6 @@ "max":10, "min":1 }, - "HealthCheckConfig":{ - "type":"structure", - "members":{ - "NumPayload":{"shape":"NumPayload"}, - "NumFailuresAllowed":{"shape":"NumFailuresAllowed"} - }, - "internalonly":true - }, - "HealthInfo":{ - "type":"structure", - "members":{ - "HealthStatus":{"shape":"HealthStatus"}, - "HealthStatusReason":{"shape":"String"}, - "RepairAction":{"shape":"ServiceRepairAction"}, - "Recommendation":{"shape":"String"} - }, - "internalonly":true - }, - "HealthStatus":{ - "type":"string", - "enum":[ - "Healthy", - "Unhealthy" - ], - "internalonly":true - }, "HiddenAppTypesList":{ "type":"list", "member":{"shape":"AppType"} @@ -29750,7 +25872,7 @@ }, "HubContentDocument":{ "type":"string", - "max":65535, + "max":327680, "min":0, "pattern":".*" }, @@ -29827,7 +25949,7 @@ }, "HubContentMarkdown":{ "type":"string", - "max":65535, + "max":170391, "min":0 }, "HubContentName":{ @@ -29836,9 +25958,15 @@ "min":0, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, + "HubContentSearchKeyword":{ + "type":"string", + "max":255, + "min":0, + "pattern":".*" + }, "HubContentSearchKeywordList":{ "type":"list", - "member":{"shape":"HubSearchKeyword"}, + "member":{"shape":"HubContentSearchKeyword"}, "max":50, "min":0 }, @@ -30006,30 +26134,6 @@ "DeleteFailed" ] }, - "HumanEvaluationDescription":{ - "type":"string", - "max":100, - "min":1, - "pattern":".+" - }, - "HumanEvaluationMetricName":{ - "type":"string", - "max":64, - "min":1, - "pattern":"[0-9a-zA-Z-_]+" - }, - "HumanEvaluationMetricType":{ - "type":"string", - "max":100, - "min":1, - "pattern":"[0-9a-zA-Z_-]+" - }, - "HumanEvaluationRatingMethod":{ - "type":"string", - "max":100, - "min":1, - "pattern":"[0-9a-zA-Z_-]+" - }, "HumanLoopActivationConditions":{ "type":"string", "max":10240, @@ -30051,10 +26155,6 @@ "type":"structure", "required":["HumanLoopActivationConditionsConfig"], "members":{ - "HumanLoopRequestSource":{ - "shape":"HumanLoopRequestSource", - "internalonly":true - }, "HumanLoopActivationConditionsConfig":{ "shape":"HumanLoopActivationConditionsConfig", "documentation":"Container structure for defining under what conditions SageMaker creates a human loop.
" @@ -30220,10 +26320,6 @@ "shape":"HumanTaskUiArn", "documentation":"The Amazon Resource Name (ARN) of the human task user interface.
" }, - "HumanTaskUiStatus":{ - "shape":"HumanTaskUiStatus", - "internalonly":true - }, "CreationTime":{ "shape":"Timestamp", "documentation":"A timestamp when SageMaker created the human task user interface.
" @@ -30291,19 +26387,17 @@ }, "IsTunable":{ "shape":"Boolean", - "documentation":"Indicates whether this hyperparameter is tunable in a hyperparameter tuning job.
" + "documentation":"Indicates whether this hyperparameter is tunable in a hyperparameter tuning job.
", + "box":true }, "IsRequired":{ "shape":"Boolean", - "documentation":"Indicates whether this hyperparameter is required.
" + "documentation":"Indicates whether this hyperparameter is required.
", + "box":true }, "DefaultValue":{ "shape":"HyperParameterValue", "documentation":"The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required.
" - }, - "DefaultScalingType":{ - "shape":"ParameterScalingType", - "internalonly":true } }, "documentation":"Defines a hyperparameter to be used by an algorithm.
" @@ -30333,10 +26427,6 @@ "shape":"HyperParameters", "documentation":"Specifies the values of hyperparameters that do not change for the tuning job.
" }, - "InitialHyperParameterConfigurations":{ - "shape":"InitialHyperParameterConfigurations", - "internalonly":true - }, "AlgorithmSpecification":{ "shape":"HyperParameterAlgorithmSpecification", "documentation":"The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches.
" @@ -30371,15 +26461,18 @@ }, "EnableNetworkIsolation":{ "shape":"Boolean", - "documentation":"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 network isolation is used 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.
" + "documentation":"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 network isolation is used 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.
", + "box":true }, "EnableInterContainerTrafficEncryption":{ "shape":"Boolean", - "documentation":"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.
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.
A Boolean indicating whether managed spot training is enabled (True) or not (False).
A Boolean indicating whether managed spot training is enabled (True) or not (False).
The number of instances of the type specified by InstanceType. Choose an instance count larger than 1 for distributed training algorithms. See Step 2: Launch a SageMaker Distributed Training Job Using the SageMaker Python SDK for more information.
The number of instances of the type specified by InstanceType. Choose an instance count larger than 1 for distributed training algorithms. See Step 2: Launch a SageMaker Distributed Training Job Using the SageMaker Python SDK for more information.
The volume size in GB of the data to be processed for hyperparameter optimization (optional).
" + "documentation":"The volume size in GB of the data to be processed for hyperparameter optimization (optional).
", + "box":true } }, "documentation":"The configuration for hyperparameter tuning resources for use in training jobs launched by the tuning job. These resources include compute instances and storage volumes. Specify one or more compute instance configurations and allocation strategies to select resources (optional).
" @@ -30539,43 +26617,19 @@ "max":6, "min":1 }, - "HyperParameterTuningInstanceGroup":{ - "type":"structure", - "required":[ - "InstanceType", - "InstanceCount", - "InstanceGroupName" - ], - "members":{ - "InstanceType":{"shape":"TrainingInstanceType"}, - "InstanceCount":{"shape":"TrainingInstanceCount"}, - "InstanceGroupName":{"shape":"InstanceGroupName"} - } - }, - "HyperParameterTuningInstanceGroups":{ - "type":"list", - "member":{"shape":"HyperParameterTuningInstanceGroup"}, - "max":5, - "min":0 - }, "HyperParameterTuningJobArn":{ "type":"string", "max":256, "min":0, "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:hyper-parameter-tuning-job/.*" }, - "HyperParameterTuningJobCompletionConfig":{ - "type":"structure", - "members":{ - "InProgressTrainingJobsHandling":{"shape":"InProgressTrainingJobsHandling"} - } - }, "HyperParameterTuningJobCompletionDetails":{ "type":"structure", "members":{ "NumberOfTrainingJobsObjectiveNotImproving":{ "shape":"Integer", - "documentation":"The number of training jobs launched by a tuning job that are not improving (1% or less) as measured by model performance evaluated against an objective function.
" + "documentation":"The number of training jobs launched by a tuning job that are not improving (1% or less) as measured by model performance evaluated against an objective function.
", + "box":true }, "ConvergenceDetectedTime":{ "shape":"Timestamp", @@ -30615,18 +26669,10 @@ "shape":"TrainingJobEarlyStoppingType", "documentation":"Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF):
Training jobs launched by the hyperparameter tuning job do not use early stopping.
SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.
The tuning job's completion criteria.
" }, - "CompletionConfig":{ - "shape":"HyperParameterTuningJobCompletionConfig", - "internalonly":true - }, "RandomSeed":{ "shape":"RandomSeed", "documentation":"A value used to initialize a pseudo-random number generator. Setting a random seed and using the same seed later for the same tuning job will allow hyperparameter optimization to find more a consistent hyperparameter configuration between the two runs.
" @@ -30639,11 +26685,8 @@ "members":{ "RuntimeInSeconds":{ "shape":"Integer", - "documentation":"The wall clock runtime in seconds used by your hyperparameter tuning job.
" - }, - "BillableTimeInSeconds":{ - "shape":"Integer", - "internalonly":true + "documentation":"The wall clock runtime in seconds used by your hyperparameter tuning job.
", + "box":true } }, "documentation":"The total resources consumed by your hyperparameter tuning job.
" @@ -30864,11 +26907,6 @@ "TransferLearning" ] }, - "HyperParameterTuningMaxBillableTimeInSeconds":{ - "type":"integer", - "box":true, - "min":1 - }, "HyperParameterTuningMaxRuntimeInSeconds":{ "type":"integer", "box":true, @@ -30884,20 +26922,18 @@ }, "InstanceCount":{ "shape":"TrainingInstanceCount", - "documentation":"The number of compute instances of type InstanceType to use. For distributed training, select a value greater than 1.
The number of compute instances of type InstanceType to use. For distributed training, select a value greater than 1.
The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional). These volumes store model artifacts, incremental states and optionally, scratch space for training algorithms. Do not provide a value for this parameter if a value for InstanceConfigs is also specified.
Some instance types have a fixed total local storage size. If you select one of these instances for training, VolumeSizeInGB cannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes.
SageMaker supports only the General Purpose SSD (gp2) storage volume type.
The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional). These volumes store model artifacts, incremental states and optionally, scratch space for training algorithms. Do not provide a value for this parameter if a value for InstanceConfigs is also specified.
Some instance types have a fixed total local storage size. If you select one of these instances for training, VolumeSizeInGB cannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes.
SageMaker supports only the General Purpose SSD (gp2) storage volume type.
A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached to the compute instances used to run the training job. You can use either of the following formats to specify a key.
KMS Key ID:
\"1234abcd-12ab-34cd-56ef-1234567890ab\"
Amazon Resource Name (ARN) of a KMS key:
\"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\"
Some instances use local storage, which use a hardware module to encrypt storage volumes. If you choose one of these instance types, you cannot request a VolumeKmsKeyId. For a list of instance types that use local storage, see instance store volumes. For more information about Amazon Web Services Key Management Service, see KMS encryption for more information.
The strategy that determines the order of preference for resources specified in InstanceConfigs used in hyperparameter optimization.
The minimum number of resources (such as epochs) that can be used by a training job launched by a hyperparameter tuning job. If the value for MinResource has not been reached, the training job is not stopped by Hyperband.
Use this parameter to specify a supported global condition key that is added to the IAM policy.
" }, - "IdcClientId":{ - "type":"string", - "max":2048, - "min":1, - "pattern":".+" - }, - "IdcUserId":{ - "type":"string", - "max":128, - "min":1, - "pattern":".+" - }, "IdempotencyToken":{ "type":"string", "max":128, "min":32 }, - "IdentityCenterUserToken":{ - "type":"structure", - "required":[ - "EncryptedRefreshToken", - "ClientId", - "IdcUserId" - ], - "members":{ - "EncryptedRefreshToken":{"shape":"EncryptedRefreshToken"}, - "ClientId":{"shape":"IdcClientId"}, - "IdcUserId":{"shape":"IdcUserId"}, - "SkipRevokeTokenAfterComplete":{"shape":"Boolean"} - } - }, "IdentityProviderOAuthSetting":{ "type":"structure", "members":{ @@ -31066,6 +27050,13 @@ "max":20, "min":0 }, + "IdleResourceSharing":{ + "type":"string", + "enum":[ + "Enabled", + "Disabled" + ] + }, "IdleSettings":{ "type":"structure", "members":{ @@ -31157,10 +27148,6 @@ "CompletionCriteria":{ "shape":"AutoMLJobCompletionCriteria", "documentation":"How long a job is allowed to run, or how many candidates a job is allowed to generate.
" - }, - "MultiLabelEnabled":{ - "shape":"Boolean", - "internalonly":true } }, "documentation":"The collection of settings used by an AutoML job V2 for the image classification problem type.
" @@ -31221,12 +27208,6 @@ "min":7, "pattern":"ami-[0-9a-fA-F]{8,17}|default" }, - "ImageMetadata":{ - "type":"structure", - "members":{ - "ImageType":{"shape":"ImageType"} - } - }, "ImageName":{ "type":"string", "max":63, @@ -31239,22 +27220,6 @@ "min":0, "pattern":"[a-zA-Z0-9\\-.]+" }, - "ImageSearchShape":{ - "type":"structure", - "members":{ - "CreationTime":{"shape":"Timestamp"}, - "Description":{"shape":"ImageDescription"}, - "DisplayName":{"shape":"ImageDisplayName"}, - "FailureReason":{"shape":"FailureReason"}, - "ImageArn":{"shape":"ImageArn"}, - "ImageName":{"shape":"ImageName"}, - "ImageStatus":{"shape":"ImageStatus"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "RoleArn":{"shape":"RoleArn"}, - "Tags":{"shape":"TagList"} - }, - "internalonly":true - }, "ImageSortBy":{ "type":"string", "enum":[ @@ -31282,35 +27247,12 @@ "DELETE_FAILED" ] }, - "ImageType":{ - "type":"string", - "enum":[ - "SageMaker1PAlgorithm", - "MarketplaceAlgorithm", - "MLFramework", - "BYOImage" - ] - }, "ImageUri":{ "type":"string", "max":255, "min":0, "pattern":".*" }, - "ImageUrlOverrides":{ - "type":"structure", - "members":{ - "DataBuilderImageUrl":{"shape":"AlgorithmImage"}, - "DataProcessingImageUrl":{"shape":"AlgorithmImage"}, - "PipelineRecommenderImageUrl":{"shape":"AlgorithmImage"}, - "AgtImageUrl":{"shape":"AlgorithmImage"}, - "MultimodalPretrainingImageUrl":{"shape":"AlgorithmImage"}, - "RobotorchImageUrl":{"shape":"AlgorithmImage"}, - "TimeSeriesPreTrainingImageUrl":{"shape":"AlgorithmImage"}, - "TimeSeriesTrainingImageUrl":{"shape":"AlgorithmImage"}, - "ThunderaImageUrl":{"shape":"AlgorithmImage"} - } - }, "ImageVersion":{ "type":"structure", "required":[ @@ -31376,30 +27318,6 @@ "box":true, "min":0 }, - "ImageVersionSearchShape":{ - "type":"structure", - "members":{ - "BaseImage":{"shape":"ImageBaseImage"}, - "ContainerImage":{"shape":"ImageContainerImage"}, - "CreationTime":{"shape":"Timestamp"}, - "FailureReason":{"shape":"FailureReason"}, - "ImageArn":{"shape":"ImageArn"}, - "ImageVersionArn":{"shape":"ImageVersionArn"}, - "ImageVersionStatus":{"shape":"ImageVersionStatus"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "Version":{"shape":"ImageVersionNumber"}, - "VendorGuidance":{"shape":"VendorGuidance"}, - "JobType":{"shape":"JobType"}, - "MLFramework":{"shape":"MLFramework"}, - "ProgrammingLang":{"shape":"ProgrammingLang"}, - "Processor":{"shape":"Processor"}, - "Horovod":{"shape":"Horovod"}, - "SociImage":{"shape":"SociImage"}, - "ReleaseNotes":{"shape":"ReleaseNotes"}, - "OverrideAliasImageVersion":{"shape":"OverrideAliasImageVersion"} - }, - "internalonly":true - }, "ImageVersionSortBy":{ "type":"string", "enum":[ @@ -31433,26 +27351,6 @@ "type":"list", "member":{"shape":"Image"} }, - "ImportCapacityScheduleRequest":{ - "type":"structure", - "required":[ - "CapacityScheduleName", - "CapacityResourceArn", - "TargetResources" - ], - "members":{ - "CapacityScheduleName":{"shape":"CapacityScheduleName"}, - "CapacityResourceArn":{"shape":"CapacityResourceArn"}, - "TargetResources":{"shape":"SageMakerResourceNames"} - } - }, - "ImportCapacityScheduleResponse":{ - "type":"structure", - "required":["CapacityScheduleArn"], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"} - } - }, "ImportHubContentRequest":{ "type":"structure", "required":[ @@ -31530,33 +27428,6 @@ } } }, - "ImportTrainingPlanRequest":{ - "type":"structure", - "required":[ - "TrainingPlanArn", - "CapacityResourceArn", - "TargetResources" - ], - "members":{ - "TrainingPlanArn":{"shape":"TrainingPlanArn"}, - "CapacityResourceArn":{"shape":"CapacityResourceArn"}, - "TargetResources":{"shape":"SageMakerResourceNames"} - } - }, - "ImportTrainingPlanResponse":{ - "type":"structure", - "required":["TrainingPlanArn"], - "members":{ - "TrainingPlanArn":{"shape":"TrainingPlanArn"} - } - }, - "InProgressTrainingJobsHandling":{ - "type":"string", - "enum":[ - "Stop", - "WaitForCompletion" - ] - }, "InUseInstanceCount":{ "type":"integer", "box":true, @@ -31566,12 +27437,26 @@ "type":"boolean", "box":true }, - "IncludePDP":{"type":"boolean"}, "InferenceComponentArn":{ "type":"string", "max":2048, "min":20 }, + "InferenceComponentAvailabilityZoneBalance":{ + "type":"structure", + "required":["EnforcementMode"], + "members":{ + "EnforcementMode":{ + "shape":"AvailabilityZoneBalanceEnforcementMode", + "documentation":"Determines how strictly the Availability Zone balance constraint is enforced.
The endpoint attempts to balance copies across Availability Zones but proceeds with scheduling even if balance can't be achieved due to available capacity or instance distribution across Availability Zones.
The maximum allowed difference in the number of inference component copies between any two Availability Zones. This parameter applies only when the endpoint has instances across two or more Availability Zones. A copy placement is allowed if it reduces imbalance or the resulting imbalance is within this value.
Default value: 0.
Configuration for balancing inference component copies across Availability Zones.
" + }, "InferenceComponentCapacitySize":{ "type":"structure", "required":[ @@ -31664,7 +27549,8 @@ "members":{ "EnableCaching":{ "shape":"EnableCaching", - "documentation":"Sets whether the endpoint that hosts the inference component caches the model artifacts and container image.
With caching enabled, the endpoint caches this data in each instance that it provisions for the inference component. That way, the inference component deploys faster during the auto scaling process. If caching isn't enabled, the inference component takes longer to deploy because of the time it spends downloading the data.
" + "documentation":"Sets whether the endpoint that hosts the inference component caches the model artifacts and container image.
With caching enabled, the endpoint caches this data in each instance that it provisions for the inference component. That way, the inference component deploys faster during the auto scaling process. If caching isn't enabled, the inference component takes longer to deploy because of the time it spends downloading the data.
", + "box":true } }, "documentation":"Settings that affect how the inference component caches data.
" @@ -31675,7 +27561,8 @@ "members":{ "EnableCaching":{ "shape":"EnableCaching", - "documentation":"Indicates whether the inference component caches model artifacts as part of the auto scaling process.
" + "documentation":"Indicates whether the inference component caches model artifacts as part of the auto scaling process.
", + "box":true } }, "documentation":"Settings that affect how the inference component caches data.
" @@ -31697,10 +27584,10 @@ "members":{ "Arn":{ "shape":"String2048", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the inference component.
" } }, - "internalonly":true + "documentation":"The metadata of the inference component.
" }, "InferenceComponentName":{ "type":"string", @@ -31714,6 +27601,13 @@ "min":0, "pattern":"[a-zA-Z0-9-]+" }, + "InferenceComponentPlacementStrategy":{ + "type":"string", + "enum":[ + "SPREAD", + "BINPACK" + ] + }, "InferenceComponentRollingUpdatePolicy":{ "type":"structure", "required":[ @@ -31765,6 +27659,21 @@ }, "documentation":"Details about the runtime settings for the model that is deployed with the inference component.
" }, + "InferenceComponentSchedulingConfig":{ + "type":"structure", + "required":["PlacementStrategy"], + "members":{ + "PlacementStrategy":{ + "shape":"InferenceComponentPlacementStrategy", + "documentation":"The strategy for placing inference component copies across available instances. If you also set AvailabilityZoneBalance, this strategy applies to placement within each Availability Zone.
Distributes copies evenly across available instances for better resilience.
Packs copies onto fewer instances to optimize resource utilization.
Configuration for balancing inference component copies across Availability Zones.
" + } + }, + "documentation":"The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed.
" + }, "InferenceComponentSortKey":{ "type":"string", "enum":[ @@ -31799,6 +27708,10 @@ "DataCacheConfig":{ "shape":"InferenceComponentDataCacheConfig", "documentation":"Settings that affect how the inference component caches data.
" + }, + "SchedulingConfig":{ + "shape":"InferenceComponentSchedulingConfig", + "documentation":"The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed.
" } }, "documentation":"Details about the resources to deploy with this inference component, including the model, container, and compute resources.
" @@ -31829,6 +27742,10 @@ "DataCacheConfig":{ "shape":"InferenceComponentDataCacheConfigSummary", "documentation":"Settings that affect how the inference component caches data.
" + }, + "SchedulingConfig":{ + "shape":"InferenceComponentSchedulingConfig", + "documentation":"The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed.
" } }, "documentation":"Details about the resources that are deployed with this inference component.
" @@ -32053,10 +27970,6 @@ "RoleArn":{ "shape":"RoleArn", "documentation":"The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.
" - }, - "Arn":{ - "shape":"InferenceExperimentArn", - "internalonly":true } }, "documentation":"Lists a summary of properties of an inference experiment.
" @@ -32081,13 +27994,6 @@ "max":256, "min":0 }, - "InferenceInvocationTypes":{ - "type":"structure", - "members":{ - "InvocationType":{"shape":"RecommendationJobInvocationType"} - }, - "internalonly":true - }, "InferenceMetrics":{ "type":"structure", "required":[ @@ -32097,31 +28003,13 @@ "members":{ "MaxInvocations":{ "shape":"Integer", - "documentation":"The expected maximum number of requests per minute for the instance.
" + "documentation":"The expected maximum number of requests per minute for the instance.
", + "box":true }, "ModelLatency":{ "shape":"Integer", - "documentation":"The expected model latency at maximum invocations per minute for the instance.
" - }, - "InputTokensPerSecondPerRequest":{ - "shape":"InputTokensPerSecondPerRequest", - "internalonly":true - }, - "OutputTokensPerSecondPerRequest":{ - "shape":"OutputTokensPerSecondPerRequest", - "internalonly":true - }, - "TimeToFirstToken":{ - "shape":"TimeToFirstToken", - "internalonly":true - }, - "IntertokenLatency":{ - "shape":"IntertokenLatency", - "internalonly":true - }, - "MaxConcurrency":{ - "shape":"MaxConcurrency", - "internalonly":true + "documentation":"The expected model latency at maximum invocations per minute for the instance.
", + "box":true } }, "documentation":"The metrics for an existing endpoint compared in an Inference Recommender job.
" @@ -32149,10 +28037,6 @@ "shape":"ModelConfiguration", "documentation":"Defines the model configuration.
" }, - "EndpointArn":{ - "shape":"EndpointArn", - "internalonly":true - }, "InvocationEndTime":{ "shape":"InvocationEndTime", "documentation":"A timestamp that shows when the benchmark completed.
" @@ -32234,10 +28118,6 @@ "ModelPackageVersionArn":{ "shape":"ModelPackageArn", "documentation":"The Amazon Resource Name (ARN) of a versioned model package.
" - }, - "BenchmarkResultsOutputConfig":{ - "shape":"BenchmarkResultsOutputConfig", - "internalonly":true } }, "documentation":"A structure that contains a list of recommendation jobs.
" @@ -32277,14 +28157,6 @@ "type":"list", "member":{"shape":"InferenceRecommendationsJob"} }, - "InferenceServiceConfig":{ - "type":"structure", - "required":["RequestStatus"], - "members":{ - "RequestStatus":{"shape":"RequestStatus"}, - "ExecutionRoleArn":{"shape":"RoleArn"} - } - }, "InferenceSpecification":{ "type":"structure", "required":["Containers"], @@ -32328,24 +28200,6 @@ }, "documentation":"Configuration information for the infrastructure health check of a training job. A SageMaker-provided health check tests the health of instance hardware and cluster network connectivity.
" }, - "IngressAddress":{ - "type":"string", - "max":1024, - "min":0 - }, - "InitialHyperParameterConfiguration":{ - "type":"map", - "key":{"shape":"ParameterKey"}, - "value":{"shape":"ParameterValue"}, - "max":20, - "min":0 - }, - "InitialHyperParameterConfigurations":{ - "type":"list", - "member":{"shape":"InitialHyperParameterConfiguration"}, - "max":20, - "min":0 - }, "InitialInstanceCount":{ "type":"integer", "box":true, @@ -32393,13 +28247,6 @@ "max":20, "min":1 }, - "InputExperimentSource":{ - "type":"structure", - "required":["SourceArn"], - "members":{ - "SourceArn":{"shape":"ExperimentSourceArn"} - } - }, "InputMode":{ "type":"string", "enum":[ @@ -32412,41 +28259,12 @@ "member":{"shape":"TrainingInputMode"}, "min":1 }, - "InputTokensPerSecondPerRequest":{ - "type":"float", - "box":true, - "min":0.0 - }, - "InputTrialComponentSource":{ - "type":"structure", - "required":["SourceArn"], - "members":{ - "SourceArn":{"shape":"TrialComponentSourceArn"} - } - }, - "InputTrialSource":{ - "type":"structure", - "required":["SourceArn"], - "members":{ - "SourceArn":{"shape":"TrialSourceArn"} - } - }, "InstanceCount":{ "type":"integer", "box":true, "max":10000000, "min":0 }, - "InstanceDeepHealthCheck":{ - "type":"structure", - "members":{ - "operationStatus":{"shape":"DeepHealthCheckOperationStatus"}, - "requestedChecks":{"shape":"DeepHealthChecksList"}, - "completedChecks":{"shape":"DeepHealthChecksList"}, - "message":{"shape":"String"} - }, - "internalonly":true - }, "InstanceGroup":{ "type":"structure", "required":[ @@ -32461,7 +28279,8 @@ }, "InstanceCount":{ "shape":"TrainingInstanceCount", - "documentation":"Specifies the number of instances of the instance group.
" + "documentation":"Specifies the number of instances of the instance group.
", + "box":true }, "InstanceGroupName":{ "shape":"InstanceGroupName", @@ -32470,28 +28289,27 @@ }, "documentation":"Defines an instance group for heterogeneous cluster training. When requesting a training job using the CreateTrainingJob API, you can configure multiple instance groups .
" }, - "InstanceGroupDeepHealthCheck":{ - "type":"structure", - "members":{ - "operationStatus":{"shape":"DeepHealthCheckOperationStatus"}, - "requestedChecks":{"shape":"DeepHealthChecksList"} - }, - "internalonly":true - }, - "InstanceGroupFailureMessages":{ - "type":"list", - "member":{"shape":"String"}, - "internalonly":true - }, "InstanceGroupHealthCheckConfiguration":{ "type":"structure", - "required":["InstanceGroupName"], + "required":[ + "InstanceGroupName", + "DeepHealthChecks" + ], "members":{ - "InstanceGroupName":{"shape":"InstanceGroupName"}, - "InstanceIds":{"shape":"InstanceIds"}, - "DeepHealthChecks":{"shape":"DeepHealthChecks"} + "InstanceGroupName":{ + "shape":"ClusterInstanceGroupName", + "documentation":"The name of the instance group.
" + }, + "InstanceIds":{ + "shape":"InstanceIds", + "documentation":"A list of Amazon Elastic Compute Cloud (EC2) instance IDs on which to perform deep health checks.
Leave this field blank to perform deep health checks on the entire instance group.
A list of deep health checks to be performed.
" + } }, - "internalonly":true + "documentation":"The configuration of deep health checks for an instance group.
Overlapping deep health check configurations will be merged into a single operation.
If you use a custom Amazon Machine Image (AMI) for the instance group, this field shows the ID of the custom AMI.
" - }, - "InstanceGroupDeepHealthCheck":{ - "shape":"InstanceGroupDeepHealthCheck", - "internalonly":true } }, "documentation":"Metadata information about an instance group in a HyperPod cluster.
" @@ -32552,7 +28366,7 @@ }, "MinCount":{ "shape":"InstanceCount", - "internalonly":true + "documentation":"Minimum instance count of the instance group.
" }, "FailureMessage":{ "shape":"String", @@ -32584,23 +28398,10 @@ "max":5, "min":0 }, - "InstanceHealthMetadata":{ - "type":"structure", - "members":{ - "OrchestratorHealthState":{"shape":"String"}, - "FailureMessage":{"shape":"String"} - }, - "internalonly":true - }, - "InstanceId":{ - "type":"string", - "internalonly":true - }, "InstanceIds":{ "type":"list", - "member":{"shape":"InstanceId"}, - "internalonly":true, - "max":100, + "member":{"shape":"ClusterNodeId"}, + "max":500, "min":1 }, "InstanceMetadata":{ @@ -32629,14 +28430,6 @@ "NodeLogicalId":{ "shape":"ClusterNodeLogicalId", "documentation":"The unique logical identifier of the node within the cluster. The ID used here is the same object as in the BatchAddClusterNodes API.
Metadata information about an instance in a HyperPod cluster.
" @@ -32652,21 +28445,13 @@ }, "documentation":"Information on the IMDS configuration of the notebook instance
" }, - "InstanceMonitorMetadata":{ - "type":"structure", - "members":{ - "InstanceReadyCount":{"shape":"InstanceReadyCount"}, - "TargetCount":{"shape":"TargetCount"}, - "FailureMessage":{"shape":"String"} - }, - "internalonly":true - }, "InstancePlacementConfig":{ "type":"structure", "members":{ "EnableMultipleJobs":{ "shape":"Boolean", - "documentation":"If set to true, allows multiple jobs to share the same UltraServer instances. If set to false, ensures this job's instances are placed on an UltraServer exclusively, with no other jobs sharing the same UltraServer. Default is false.
" + "documentation":"If set to true, allows multiple jobs to share the same UltraServer instances. If set to false, ensures this job's instances are placed on an UltraServer exclusively, with no other jobs sharing the same UltraServer. Default is false.
", + "box":true }, "PlacementSpecifications":{ "shape":"PlacementSpecifications", @@ -32675,11 +28460,6 @@ }, "documentation":"Configuration for how instances are placed and allocated within UltraServers. This is only applicable for UltraServer capacity.
" }, - "InstanceReadyCount":{ - "type":"integer", - "box":true, - "min":0 - }, "InstanceType":{ "type":"string", "enum":[ @@ -32859,15 +28639,6 @@ ] }, "Integer":{"type":"integer"}, - "IntegerParameter":{ - "type":"structure", - "members":{ - "Name":{"shape":"String64"}, - "MinValue":{"shape":"Integer"}, - "MaxValue":{"shape":"Integer"}, - "ScalingType":{"shape":"ScalingType"} - } - }, "IntegerParameterRange":{ "type":"structure", "required":[ @@ -32919,23 +28690,8 @@ "max":30, "min":0 }, - "IntegerParameters":{ - "type":"list", - "member":{"shape":"IntegerParameter"} - }, - "IntertokenLatency":{ - "type":"float", - "box":true, - "min":0.0 - }, "InvocationEndTime":{"type":"timestamp"}, "InvocationStartTime":{"type":"timestamp"}, - "InvocationTimeoutInSeconds":{ - "type":"integer", - "box":true, - "max":1000, - "min":1 - }, "InvocationsMaxRetries":{ "type":"integer", "box":true, @@ -32948,12 +28704,6 @@ "max":3600, "min":1 }, - "IoTAnalyticsDatasetArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws[a-z\\-]*:iotanalytics:[a-z0-9\\-]*:[0-9]{12}:dataset/.*" - }, "IotRoleAlias":{ "type":"string", "pattern":"arn:aws[a-z\\-]*:iam::\\d{12}:rolealias/?[a-zA-Z_0-9+=,.@\\-_/]+" @@ -32970,10 +28720,6 @@ "max":256, "min":1 }, - "IterationNumbers":{ - "type":"list", - "member":{"shape":"NonNegativeInteger"} - }, "JobDurationInSeconds":{ "type":"integer", "box":true, @@ -33083,19 +28829,7 @@ "type":"integer", "documentation":"Optional. Customer requested period in seconds for which the Training cluster is kept alive after the job is finished.
", "box":true, - "max":3600, - "min":0 - }, - "KendraIndexId":{ - "type":"string", - "max":36, - "min":36, - "pattern":"[a-zA-Z0-9][a-zA-Z0-9-]*" - }, - "KendraIndexIdList":{ - "type":"list", - "member":{"shape":"KendraIndexId"}, - "max":10, + "max":21600, "min":0 }, "KendraSettings":{ @@ -33104,10 +28838,6 @@ "Status":{ "shape":"FeatureStatus", "documentation":"Describes whether the document querying feature is enabled or disabled in the Canvas application.
" - }, - "IndexIdList":{ - "shape":"KendraIndexIdList", - "internalonly":true } }, "documentation":"The Amazon SageMaker Canvas application setting where you configure document querying.
" @@ -33182,13 +28912,6 @@ "min":1, "pattern":".+" }, - "KmsEncryptionContext":{ - "type":"map", - "key":{"shape":"ConfigKey"}, - "value":{"shape":"ConfigValue"}, - "max":5, - "min":0 - }, "KmsKeyId":{ "type":"string", "max":2048, @@ -33210,23 +28933,28 @@ "members":{ "TotalLabeled":{ "shape":"LabelCounter", - "documentation":"The total number of objects labeled.
" + "documentation":"The total number of objects labeled.
", + "box":true }, "HumanLabeled":{ "shape":"LabelCounter", - "documentation":"The total number of objects labeled by a human worker.
" + "documentation":"The total number of objects labeled by a human worker.
", + "box":true }, "MachineLabeled":{ "shape":"LabelCounter", - "documentation":"The total number of objects labeled by automated data labeling.
" + "documentation":"The total number of objects labeled by automated data labeling.
", + "box":true }, "FailedNonRetryableError":{ "shape":"LabelCounter", - "documentation":"The total number of objects that could not be labeled due to an error.
" + "documentation":"The total number of objects that could not be labeled due to an error.
", + "box":true }, "Unlabeled":{ "shape":"LabelCounter", - "documentation":"The total number of objects not yet labeled.
" + "documentation":"The total number of objects not yet labeled.
", + "box":true } }, "documentation":"Provides a breakdown of the number of objects labeled.
" @@ -33236,15 +28964,18 @@ "members":{ "HumanLabeled":{ "shape":"LabelCounter", - "documentation":"The total number of data objects labeled by a human worker.
" + "documentation":"The total number of data objects labeled by a human worker.
", + "box":true }, "PendingHuman":{ "shape":"LabelCounter", - "documentation":"The total number of data objects that need to be labeled by a human worker.
" + "documentation":"The total number of data objects that need to be labeled by a human worker.
", + "box":true }, "Total":{ "shape":"LabelCounter", - "documentation":"The total number of tasks in the labeling job.
" + "documentation":"The total number of tasks in the labeling job.
", + "box":true } }, "documentation":"Provides counts for human-labeled tasks in the labeling job.
" @@ -33523,60 +29254,6 @@ "type":"list", "member":{"shape":"LabelingJobSummary"} }, - "LabelingPortalPolicy":{ - "type":"structure", - "required":["LabelingPortalPolicyStatements"], - "members":{ - "LabelingPortalPolicyStatements":{"shape":"LabelingPortalPolicyStatements"} - } - }, - "LabelingPortalPolicyAction":{ - "type":"string", - "enum":["LabelingPortalFullAccess"] - }, - "LabelingPortalPolicyGroup":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+" - }, - "LabelingPortalPolicyGroups":{ - "type":"list", - "member":{"shape":"LabelingPortalPolicyGroup"}, - "max":10, - "min":1 - }, - "LabelingPortalPolicyResource":{ - "type":"string", - "max":512, - "min":1, - "pattern":"\\*" - }, - "LabelingPortalPolicyResources":{ - "type":"list", - "member":{"shape":"LabelingPortalPolicyResource"}, - "max":1, - "min":1 - }, - "LabelingPortalPolicyStatement":{ - "type":"structure", - "required":[ - "LabelingPortalPolicyGroups", - "LabelingPortalPolicyAction", - "LabelingPortalPolicyResources" - ], - "members":{ - "LabelingPortalPolicyGroups":{"shape":"LabelingPortalPolicyGroups"}, - "LabelingPortalPolicyAction":{"shape":"LabelingPortalPolicyAction"}, - "LabelingPortalPolicyResources":{"shape":"LabelingPortalPolicyResources"} - } - }, - "LabelingPortalPolicyStatements":{ - "type":"list", - "member":{"shape":"LabelingPortalPolicyStatement"}, - "max":1, - "min":1 - }, "LambdaFunctionArn":{ "type":"string", "max":2048, @@ -33691,22 +29368,22 @@ "members":{ "ActionArns":{ "shape":"MapString2048", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the lineage action.
" }, "ArtifactArns":{ "shape":"MapString2048", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the lineage artifact.
" }, "ContextArns":{ "shape":"MapString2048", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of the lineage context.
" }, "Associations":{ "shape":"AssociationInfoList", - "internalonly":true + "documentation":"The lineage associations.
" } }, - "internalonly":true + "documentation":"The metadata that tracks relationships between ML artifacts, actions, and contexts.
" }, "LineageType":{ "type":"string", @@ -33717,6 +29394,178 @@ "Action" ] }, + "ListAIBenchmarkJobsRequest":{ + "type":"structure", + "members":{ + "MaxResults":{ + "shape":"MaxResults", + "documentation":"The maximum number of benchmark jobs to return in the response.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"If the previous call to ListAIBenchmarkJobs didn't return the full set of jobs, the call returns a token for getting the next set.
A string in the job name. This filter returns only jobs whose name contains the specified string.
" + }, + "StatusEquals":{ + "shape":"AIBenchmarkJobStatus", + "documentation":"A filter that returns only benchmark jobs with the specified status.
" + }, + "CreationTimeAfter":{ + "shape":"Timestamp", + "documentation":"A filter that returns only jobs created after the specified time.
" + }, + "CreationTimeBefore":{ + "shape":"Timestamp", + "documentation":"A filter that returns only jobs created before the specified time.
" + }, + "SortBy":{ + "shape":"ListAIBenchmarkJobsSortBy", + "documentation":"The field to sort results by. The default is CreationTime.
The sort order for results. The default is Descending.
An array of AIBenchmarkJobSummary objects, one for each benchmark job that matches the specified filters.
If the response is truncated, Amazon SageMaker AI returns this token. To retrieve the next set of jobs, use it in the subsequent request.
" + } + } + }, + "ListAIBenchmarkJobsSortBy":{ + "type":"string", + "enum":[ + "Name", + "CreationTime", + "Status" + ] + }, + "ListAIRecommendationJobsRequest":{ + "type":"structure", + "members":{ + "MaxResults":{ + "shape":"MaxResults", + "documentation":"The maximum number of recommendation jobs to return in the response.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"If the previous call to ListAIRecommendationJobs didn't return the full set of jobs, the call returns a token for getting the next set.
A string in the job name. This filter returns only jobs whose name contains the specified string.
" + }, + "StatusEquals":{ + "shape":"AIRecommendationJobStatus", + "documentation":"A filter that returns only recommendation jobs with the specified status.
" + }, + "CreationTimeAfter":{ + "shape":"Timestamp", + "documentation":"A filter that returns only jobs created after the specified time.
" + }, + "CreationTimeBefore":{ + "shape":"Timestamp", + "documentation":"A filter that returns only jobs created before the specified time.
" + }, + "SortBy":{ + "shape":"ListAIRecommendationJobsSortBy", + "documentation":"The field to sort results by. The default is CreationTime.
The sort order for results. The default is Descending.
An array of AIRecommendationJobSummary objects, one for each recommendation job that matches the specified filters.
If the response is truncated, Amazon SageMaker AI returns this token. To retrieve the next set of jobs, use it in the subsequent request.
" + } + } + }, + "ListAIRecommendationJobsSortBy":{ + "type":"string", + "enum":[ + "Name", + "CreationTime", + "Status" + ] + }, + "ListAIWorkloadConfigsRequest":{ + "type":"structure", + "members":{ + "MaxResults":{ + "shape":"MaxResults", + "documentation":"The maximum number of AI workload configurations to return in the response.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"If the previous call to ListAIWorkloadConfigs didn't return the full set of configurations, the call returns a token for getting the next set of configurations.
A string in the configuration name. This filter returns only configurations whose name contains the specified string.
" + }, + "CreationTimeAfter":{ + "shape":"Timestamp", + "documentation":"A filter that returns only configurations created after the specified time.
" + }, + "CreationTimeBefore":{ + "shape":"Timestamp", + "documentation":"A filter that returns only configurations created before the specified time.
" + }, + "SortBy":{ + "shape":"ListAIWorkloadConfigsSortBy", + "documentation":"The field to sort results by. The default is CreationTime.
The sort order for results. The default is Descending.
An array of AIWorkloadConfigSummary objects, one for each AI workload configuration that matches the specified filters.
If the response is truncated, Amazon SageMaker AI returns this token. To retrieve the next set of configurations, use it in the subsequent request.
" + } + } + }, + "ListAIWorkloadConfigsSortBy":{ + "type":"string", + "enum":[ + "Name", + "CreationTime" + ] + }, "ListActionsRequest":{ "type":"structure", "members":{ @@ -34125,30 +29974,6 @@ } } }, - "ListAutoMLTasksForAutoMLJobRequest":{ - "type":"structure", - "required":["AutoMLJobName"], - "members":{ - "AutoMLJobName":{"shape":"AutoMLJobName"}, - "AutoMLTaskStatusEquals":{"shape":"AutoMLTaskStatus"}, - "AutoMLTaskTypeEquals":{"shape":"AutoMLTaskType"}, - "SortBy":{"shape":"AutoMLTaskSortBy"}, - "SortOrder":{"shape":"AutoMLSortOrder"}, - "MaxResults":{ - "shape":"AutoMLMaxResultsForTasks", - "box":true - }, - "NextToken":{"shape":"NextToken"} - } - }, - "ListAutoMLTasksForAutoMLJobResponse":{ - "type":"structure", - "required":["AutoMLTasks"], - "members":{ - "AutoMLTasks":{"shape":"AutoMLTasks"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListCandidatesForAutoMLJobRequest":{ "type":"structure", "required":["AutoMLJobName"], @@ -34198,52 +30023,6 @@ } } }, - "ListCapacityScheduleOfferingsRequest":{ - "type":"structure", - "required":[ - "InstanceType", - "InstanceCount" - ], - "members":{ - "InstanceType":{"shape":"CapacityScheduleInstanceType"}, - "InstanceCount":{"shape":"CapacityScheduleInstanceCount"}, - "StartTimeAfter":{"shape":"Timestamp"}, - "EndTimeBefore":{"shape":"Timestamp"}, - "DurationInHours":{"shape":"CapacityScheduleDurationInHours"}, - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"MaxResults"} - } - }, - "ListCapacityScheduleOfferingsResponse":{ - "type":"structure", - "required":["CapacityScheduleOfferings"], - "members":{ - "CapacityScheduleOfferings":{"shape":"CapacityScheduleOfferings"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListCapacitySchedulesRequest":{ - "type":"structure", - "members":{ - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"MaxResults"}, - "RequestedStartTimeAfter":{"shape":"Timestamp"}, - "RequestedStartTimeBefore":{"shape":"Timestamp"}, - "StartTimeAfter":{"shape":"Timestamp"}, - "StartTimeBefore":{"shape":"Timestamp"}, - "SortBy":{"shape":"CapacityScheduleSortBy"}, - "SortOrder":{"shape":"CapacityScheduleSortOrder"}, - "Filters":{"shape":"CapacityScheduleFilters"} - } - }, - "ListCapacitySchedulesResponse":{ - "type":"structure", - "required":["CapacityScheduleDetails"], - "members":{ - "NextToken":{"shape":"NextToken"}, - "CapacityScheduleDetails":{"shape":"CapacityScheduleDetails"} - } - }, "ListClusterEventsRequest":{ "type":"structure", "required":["ClusterName"], @@ -34586,29 +30365,6 @@ "Status" ] }, - "ListComponentJobsForAutoMLJobRequest":{ - "type":"structure", - "required":["AutoMLJobName"], - "members":{ - "AutoMLJobName":{"shape":"AutoMLJobName"}, - "StatusEquals":{"shape":"ComponentJobStatus"}, - "SortBy":{"shape":"AutoMLSortBy"}, - "SortOrder":{"shape":"AutoMLSortOrder"}, - "MaxResults":{ - "shape":"AutoMLMaxResults", - "box":true - }, - "NextToken":{"shape":"NextToken"} - } - }, - "ListComponentJobsForAutoMLJobResponse":{ - "type":"structure", - "required":["ComponentJobSummaries"], - "members":{ - "ComponentJobSummaries":{"shape":"ComponentJobSummaries"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListComputeQuotasRequest":{ "type":"structure", "members":{ @@ -34713,27 +30469,6 @@ } } }, - "ListCustomMonitoringJobDefinitionsRequest":{ - "type":"structure", - "members":{ - "EndpointName":{"shape":"EndpointName"}, - "SortBy":{"shape":"MonitoringJobDefinitionSortKey"}, - "SortOrder":{"shape":"SortOrder"}, - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"MaxResults"}, - "NameContains":{"shape":"NameContains"}, - "CreationTimeBefore":{"shape":"Timestamp"}, - "CreationTimeAfter":{"shape":"Timestamp"} - } - }, - "ListCustomMonitoringJobDefinitionsResponse":{ - "type":"structure", - "required":["JobDefinitionSummaries"], - "members":{ - "JobDefinitionSummaries":{"shape":"MonitoringJobDefinitionSummaryList"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListDataQualityJobDefinitionsRequest":{ "type":"structure", "members":{ @@ -35164,27 +30899,6 @@ } } }, - "ListEvaluationJobsRequest":{ - "type":"structure", - "members":{ - "CreationTimeAfter":{"shape":"Timestamp"}, - "CreationTimeBefore":{"shape":"Timestamp"}, - "NameContains":{"shape":"NameContains"}, - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"MaxResults"}, - "SortBy":{"shape":"EvaluationJobSortBy"}, - "SortOrder":{"shape":"SortOrder"}, - "StatusEquals":{"shape":"EvaluationJobStatus"} - } - }, - "ListEvaluationJobsResponse":{ - "type":"structure", - "required":["EvaluationJobSummaries"], - "members":{ - "EvaluationJobSummaries":{"shape":"EvaluationJobSummaries"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListExperimentsRequest":{ "type":"structure", "members":{ @@ -35321,52 +31035,6 @@ } } }, - "ListGroundTruthJobsRequest":{ - "type":"structure", - "required":["GroundTruthProjectName"], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "MaxResults":{"shape":"MaxResults"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListGroundTruthJobsResponse":{ - "type":"structure", - "members":{ - "GroundTruthJobSummaries":{"shape":"GroundTruthJobSummaryList"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListGroundTruthProjectsRequest":{ - "type":"structure", - "members":{ - "MaxResults":{"shape":"MaxResults"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListGroundTruthProjectsResponse":{ - "type":"structure", - "members":{ - "GroundTruthProjectSummaries":{"shape":"GroundTruthProjectSummaryList"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListGroundTruthWorkflowsRequest":{ - "type":"structure", - "required":["GroundTruthProjectName"], - "members":{ - "GroundTruthProjectName":{"shape":"GroundTruthProjectName"}, - "MaxResults":{"shape":"MaxResults"}, - "NextToken":{"shape":"NextToken"} - } - }, - "ListGroundTruthWorkflowsResponse":{ - "type":"structure", - "members":{ - "GroundTruthWorkflowSummaries":{"shape":"GroundTruthWorkflowSummaryList"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListHubContentVersionsRequest":{ "type":"structure", "required":[ @@ -36170,23 +31838,59 @@ "ListMlflowAppsRequest":{ "type":"structure", "members":{ - "CreatedAfter":{"shape":"Timestamp"}, - "CreatedBefore":{"shape":"Timestamp"}, - "Status":{"shape":"MlflowAppStatus"}, - "MlflowVersion":{"shape":"MlflowVersion"}, - "DefaultForDomainId":{"shape":"String"}, - "AccountDefaultStatus":{"shape":"AccountDefaultStatus"}, - "SortBy":{"shape":"SortMlflowAppBy"}, - "SortOrder":{"shape":"SortOrder"}, - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"MaxResults"} + "CreatedAfter":{ + "shape":"Timestamp", + "documentation":"Use the CreatedAfter filter to only list MLflow Apps created after a specific date and time. Listed MLflow Apps are shown with a date and time such as \"2024-03-16T01:46:56+00:00\". The CreatedAfter parameter takes in a Unix timestamp.
Use the CreatedBefore filter to only list MLflow Apps created before a specific date and time. Listed MLflow Apps are shown with a date and time such as \"2024-03-16T01:46:56+00:00\". The CreatedAfter parameter takes in a Unix timestamp.
Filter for Mlflow apps with a specific creation status.
" + }, + "MlflowVersion":{ + "shape":"MlflowVersion", + "documentation":"Filter for Mlflow Apps with the specified version.
" + }, + "DefaultForDomainId":{ + "shape":"String", + "documentation":"Filter for MLflow Apps with the specified default SageMaker Domain ID.
" + }, + "AccountDefaultStatus":{ + "shape":"AccountDefaultStatus", + "documentation":"Filter for MLflow Apps with the specified AccountDefaultStatus.
Filter for MLflow Apps sorting by name, creation time, or creation status.
" + }, + "SortOrder":{ + "shape":"SortOrder", + "documentation":"Change the order of the listed MLflow Apps. By default, MLflow Apps are listed in Descending order by creation time. To change the list order, specify SortOrder to be Ascending.
If the previous response was truncated, use this token in your next request to receive the next set of results.
" + }, + "MaxResults":{ + "shape":"MaxResults", + "documentation":"The maximum number of MLflow Apps to list.
" + } } }, "ListMlflowAppsResponse":{ "type":"structure", "members":{ - "Summaries":{"shape":"MlflowAppSummaries"}, - "NextToken":{"shape":"NextToken"} + "Summaries":{ + "shape":"MlflowAppSummaries", + "documentation":"A list of MLflow Apps according to chosen filters.
" + }, + "NextToken":{ + "shape":"NextToken", + "documentation":"If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results.
" + } } }, "ListMlflowTrackingServersRequest":{ @@ -36300,7 +32004,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"List export jobs for the model card with the specified version.
" + "documentation":"List export jobs for the model card with the specified version.
", + "box":true }, "CreationTimeAfter":{ "shape":"Timestamp", @@ -36679,10 +32384,6 @@ "CreationTimeAfter":{ "shape":"Timestamp", "documentation":"A filter that returns only model quality monitoring job definitions created after the specified time.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } } }, @@ -36894,10 +32595,6 @@ "MonitoringTypeEquals":{ "shape":"MonitoringType", "documentation":"A filter that returns only the monitoring job runs of the specified monitoring type.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } } }, @@ -36969,10 +32666,6 @@ "MonitoringTypeEquals":{ "shape":"MonitoringType", "documentation":"A filter that returns only the monitoring schedules for the specified monitoring type.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } } }, @@ -37501,10 +33194,6 @@ "SortOrder":{ "shape":"ProjectSortOrder", "documentation":"The sort order for results. The default is Ascending.
Toggle for excluding devices deployed in other stages.
" + "documentation":"Toggle for excluding devices deployed in other stages.
", + "box":true }, "StageName":{ "shape":"EntityName", @@ -37905,22 +33451,6 @@ } } }, - "ListTagsInternalInput":{ - "type":"structure", - "required":["ResourceArn"], - "members":{ - "ResourceArn":{"shape":"ResourceArn"}, - "NextToken":{"shape":"NextToken"}, - "MaxResults":{"shape":"ListTagsMaxResults"} - } - }, - "ListTagsInternalOutput":{ - "type":"structure", - "members":{ - "Tags":{"shape":"TagList"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListTagsMaxResults":{ "type":"integer", "box":true, @@ -38160,34 +33690,6 @@ "type":"list", "member":{"shape":"TrialComponentKey256"} }, - "ListTrialComponentsInternalRequest":{ - "type":"structure", - "members":{ - "ExperimentName":{ - "shape":"ExperimentEntityName", - "internalonly":true - }, - "TrialName":{ - "shape":"ExperimentEntityName", - "internalonly":true - }, - "SourceArn":{"shape":"String256"}, - "CreatedAfter":{"shape":"Timestamp"}, - "CreatedBefore":{"shape":"Timestamp"}, - "SortBy":{"shape":"SortTrialComponentsBy"}, - "SortOrder":{"shape":"SortOrder"}, - "MaxResults":{"shape":"MaxResults"}, - "NextToken":{"shape":"NextToken"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "ListTrialComponentsInternalResponse":{ - "type":"structure", - "members":{ - "TrialComponentSummaries":{"shape":"TrialComponentSummaries"}, - "NextToken":{"shape":"NextToken"} - } - }, "ListTrialComponentsRequest":{ "type":"structure", "members":{ @@ -38458,43 +33960,12 @@ "CreateDate" ] }, - "LocalAppLaunchConfiguration":{ - "type":"structure", - "members":{ - "ParentAppArn":{"shape":"AppArn"}, - "Services":{"shape":"Services"} - }, - "internalonly":true - }, - "LocalModeEnabled":{"type":"boolean"}, "LocalPath":{ "type":"string", "max":1024, "min":0, "pattern":"\\/.*" }, - "LogRoutingConfig":{ - "type":"structure", - "members":{ - "LogGroup":{ - "shape":"CWLogGroup", - "internalonly":true - }, - "LogStreamPrefix":{ - "shape":"CWLogStream", - "internalonly":true - }, - "MetricsNamespace":{ - "shape":"CWMetricNamespace", - "internalonly":true - }, - "MetricsHostDimensionValue":{ - "shape":"MetricsHostDimensionValue", - "internalonly":true - } - }, - "internalonly":true - }, "Long":{"type":"long"}, "LongS3Uri":{ "type":"string", @@ -38552,14 +34023,14 @@ "members":{ "MlflowResourceArn":{ "shape":"MLflowArn", - "internalonly":true + "documentation":"The Amazon Resource Name (ARN) of MLflow configuration resource.
" }, "MlflowExperimentName":{ "shape":"MlflowExperimentEntityName", - "internalonly":true + "documentation":"The name of the MLflow configuration.
" } }, - "internalonly":true + "documentation":"The MLflow configuration.
" }, "MaintenanceStatus":{ "type":"string", @@ -38575,16 +34046,35 @@ "min":0, "pattern":"\\d+\\.\\d+" }, + "ManagedInstanceScalingCooldownInMinutes":{ + "type":"integer", + "box":true, + "max":1440, + "min":5 + }, "ManagedInstanceScalingMaxInstanceCount":{ "type":"integer", "box":true, "min":1 }, + "ManagedInstanceScalingMaximumStepSize":{ + "type":"integer", + "box":true, + "max":100, + "min":1 + }, "ManagedInstanceScalingMinInstanceCount":{ "type":"integer", "box":true, "min":0 }, + "ManagedInstanceScalingScaleInStrategy":{ + "type":"string", + "enum":[ + "IDLE_RELEASE", + "CONSOLIDATION" + ] + }, "ManagedInstanceScalingStatus":{ "type":"string", "enum":[ @@ -38599,13 +34089,6 @@ "max":5, "min":0 }, - "MapString256":{ - "type":"map", - "key":{"shape":"String256"}, - "value":{"shape":"String256"}, - "max":30, - "min":0 - }, "MaxAutoMLJobRuntimeInSeconds":{ "type":"integer", "box":true, @@ -38617,11 +34100,6 @@ "max":750, "min":1 }, - "MaxConcurrency":{ - "type":"integer", - "box":true, - "min":0 - }, "MaxConcurrentInvocationsPerInstance":{ "type":"integer", "box":true, @@ -38705,21 +34183,11 @@ "box":true, "min":1 }, - "MaxTotalComputeTimeInMinutes":{ - "type":"integer", - "box":true, - "min":1 - }, "MaxWaitTimeInSeconds":{ "type":"integer", "box":true, "min":1 }, - "MaxWallClockTimeInMinutes":{ - "type":"integer", - "box":true, - "min":1 - }, "MaximumExecutionTimeoutInSeconds":{ "type":"integer", "box":true, @@ -38751,34 +34219,12 @@ }, "documentation":"Defines an Amazon Cognito or your own OIDC IdP user group that is part of a work team.
" }, - "MemberDefinitionId":{ - "type":"string", - "internalonly":true, - "max":128, - "min":1, - "pattern":"[a-zA-Z0-9]([-_.]?[a-zA-Z0-9])*" - }, "MemberDefinitions":{ "type":"list", "member":{"shape":"MemberDefinition"}, "max":10, "min":1 }, - "MembershipRule":{ - "type":"structure", - "members":{ - "TargetMemberDefinition":{"shape":"TargetMemberDefinition"}, - "FilterExpression":{"shape":"FilterExpression"} - }, - "internalonly":true - }, - "MembershipType":{ - "type":"string", - "enum":[ - "AnyMemberDefinition", - "MembershipRule" - ] - }, "MemoryInGiBAmount":{ "type":"float", "box":true, @@ -38808,10 +34254,6 @@ "ProjectId":{ "shape":"MetadataPropertyValue", "documentation":"The project ID.
" - }, - "BranchName":{ - "shape":"MetadataPropertyValue", - "internalonly":true } }, "documentation":"Metadata properties of the tracking entity, trial, or trial component.
" @@ -38831,7 +34273,8 @@ }, "Value":{ "shape":"Float", - "documentation":"The value of the metric.
" + "documentation":"The value of the metric.
", + "box":true }, "Timestamp":{ "shape":"Timestamp", @@ -38859,7 +34302,8 @@ }, "Value":{ "shape":"Float", - "documentation":"The value of the metric.
" + "documentation":"The value of the metric.
", + "box":true }, "Set":{ "shape":"MetricSetSource", @@ -38902,68 +34346,6 @@ "type":"integer", "box":true }, - "MetricQuery":{ - "type":"structure", - "required":[ - "MetricName", - "ResourceArn", - "MetricStat", - "Period", - "XAxisType" - ], - "members":{ - "MetricName":{"shape":"MetricName"}, - "ResourceArn":{"shape":"SageMakerResourceArn"}, - "MetricStat":{"shape":"MetricStatistic"}, - "Period":{"shape":"Period"}, - "XAxisType":{"shape":"XAxisType"}, - "Start":{"shape":"Timestamp"}, - "End":{"shape":"Timestamp"}, - "StartIterationNumber":{ - "shape":"NonNegativeInteger", - "box":true - }, - "EndIterationNumber":{ - "shape":"NonNegativeInteger", - "box":true - } - } - }, - "MetricQueryList":{ - "type":"list", - "member":{"shape":"MetricQuery"}, - "max":100, - "min":1 - }, - "MetricQueryResult":{ - "type":"structure", - "required":[ - "Status", - "MetricValues" - ], - "members":{ - "Status":{"shape":"MetricQueryResultStatus"}, - "Message":{"shape":"String"}, - "IterationNumbers":{"shape":"IterationNumbers"}, - "Timestamps":{"shape":"Timestamps"}, - "MetricValues":{"shape":"MetricValues"} - } - }, - "MetricQueryResultList":{ - "type":"list", - "member":{"shape":"MetricQueryResult"}, - "max":100, - "min":1 - }, - "MetricQueryResultStatus":{ - "type":"string", - "enum":[ - "Complete", - "Truncated", - "InternalError", - "ValidationError" - ] - }, "MetricRegex":{ "type":"string", "max":500, @@ -38993,39 +34375,20 @@ "documentation":"An object containing information about a metric.
", "union":true }, - "MetricStatistic":{ - "type":"string", - "enum":[ - "Min", - "Max", - "Avg", - "Count", - "StdDev", - "Last" - ] - }, "MetricValue":{"type":"float"}, - "MetricValues":{ - "type":"list", - "member":{"shape":"Double"} - }, "MetricsConfig":{ "type":"structure", "members":{ "EnableEnhancedMetrics":{ "shape":"EnableEnhancedMetrics", - "documentation":"Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization data at instance and container granularity. Container granularity is supported for Inference Components. The default is False.
Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization and invocation data at instance and container granularity. Container granularity is supported for Inference Components. The default is False.
The frequency, in seconds, at which Utilization Metrics are published to Amazon CloudWatch. The default is 60 seconds.
The interval, in seconds, at which metrics are published to Amazon CloudWatch. Defaults to 60. Valid values: 10, 30, 60, 120, 180, 240, 300. When EnableEnhancedMetrics is set to False, this interval applies to utilization metrics only; invocation metrics continue to be published at the default 60-second interval. When EnableEnhancedMetrics is set to True, this interval applies to both utilization and invocation metrics.
The configuration for Utilization metrics.
" }, "MetricsSource":{ "type":"structure", @@ -39131,13 +34494,32 @@ "MlflowAppSummary":{ "type":"structure", "members":{ - "Arn":{"shape":"MlflowAppArn"}, - "Name":{"shape":"MlflowAppName"}, - "Status":{"shape":"MlflowAppStatus"}, - "CreationTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"}, - "MlflowVersion":{"shape":"MlflowVersion"} - } + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of a listed MLflow App.
" + }, + "Name":{ + "shape":"MlflowAppName", + "documentation":"The name of the MLflow App.
" + }, + "Status":{ + "shape":"MlflowAppStatus", + "documentation":"The status of the MLflow App.
" + }, + "CreationTime":{ + "shape":"Timestamp", + "documentation":"The creation time of a listed MLflow App.
" + }, + "LastModifiedTime":{ + "shape":"Timestamp", + "documentation":"The last modified time of a listed MLflow App.
" + }, + "MlflowVersion":{ + "shape":"MlflowVersion", + "documentation":"The version of a listed MLflow App.
" + } + }, + "documentation":"The summary of the Mlflow App to list.
" }, "MlflowAppUrl":{ "type":"string", @@ -39148,23 +34530,34 @@ "type":"structure", "required":["MlflowResourceArn"], "members":{ - "MlflowTrackingServerArn":{ + "MlflowResourceArn":{ "shape":"MlFlowResourceArn", - "deprecated":true + "documentation":"The Amazon Resource Name (ARN) of the MLflow resource.
" + }, + "MlflowExperimentName":{ + "shape":"MlflowExperimentName", + "documentation":"The MLflow experiment name used for this job.
" }, - "MlflowResourceArn":{"shape":"MlFlowResourceArn"}, - "MlflowExperimentName":{"shape":"MlflowExperimentName"}, - "MlflowRunName":{"shape":"MlflowRunName"} + "MlflowRunName":{ + "shape":"MlflowRunName", + "documentation":"The MLflow run name used for this job.
" + } }, - "internalonly":true + "documentation":"The MLflow configuration using SageMaker managed MLflow.
" }, "MlflowDetails":{ "type":"structure", "members":{ - "MlflowExperimentId":{"shape":"MlflowExperimentId"}, - "MlflowRunId":{"shape":"MlflowRunId"} + "MlflowExperimentId":{ + "shape":"MlflowExperimentId", + "documentation":"The MLflow experiment ID used for this job.
" + }, + "MlflowRunId":{ + "shape":"MlflowRunId", + "documentation":"The MLflow run ID used for this job.
" + } }, - "internalonly":true + "documentation":"The MLflow details of this job.
" }, "MlflowExperimentEntityName":{ "type":"string", @@ -39231,7 +34624,8 @@ }, "EnableNetworkIsolation":{ "shape":"Boolean", - "documentation":"Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
" + "documentation":"Isolates the model container. No inbound or outbound network calls can be made to or from the model container.
", + "box":true }, "Tags":{ "shape":"TagList", @@ -39250,7 +34644,8 @@ "members":{ "AcceptEula":{ "shape":"AcceptEula", - "documentation":"Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
The access configuration file to control access to the ML model. You can explicitly accept the model end-user license agreement (EULA) within the ModelAccessConfig.
If you are a Jumpstart user, see the End-user license agreements section for more details on accepting the EULA.
If you are an AutoML user, see the Optional Parameters section of Create an AutoML job to fine-tune text generation models using the API for details on How to set the EULA acceptance when fine-tuning a model using the AutoML API.
The configuration for a baseline model bias job.
" }, - "ModelBiasJobDefinition":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "ModelBiasAppSpecification", - "ModelBiasJobInput", - "ModelBiasJobOutputConfig", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "ModelBiasBaselineConfig":{"shape":"ModelBiasBaselineConfig"}, - "ModelBiasAppSpecification":{"shape":"ModelBiasAppSpecification"}, - "ModelBiasJobInput":{"shape":"ModelBiasJobInput"}, - "ModelBiasJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - }, - "internalonly":true - }, "ModelBiasJobInput":{ "type":"structure", "required":["GroundTruthS3Input"], @@ -39376,7 +34744,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"The version of the model card.
" + "documentation":"The version of the model card.
", + "box":true }, "Content":{ "shape":"ModelCardContent", @@ -39503,7 +34872,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"The version of the model card that the export job exports.
" + "documentation":"The version of the model card that the export job exports.
", + "box":true }, "CreatedAt":{ "shape":"Timestamp", @@ -39645,7 +35015,8 @@ }, "ModelCardVersion":{ "shape":"Integer", - "documentation":"A version of the model card.
" + "documentation":"A version of the model card.
", + "box":true }, "CreationTime":{ "shape":"Timestamp", @@ -39711,10 +35082,6 @@ "CompilationJobName":{ "shape":"RecommendationJobCompilationJobName", "documentation":"The name of the compilation job used to create the recommended model artifacts.
" - }, - "Image":{ - "shape":"ContainerImage", - "internalonly":true } }, "documentation":"Defines the model configuration. Includes the specification name and environment parameters.
" @@ -39761,7 +35128,8 @@ "members":{ "Enabled":{ "shape":"Boolean", - "documentation":"Indicates whether the alert action is turned on.
" + "documentation":"Indicates whether the alert action is turned on.
", + "box":true } }, "documentation":"An alert action taken to light up an icon on the Amazon SageMaker Model Dashboard when an alert goes into InAlert status.
The model card version.
" + "documentation":"The model card version.
", + "box":true }, "ModelCardStatus":{ "shape":"ModelCardStatus", @@ -39878,26 +35247,6 @@ "documentation":"A JSON array where each element is a summary for a monitoring alert.
" }, "LastMonitoringExecutionSummary":{"shape":"MonitoringExecutionSummary"}, - "CustomMonitoringJobDefinition":{ - "shape":"CustomMonitoringJobDefinition", - "internalonly":true - }, - "DataQualityJobDefinition":{ - "shape":"DataQualityJobDefinition", - "internalonly":true - }, - "ModelQualityJobDefinition":{ - "shape":"ModelQualityJobDefinition", - "internalonly":true - }, - "ModelBiasJobDefinition":{ - "shape":"ModelBiasJobDefinition", - "internalonly":true - }, - "ModelExplainabilityJobDefinition":{ - "shape":"ModelExplainabilityJobDefinition", - "internalonly":true - }, "BatchTransformInput":{"shape":"BatchTransformInput"} }, "documentation":"A monitoring schedule for a model displayed in the Amazon SageMaker Model Dashboard.
" @@ -39933,78 +35282,24 @@ "ModelDeployConfig":{ "type":"structure", "members":{ - "ModelDeployMode":{ - "shape":"ModelDeployMode", - "internalonly":true - }, "AutoGenerateEndpointName":{ "shape":"AutoGenerateEndpointName", - "documentation":"Set to True to automatically generate an endpoint name for a one-click Autopilot model deployment; set to False otherwise. The default value is False.
If you set AutoGenerateEndpointName to True, do not specify the EndpointName; otherwise a 400 error is thrown.
Set to True to automatically generate an endpoint name for a one-click Autopilot model deployment; set to False otherwise. The default value is False.
If you set AutoGenerateEndpointName to True, do not specify the EndpointName; otherwise a 400 error is thrown.
Specifies the endpoint name to use for a one-click Autopilot model deployment if the endpoint name is not generated automatically.
Specify the EndpointName if and only if you set AutoGenerateEndpointName to False; otherwise a 400 error is thrown.
Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.
" }, - "ModelDeployEndpoint":{ - "type":"structure", - "members":{ - "EndpointName":{"shape":"EndpointName"}, - "EndpointArn":{"shape":"EndpointArn"} - }, - "internalonly":true - }, - "ModelDeployEndpointConfig":{ - "type":"structure", - "members":{ - "EndpointConfigName":{"shape":"EndpointConfigName"}, - "EndpointConfigArn":{"shape":"EndpointConfigArn"} - }, - "internalonly":true - }, - "ModelDeployEndpointConfigList":{ - "type":"list", - "member":{"shape":"ModelDeployEndpointConfig"}, - "internalonly":true - }, - "ModelDeployEndpointList":{ - "type":"list", - "member":{"shape":"ModelDeployEndpoint"}, - "internalonly":true - }, - "ModelDeployMode":{ - "type":"string", - "enum":[ - "Endpoint", - "EndpointConfig", - "Model" - ], - "internalonly":true - }, "ModelDeployResult":{ "type":"structure", "members":{ "EndpointName":{ "shape":"EndpointName", "documentation":"The name of the endpoint to which the model has been deployed.
If model deployment fails, this field is omitted from the response.
Provides information about the endpoint of the model deployment.
" @@ -40052,33 +35347,6 @@ }, "documentation":"The configuration for a baseline model explainability job.
" }, - "ModelExplainabilityJobDefinition":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "ModelExplainabilityAppSpecification", - "ModelExplainabilityJobInput", - "ModelExplainabilityJobOutputConfig", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "ModelExplainabilityBaselineConfig":{"shape":"ModelExplainabilityBaselineConfig"}, - "ModelExplainabilityAppSpecification":{"shape":"ModelExplainabilityAppSpecification"}, - "ModelExplainabilityJobInput":{"shape":"ModelExplainabilityJobInput"}, - "ModelExplainabilityJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - }, - "internalonly":true - }, "ModelExplainabilityJobInput":{ "type":"structure", "members":{ @@ -40127,13 +35395,6 @@ "type":"string", "min":1 }, - "ModelInsightsTaskContext":{ - "type":"structure", - "required":["CandidateName"], - "members":{ - "CandidateName":{"shape":"CandidateName"} - } - }, "ModelLatencyThreshold":{ "type":"structure", "members":{ @@ -40143,7 +35404,8 @@ }, "ValueInMilliseconds":{ "shape":"Integer", - "documentation":"The model latency percentile value in milliseconds.
" + "documentation":"The model latency percentile value in milliseconds.
", + "box":true } }, "documentation":"The model latency threshold.
" @@ -40176,17 +35438,6 @@ }, "documentation":"A structure describing the current state of the model in its life cycle.
" }, - "ModelList":{ - "type":"list", - "member":{"shape":"EvaluationJobModel"}, - "max":2, - "min":1 - }, - "ModelLoadConcurrencyFactor":{ - "type":"integer", - "box":true, - "min":0 - }, "ModelMetadataFilter":{ "type":"structure", "required":[ @@ -40318,7 +35569,7 @@ }, "ModelPackageRegistrationType":{ "shape":"ModelPackageRegistrationType", - "internalonly":true + "documentation":"The package registration type of the model package.
" }, "ModelPackageArn":{ "shape":"ModelPackageArn", @@ -40354,7 +35605,8 @@ }, "CertifyForMarketplace":{ "shape":"CertifyForMarketplace", - "documentation":"Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For information about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or Model Package on Amazon Web Services Marketplace.
" + "documentation":"Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For information about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or Model Package on Amazon Web Services Marketplace.
", + "box":true }, "ModelApprovalStatus":{ "shape":"ModelApprovalStatus", @@ -40372,7 +35624,6 @@ "shape":"ModelMetrics", "documentation":"Metrics for the model.
" }, - "DeploymentSpecification":{"shape":"DeploymentSpecification"}, "LastModifiedTime":{ "shape":"Timestamp", "documentation":"The last time the model package was modified.
" @@ -40446,10 +35697,16 @@ "type":"structure", "required":["ModelPackageGroupArn"], "members":{ - "ModelPackageGroupArn":{"shape":"ModelPackageGroupArn"}, - "SourceModelPackageArn":{"shape":"ModelPackageArn"} + "ModelPackageGroupArn":{ + "shape":"ModelPackageGroupArn", + "documentation":"The Amazon Resource Name (ARN) of the model package group of output model package.
" + }, + "SourceModelPackageArn":{ + "shape":"ModelPackageArn", + "documentation":"The Amazon Resource Name (ARN) of the source model package used for continued fine-tuning and custom model evaluation.
" + } }, - "internalonly":true + "documentation":"The configuration for the Model package.
" }, "ModelPackageContainerDefinition":{ "type":"structure", @@ -40498,9 +35755,9 @@ "shape":"String", "documentation":"The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model. You can find a list of benchmarked models by calling ListModelMetadata.
Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModelPackage action.
Specifies whether the model data is a training checkpoint.
", + "box":true }, "BaseModel":{ "shape":"BaseModel", - "internalonly":true + "documentation":"Identifies the foundation model that was used as the starting point for model customization.
" } }, "documentation":"Describes the Docker container for the model package.
" @@ -40768,7 +36026,7 @@ "ModelLifeCycle":{"shape":"ModelLifeCycle"}, "ModelPackageRegistrationType":{ "shape":"ModelPackageRegistrationType", - "internalonly":true + "documentation":"The package registration type of the model package summary.
" } }, "documentation":"Provides summary information about a model package.
" @@ -40892,33 +36150,6 @@ }, "documentation":"Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically.
" }, - "ModelQualityJobDefinition":{ - "type":"structure", - "required":[ - "JobDefinitionArn", - "JobDefinitionName", - "CreationTime", - "ModelQualityAppSpecification", - "ModelQualityJobInput", - "ModelQualityJobOutputConfig", - "JobResources", - "RoleArn" - ], - "members":{ - "JobDefinitionArn":{"shape":"MonitoringJobDefinitionArn"}, - "JobDefinitionName":{"shape":"MonitoringJobDefinitionName"}, - "CreationTime":{"shape":"Timestamp"}, - "ModelQualityBaselineConfig":{"shape":"ModelQualityBaselineConfig"}, - "ModelQualityAppSpecification":{"shape":"ModelQualityAppSpecification"}, - "ModelQualityJobInput":{"shape":"ModelQualityJobInput"}, - "ModelQualityJobOutputConfig":{"shape":"MonitoringOutputConfig"}, - "JobResources":{"shape":"MonitoringResources"}, - "NetworkConfig":{"shape":"MonitoringNetworkConfig"}, - "RoleArn":{"shape":"RoleArn"}, - "StoppingCondition":{"shape":"MonitoringStoppingCondition"} - }, - "internalonly":true - }, "ModelQualityJobInput":{ "type":"structure", "required":["GroundTruthS3Input"], @@ -41000,9 +36231,16 @@ "type":"structure", "required":["Technique"], "members":{ - "Technique":{"shape":"ModelSpeculativeDecodingTechnique"}, - "TrainingDataSource":{"shape":"ModelSpeculativeDecodingTrainingDataSource"} - } + "Technique":{ + "shape":"ModelSpeculativeDecodingTechnique", + "documentation":"The speculative decoding technique to apply during model optimization.
" + }, + "TrainingDataSource":{ + "shape":"ModelSpeculativeDecodingTrainingDataSource", + "documentation":"The location of the training data to use for speculative decoding. The data must be formatted as ShareGPT, OpenAI Completions or OpenAI Chat Completions. The input can also be unencrypted captured data from a SageMaker endpoint as long as the endpoint uses one of the above formats.
" + } + }, + "documentation":"Settings for the model speculative decoding technique that's applied by a model optimization job.
" }, "ModelSpeculativeDecodingS3DataType":{ "type":"string", @@ -41022,9 +36260,16 @@ "S3DataType" ], "members":{ - "S3Uri":{"shape":"S3Uri"}, - "S3DataType":{"shape":"ModelSpeculativeDecodingS3DataType"} - } + "S3Uri":{ + "shape":"S3Uri", + "documentation":"The Amazon S3 URI that points to the training data for speculative decoding.
" + }, + "S3DataType":{ + "shape":"ModelSpeculativeDecodingS3DataType", + "documentation":"The type of data stored in the Amazon S3 location. Valid values are S3Prefix or ManifestFile.
Contains information about the training data source for speculative decoding.
" }, "ModelStepMetadata":{ "type":"structure", @@ -41359,11 +36604,8 @@ "members":{ "Header":{ "shape":"Boolean", - "documentation":"Indicates if the CSV data has a header.
" - }, - "Compressed":{ - "shape":"Boolean", - "internalonly":true + "documentation":"Indicates if the CSV data has a header.
", + "box":true } }, "documentation":"Represents the CSV dataset format used when running a monitoring job.
" @@ -41405,12 +36647,6 @@ "max":100, "min":1 }, - "MonitoringExecutionId":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" - }, "MonitoringExecutionSortKey":{ "type":"string", "enum":[ @@ -41468,14 +36704,6 @@ "MonitoringType":{ "shape":"MonitoringType", "documentation":"The type of the monitoring job.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true - }, - "MonitoringExecutionId":{ - "shape":"MonitoringExecutionId", - "internalonly":true } }, "documentation":"Summary of information about the last monitoring job to run.
" @@ -41497,10 +36725,6 @@ "MonitoringInput":{ "type":"structure", "members":{ - "ProcessingInputs":{ - "shape":"MonitoringProcessingInputs", - "internalonly":true - }, "EndpointInput":{ "shape":"EndpointInput", "documentation":"The endpoint for a monitoring job.
" @@ -41610,10 +36834,6 @@ "EndpointName":{ "shape":"EndpointName", "documentation":"The name of the endpoint that the job monitors.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } }, "documentation":"Summary information about a monitoring job.
" @@ -41627,11 +36847,8 @@ "members":{ "Line":{ "shape":"Boolean", - "documentation":"Indicates if the file should be read as a JSON object per line.
" - }, - "Compressed":{ - "shape":"Boolean", - "internalonly":true + "documentation":"Indicates if the file should be read as a JSON object per line.
", + "box":true } }, "documentation":"Represents the JSON dataset format used when running a monitoring job.
" @@ -41646,11 +36863,13 @@ "members":{ "EnableInterContainerTrafficEncryption":{ "shape":"Boolean", - "documentation":"Whether to encrypt all communications between the instances used for the monitoring jobs. Choose True to encrypt communications. Encryption provides greater security for distributed jobs, but the processing might take longer.
Whether to encrypt all communications between the instances used for the monitoring jobs. Choose True to encrypt communications. Encryption provides greater security for distributed jobs, but the processing might take longer.
Whether to allow inbound and outbound network calls to and from the containers used for the monitoring job.
" + "documentation":"Whether to allow inbound and outbound network calls to and from the containers used for the monitoring job.
", + "box":true }, "VpcConfig":{"shape":"VpcConfig"} }, @@ -41701,12 +36920,6 @@ "Regression" ] }, - "MonitoringProcessingInputs":{ - "type":"list", - "member":{"shape":"ProcessingInput"}, - "max":3, - "min":0 - }, "MonitoringResources":{ "type":"structure", "required":["ClusterConfig"], @@ -41783,18 +36996,6 @@ "documentation":"The endpoint that hosts the model being monitored.
" }, "LastMonitoringExecutionSummary":{"shape":"MonitoringExecutionSummary"}, - "CustomMonitoringJobDefinition":{ - "shape":"CustomMonitoringJobDefinition", - "internalonly":true - }, - "DataQualityJobDefinition":{"shape":"DataQualityJobDefinition"}, - "ModelQualityJobDefinition":{"shape":"ModelQualityJobDefinition"}, - "ModelBiasJobDefinition":{"shape":"ModelBiasJobDefinition"}, - "ModelExplainabilityJobDefinition":{"shape":"ModelExplainabilityJobDefinition"}, - "VariantName":{ - "shape":"VariantName", - "internalonly":true - }, "Tags":{ "shape":"TagList", "documentation":"A list of the tags associated with the monitoring schedlue. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.
" @@ -41889,10 +37090,6 @@ "MonitoringType":{ "shape":"MonitoringType", "documentation":"The type of the monitoring job definition that the schedule is for.
" - }, - "VariantName":{ - "shape":"VariantName", - "internalonly":true } }, "documentation":"Summarizes the monitoring schedule.
" @@ -41917,7 +37114,8 @@ "members":{ "MaxRuntimeInSeconds":{ "shape":"MonitoringMaxRuntimeInSeconds", - "documentation":"The maximum runtime allowed in seconds.
The MaxRuntimeInSeconds cannot exceed the frequency of the job. For data quality and model explainability, this can be up to 3600 seconds for an hourly schedule. For model bias and model quality hourly schedules, this can be up to 1800 seconds.
The maximum runtime allowed in seconds.
The MaxRuntimeInSeconds cannot exceed the frequency of the job. For data quality and model explainability, this can be up to 3600 seconds for an hourly schedule. For model bias and model quality hourly schedules, this can be up to 1800 seconds.
A time limit for how long the monitoring job is allowed to run before stopping.
" @@ -41931,7 +37129,6 @@ "MonitoringType":{ "type":"string", "enum":[ - "Custom", "DataQuality", "ModelQuality", "ModelBias", @@ -41950,33 +37147,16 @@ "ModelCacheSetting":{ "shape":"ModelCacheSetting", "documentation":"Whether to cache models for a multi-model endpoint. By default, multi-model endpoints cache models so that a model does not have to be loaded into memory each time it is invoked. Some use cases do not benefit from model caching. For example, if an endpoint hosts a large number of models that are each invoked infrequently, the endpoint might perform better if you disable model caching. To disable model caching, set the value of this parameter to Disabled.
Specifies additional configuration for hosting multi-model endpoints.
" }, - "Name":{ - "type":"string", - "max":63, - "min":1, - "pattern":"[A-Za-z\\s]+" - }, "NameContains":{ "type":"string", "max":63, "min":0, "pattern":"[a-zA-Z0-9\\-]+" }, - "NeoResourceConfig":{ - "type":"structure", - "required":["VolumeKmsKeyId"], - "members":{ - "VolumeKmsKeyId":{"shape":"KmsKeyId"} - } - }, "NeoVpcConfig":{ "type":"structure", "required":[ @@ -42048,23 +37228,19 @@ "members":{ "EnableInterContainerTrafficEncryption":{ "shape":"Boolean", - "documentation":"Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.
Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.
Whether to allow inbound and outbound network calls to and from the containers used for the processing job.
" + "documentation":"Whether to allow inbound and outbound network calls to and from the containers used for the processing job.
", + "box":true }, "VpcConfig":{"shape":"VpcConfig"} }, "documentation":"Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs.
" }, "NetworkInterfaceId":{"type":"string"}, - "NetworkInterfaceTags":{ - "type":"list", - "member":{"shape":"Tag"}, - "max":10, - "min":1 - }, "NextToken":{ "type":"string", "max":8192, @@ -42090,6 +37266,14 @@ "Status":{ "shape":"ClusterInstanceStatus", "documentation":"The current status of the node. Possible values include Pending, Running, Failed, ShuttingDown, SystemUpdating, DeepHealthCheckInProgress, and NotFound.
The availability zones associated with the successfully added node.
" + }, + "InstanceTypes":{ + "shape":"ClusterInstanceTypes", + "documentation":"The instance types associated with the successfully added node.
" } }, "documentation":"Information about a node that was successfully added to the cluster.
" @@ -42122,10 +37306,6 @@ "min":0, "pattern":"(?!\\s*$).+" }, - "NonNegativeInteger":{ - "type":"integer", - "min":0 - }, "NotebookInstanceAcceleratorType":{ "type":"string", "enum":[ @@ -42351,25 +37531,11 @@ "type":"string", "pattern":"arn:aws[a-z\\-]*:sns:[a-z0-9\\-]*:[0-9]{12}:[a-zA-Z0-9_.-]*" }, - "NumFailuresAllowed":{ - "type":"integer", - "max":100, - "min":1 - }, - "NumPayload":{ - "type":"integer", - "max":100, - "min":1 - }, "NumberOfAcceleratorDevices":{ "type":"float", "box":true, "min":1 }, - "NumberOfConcurrentUsers":{ - "type":"integer", - "box":true - }, "NumberOfCpuCores":{ "type":"float", "box":true, @@ -42403,15 +37569,18 @@ "members":{ "Succeeded":{ "shape":"ObjectiveStatusCounter", - "documentation":"The number of training jobs whose final objective metric was evaluated by the hyperparameter tuning job and used in the hyperparameter tuning process.
" + "documentation":"The number of training jobs whose final objective metric was evaluated by the hyperparameter tuning job and used in the hyperparameter tuning process.
", + "box":true }, "Pending":{ "shape":"ObjectiveStatusCounter", - "documentation":"The number of training jobs that are in progress and pending evaluation of their final objective metric.
" + "documentation":"The number of training jobs that are in progress and pending evaluation of their final objective metric.
", + "box":true }, "Failed":{ "shape":"ObjectiveStatusCounter", - "documentation":"The number of training jobs whose final objective metric was not evaluated and used in the hyperparameter tuning process. This typically occurs when the training job failed or did not emit an objective metric.
" + "documentation":"The number of training jobs whose final objective metric was not evaluated and used in the hyperparameter tuning process. This typically occurs when the training job failed or did not emit an objective metric.
", + "box":true } }, "documentation":"Specifies the number of training jobs that this hyperparameter tuning job launched, categorized by the status of their objective metric. The objective metric status shows whether the final objective metric for the training job has been evaluated by the tuning job and used in the hyperparameter tuning process.
" @@ -42426,11 +37595,12 @@ }, "DisableGlueTableCreation":{ "shape":"Boolean", - "documentation":"Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore. If set to False, Feature Store will name the OfflineStore Glue table following Athena's naming recommendations.
The default value is False.
Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore. If set to True and DataCatalogConfig is provided, Feature Store associates the provided catalog configuration with the feature group without creating a table. In this case, you are responsible for creating and managing the Glue table. If set to True without DataCatalogConfig, no Glue table is created or associated with the feature group. The Iceberg table format is only supported when this is set to False.
If set to False and DataCatalogConfig is provided, Feature Store creates the table using the specified names. If set to False without DataCatalogConfig, Feature Store auto-generates the table name following Athena's naming recommendations. This applies to both Glue and Apache Iceberg table formats.
The default value is False.
The meta data of the Glue table that is autogenerated when an OfflineStore is created.
The meta data of the Glue table for the OfflineStore. If not provided, Feature Store auto-generates the table name, database, and catalog when the OfflineStore is created. You can optionally provide this configuration to specify custom values. This applies to both Glue and Apache Iceberg table formats.
A list of comma seperated strings that identifies user groups in your OIDC IdP. Each user group is made up of a group of private workers.
" - }, - "Group":{ - "shape":"Group", - "internalonly":true - }, - "MemberDefinitionId":{ - "shape":"MemberDefinitionId", - "internalonly":true } }, "documentation":"A list of user groups that exist in your OIDC Identity Provider (IdP). One to ten groups can be used to create a single private work team. When you add a user group to the list of Groups, you can add that user group to one or more private work teams. If you add a user group to a private work team, all workers in that user group are added to the work team.
Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag.
The default value is False.
Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag.
The default value is False.
Updates the feature group online store configuration.
" }, - "OnlineStoreMetadata":{ - "type":"structure", - "members":{ - "StorageAccountId":{"shape":"AccountId"}, - "IsOnlineStoreReplica":{"shape":"Boolean"}, - "OnlineStoreReplicaMetadata":{"shape":"OnlineStoreReplicaMetadata"} - } - }, - "OnlineStoreReadWriteType":{ - "type":"string", - "enum":[ - "ReadWrite", - "ReadOnly" - ] - }, - "OnlineStoreReplica":{ - "type":"structure", - "required":[ - "RegionName", - "OnlineStoreReplicaStatus" - ], - "members":{ - "RegionName":{"shape":"RegionName"}, - "OnlineStoreReplicaStatus":{"shape":"OnlineStoreReplicaStatus"} - } - }, - "OnlineStoreReplicaConfig":{ - "type":"structure", - "members":{ - "SecurityConfig":{"shape":"OnlineStoreSecurityConfig"} - } - }, - "OnlineStoreReplicaMetadata":{ - "type":"structure", - "required":[ - "SourceRegionName", - "SourceTableName", - "SourceFeatureGroupArn" - ], - "members":{ - "SourceRegionName":{"shape":"RegionName"}, - "SourceTableName":{"shape":"DynamoDBTableName"}, - "SourceFeatureGroupArn":{"shape":"FeatureGroupArn"} - } - }, - "OnlineStoreReplicaStatus":{ - "type":"structure", - "required":["Status"], - "members":{ - "Status":{"shape":"OnlineStoreReplicaStatusValue"}, - "FailureReason":{"shape":"FailureReason"} - } - }, - "OnlineStoreReplicaStatusValue":{ - "type":"string", - "enum":[ - "Created", - "Creating", - "CreateFailed", - "Deleting", - "DeleteFailed" - ] - }, - "OnlineStoreReplicas":{ - "type":"list", - "member":{"shape":"OnlineStoreReplica"} - }, "OnlineStoreSecurityConfig":{ "type":"structure", "members":{ @@ -42705,10 +37795,6 @@ }, "documentation":"The security configuration for OnlineStore.
Settings for the model compilation technique that's applied by a model optimization job.
" }, - "SpeculativeDecodingConfig":{ - "shape":"SpeculativeDecodingConfig", - "internalonly":true - }, "ModelShardingConfig":{ "shape":"ModelShardingConfig", "documentation":"Settings for the model sharding technique that's applied by a model optimization job.
" }, "ModelSpeculativeDecodingConfig":{ "shape":"ModelSpeculativeDecodingConfig", - "internalonly":true + "documentation":"Settings for the model speculative decoding technique that's applied by a model optimization job.
" } }, "documentation":"Settings for an optimization technique that you apply with a model optimization job.
", @@ -42781,6 +37863,12 @@ "ml.p5.48xlarge", "ml.p5e.48xlarge", "ml.p5en.48xlarge", + "ml.g4dn.xlarge", + "ml.g4dn.2xlarge", + "ml.g4dn.4xlarge", + "ml.g4dn.8xlarge", + "ml.g4dn.12xlarge", + "ml.g4dn.16xlarge", "ml.g5.xlarge", "ml.g5.2xlarge", "ml.g5.4xlarge", @@ -42814,13 +37902,6 @@ "ml.trn1n.32xlarge" ] }, - "OptimizationJobDraftModel":{ - "type":"structure", - "members":{ - "S3Uri":{"shape":"S3Uri"}, - "ModelAccessConfig":{"shape":"OptimizationModelAccessConfig"} - } - }, "OptimizationJobEnvironmentVariables":{ "type":"map", "key":{"shape":"NonEmptyString256"}, @@ -42842,7 +37923,7 @@ }, "SageMakerModel":{ "shape":"OptimizationSageMakerModel", - "internalonly":true + "documentation":"The name of an existing SageMaker model to optimize with an optimization job.
" } }, "documentation":"The location of the source model to optimize with an optimization job.
" @@ -42875,7 +37956,7 @@ }, "SageMakerModel":{ "shape":"OptimizationSageMakerModel", - "internalonly":true + "documentation":"The name of a SageMaker model to use as the output destination for an optimization job.
" } }, "documentation":"Details for where to store the optimized model that you create with the optimization job.
" @@ -42940,7 +38021,7 @@ }, "MaxInstanceCount":{ "shape":"OptimizationJobMaxInstanceCount", - "internalonly":true + "documentation":"The maximum number of instances to use for the optimization job.
" }, "OptimizationTypes":{ "shape":"OptimizationTypes", @@ -42956,7 +38037,8 @@ "members":{ "AcceptEula":{ "shape":"OptimizationModelAcceptEula", - "documentation":"Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model.
The access configuration settings for the source ML model for an optimization job, where you can accept the model end-user license agreement (EULA).
" @@ -42974,8 +38056,12 @@ "OptimizationSageMakerModel":{ "type":"structure", "members":{ - "ModelName":{"shape":"ModelName"} - } + "ModelName":{ + "shape":"ModelName", + "documentation":"The name of a SageMaker model.
" + } + }, + "documentation":"A SageMaker model to use as the source or destination for an optimization job.
" }, "OptimizationType":{"type":"string"}, "OptimizationTypes":{ @@ -43043,39 +38129,6 @@ "Descending" ] }, - "OrganizationId":{ - "type":"string", - "documentation":"AWS Organization Id.
", - "pattern":"o-[a-z0-9]{10,32}" - }, - "Origin":{ - "type":"string", - "enum":[ - "Studio", - "Canvas" - ] - }, - "OutputChannel":{ - "type":"structure", - "required":[ - "ChannelName", - "S3OutputPath" - ], - "members":{ - "ChannelName":{"shape":"ChannelName"}, - "LocalPath":{"shape":"DirectoryPath"}, - "S3OutputPath":{"shape":"S3Uri"}, - "ContinuousUpload":{"shape":"ContinuousUpload"}, - "KmsKeyId":{"shape":"KmsKeyId"}, - "KmsEncryptionContext":{"shape":"KmsEncryptionContext"} - } - }, - "OutputChannels":{ - "type":"list", - "member":{"shape":"OutputChannel"}, - "max":10, - "min":0 - }, "OutputCompressionType":{ "type":"string", "enum":[ @@ -43125,18 +38178,6 @@ "CompressionType":{ "shape":"OutputCompressionType", "documentation":"The model output compression type. Select None to output an uncompressed model, recommended for large model outputs. Defaults to gzip.
Provides information about how to store model training results (model artifacts).
" @@ -43165,36 +38206,6 @@ "max":50, "min":0 }, - "OutputPrefix":{ - "type":"string", - "internalonly":true, - "max":64, - "min":0, - "pattern":"[a-zA-Z0-9.-]*" - }, - "OutputSuffix":{ - "type":"string", - "internalonly":true, - "max":64, - "min":0, - "pattern":"[a-zA-Z0-9.-]*" - }, - "OutputTokensPerSecondPerRequest":{ - "type":"float", - "box":true, - "min":0.0 - }, - "OverQuota":{ - "type":"structure", - "members":{ - "AllowOverQuota":{"shape":"Boolean"}, - "UseDedicatedCapacity":{"shape":"Boolean"}, - "FairShareWeight":{"shape":"Integer"}, - "BurstLimit":{"shape":"BurstLimit"} - } - }, - "OverrideAliasImageVersion":{"type":"boolean"}, - "OverwriteArtifacts":{"type":"boolean"}, "OwnershipSettings":{ "type":"structure", "required":["OwnerUserProfileName"], @@ -43216,12 +38227,6 @@ }, "documentation":"Specifies summary information about the ownership settings.
" }, - "OwningEntityArn":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"arn:aws[a-z-]*:sagemaker:[a-zA-Z0-9-]*:[0-9]{12}:.+" - }, "PaginationToken":{ "type":"string", "max":8192, @@ -43234,7 +38239,8 @@ "members":{ "MaxParallelExecutionSteps":{ "shape":"MaxParallelExecutionSteps", - "documentation":"The max number of steps that can be executed in parallel.
" + "documentation":"The max number of steps that can be executed in parallel.
", + "box":true } }, "documentation":"Configuration that controls the parallelism of the pipeline. By default, the parallelism configuration specified applies to all executions of the pipeline unless overridden.
" @@ -43315,14 +38321,6 @@ }, "documentation":"Specifies ranges of integer, continuous, and categorical hyperparameters that a hyperparameter tuning job searches. The hyperparameter tuning job launches training jobs with hyperparameter values within these ranges to find the combination of values that result in the training job with the best performance as measured by the objective metric of the hyperparameter tuning job.
The maximum number of items specified for Array Members refers to the maximum number of hyperparameters for each range and also the maximum for the hyperparameter tuning job itself. That is, the sum of the number of hyperparameters for all the ranges can't exceed the maximum number specified.
An internal field indicates who is responsible to pay for the AWS resources consumed by training.
", - "enum":[ - "CUSTOMER", - "SAGEMAKER" - ] - }, - "PayloadSampling":{ - "type":"structure", - "members":{ - "SamplingType":{"shape":"PayloadSamplingType"}, - "SamplingSeed":{"shape":"PayloadSamplingSeed"} - } - }, - "PayloadSamplingSeed":{ - "type":"integer", - "box":true, - "max":1000, - "min":0 - }, - "PayloadSamplingType":{ - "type":"string", - "enum":[ - "Random", - "SeedBased" - ] - }, "Peft":{ "type":"string", "enum":["LORA"] @@ -43541,10 +38511,6 @@ "ShadowProductionVariants":{ "shape":"PendingProductionVariantSummaryList", "documentation":"An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants for the in-progress deployment.
The summary of an in-progress deployment when an endpoint is creating or updating with a new endpoint configuration.
" @@ -43604,15 +38570,6 @@ "RoutingConfig":{ "shape":"ProductionVariantRoutingConfig", "documentation":"Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.
" - }, - "CapacitySchedulesConfig":{ - "shape":"ProductionVariantCapacitySchedulesConfig", - "internalonly":true - }, - "CapacityReservationConfig":{ - "shape":"ProductionVariantCapacityReservationSummary", - "documentation":"Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.
", - "internalonly":true } }, "documentation":"The production variant summary for a deployment when an endpoint is creating or updating with the CreateEndpoint or UpdateEndpoint operations. Describes the VariantStatus , weight and capacity for a production variant associated with an endpoint.
The display name of the pipeline version that started this execution.
" - }, - "Tags":{ - "shape":"TagList", - "internalonly":true } }, "documentation":"An execution of a pipeline.
" @@ -43934,7 +38834,8 @@ }, "AttemptCount":{ "shape":"Integer", - "documentation":"The current attempt of the execution step. For more information, see Retry Policy for SageMaker Pipelines steps.
" + "documentation":"The current attempt of the execution step. For more information, see Retry Policy for SageMaker Pipelines steps.
", + "box":true }, "SelectiveExecutionResult":{ "shape":"SelectiveExecutionResult", @@ -43968,10 +38869,6 @@ "shape":"TuningJobStepMetaData", "documentation":"The Amazon Resource Name (ARN) of the tuning job that was run by this step execution.
" }, - "CompilationJob":{ - "shape":"CompilationJobStepMetadata", - "internalonly":true - }, "Model":{ "shape":"ModelStepMetadata", "documentation":"The Amazon Resource Name (ARN) of the model that was created by this step execution.
" @@ -44022,27 +38919,27 @@ }, "BedrockCustomModel":{ "shape":"BedrockCustomModelMetadata", - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock custom model used in the pipeline execution step.
" }, "BedrockCustomModelDeployment":{ "shape":"BedrockCustomModelDeploymentMetadata", - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock custom model deployment used in pipeline execution step.
" }, "BedrockProvisionedModelThroughput":{ "shape":"BedrockProvisionedModelThroughputMetadata", - "internalonly":true + "documentation":"The metadata of the Amazon Bedrock provisioned model throughput used in the pipeline execution step.
" }, "BedrockModelImport":{ "shape":"BedrockModelImportMetadata", - "internalonly":true + "documentation":"The metadata of Amazon Bedrock model import used in pipeline execution step.
" }, "InferenceComponent":{ "shape":"InferenceComponentMetadata", - "internalonly":true + "documentation":"The metadata of the inference component used in pipeline execution step.
" }, "Lineage":{ "shape":"LineageMetadata", - "internalonly":true + "documentation":"The metadata of the lineage used in pipeline execution step.
" } }, "documentation":"Metadata for a step execution.
" @@ -44107,7 +39004,7 @@ "type":"string", "max":2048, "min":1, - "pattern":"(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:pipeline/.*)?([a-zA-Z0-9](-*[a-zA-Z0-9]){0,255})" + "pattern":"(arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:([0-9]{12}|aws):pipeline/.*)?([a-zA-Z0-9](-*[a-zA-Z0-9]){0,255})" }, "PipelineParameterName":{ "type":"string", @@ -44177,10 +39074,6 @@ "shape":"PipelineVersionId", "documentation":"The ID of the pipeline version.
" }, - "PipelineVersionArn":{ - "shape":"PipelineVersionArn", - "internalonly":true - }, "PipelineVersionDisplayName":{ "shape":"PipelineVersionName", "documentation":"The display name of the pipeline version.
" @@ -44214,12 +39107,6 @@ }, "documentation":"The version of the pipeline.
" }, - "PipelineVersionArn":{ - "type":"string", - "max":2048, - "min":0, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:pipeline-version/.*" - }, "PipelineVersionDescription":{ "type":"string", "max":3072, @@ -44273,13 +39160,6 @@ "max":100, "min":0 }, - "Placement":{ - "type":"string", - "enum":[ - "None", - "Cluster" - ] - }, "PlacementSpecification":{ "type":"structure", "required":["InstanceCount"], @@ -44314,12 +39194,6 @@ "min":1, "pattern":".*" }, - "PortfolioId":{ - "type":"string", - "max":100, - "min":1, - "pattern":"[a-zA-Z0-9_\\-]{1,100}" - }, "PredefinedMetricSpecification":{ "type":"structure", "members":{ @@ -44337,20 +39211,14 @@ "LowerPriority" ] }, - "PreemptionConfig":{ - "type":"structure", - "required":["AllowSameTeamPreemption"], - "members":{ - "AllowSameTeamPreemption":{"shape":"Boolean"} - } - }, "PresignedDomainUrl":{"type":"string"}, "PresignedUrlAccessConfig":{ "type":"structure", "members":{ "AcceptEula":{ "shape":"Boolean", - "documentation":"Indicates acceptance of the End User License Agreement (EULA) for gated models. Set to true to acknowledge acceptance of the license terms required for accessing gated content.
" + "documentation":"Indicates acceptance of the End User License Agreement (EULA) for gated models. Set to true to acknowledge acceptance of the license terms required for accessing gated content.
", + "box":true }, "ExpectedS3Url":{ "shape":"S3ModelUri", @@ -44468,7 +39336,8 @@ }, "AppManaged":{ "shape":"AppManaged", - "documentation":"When True, input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker.
When True, input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker.
The inputs for a processing job. The processing input must specify exactly one of either S3Input or DatasetDefinition types.
The time the processing job was created.
" }, - "LastModifiedBy":{ - "shape":"UserContext", - "internalonly":true - }, - "CreatedBy":{ - "shape":"UserContext", - "internalonly":true - }, "MonitoringScheduleArn":{ "shape":"MonitoringScheduleArn", "documentation":"The ARN of a monitoring schedule for an endpoint associated with this processing job.
" @@ -44736,16 +39576,6 @@ "min":0, "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:processing-job/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "ProcessingJobConfig":{ - "type":"structure", - "members":{ - "ProcessingInputs":{"shape":"ProcessingInputsTraining"}, - "ProcessingOutputConfig":{"shape":"ProcessingOutputConfigTraining"}, - "UpstreamProcessingOutputConfig":{"shape":"UpstreamProcessingOutputConfig"}, - "ProcessingResult":{"shape":"ProcessingResult"}, - "ProcessingUpstreamSvcConfig":{"shape":"ProcessingUpstreamSvcConfig"} - } - }, "ProcessingJobName":{ "type":"string", "max":63, @@ -44849,7 +39679,8 @@ }, "AppManaged":{ "shape":"AppManaged", - "documentation":"When True, output operations such as data upload are managed natively by the processing job application. When False (default), output operations are managed by Amazon SageMaker.
When True, output operations such as data upload are managed natively by the processing job application. When False (default), output operations are managed by Amazon SageMaker.
Describes the results of a processing job. The processing output must specify exactly one of either S3Output or FeatureStoreOutput types.
Configuration for uploading output from the processing container.
" }, - "ProcessingOutputConfigTraining":{ - "type":"structure", - "required":["Outputs"], - "members":{ - "Outputs":{"shape":"ProcessingOutputsTraining"}, - "KmsKeyId":{"shape":"KmsKeyId"} - } - }, - "ProcessingOutputTraining":{ - "type":"structure", - "required":["OutputName"], - "members":{ - "OutputName":{"shape":"String"}, - "S3Output":{"shape":"ProcessingS3Output"}, - "FeatureStoreOutput":{"shape":"ProcessingFeatureStoreOutput"}, - "AppManaged":{"shape":"AppManaged"} - } - }, "ProcessingOutputs":{ "type":"list", "member":{"shape":"ProcessingOutput"}, "max":10, "min":0 }, - "ProcessingOutputsTraining":{ - "type":"list", - "member":{"shape":"ProcessingOutputTraining"}, - "max":10, - "min":0 - }, "ProcessingResources":{ "type":"structure", "required":["ClusterConfig"], @@ -44910,15 +39717,6 @@ }, "documentation":"Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.
" }, - "ProcessingResult":{ - "type":"structure", - "members":{ - "ExitMessage":{"shape":"ExitMessage"}, - "InternalFailureReason":{"shape":"FailureReason"}, - "FaultEntity":{"shape":"FaultEntity"}, - "Payer":{"shape":"Payer"} - } - }, "ProcessingS3CompressionType":{ "type":"string", "enum":[ @@ -44940,21 +39738,6 @@ "S3Prefix" ] }, - "ProcessingS3DataTypeInternal":{ - "type":"string", - "enum":[ - "ManifestFile", - "S3Prefix", - "ManifestS3Prefix" - ] - }, - "ProcessingS3DownloadMode":{ - "type":"string", - "enum":[ - "Continuous", - "StartOfJob" - ] - }, "ProcessingS3Input":{ "type":"structure", "required":[ @@ -44989,22 +39772,6 @@ }, "documentation":"Configuration for downloading input data from Amazon S3 into the processing container.
" }, - "ProcessingS3InputInternal":{ - "type":"structure", - "required":[ - "S3Uri", - "S3DataType" - ], - "members":{ - "S3Uri":{"shape":"S3Uri"}, - "LocalPath":{"shape":"ProcessingLocalPath"}, - "S3DataType":{"shape":"ProcessingS3DataTypeInternal"}, - "S3InputMode":{"shape":"ProcessingS3InputMode"}, - "S3DownloadMode":{"shape":"ProcessingS3DownloadMode"}, - "S3DataDistributionType":{"shape":"ProcessingS3DataDistributionType"}, - "S3CompressionType":{"shape":"ProcessingS3CompressionType"} - } - }, "ProcessingS3InputMode":{ "type":"string", "enum":[ @@ -45041,52 +39808,18 @@ "EndOfJob" ] }, - "ProcessingSecretArn":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"arn:[\\p{Alnum}\\-]+:secretsmanager:[\\p{Alnum}\\-]+:[0-9]{12}:secret:.*" - }, - "ProcessingStateMachineArnProviderLambdaArn":{ - "type":"string", - "max":512, - "min":0, - "pattern":".*" - }, "ProcessingStoppingCondition":{ "type":"structure", "required":["MaxRuntimeInSeconds"], "members":{ "MaxRuntimeInSeconds":{ "shape":"ProcessingMaxRuntimeInSeconds", - "documentation":"Specifies the maximum runtime in seconds.
" + "documentation":"Specifies the maximum runtime in seconds.
", + "box":true } }, "documentation":"Configures conditions under which the processing job should be stopped, such as how long the processing job has been running. After the condition is met, the processing job is stopped.
" }, - "ProcessingUpstreamS3Output":{ - "type":"structure", - "required":[ - "S3Uri", - "LocalPath", - "S3UploadMode" - ], - "members":{ - "S3Uri":{"shape":"S3Uri"}, - "LocalPath":{"shape":"ProcessingLocalPath"}, - "S3UploadMode":{"shape":"ProcessingS3UploadMode"}, - "RoleArn":{"shape":"RoleArn"} - } - }, - "ProcessingUpstreamSvcConfig":{ - "type":"structure", - "members":{ - "AutoMLJobArn":{"shape":"AutoMLJobArn"}, - "MonitoringScheduleArn":{"shape":"MonitoringScheduleArn"}, - "TrainingJobArn":{"shape":"TrainingJobArn"} - }, - "documentation":"Populated only for a Processing Job running in Training platform. Has fields to represent the Upstream Service Resource ARNs for a Processing Job. (Upstream to a Processing Job). These fields are used to determine the sourceArn and sourceAccount headers to be used for assume-role service calls to prevent confused deputy attacks
" - }, "ProcessingVolumeSizeInGB":{ "type":"integer", "box":true, @@ -45170,17 +39903,9 @@ "shape":"ProductionVariantRoutingConfig", "documentation":"Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.
" }, - "CapacitySchedulesConfig":{ - "shape":"ProductionVariantCapacitySchedulesConfig", - "internalonly":true - }, "InferenceAmiVersion":{ "shape":"ProductionVariantInferenceAmiVersion", - "documentation":"Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads.
By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions.
The AMI version names, and their configurations, are the following:
Accelerator: GPU
NVIDIA driver version: 535
CUDA version: 12.2
Accelerator: GPU
NVIDIA driver version: 535
CUDA version: 12.2
NVIDIA Container Toolkit with disabled CUDA-compat mounting
Accelerator: GPU
NVIDIA driver version: 550
CUDA version: 12.4
NVIDIA Container Toolkit with disabled CUDA-compat mounting
Accelerator: Inferentia2 and Trainium
Neuron driver version: 2.19
Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads.
By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions.
The AMI version names, and their configurations, are the following:
Accelerator: GPU
NVIDIA driver version: 535
CUDA version: 12.2
Accelerator: GPU
NVIDIA driver version: 535
CUDA version: 12.2
NVIDIA Container Toolkit with disabled CUDA-compat mounting
Accelerator: GPU
NVIDIA driver version: 550
CUDA version: 12.4
NVIDIA Container Toolkit with disabled CUDA-compat mounting
Accelerator: GPU
NVIDIA driver version: 580
CUDA version: 13.0
NVIDIA Container Toolkit with disabled CUDA-compat mounting
Accelerator: Inferentia2 and Trainium
Neuron driver version: 2.19
Options that you can choose for the capacity reservation. SageMaker AI supports the following options:
SageMaker AI launches instances only into an ML capacity reservation. If no capacity is available, the instances fail to launch.
Details about an ML capacity reservation.
" }, - "ProductionVariantCapacitySchedulesConfig":{ - "type":"structure", - "required":["CapacitySchedules"], - "members":{ - "CapacityFallbackStrategy":{"shape":"CapacityFallbackStrategy"}, - "CapacitySchedules":{"shape":"CapacitySchedulesList"} - } - }, "ProductionVariantContainerStartupHealthCheckTimeoutInSeconds":{ "type":"integer", "box":true, @@ -45277,13 +39990,6 @@ }, "documentation":"Specifies configuration for a core dump from the model container when the process crashes.
" }, - "ProductionVariantHyperPodConfig":{ - "type":"structure", - "required":["IngressAddress"], - "members":{ - "IngressAddress":{"shape":"IngressAddress"} - } - }, "ProductionVariantInferenceAmiVersion":{ "type":"string", "enum":[ @@ -45291,7 +39997,7 @@ "al2-ami-sagemaker-inference-gpu-2-1", "al2-ami-sagemaker-inference-gpu-3-1", "al2-ami-sagemaker-inference-neuron-2", - "al2023-ami-sagemaker-inference-cpu-0" + "al2023-ami-sagemaker-inference-gpu-4-1" ] }, "ProductionVariantInstanceType":{ @@ -45425,6 +40131,12 @@ "ml.g6e.16xlarge", "ml.g6e.24xlarge", "ml.g6e.48xlarge", + "ml.g7e.2xlarge", + "ml.g7e.4xlarge", + "ml.g7e.8xlarge", + "ml.g7e.12xlarge", + "ml.g7e.24xlarge", + "ml.g7e.48xlarge", "ml.p4d.24xlarge", "ml.c7g.large", "ml.c7g.xlarge", @@ -45491,7 +40203,6 @@ "ml.inf2.8xlarge", "ml.inf2.24xlarge", "ml.inf2.48xlarge", - "ml.inf2e.32xlarge", "ml.p5.48xlarge", "ml.p5e.48xlarge", "ml.p5en.48xlarge", @@ -45560,6 +40271,7 @@ "ml.c6in.24xlarge", "ml.c6in.32xlarge", "ml.p6-b200.48xlarge", + "ml.p6-b300.48xlarge", "ml.p6e-gb200.36xlarge", "ml.p5.4xlarge" ] @@ -45584,10 +40296,33 @@ "MaxInstanceCount":{ "shape":"ManagedInstanceScalingMaxInstanceCount", "documentation":"The maximum number of instances that the endpoint can provision when it scales up to accommodate an increase in traffic.
" + }, + "ScaleInPolicy":{ + "shape":"ProductionVariantManagedInstanceScalingScaleInPolicy", + "documentation":"Configures the scale-in behavior for managed instance scaling.
" } }, "documentation":"Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic.
" }, + "ProductionVariantManagedInstanceScalingScaleInPolicy":{ + "type":"structure", + "required":["Strategy"], + "members":{ + "Strategy":{ + "shape":"ManagedInstanceScalingScaleInStrategy", + "documentation":"The strategy for scaling in instances.
Releases instances that have no hosted inference component copies.
Consolidates inference component copies onto fewer instances to release more instances. Consolidation honors the scheduling configuration of each inference component. For example, if an inference component specifies Availability Zone balance, consolidation only proceeds when the resulting distribution does not increase the imbalance.
The maximum number of instances that the endpoint can terminate at a time during a consolidation scale-in operation.
Default value: 1.
The cooldown period, in minutes, after the last endpoint operation before the endpoint evaluates consolidation scale-in opportunities.
Default value: 20.
Configures the scale-in behavior for managed instance scaling.
" + }, "ProductionVariantModelDataDownloadTimeoutInSeconds":{ "type":"integer", "box":true, @@ -45718,14 +40453,6 @@ "shape":"ProductionVariantRoutingConfig", "documentation":"Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts.
" }, - "CapacitySchedulesConfig":{ - "shape":"ProductionVariantCapacitySchedulesConfig", - "internalonly":true - }, - "HyperPodConfig":{ - "shape":"ProductionVariantHyperPodConfig", - "internalonly":true - }, "CapacityReservationConfig":{ "shape":"ProductionVariantCapacityReservationSummary", "documentation":"Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.
" @@ -45761,7 +40488,8 @@ }, "DisableProfiler":{ "shape":"DisableProfiler", - "documentation":"Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it off, set to True.
Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it off, set to True.
Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths.
" @@ -45783,7 +40511,8 @@ }, "DisableProfiler":{ "shape":"DisableProfiler", - "documentation":"To turn off Amazon SageMaker Debugger monitoring and profiling while a training job is in progress, set to True.
To turn off Amazon SageMaker Debugger monitoring and profiling while a training job is in progress, set to True.
Configuration information for updating the Amazon SageMaker Debugger profile parameters, system and framework metrics configurations, and storage paths.
" @@ -45817,7 +40546,8 @@ }, "VolumeSizeInGB":{ "shape":"OptionalVolumeSizeInGB", - "documentation":"The size, in GB, of the ML storage volume attached to the processing instance.
" + "documentation":"The size, in GB, of the ML storage volume attached to the processing instance.
", + "box":true }, "RuleParameters":{ "shape":"RuleParameters", @@ -46090,12 +40820,6 @@ "type":"list", "member":{"shape":"ProvisioningParameter"} }, - "ProxyToken":{ - "type":"string", - "max":1024, - "min":1, - "pattern":".+" - }, "PublicWorkforceTaskPrice":{ "type":"structure", "members":{ @@ -46106,76 +40830,6 @@ }, "documentation":"Defines the amount of money paid to an Amazon Mechanical Turk worker for each task performed.
Use one of the following prices for bounding box tasks. Prices are in US dollars and should be based on the complexity of the task; the longer it takes in your initial testing, the more you should offer.
0.036
0.048
0.060
0.072
0.120
0.240
0.360
0.480
0.600
0.720
0.840
0.960
1.080
1.200
Use one of the following prices for image classification, text classification, and custom tasks. Prices are in US dollars.
0.012
0.024
0.036
0.048
0.060
0.072
0.120
0.240
0.360
0.480
0.600
0.720
0.840
0.960
1.080
1.200
Use one of the following prices for semantic segmentation tasks. Prices are in US dollars.
0.840
0.960
1.080
1.200
Use one of the following prices for Textract AnalyzeDocument Important Form Key Amazon Augmented AI review tasks. Prices are in US dollars.
2.400
2.280
2.160
2.040
1.920
1.800
1.680
1.560
1.440
1.320
1.200
1.080
0.960
0.840
0.720
0.600
0.480
0.360
0.240
0.120
0.072
0.060
0.048
0.036
0.024
0.012
Use one of the following prices for Rekognition DetectModerationLabels Amazon Augmented AI review tasks. Prices are in US dollars.
1.200
1.080
0.960
0.840
0.720
0.600
0.480
0.360
0.240
0.120
0.072
0.060
0.048
0.036
0.024
0.012
Use one of the following prices for Amazon Augmented AI custom human review tasks. Prices are in US dollars.
1.200
1.080
0.960
0.840
0.720
0.600
0.480
0.360
0.240
0.120
0.072
0.060
0.048
0.036
0.024
0.012
The resource policy for the model group.
" - }, - "ModelPackageGroupArn":{ - "shape":"ModelPackageGroupArn", - "internalonly":true } } }, @@ -46207,86 +40857,6 @@ } } }, - "PutPartnerAppPolicyRequest":{ - "type":"structure", - "required":[ - "PartnerAppArn", - "ResourcePolicy" - ], - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"}, - "ResourcePolicy":{"shape":"ResourcePolicyString"} - } - }, - "PutPartnerAppPolicyResponse":{ - "type":"structure", - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, - "PutPipelinePolicyRequest":{ - "type":"structure", - "required":[ - "PipelineName", - "ResourcePolicy", - "CreationTime" - ], - "members":{ - "PipelineName":{ - "shape":"PipelineNameOrArn", - "internalonly":true - }, - "ResourcePolicy":{ - "shape":"ResourcePolicyString", - "internalonly":true - }, - "CreationTime":{ - "shape":"Timestamp", - "internalonly":true - }, - "ClientRequestToken":{ - "shape":"IdempotencyToken", - "idempotencyToken":true, - "internalonly":true - } - } - }, - "PutPipelinePolicyResponse":{ - "type":"structure", - "members":{ - "PipelineArn":{ - "shape":"PipelineArn", - "internalonly":true - } - }, - "documentation":"Defines the response object for PutPipelinePolicy API.
" - }, - "PutResourcePolicyRequest":{ - "type":"structure", - "required":[ - "ResourceArn", - "ResourcePolicy" - ], - "members":{ - "ResourceArn":{ - "shape":"ResourceArn", - "internalonly":true - }, - "ResourcePolicy":{ - "shape":"ResourcePolicyString", - "internalonly":true - } - } - }, - "PutResourcePolicyResponse":{ - "type":"structure", - "members":{ - "ResourceArn":{ - "shape":"ResourceArn", - "internalonly":true - } - } - }, "QProfileArn":{ "type":"string", "pattern":"arn:[-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" @@ -46328,11 +40898,13 @@ }, "SkipCheck":{ "shape":"Boolean", - "documentation":"This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available.
This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available.
This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics properties.
This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics properties.
Container for the metadata for a Quality check step. For more information, see the topic on QualityCheck step in the Amazon SageMaker Developer Guide.
" @@ -46394,7 +40966,8 @@ }, "IncludeEdges":{ "shape":"Boolean", - "documentation":" Setting this value to True retrieves not only the entities of interest but also the Associations and lineage entities on the path. Set to False to only return lineage entities that match your query.
Setting this value to True retrieves not only the entities of interest but also the Associations and lineage entities on the path. Set to False to only return lineage entities that match your query.
Inference Recommender provisions SageMaker endpoints with access to VPC in the inference recommendation job.
" - }, - "TokenizerConfig":{ - "shape":"TokenizerConfig", - "internalonly":true } }, "documentation":"The input configuration of the recommendation job.
" }, - "RecommendationJobInvocationType":{ - "type":"string", - "enum":[ - "InvokeEndpoint", - "InvokeEndpointWithResponseStream" - ] - }, "RecommendationJobName":{ "type":"string", "max":64, @@ -46877,10 +41339,6 @@ "CompiledOutputConfig":{ "shape":"RecommendationJobCompiledOutputConfig", "documentation":"Provides information about the output configuration for the compiled model.
" - }, - "BenchmarkResultsOutputConfig":{ - "shape":"BenchmarkResultsOutputConfig", - "internalonly":true } }, "documentation":"Provides information about the output configuration for the compiled model.
" @@ -46931,7 +41389,8 @@ "members":{ "MaxInvocations":{ "shape":"Integer", - "documentation":"The maximum number of requests per minute expected for the endpoint.
" + "documentation":"The maximum number of requests per minute expected for the endpoint.
", + "box":true }, "ModelLatencyThresholds":{ "shape":"ModelLatencyThresholds", @@ -46975,84 +41434,6 @@ "type":"list", "member":{"shape":"RecommendationJobSupportedResponseMIMEType"} }, - "RecommendationJobTokenizerModelId":{ - "type":"string", - "max":1024, - "min":1 - }, - "RecommendationJobTuningBestObjectiveNotImproving":{ - "type":"structure", - "members":{ - "MaxNumberOfTestsNotImproving":{"shape":"RecommendationJobTuningMaxNumberOfTestsNotImproving"} - } - }, - "RecommendationJobTuningCompleteOnConvergence":{ - "type":"string", - "enum":[ - "Enabled", - "Disabled" - ] - }, - "RecommendationJobTuningCompletionCriteria":{ - "type":"structure", - "members":{ - "ConvergenceDetected":{"shape":"RecommendationJobTuningConvergenceDetected"}, - "BestObjectiveNotImproving":{"shape":"RecommendationJobTuningBestObjectiveNotImproving"} - } - }, - "RecommendationJobTuningConvergenceDetected":{ - "type":"structure", - "members":{ - "CompleteOnConvergence":{"shape":"RecommendationJobTuningCompleteOnConvergence"} - } - }, - "RecommendationJobTuningJob":{ - "type":"structure", - "members":{ - "JobName":{"shape":"RecommendationJobName"} - } - }, - "RecommendationJobTuningJobs":{ - "type":"list", - "member":{"shape":"RecommendationJobTuningJob"}, - "max":1, - "min":0 - }, - "RecommendationJobTuningMaxNumberOfTestsNotImproving":{ - "type":"integer", - "box":true, - "min":3 - }, - "RecommendationJobTuningObjectiveMetric":{ - "type":"structure", - "members":{ - "Name":{"shape":"RecommendationJobTuningObjectiveMetricName"} - } - }, - "RecommendationJobTuningObjectiveMetricName":{ - "type":"string", - "enum":[ - "CostPerInference", - "ModelLatency", - "CpuUtilization", - "MaxInvocations" - ] - }, - "RecommendationJobTuningStrategy":{ - "type":"string", - "enum":[ - "Bayesian", - "Random", - "Grid", - "MultiObjective" - ] - }, - "RecommendationJobTuningWarmStartConfig":{ - "type":"structure", - "members":{ - "Jobs":{"shape":"RecommendationJobTuningJobs"} - } - }, "RecommendationJobType":{ "type":"string", "enum":[ @@ -47107,19 +41488,23 @@ "members":{ "CostPerHour":{ "shape":"Float", - "documentation":"Defines the cost per hour for the instance.
" + "documentation":"Defines the cost per hour for the instance.
", + "box":true }, "CostPerInference":{ "shape":"Float", - "documentation":"Defines the cost per inference for the instance .
" + "documentation":"Defines the cost per inference for the instance .
", + "box":true }, "MaxInvocations":{ "shape":"Integer", - "documentation":"The expected maximum number of requests per minute for the instance.
" + "documentation":"The expected maximum number of requests per minute for the instance.
", + "box":true }, "ModelLatency":{ "shape":"Integer", - "documentation":"The expected model latency at maximum invocation per minute for the instance.
" + "documentation":"The expected model latency at maximum invocation per minute for the instance.
", + "box":true }, "CpuUtilization":{ "shape":"UtilizationMetric", @@ -47132,38 +41517,6 @@ "ModelSetupTime":{ "shape":"ModelSetupTime", "documentation":"The time it takes to launch new compute resources for a serverless endpoint. The time can vary depending on the model size, how long it takes to download the model, and the start-up time of the container.
NaN indicates that the value is not available.
The metrics of recommendations.
" @@ -47226,10 +41579,6 @@ "shape":"S3Uri", "documentation":"The location in Amazon S3 where the Redshift query results are stored.
" }, - "OutputDatasetS3Uri":{ - "shape":"S3Uri", - "internalonly":true - }, "KmsKeyId":{ "shape":"KmsKeyId", "documentation":"The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data from a Redshift execution.
" @@ -47353,28 +41702,6 @@ }, "documentation":"Configuration for remote debugging for the UpdateTrainingJob API. 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.
" }, - "RemoveJobNameFromS3OutputPath":{"type":"boolean"}, - "RemoveSharedModelReviewersRequest":{ - "type":"structure", - "required":[ - "SharedModelId", - "ReviewerUserProfiles" - ], - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "ReviewerUserProfiles":{ - "shape":"UserProfileNameList", - "internalonly":true - } - } - }, - "RemoveSharedModelReviewersResponse":{ - "type":"structure", - "members":{} - }, "RenderUiTemplateRequest":{ "type":"structure", "required":[ @@ -47450,30 +41777,6 @@ "type":"list", "member":{"shape":"RenderingError"} }, - "RepairAction":{ - "type":"string", - "enum":[ - "Reboot", - "Replace" - ] - }, - "RepairNodeItem":{ - "type":"structure", - "required":[ - "NodeIds", - "RepairAction" - ], - "members":{ - "NodeIds":{"shape":"ClusterNodeIdsForBatchRepair"}, - "RepairAction":{"shape":"RepairAction"} - } - }, - "RepairNodeList":{ - "type":"list", - "member":{"shape":"RepairNodeItem"}, - "max":99, - "min":1 - }, "RepositoryAccessMode":{ "type":"string", "enum":[ @@ -47504,14 +41807,6 @@ "min":0, "pattern":"https://([.\\-_a-zA-Z0-9]+/?){3,1016}" }, - "RequestStatus":{ - "type":"string", - "enum":[ - "Enabled", - "Disabled" - ] - }, - "RequireImageScan":{"type":"boolean"}, "ReservedCapacityArn":{ "type":"string", "max":2048, @@ -47548,17 +41843,6 @@ "ml.p4de.24xlarge", "ml.p6e-gb200.36xlarge", "ml.p5.4xlarge", - "ml.c6i.32xlarge", - "ml.t3.large", - "ml.t3.xlarge", - "ml.t3.2xlarge", - "ml.c7g.medium", - "ml.c4.large", - "ml.c6i.large", - "ml.t4g.medium", - "ml.m6g.medium", - "ml.c5.large", - "ml.hpc5i.18xlarge", "ml.p6-b300.48xlarge" ] }, @@ -47587,7 +41871,8 @@ }, "InstanceCount":{ "shape":"ReservedCapacityInstanceCount", - "documentation":"The number of instances in the reserved capacity offering.
" + "documentation":"The number of instances in the reserved capacity offering.
", + "box":true }, "AvailabilityZone":{ "shape":"AvailabilityZone", @@ -47608,6 +41893,14 @@ "EndTime":{ "shape":"Timestamp", "documentation":"The end time of the reserved capacity offering.
" + }, + "ExtensionStartTime":{ + "shape":"Timestamp", + "documentation":"The start time of the extension for the reserved capacity offering.
" + }, + "ExtensionEndTime":{ + "shape":"Timestamp", + "documentation":"The end time of the extension for the reserved capacity offering.
" } }, "documentation":"Details about a reserved capacity offering for a training plan offering.
For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .
The availability zone for the reserved capacity.
" }, - "AvailabilityZoneId":{ - "shape":"AvailabilityZoneId", - "internalonly":true - }, "DurationHours":{ "shape":"ReservedCapacityDurationHours", "documentation":"The number of whole hours in the total duration for this reserved capacity.
" @@ -47717,13 +42006,6 @@ }, "documentation":"The resolved attributes.
" }, - "ResourceAlreadyExists":{ - "type":"structure", - "members":{ - "Message":{"shape":"FailureReason"} - }, - "exception":true - }, "ResourceArn":{ "type":"string", "max":256, @@ -47798,11 +42080,13 @@ }, "InstanceCount":{ "shape":"TrainingInstanceCount", - "documentation":"The number of ML compute instances to use. For distributed training, provide a value greater than 1.
" + "documentation":"The number of ML compute instances to use. For distributed training, provide a value greater than 1.
", + "box":true }, "VolumeSizeInGB":{ "shape":"OptionalVolumeSizeInGB", - "documentation":"The size of the ML storage volume that you want to provision.
ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.
When using an ML instance with NVMe SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5.
When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML instance families that use EBS volumes include ml.c5 and ml.p2.
To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types.
To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs.
" + "documentation":"The size of the ML storage volume that you want to provision.
SageMaker automatically selects the volume size for serverless training jobs. You cannot customize this setting.
ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification.
When using an ML instance with NVMe SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5.
When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML instance families that use EBS volumes include ml.c5 and ml.p2.
To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types.
To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs.
", + "box":true }, "VolumeKmsKeyId":{ "shape":"KmsKeyId", @@ -47812,18 +42096,10 @@ "shape":"KeepAlivePeriodInSeconds", "documentation":"The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs.
" }, - "CapacityReservationIds":{ - "shape":"CapacityReservationIds", - "internalonly":true - }, "InstanceGroups":{ "shape":"InstanceGroups", "documentation":"The configuration of a heterogeneous cluster in JSON format.
" }, - "CapacitySchedulesConfig":{ - "shape":"CapacitySchedulesConfig", - "internalonly":true - }, "TrainingPlanArn":{ "shape":"TrainingPlanArn", "documentation":"The Amazon Resource Name (ARN); of the training plan to use for this resource configuration.
" @@ -47883,23 +42159,12 @@ }, "MaxParallelTrainingJobs":{ "shape":"MaxParallelTrainingJobs", - "documentation":"The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.
" - }, - "MaxWallClockTimeInMinutes":{ - "shape":"MaxWallClockTimeInMinutes", - "internalonly":true - }, - "MaxTotalComputeTimeInMinutes":{ - "shape":"MaxTotalComputeTimeInMinutes", - "internalonly":true + "documentation":"The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.
", + "box":true }, "MaxRuntimeInSeconds":{ "shape":"HyperParameterTuningMaxRuntimeInSeconds", "documentation":"The maximum time in seconds that a hyperparameter tuning job can run.
" - }, - "MaxBillableTimeInSeconds":{ - "shape":"HyperParameterTuningMaxBillableTimeInSeconds", - "internalonly":true } }, "documentation":"Specifies the maximum number of training jobs and parallel training jobs that a hyperparameter tuning job can launch.
" @@ -47941,6 +42206,10 @@ "BorrowLimit":{ "shape":"BorrowLimit", "documentation":"The limit on how much idle compute can be borrowed.The values can be 1 - 500 percent of idle compute that the team is allowed to borrow.
Default is 50.
The absolute limits on compute resources that can be borrowed from idle compute. When specified, these limits define the maximum amount of specific resource types (such as accelerators, vCPU, or memory) that an entity can borrow, regardless of the percentage-based BorrowLimit.
Resource sharing configuration.
" @@ -47956,14 +42225,6 @@ "ResourceSpec":{ "type":"structure", "members":{ - "EnvironmentArn":{ - "shape":"EnvironmentArn", - "internalonly":true - }, - "EnvironmentVersionArn":{ - "shape":"EnvironmentVersionArn", - "internalonly":true - }, "SageMakerImageArn":{ "shape":"ImageArn", "documentation":"The ARN of the SageMaker AI image that the image version belongs to.
" @@ -47987,15 +42248,6 @@ }, "documentation":"Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on.
When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value.
The number of times to retry the job. When the job is retried, it's SecondaryStatus is changed to STARTING.
The number of times to retry the job. When the job is retried, it's SecondaryStatus is changed to STARTING.
The retry strategy to use when a training job fails due to an InternalServerError. RetryStrategy is specified as part of the CreateTrainingJob and CreateHyperParameterTuningJob requests. You can add the StoppingCondition parameter to the request to limit the training time for the complete job.
The time limit for the total deployment. Exceeding this limit causes a timeout.
" }, - "WaitForInstanceTermination":{ - "shape":"WaitForInstanceTermination", - "internalonly":true - }, "RollbackMaximumBatchSize":{ "shape":"CapacitySize", "documentation":"Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback.
" @@ -48295,22 +42527,6 @@ }, "documentation":"Configuration for the custom Amazon S3 file system.
" }, - "S3JobProgress":{ - "type":"structure", - "required":[ - "CompletedObjects", - "FailedObjects" - ], - "members":{ - "CompletedObjects":{"shape":"CompletedObjects"}, - "FailedObjects":{"shape":"FailedObjects"} - } - }, - "S3KmsEncryptionContext":{ - "type":"string", - "max":2048, - "min":0 - }, "S3ModelDataSource":{ "type":"structure", "required":[ @@ -48373,12 +42589,6 @@ "min":0, "pattern":"(https|s3)://([^/]+)/?(.*)" }, - "S3OutputUri":{ - "type":"string", - "max":1024, - "min":0, - "pattern":"(s3)://([^/]+)/?(.*)" - }, "S3Presign":{ "type":"structure", "members":{ @@ -48440,12 +42650,6 @@ "min":0, "pattern":"arn:[a-z0-9-\\.]{1,63}:sagemaker:\\w+(?:-\\w+)+:aws:hub-content\\/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}\\/Model\\/[a-zA-Z0-9](-*[a-zA-Z0-9]){0,63}" }, - "SageMakerResourceArn":{ - "type":"string", - "max":2048, - "min":1, - "pattern":"arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:.*\\/.*" - }, "SageMakerResourceName":{ "type":"string", "enum":[ @@ -48478,36 +42682,6 @@ "max":100, "min":0 }, - "SaviturAppImageConfig":{ - "type":"structure", - "members":{ - "FileSystemConfig":{"shape":"FileSystemConfig"}, - "ContainerConfig":{"shape":"ContainerConfig"} - }, - "internalonly":true - }, - "SaviturAppSettings":{ - "type":"structure", - "members":{ - "DefaultResourceSpec":{"shape":"ResourceSpec"}, - "CustomImages":{"shape":"CustomImages"}, - "LifecycleConfigArns":{"shape":"LifecycleConfigArns"}, - "CodeRepositories":{"shape":"CodeRepositories"} - }, - "internalonly":true - }, - "ScalingConfig":{ - "type":"structure", - "required":["BestEffortProvisioning"], - "members":{ - "BestEffortProvisioning":{ - "shape":"BestEffortProvisioning", - "documentation":"Specifies whether to turn on best-effort provisioning. The default value is false. If set to true, SageMaker HyperPod will attempt to provision as many instances as possible, even if some instances fail to provision due to faulty nodes or configuration issues. This allows for partial provisioning of the requested number of instances when the full target cannot be achieved. Note that for provisioning with on-demand instances, billing begins as soon as healthy instances become available and enter the InService status.
Defines how an instance group should be scaled and provisioned in SageMaker HyperPod.
", - "internalonly":true - }, "ScalingPolicies":{ "type":"list", "member":{"shape":"ScalingPolicy"} @@ -48528,11 +42702,13 @@ "members":{ "InvocationsPerInstance":{ "shape":"Integer", - "documentation":"The number of invocations sent to a model, normalized by InstanceCount in each ProductionVariant. 1/numberOfInstances is sent as the value on each request, where numberOfInstances is the number of active instances for the ProductionVariant behind the endpoint at the time of the request.
The number of invocations sent to a model, normalized by InstanceCount in each ProductionVariant. 1/numberOfInstances is sent as the value on each request, where numberOfInstances is the number of active instances for the ProductionVariant behind the endpoint at the time of the request.
The interval of time taken by a model to respond as viewed from SageMaker. This interval includes the local communication times taken to send the request and to fetch the response from the container of a model and the time taken to complete the inference in the container.
" + "documentation":"The interval of time taken by a model to respond as viewed from SageMaker. This interval includes the local communication times taken to send the request and to fetch the response from the container of a model and the time taken to complete the inference in the container.
", + "box":true } }, "documentation":"The metric for a scaling policy.
" @@ -48542,22 +42718,17 @@ "members":{ "MinInvocationsPerMinute":{ "shape":"Integer", - "documentation":"The minimum number of expected requests to your endpoint per minute.
" + "documentation":"The minimum number of expected requests to your endpoint per minute.
", + "box":true }, "MaxInvocationsPerMinute":{ "shape":"Integer", - "documentation":"The maximum number of expected requests to your endpoint per minute.
" + "documentation":"The maximum number of expected requests to your endpoint per minute.
", + "box":true } }, "documentation":"An object where you specify the anticipated traffic pattern for an endpoint.
" }, - "ScalingType":{ - "type":"string", - "enum":[ - "Linear", - "Logarithmic" - ] - }, "ScheduleConfig":{ "type":"structure", "required":["ScheduleExpression"], @@ -48616,10 +42787,22 @@ "FairShare":{ "shape":"FairShare", "documentation":"When enabled, entities borrow idle compute based on their assigned FairShareWeight.
When disabled, entities borrow idle compute based on a first-come first-serve basis.
Default is Enabled.
Configuration for sharing idle compute resources across entities in the cluster. When enabled, unallocated resources are automatically calculated and made available for entities to borrow.
" } }, "documentation":"Cluster policy configuration. This policy is used for task prioritization and fair-share allocation. This helps prioritize critical workloads and distributes idle compute across entities.
" }, + "SchedulerConfigComponent":{ + "type":"string", + "enum":[ + "PriorityClasses", + "FairShare", + "IdleResourceSharing" + ] + }, "SchedulerResourceStatus":{ "type":"string", "enum":[ @@ -48690,10 +42873,6 @@ "shape":"TrialComponent", "documentation":"The properties of a trial component.
" }, - "TransformJob":{ - "shape":"TransformJob", - "internalonly":true - }, "Endpoint":{"shape":"Endpoint"}, "ModelPackage":{"shape":"ModelPackage"}, "ModelPackageGroup":{"shape":"ModelPackageGroup"}, @@ -48708,8 +42887,6 @@ "shape":"FeatureMetadata", "documentation":"The feature metadata used to search through the features.
" }, - "Image":{"shape":"ImageSearchShape"}, - "ImageVersion":{"shape":"ImageVersionSearchShape"}, "Project":{ "shape":"Project", "documentation":"The properties of a project.
" @@ -48722,19 +42899,7 @@ "shape":"ModelCard", "documentation":"An Amazon SageMaker Model Card that documents details about a machine learning model.
" }, - "Model":{"shape":"ModelDashboardModel"}, - "App":{ - "shape":"App", - "internalonly":true - }, - "UserProfile":{ - "shape":"UserProfile", - "internalonly":true - }, - "Domain":{ - "shape":"Domain", - "internalonly":true - } + "Model":{"shape":"ModelDashboardModel"} }, "documentation":"A single resource returned as part of the Search API response.
" }, @@ -48766,10 +42931,6 @@ "shape":"MaxResults", "documentation":"The maximum number of results to return.
" }, - "IncludeCrossAccountResults":{ - "shape":"Boolean", - "internalonly":true - }, "CrossAccountFilterOption":{ "shape":"CrossAccountFilterOption", "documentation":" A cross account filter option. When the value is \"CrossAccount\" the search results will only include resources made discoverable to you from other accounts. When the value is \"SameAccount\" or null the search results will only include resources from your account. Default is null. For more information on searching for resources made discoverable to your account, see Search discoverable resources in the SageMaker Developer Guide. The maximum number of ResourceCatalogs viewable is 1000.
The number of instances you want to reserve in the training plan offerings. This allows you to specify the quantity of compute resources needed for your SageMaker training jobs or SageMaker HyperPod clusters, helping you find reserved capacity offerings that match your requirements.
" + "documentation":"The number of instances you want to reserve in the training plan offerings. This allows you to specify the quantity of compute resources needed for your SageMaker training jobs or SageMaker HyperPod clusters, helping you find reserved capacity offerings that match your requirements.
", + "box":true }, "UltraServerType":{ "shape":"UltraServerType", @@ -48831,10 +42989,6 @@ "shape":"UltraServerCount", "documentation":"The number of UltraServers to search for.
" }, - "AvailabilityZone":{ - "shape":"AvailabilityZone", - "internalonly":true - }, "StartTimeAfter":{ "shape":"Timestamp", "documentation":"A filter to search for training plan offerings with a start time after a specified date.
" @@ -48849,7 +43003,11 @@ }, "TargetResources":{ "shape":"SageMakerResourceNames", - "documentation":"The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod) to search for in the offerings.
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.
The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) to search for in the offerings.
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.
A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment.
The Amazon Resource Name (ARN); of an existing training plan to search for extension offerings. When specified, the API returns extension offerings that can be used to extend the specified training plan.
" } } }, @@ -48860,6 +43018,10 @@ "TrainingPlanOfferings":{ "shape":"TrainingPlanOfferings", "documentation":"A list of training plan offerings that match the search criteria.
" + }, + "TrainingPlanExtensionOfferings":{ + "shape":"TrainingPlanExtensionOfferings", + "documentation":"A list of extension offerings available for the specified training plan. These offerings can be used with the ExtendTrainingPlan API to extend an existing training plan.
ServerlessJobConfig relevant fields
", @@ -49073,38 +43208,37 @@ "JobType" ], "members":{ - "BaseModelArn":{"shape":"ServerlessJobBaseModelArn"}, - "AcceptEula":{"shape":"AcceptEula"}, - "JobType":{"shape":"ServerlessJobType"}, - "CustomizationTechnique":{"shape":"CustomizationTechnique"}, - "Peft":{"shape":"Peft"}, - "EvaluationType":{"shape":"EvaluationType"}, - "EvaluatorArn":{"shape":"EvaluatorArn"}, - "JobSpec":{ - "shape":"ServerlessJobSpec", - "deprecated":true, - "internalonly":true + "BaseModelArn":{ + "shape":"ServerlessJobBaseModelArn", + "documentation":"The base model Amazon Resource Name (ARN) in SageMaker Public Hub. SageMaker always selects the latest version of the provided model.
" + }, + "AcceptEula":{ + "shape":"AcceptEula", + "documentation":" Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. For more information, see End-user license agreements section for more details on accepting the EULA.
The serverless training job type.
" + }, + "CustomizationTechnique":{ + "shape":"CustomizationTechnique", + "documentation":"The model customization technique.
" + }, + "Peft":{ + "shape":"Peft", + "documentation":"The parameter-efficient fine-tuning configuration.
" + }, + "EvaluationType":{ + "shape":"EvaluationType", + "documentation":" The evaluation job type. Required when serverless job type is Evaluation.
The evaluator Amazon Resource Name (ARN) used as reward function or reward prompt.
" } }, - "internalonly":true - }, - "ServerlessJobSpec":{ - "type":"map", - "key":{"shape":"ServerlessJobSpecKey"}, - "value":{"shape":"ServerlessJobSpecValue"}, - "internalonly":true - }, - "ServerlessJobSpecKey":{ - "type":"string", - "max":256, - "min":0, - "pattern":".*" - }, - "ServerlessJobSpecValue":{ - "type":"string", - "max":2500, - "min":0, - "pattern":".*" + "documentation":"The configuration for the serverless training job.
" }, "ServerlessJobType":{ "type":"string", @@ -49131,17 +43265,6 @@ "max":200, "min":1 }, - "Service":{ - "type":"structure", - "members":{ - "Environment":{"shape":"Environment"}, - "ImageUri":{"shape":"String2048"}, - "Volumes":{"shape":"Volumes"}, - "Entrypoint":{"shape":"Entrypoint"}, - "Command":{"shape":"Command"} - }, - "internalonly":true - }, "ServiceCatalogEntityId":{ "type":"string", "max":100, @@ -49199,22 +43322,6 @@ }, "documentation":"Details that you specify to provision a service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog.
" }, - "ServiceRepairAction":{ - "type":"string", - "enum":[ - "Replace", - "Reboot", - "None" - ], - "internalonly":true - }, - "Services":{ - "type":"list", - "member":{"shape":"Service"}, - "internalonly":true, - "max":1, - "min":0 - }, "SessionChainingConfig":{ "type":"structure", "members":{ @@ -49267,7 +43374,8 @@ }, "SamplingPercentage":{ "shape":"Percentage", - "documentation":"The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
" + "documentation":"The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant.
", + "box":true } }, "documentation":"The name and sampling percentage of a shadow variant.
" @@ -49278,114 +43386,6 @@ "max":1, "min":1 }, - "SharedModelArtifacts":{ - "type":"map", - "key":{"shape":"ArtifactKey"}, - "value":{"shape":"ArtifactValue"}, - "max":20, - "min":0 - }, - "SharedModelDescription":{ - "type":"string", - "max":1023, - "min":0, - "pattern":".*" - }, - "SharedModelId":{ - "type":"string", - "max":128, - "min":0 - }, - "SharedModelIdentifier":{ - "type":"string", - "max":256, - "min":0 - }, - "SharedModelListEntity":{ - "type":"structure", - "members":{ - "SharedModelId":{"shape":"SharedModelId"}, - "SharedModelVersion":{"shape":"SharedModelVersion"}, - "Owner":{"shape":"UserProfileName"}, - "ModelName":{"shape":"SharedModelName"}, - "ModelType":{"shape":"SharedModelType"}, - "ProblemType":{"shape":"SharedModelProblemType"}, - "Description":{"shape":"SharedModelDescription"}, - "Shares":{"shape":"SharedModelSharesCount"}, - "ModelIdentifier":{"shape":"SharedModelIdentifier"}, - "CreationTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"} - } - }, - "SharedModelName":{ - "type":"string", - "max":63, - "min":0, - "pattern":"[a-zA-Z0-9 _.:/=+-@]{0,63}" - }, - "SharedModelProblemType":{ - "type":"string", - "enum":[ - "BinaryClassification", - "MulticlassClassification", - "Regression", - "TimeSeriesForecasting", - "ImageClassification", - "TextClassification" - ] - }, - "SharedModelSharesCount":{ - "type":"integer", - "max":999, - "min":0 - }, - "SharedModelType":{ - "type":"string", - "enum":[ - "Canvas", - "Autopilot", - "Forecast", - "ModelRegistry", - "JumpStart", - "Hub" - ] - }, - "SharedModelVersion":{"type":"string"}, - "SharedModelVersionListEntity":{ - "type":"structure", - "members":{ - "SharedModelVersion":{"shape":"SharedModelVersion"}, - "Creator":{"shape":"UserProfileName"}, - "ModelType":{"shape":"SharedModelType"}, - "ProblemType":{"shape":"SharedModelProblemType"}, - "Description":{"shape":"SharedModelDescription"}, - "ModelIdentifier":{"shape":"SharedModelIdentifier"}, - "CreationTime":{"shape":"Timestamp"}, - "LastModifiedTime":{"shape":"Timestamp"} - } - }, - "SharedModelVersions":{ - "type":"list", - "member":{"shape":"SharedModelVersionListEntity"} - }, - "SharedModels":{ - "type":"list", - "member":{"shape":"SharedModelListEntity"} - }, - "SharedModelsSortBy":{ - "type":"string", - "enum":[ - "SharedModelName", - "CreationTime" - ] - }, - "SharedModelsSortOrder":{ - "type":"string", - "enum":[ - "Ascending", - "Descending" - ] - }, "SharingSettings":{ "type":"structure", "members":{ @@ -49417,7 +43417,8 @@ "members":{ "Seed":{ "shape":"Seed", - "documentation":"Determines the shuffling order in ShuffleConfig value.
Determines the shuffling order in ShuffleConfig value.
A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType, the results of the S3 key prefix matches are shuffled. If you use ManifestFile, the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value.
For Pipe input mode, when ShuffleConfig is specified shuffling is done at the start of every epoch. With large datasets, this ensures that the order of the training data is different for each epoch, and it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key, the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch.
A list of algorithms that were used to create a model package.
" }, - "SourceArn":{ - "type":"string", - "max":2048, - "min":20, - "pattern":"arn:[a-z0-9\\-]+:[a-z0-9\\-]+:[a-z0-9\\-]*:[0-9]{12}:.*" - }, "SourceIpConfig":{ "type":"structure", "required":["Cidrs"], @@ -49847,14 +43758,6 @@ "members":{ "JupyterServerAppSettings":{"shape":"JupyterServerAppSettings"}, "KernelGatewayAppSettings":{"shape":"KernelGatewayAppSettings"}, - "VSCodeAppSettings":{ - "shape":"VSCodeAppSettings", - "internalonly":true - }, - "SaviturAppSettings":{ - "shape":"SaviturAppSettings", - "internalonly":true - }, "CodeEditorAppSettings":{ "shape":"SpaceCodeEditorAppSettings", "documentation":"The Code Editor application settings.
" @@ -49964,12 +43867,6 @@ "box":true, "min":0 }, - "SpeculativeDecodingConfig":{ - "type":"structure", - "members":{ - "DraftModel":{"shape":"OptimizationJobDraftModel"} - } - }, "SplitType":{ "type":"string", "enum":[ @@ -49979,12 +43876,6 @@ "TFRecord" ] }, - "Stage":{ - "type":"string", - "max":16, - "min":0, - "pattern":".*" - }, "StageDescription":{ "type":"string", "max":1024, @@ -50029,11 +43920,13 @@ "DeepHealthCheckConfigurations" ], "members":{ - "ClusterName":{"shape":"ClusterNameOrArn"}, - "DeepHealthCheckConfigurations":{"shape":"DeepHealthCheckConfigurations"}, - "DryRun":{ - "shape":"DryRun", - "internalonly":true + "ClusterName":{ + "shape":"ClusterNameOrArn", + "documentation":"The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster.
" + }, + "DeepHealthCheckConfigurations":{ + "shape":"DeepHealthCheckConfigurations", + "documentation":"A list of configurations containing instance group names, EC2 instance IDs, and deep health checks to perform.
" } } }, @@ -50041,18 +43934,10 @@ "type":"structure", "required":["ClusterArn"], "members":{ - "ClusterArn":{"shape":"ClusterArn"} - } - }, - "StartClusterNodeRequest":{ - "type":"structure", - "required":[ - "ClusterName", - "NodeId" - ], - "members":{ - "ClusterName":{"shape":"ClusterNameOrArn"}, - "NodeId":{"shape":"ClusterNodeId"} + "ClusterArn":{ + "shape":"ClusterArn", + "documentation":"The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster on which the deep health checks were initiated.
" + } } }, "StartEdgeDeploymentStageRequest":{ @@ -50131,19 +44016,6 @@ } } }, - "StartPartnerAppRequest":{ - "type":"structure", - "required":["PartnerAppArn"], - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, - "StartPartnerAppResponse":{ - "type":"structure", - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, "StartPipelineExecutionRequest":{ "type":"structure", "required":[ @@ -50186,7 +44058,7 @@ }, "MlflowExperimentName":{ "shape":"MlflowExperimentEntityName", - "internalonly":true + "documentation":"The MLflow experiment name of the pipeline execution.
" } } }, @@ -50226,12 +44098,6 @@ } } }, - "StateMachineArn":{ - "type":"string", - "max":512, - "min":0 - }, - "StateMachineArnProviderLambdaArn":{"type":"string"}, "Statistic":{ "type":"string", "enum":[ @@ -50242,23 +44108,17 @@ "Sum" ] }, - "Status":{ - "type":"string", - "enum":[ - "Enabling", - "Enabled", - "EnableFailed", - "Disabling", - "Disabled", - "DisableFailed" - ] - }, "StatusDetails":{ "type":"string", "max":1024, "min":0, "pattern":".*" }, + "StatusDetailsMap":{ + "type":"map", + "key":{"shape":"SchedulerConfigComponent"}, + "value":{"shape":"SchedulerResourceStatus"} + }, "StatusMessage":{"type":"string"}, "StepDescription":{ "type":"string", @@ -50289,43 +44149,54 @@ "Succeeded" ] }, - "StopAutoMLJobRequest":{ + "StopAIBenchmarkJobRequest":{ "type":"structure", - "required":["AutoMLJobName"], + "required":["AIBenchmarkJobName"], "members":{ - "AutoMLJobName":{ - "shape":"AutoMLJobName", - "documentation":"The name of the object you are requesting.
" + "AIBenchmarkJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI benchmark job to stop.
" } } }, - "StopCapacityScheduleRequest":{ + "StopAIBenchmarkJobResponse":{ "type":"structure", - "required":["CapacityScheduleName"], + "required":["AIBenchmarkJobArn"], "members":{ - "CapacityScheduleName":{"shape":"CapacityScheduleName"} + "AIBenchmarkJobArn":{ + "shape":"AIBenchmarkJobArn", + "documentation":"The Amazon Resource Name (ARN) of the stopped benchmark job.
" + } } }, - "StopCapacityScheduleResponse":{ + "StopAIRecommendationJobRequest":{ "type":"structure", - "required":[ - "CapacityScheduleArn", - "Status" - ], + "required":["AIRecommendationJobName"], "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"}, - "Status":{"shape":"CapacityScheduleStatus"} + "AIRecommendationJobName":{ + "shape":"AIEntityName", + "documentation":"The name of the AI recommendation job to stop.
" + } } }, - "StopClusterNodeRequest":{ + "StopAIRecommendationJobResponse":{ "type":"structure", - "required":[ - "ClusterName", - "NodeId" - ], + "required":["AIRecommendationJobArn"], "members":{ - "ClusterName":{"shape":"ClusterNameOrArn"}, - "NodeId":{"shape":"ClusterNodeId"} + "AIRecommendationJobArn":{ + "shape":"AIRecommendationJobArn", + "documentation":"The Amazon Resource Name (ARN) of the stopped recommendation job.
" + } + } + }, + "StopAutoMLJobRequest":{ + "type":"structure", + "required":["AutoMLJobName"], + "members":{ + "AutoMLJobName":{ + "shape":"AutoMLJobName", + "documentation":"The name of the object you are requesting.
" + } } }, "StopCompilationJobRequest":{ @@ -50365,24 +44236,6 @@ } } }, - "StopEvaluationJobRequest":{ - "type":"structure", - "required":["EvaluationJobName"], - "members":{ - "EvaluationJobName":{"shape":"EvaluationJobName"} - } - }, - "StopHyperParameterTuningJobInternalRequest":{ - "type":"structure", - "required":[ - "HyperParameterTuningJobName", - "CustomerDetails" - ], - "members":{ - "HyperParameterTuningJobName":{"shape":"HyperParameterTuningJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, "StopHyperParameterTuningJobRequest":{ "type":"structure", "required":["HyperParameterTuningJobName"], @@ -50501,19 +44354,6 @@ } } }, - "StopPartnerAppRequest":{ - "type":"structure", - "required":["PartnerAppArn"], - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, - "StopPartnerAppResponse":{ - "type":"structure", - "members":{ - "PartnerAppArn":{"shape":"PartnerAppArn"} - } - }, "StopPipelineExecutionRequest":{ "type":"structure", "required":[ @@ -50541,18 +44381,6 @@ } } }, - "StopProcessingJobInternalRequest":{ - "type":"structure", - "required":[ - "ProcessingJobName", - "CustomerDetails" - ], - "members":{ - "ProcessingJobName":{"shape":"ProcessingJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"}, - "Payer":{"shape":"Payer"} - } - }, "StopProcessingJobRequest":{ "type":"structure", "required":["ProcessingJobName"], @@ -50563,17 +44391,6 @@ } } }, - "StopTrainingJobInternalRequest":{ - "type":"structure", - "required":[ - "TrainingJobName", - "CustomerDetails" - ], - "members":{ - "TrainingJobName":{"shape":"TrainingJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, "StopTrainingJobRequest":{ "type":"structure", "required":["TrainingJobName"], @@ -50584,35 +44401,6 @@ } } }, - "StopTrainingPlanRequest":{ - "type":"structure", - "required":["TrainingPlanName"], - "members":{ - "TrainingPlanName":{"shape":"TrainingPlanName"} - } - }, - "StopTrainingPlanResponse":{ - "type":"structure", - "required":[ - "TrainingPlanArn", - "Status" - ], - "members":{ - "TrainingPlanArn":{"shape":"TrainingPlanArn"}, - "Status":{"shape":"TrainingPlanStatus"} - } - }, - "StopTransformJobInternalRequest":{ - "type":"structure", - "required":[ - "TransformJobName", - "CustomerDetails" - ], - "members":{ - "TransformJobName":{"shape":"TransformJobName"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, "StopTransformJobRequest":{ "type":"structure", "required":["TransformJobName"], @@ -50628,7 +44416,8 @@ "members":{ "MaxRuntimeInSeconds":{ "shape":"MaxRuntimeInSeconds", - "documentation":"The maximum length of time, in seconds, that a training or compilation job can run before it is stopped.
For compilation jobs, if the job does not complete during this time, a TimeOut error is generated. We recommend starting with 900 seconds and increasing as necessary based on your model.
For all other jobs, if the job does not complete during this time, SageMaker ends the job. When RetryStrategy is specified in the job request, MaxRuntimeInSeconds specifies the maximum time for all of the attempts in total, not each individual attempt. The default value is 1 day. The maximum value is 28 days.
The maximum time that a TrainingJob can run in total, including any time spent publishing metrics or archiving and uploading models after it has been stopped, is 30 days.
The maximum length of time, in seconds, that a training or compilation job can run before it is stopped.
For compilation jobs, if the job does not complete during this time, a TimeOut error is generated. We recommend starting with 900 seconds and increasing as necessary based on your model.
For all other jobs, if the job does not complete during this time, SageMaker ends the job. When RetryStrategy is specified in the job request, MaxRuntimeInSeconds specifies the maximum time for all of the attempts in total, not each individual attempt. The default value is 1 day. The maximum value is 28 days.
The maximum time that a TrainingJob can run in total, including any time spent publishing metrics or archiving and uploading models after it has been stopped, is 30 days.
Generates possible candidates without training the models. A model candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.
" + "documentation":"Generates possible candidates without training the models. A model candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.
", + "box":true }, "ProblemType":{ "shape":"ProblemType", @@ -50953,10 +44696,6 @@ "ProblemType":{ "shape":"ProblemType", "documentation":"The type of supervised learning problem available for the model candidates of the AutoML job V2 (Binary Classification, Multiclass Classification, Regression). For more information, see SageMaker Autopilot problem types.
" - }, - "LocalModeEnabled":{ - "shape":"LocalModeEnabled", - "internalonly":true } }, "documentation":"The resolved attributes specific to the tabular problem type.
" @@ -51010,111 +44749,6 @@ "min":0, "pattern":"([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)" }, - "TagrisAccessDeniedException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"} - }, - "exception":true - }, - "TagrisAccountId":{ - "type":"string", - "max":12, - "min":12 - }, - "TagrisAmazonResourceName":{ - "type":"string", - "max":1011, - "min":1 - }, - "TagrisExceptionMessage":{ - "type":"string", - "max":2048, - "min":0 - }, - "TagrisInternalId":{ - "type":"string", - "max":64, - "min":0 - }, - "TagrisInternalServiceException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"} - }, - "exception":true, - "fault":true - }, - "TagrisInvalidArnException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"}, - "sweepListItem":{"shape":"TagrisSweepListItem"} - }, - "exception":true - }, - "TagrisInvalidParameterException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"} - }, - "exception":true - }, - "TagrisPartialResourcesExistResultsException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"}, - "resourceExistenceInformation":{"shape":"TagrisSweepListResult"} - }, - "exception":true - }, - "TagrisStatus":{ - "type":"string", - "enum":[ - "ACTIVE", - "NOT_ACTIVE" - ] - }, - "TagrisSweepList":{ - "type":"list", - "member":{"shape":"TagrisSweepListItem"} - }, - "TagrisSweepListItem":{ - "type":"structure", - "members":{ - "TagrisAccountId":{"shape":"TagrisAccountId"}, - "TagrisAmazonResourceName":{"shape":"TagrisAmazonResourceName"}, - "TagrisInternalId":{"shape":"TagrisInternalId"}, - "TagrisVersion":{"shape":"TagrisVersion"} - } - }, - "TagrisSweepListResult":{ - "type":"map", - "key":{"shape":"TagrisAmazonResourceName"}, - "value":{"shape":"TagrisStatus"} - }, - "TagrisThrottledException":{ - "type":"structure", - "members":{ - "message":{"shape":"TagrisExceptionMessage"} - }, - "exception":true - }, - "TagrisVerifyResourcesExistInput":{ - "type":"structure", - "required":["TagrisSweepList"], - "members":{ - "TagrisSweepList":{"shape":"TagrisSweepList"} - } - }, - "TagrisVerifyResourcesExistOutput":{ - "type":"structure", - "required":["TagrisSweepListResult"], - "members":{ - "TagrisSweepListResult":{"shape":"TagrisSweepListResult"} - } - }, - "TagrisVersion":{"type":"long"}, "TargetAttributeName":{ "type":"string", "min":1 @@ -51136,10 +44770,7 @@ "ml_c6g", "ml_p2", "ml_p3", - "ml_p5", - "ml_p4d", "ml_g4dn", - "ml_g5", "ml_inf1", "ml_inf2", "ml_trn1", @@ -51174,13 +44805,6 @@ "max":256, "min":1 }, - "TargetMemberDefinition":{ - "type":"string", - "internalonly":true, - "max":128, - "min":1, - "pattern":"[a-zA-Z0-9]([-_.]?[a-zA-Z0-9])*" - }, "TargetObjectiveMetricValue":{ "type":"float", "box":true @@ -51242,7 +44866,8 @@ }, "TargetValue":{ "shape":"Double", - "documentation":"The recommended target value to specify for the metric when creating a scaling policy.
" + "documentation":"The recommended target value to specify for the metric when creating a scaling policy.
", + "box":true } }, "documentation":"A target tracking scaling policy. Includes support for predefined or customized metrics.
When using the PutScalingPolicy API, this parameter is required when you are creating a policy with the policy type TargetTrackingScaling.
Transformations allowed on the dataset. Supported transformations are Filling and Aggregation. Filling specifies how to add values to missing values in the dataset. Aggregation defines how to aggregate data that does not align with forecast frequency.
The total number of matching results. This value may be exact or an estimate, depending on the Relation field.
The total number of matching results. This value may be exact or an estimate, depending on the Relation field.
Defines the stairs traffic pattern.
" - }, - "Concurrencies":{ - "shape":"Concurrencies", - "internalonly":true - }, - "InferenceInvocationTypes":{ - "shape":"InferenceInvocationTypes", - "internalonly":true - }, - "PayloadSampling":{ - "shape":"PayloadSampling", - "internalonly":true } }, "documentation":"Defines the traffic pattern of the load test.
" @@ -51837,15 +45413,7 @@ "type":"string", "enum":[ "PHASES", - "STAIRS", - "CONCURRENCIES" - ] - }, - "TrainingCapacityFallbackStrategy":{ - "type":"string", - "enum":[ - "OnDemand", - "None" + "STAIRS" ] }, "TrainingContainerArgument":{ @@ -52076,12 +45644,7 @@ "ml.g7e.8xlarge", "ml.g7e.12xlarge", "ml.g7e.24xlarge", - "ml.g7e.48xlarge", - "ml.g5g.xlarge", - "ml.g5g.2xlarge", - "ml.g5g.4xlarge", - "ml.g5g.8xlarge", - "ml.g5g.16xlarge" + "ml.g7e.48xlarge" ] }, "TrainingInstanceTypes":{ @@ -52115,10 +45678,6 @@ "shape":"ModelArtifacts", "documentation":"Information about the Amazon S3 location that is configured for storing model artifacts.
" }, - "TrainingJobOutput":{ - "shape":"TrainingJobOutput", - "internalonly":true - }, "TrainingJobStatus":{ "shape":"TrainingJobStatus", "documentation":"The status of the training job.
Training job statuses are:
InProgress - The training is in progress.
Completed - The training job has completed.
Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call.
Stopping - The training job is stopping.
Stopped - The training job has stopped.
For more detailed information, see SecondaryStatus.
If the TrainingJob was created with network isolation, the value is set to true. If network isolation is enabled, nodes can't communicate beyond the VPC they run in.
If the TrainingJob was created with network isolation, the value is set to true. If network isolation is enabled, nodes can't communicate beyond the VPC they run in.
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.
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.
When true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances. For more information, see Managed Spot Training.
" + "documentation":"When true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances. For more information, see Managed Spot Training.
", + "box":true }, "CheckpointConfig":{"shape":"CheckpointConfig"}, "TrainingTimeInSeconds":{ @@ -52221,21 +45783,13 @@ }, "OutputModelPackageArn":{ "shape":"ModelPackageArn", - "internalonly":true + "documentation":"The output model package Amazon Resource Name (ARN) that contains model weights or checkpoint.
" }, "ModelPackageConfig":{ "shape":"ModelPackageConfig", - "internalonly":true - }, - "UpstreamPlatformConfig":{ - "shape":"UpstreamPlatformConfig", - "internalonly":true + "documentation":"The model package configuration.
" }, "ProfilerConfig":{"shape":"ProfilerConfig"}, - "DisableEFA":{ - "shape":"Boolean", - "internalonly":true - }, "Environment":{ "shape":"TrainingEnvironmentMap", "documentation":"The environment variables to set in the Docker container.
" @@ -52244,14 +45798,6 @@ "shape":"RetryStrategy", "documentation":"The number of times to retry the job when the job fails due to an InternalServerError.
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.
" @@ -52312,17 +45858,6 @@ "min":1, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "TrainingJobOutput":{ - "type":"structure", - "required":["S3TrainingJobOutput"], - "members":{ - "S3TrainingJobOutput":{ - "shape":"S3Uri", - "documentation":"Provides information about the S3 bucket where training job output (model artifacts) is stored. For example, s3://bucket-name/keyname-prefix/output.tar.gz.
Provides information about the location that is configured for storing optional output.
" - }, "TrainingJobSortByOptions":{ "type":"string", "enum":[ @@ -52352,23 +45887,28 @@ "members":{ "Completed":{ "shape":"TrainingJobStatusCounter", - "documentation":"The number of completed training jobs launched by the hyperparameter tuning job.
" + "documentation":"The number of completed training jobs launched by the hyperparameter tuning job.
", + "box":true }, "InProgress":{ "shape":"TrainingJobStatusCounter", - "documentation":"The number of in-progress training jobs launched by a hyperparameter tuning job.
" + "documentation":"The number of in-progress training jobs launched by a hyperparameter tuning job.
", + "box":true }, "RetryableError":{ "shape":"TrainingJobStatusCounter", - "documentation":"The number of training jobs that failed, but can be retried. A failed training job can be retried only if it failed because an internal service error occurred.
" + "documentation":"The number of training jobs that failed, but can be retried. A failed training job can be retried only if it failed because an internal service error occurred.
", + "box":true }, "NonRetryableError":{ "shape":"TrainingJobStatusCounter", - "documentation":"The number of training jobs that failed and can't be retried. A failed training job can't be retried if it failed because a client error occurred.
" + "documentation":"The number of training jobs that failed and can't be retried. A failed training job can't be retried if it failed because a client error occurred.
", + "box":true }, "Stopped":{ "shape":"TrainingJobStatusCounter", - "documentation":"The number of training jobs launched by a hyperparameter tuning job that were manually stopped.
" + "documentation":"The number of training jobs launched by a hyperparameter tuning job that were manually stopped.
", + "box":true } }, "documentation":"The numbers of training jobs launched by a hyperparameter tuning job, categorized by status.
" @@ -52428,10 +45968,6 @@ "shape":"WarmPoolStatus", "documentation":"The status of the warm pool associated with the training job.
" }, - "KeepAlivePeriodInSeconds":{ - "shape":"KeepAlivePeriodInSeconds", - "internalonly":true - }, "TrainingPlanArn":{ "shape":"TrainingPlanArn", "documentation":"The Amazon Resource Name (ARN); of the training plan associated with this training job.
For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .
The unique identifier of the extension offering that was used to create this extension.
" + }, + "ExtendedAt":{ + "shape":"Timestamp", + "documentation":"The timestamp when the extension was created.
" + }, + "StartDate":{ + "shape":"Timestamp", + "documentation":"The start date of the extension period.
" + }, + "EndDate":{ + "shape":"Timestamp", + "documentation":"The end date of the extension period.
" + }, + "Status":{ + "shape":"String256", + "documentation":"The current status of the extension (e.g., Pending, Active, Scheduled, Failed, Expired).
" + }, + "PaymentStatus":{ + "shape":"String256", + "documentation":"The payment processing status of the extension.
" + }, + "AvailabilityZone":{ + "shape":"String256", + "documentation":"The Availability Zone of the extension.
" + }, + "AvailabilityZoneId":{ + "shape":"AvailabilityZoneId", + "documentation":"The Availability Zone ID of the extension.
" + }, + "DurationHours":{ + "shape":"TrainingPlanExtensionDurationHours", + "documentation":"The duration of the extension in hours.
" + }, + "UpfrontFee":{ + "shape":"String256", + "documentation":"The upfront fee for the extension.
" + }, + "CurrencyCode":{ + "shape":"CurrencyCode", + "documentation":"The currency code for the upfront fee (e.g., USD).
" + } + }, + "documentation":"Details about an extension to a training plan, including the offering ID, dates, status, and cost information.
" + }, + "TrainingPlanExtensionDurationHours":{ + "type":"integer", + "box":true, + "max":4368, + "min":0 + }, + "TrainingPlanExtensionOffering":{ + "type":"structure", + "required":["TrainingPlanExtensionOfferingId"], + "members":{ + "TrainingPlanExtensionOfferingId":{ + "shape":"TrainingPlanExtensionOfferingId", + "documentation":"The unique identifier for this extension offering.
" + }, + "AvailabilityZone":{ + "shape":"String256", + "documentation":"The Availability Zone for this extension offering.
" + }, + "StartDate":{ + "shape":"Timestamp", + "documentation":"The start date of this extension offering.
" + }, + "EndDate":{ + "shape":"Timestamp", + "documentation":"The end date of this extension offering.
" + }, + "DurationHours":{ + "shape":"TrainingPlanExtensionDurationHours", + "documentation":"The duration of this extension offering in hours.
" + }, + "UpfrontFee":{ + "shape":"String256", + "documentation":"The upfront fee for this extension offering.
" + }, + "CurrencyCode":{ + "shape":"CurrencyCode", + "documentation":"The currency code for the upfront fee (e.g., USD).
" + } + }, + "documentation":"Details about an available extension offering for a training plan. Use the offering ID with the ExtendTrainingPlan API to extend a training plan.
The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod) for this training plan offering.
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.
The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) for this training plan offering.
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.
A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment.
The number of instances currently in use from this training plan.
" }, - "UnhealthyInstanceCount":{ - "shape":"UnhealthyInstanceCount", - "internalonly":true - }, - "AvailableSpareInstanceCount":{ - "shape":"AvailableSpareInstanceCount", - "internalonly":true - }, "TotalUltraServerCount":{ "shape":"UltraServerCount", "documentation":"The total number of UltraServers allocated to this training plan.
" }, "TargetResources":{ "shape":"SageMakerResourceNames", - "documentation":"The target resources (e.g., training jobs, HyperPod clusters) 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.
The target resources (e.g., training jobs, HyperPod clusters, Endpoints) 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.
A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment.
A list of reserved capacities associated with this training plan, including details such as instance types, counts, and availability zones.
" - }, - "TrainingPlanStatusTransitions":{ - "shape":"TrainingPlanStatusTransitions", - "internalonly":true } }, "documentation":"Details of the training plan.
For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan .
The total step count per epoch.
" + }, "CurrentStep":{ "shape":"TrainingStepIndex", - "internalonly":true + "documentation":"The current step number.
" }, - "CurrentEpoch":{"shape":"TrainingEpochIndex"}, - "MaxEpoch":{"shape":"TrainingEpochCount"} + "CurrentEpoch":{ + "shape":"TrainingEpochIndex", + "documentation":"The current epoch number.
" + }, + "MaxEpoch":{ + "shape":"TrainingEpochCount", + "documentation":"The maximum number of epochs for this job.
" + } }, - "internalonly":true + "documentation":"The serverless training job progress information.
" }, "TrainingRepositoryAccessMode":{ "type":"string", @@ -52772,7 +46378,8 @@ }, "SupportsDistributedTraining":{ "shape":"Boolean", - "documentation":"Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than one instance during training.
" + "documentation":"Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than one instance during training.
", + "box":true }, "MetricDefinitions":{ "shape":"MetricDefinitionList", @@ -53049,20 +46656,8 @@ "shape":"AutoMLJobArn", "documentation":"The Amazon Resource Name (ARN) of the AutoML job that created the transform job.
" }, - "TransformJobProgress":{ - "shape":"TransformJobProgress", - "internalonly":true - }, "DataProcessing":{"shape":"DataProcessing"}, "ExperimentConfig":{"shape":"ExperimentConfig"}, - "LastModifiedBy":{ - "shape":"UserContext", - "internalonly":true - }, - "CreatedBy":{ - "shape":"UserContext", - "internalonly":true - }, "Tags":{ "shape":"TagList", "documentation":"A list of tags associated with the transform job.
" @@ -53121,12 +46716,6 @@ "min":1, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "TransformJobProgress":{ - "type":"structure", - "members":{ - "S3JobProgress":{"shape":"S3JobProgress"} - } - }, "TransformJobStatus":{ "type":"string", "enum":[ @@ -53210,14 +46799,6 @@ "KmsKeyId":{ "shape":"KmsKeyId", "documentation":"The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:
Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
Alias name: alias/ExampleAlias
Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.
The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide.
" - }, - "OutputPrefix":{ - "shape":"OutputPrefix", - "internalonly":true - }, - "OutputSuffix":{ - "shape":"OutputSuffix", - "internalonly":true } }, "documentation":"Describes the results of a transform job.
" @@ -53271,19 +46852,6 @@ "max":256, "min":1 }, - "Transformer":{ - "type":"structure", - "required":["Name"], - "members":{ - "Name":{"shape":"AutoMLTransformer"} - } - }, - "Transformers":{ - "type":"list", - "member":{"shape":"Transformer"}, - "max":5, - "min":0 - }, "Trial":{ "type":"structure", "members":{ @@ -53542,9 +47110,7 @@ "Completed", "Failed", "Stopping", - "Stopped", - "Deleting", - "DeleteFailed" + "Stopped" ] }, "TrialComponentSimpleSummaries":{ @@ -53741,35 +47307,6 @@ }, "documentation":"A summary of the properties of a trial. To get the complete set of properties, call the DescribeTrial API and provide the TrialName.
The job completion criteria.
" }, - "TuningJobCompletionReason":{ - "type":"string", - "enum":[ - "MaxNumberOfTrainingJobsReached", - "MaxTuningJobRuntimeReached", - "MaxBillableTimeReached", - "TargetObjectiveMetricValueReached", - "BestObjectiveNotImprovingReached", - "ConvergenceReached" - ] - }, "TuningJobStepMetaData":{ "type":"structure", "members":{ @@ -53854,15 +47380,18 @@ "members":{ "Dollars":{ "shape":"Dollars", - "documentation":"The whole number of dollars in the amount.
" + "documentation":"The whole number of dollars in the amount.
", + "box":true }, "Cents":{ "shape":"Cents", - "documentation":"The fractional portion, in cents, of the amount.
" + "documentation":"The fractional portion, in cents, of the amount.
", + "box":true }, "TenthFractionsOfACent":{ "shape":"TenthFractionsOfACent", - "documentation":"Fractions of a cent, in tenths.
" + "documentation":"Fractions of a cent, in tenths.
", + "box":true } }, "documentation":"Represents an amount of money in United States dollars.
" @@ -53988,6 +47517,10 @@ "Id":{ "shape":"String", "documentation":"The unique identifier of the UltraServer.
" + }, + "Type":{ + "shape":"String", + "documentation":"The type of the UltraServer.
" } }, "documentation":"Contains information about the UltraServer object.
" @@ -54136,10 +47669,6 @@ "shape":"KernelGatewayImageConfig", "documentation":"The new KernelGateway app to run on the image.
" }, - "SaviturAppImageConfig":{ - "shape":"SaviturAppImageConfig", - "internalonly":true - }, "JupyterLabAppImageConfig":{ "shape":"JupyterLabAppImageConfig", "documentation":"The JupyterLab app running on the image.
" @@ -54159,45 +47688,6 @@ } } }, - "UpdateAppRequest":{ - "type":"structure", - "required":[ - "DomainId", - "AppType", - "AppName" - ], - "members":{ - "DomainId":{ - "shape":"DomainId", - "internalonly":true - }, - "UserProfileName":{ - "shape":"UserProfileName", - "internalonly":true - }, - "SpaceName":{ - "shape":"SpaceName", - "internalonly":true - }, - "AppType":{ - "shape":"AppType", - "internalonly":true - }, - "AppName":{ - "shape":"AppName", - "internalonly":true - } - } - }, - "UpdateAppResponse":{ - "type":"structure", - "members":{ - "AppArn":{ - "shape":"AppArn", - "internalonly":true - } - } - }, "UpdateArtifactRequest":{ "type":"structure", "required":["ArtifactArn"], @@ -54229,50 +47719,6 @@ } } }, - "UpdateCapacityScheduleRequest":{ - "type":"structure", - "required":["CapacityScheduleName"], - "members":{ - "CapacityScheduleName":{"shape":"CapacityScheduleName"}, - "MaxWaitTimeInSeconds":{"shape":"CapacityScheduleMaxWaitTimeInSeconds"}, - "RequestedStartTime":{"shape":"Timestamp"}, - "RequestedEndTime":{"shape":"Timestamp"}, - "InstanceCount":{"shape":"CapacityScheduleInstanceCount"} - } - }, - "UpdateCapacityScheduleResponse":{ - "type":"structure", - "required":[ - "CapacityScheduleArn", - "Status" - ], - "members":{ - "CapacityScheduleArn":{"shape":"CapacityScheduleArn"}, - "Status":{"shape":"CapacityScheduleStatus"} - } - }, - "UpdateClusterInferenceRequest":{ - "type":"structure", - "required":[ - "ClusterArn", - "InferenceServiceConfig" - ], - "members":{ - "ClusterArn":{"shape":"ClusterArn"}, - "InferenceServiceConfig":{"shape":"InferenceServiceConfig"}, - "DryRun":{ - "shape":"DryRun", - "internalonly":true - } - } - }, - "UpdateClusterInferenceResponse":{ - "type":"structure", - "required":["ClusterArn"], - "members":{ - "ClusterArn":{"shape":"ClusterArn"} - } - }, "UpdateClusterRequest":{ "type":"structure", "required":["ClusterName"], @@ -54289,10 +47735,6 @@ "shape":"ClusterRestrictedInstanceGroupSpecifications", "documentation":"The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.
" }, - "ResilienceConfig":{ - "shape":"ClusterResilienceConfig", - "internalonly":true - }, "TieredStorageConfig":{ "shape":"ClusterTieredStorageConfig", "documentation":"Updates the configuration for managed tier checkpointing on the HyperPod cluster. For example, you can enable or disable the feature and modify the percentage of cluster memory allocated for checkpoint storage.
" @@ -54309,10 +47751,6 @@ "shape":"ClusterNodeProvisioningMode", "documentation":"Determines how instance provisioning is handled during cluster operations. In Continuous mode, the cluster provisions available instances incrementally and retries until the target count is reached. The cluster becomes operational once cluster-level resources are ready. Use CurrentCount and TargetCount in DescribeCluster to track provisioning progress.
The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes for cluster autoscaling operations. Cannot be updated while autoscaling is enabled.
" @@ -54321,10 +47759,7 @@ "shape":"ClusterAutoScalingConfig", "documentation":"Updates the autoscaling configuration for the cluster. Use to enable or disable automatic node scaling.
" }, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true - } + "Orchestrator":{"shape":"ClusterOrchestrator"} } }, "UpdateClusterResponse":{ @@ -54350,7 +47785,8 @@ }, "TargetVersion":{ "shape":"Integer", - "documentation":"Target version.
" + "documentation":"Target version.
", + "box":true }, "SchedulerConfig":{ "shape":"SchedulerConfig", @@ -54359,10 +47795,6 @@ "Description":{ "shape":"EntityDescription", "documentation":"Description of the cluster policy.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -54379,7 +47811,8 @@ }, "ClusterSchedulerConfigVersion":{ "shape":"Integer", - "documentation":"Version of the cluster policy.
" + "documentation":"Version of the cluster policy.
", + "box":true } } }, @@ -54390,10 +47823,6 @@ "InstanceGroupName":{ "shape":"ClusterInstanceGroupName", "documentation":"The name of the instance group to update.
" - }, - "CustomMetadata":{ - "shape":"CustomMetadata", - "internalonly":true } }, "documentation":"The configuration that describes specifications of the instance groups to update.
" @@ -54420,10 +47849,6 @@ "shape":"DeploymentConfiguration", "documentation":"The configuration to use when updating the AMI versions.
" }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true - }, "ImageId":{ "shape":"ImageId", "documentation":"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.
Target version.
" + "documentation":"Target version.
", + "box":true }, "ComputeQuotaConfig":{ "shape":"ComputeQuotaConfig", @@ -54494,10 +47920,6 @@ "Description":{ "shape":"EntityDescription", "documentation":"Description of the compute allocation definition.
" - }, - "DryRun":{ - "shape":"DryRun", - "internalonly":true } } }, @@ -54514,7 +47936,8 @@ }, "ComputeQuotaVersion":{ "shape":"Integer", - "documentation":"Version of the compute allocation definition.
" + "documentation":"Version of the compute allocation definition.
", + "box":true } } }, @@ -54663,7 +48086,8 @@ }, "RetainAllVariantProperties":{ "shape":"Boolean", - "documentation":"When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating it, set RetainAllVariantProperties to true. To use the variant properties specified in a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to false. The default is false.
When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating it, set RetainAllVariantProperties to true. To use the variant properties specified in a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to false. The default is false.
Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is not reused).
" + "documentation":"Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is not reused).
", + "box":true } } }, @@ -54751,10 +48176,6 @@ "shape":"FeatureGroupNameOrArn", "documentation":"The name or Amazon Resource Name (ARN) of the feature group that you're updating.
" }, - "AddOnlineStoreReplica":{ - "shape":"AddOnlineStoreReplicaAction", - "internalonly":true - }, "FeatureAdditions":{ "shape":"FeatureAdditions", "documentation":"Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group.
" @@ -54763,10 +48184,6 @@ "shape":"OnlineStoreConfigUpdate", "documentation":"Updates the feature group online store configuration.
" }, - "Description":{ - "shape":"Description", - "internalonly":true - }, "ThroughputConfig":{"shape":"ThroughputConfigUpdate"} } }, @@ -54948,24 +48365,6 @@ } } }, - "UpdateHumanTaskUiRequest":{ - "type":"structure", - "required":[ - "HumanTaskUiName", - "UiTemplate" - ], - "members":{ - "HumanTaskUiName":{"shape":"HumanTaskUiName"}, - "UiTemplate":{"shape":"UiTemplate"} - } - }, - "UpdateHumanTaskUiResponse":{ - "type":"structure", - "required":["HumanTaskUiArn"], - "members":{ - "HumanTaskUiArn":{"shape":"HumanTaskUiArn"} - } - }, "UpdateImageRequest":{ "type":"structure", "required":["ImageName"], @@ -55047,7 +48446,8 @@ }, "Horovod":{ "shape":"Horovod", - "documentation":"Indicates Horovod compatibility.
" + "documentation":"Indicates Horovod compatibility.
", + "box":true }, "ReleaseNotes":{ "shape":"ReleaseNotes", @@ -55167,19 +48567,43 @@ "type":"structure", "required":["Arn"], "members":{ - "Arn":{"shape":"MlflowAppArn"}, - "Name":{"shape":"MlflowAppName"}, - "ArtifactStoreUri":{"shape":"S3Uri"}, - "ModelRegistrationMode":{"shape":"ModelRegistrationMode"}, - "WeeklyMaintenanceWindowStart":{"shape":"WeeklyMaintenanceWindowStart"}, - "DefaultDomainIdList":{"shape":"DefaultDomainIdList"}, - "AccountDefaultStatus":{"shape":"AccountDefaultStatus"} + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the MLflow App to update.
" + }, + "Name":{ + "shape":"MlflowAppName", + "documentation":"The name of the MLflow App to update.
" + }, + "ArtifactStoreUri":{ + "shape":"S3Uri", + "documentation":"The new S3 URI for the general purpose bucket to use as the artifact store for the MLflow App.
" + }, + "ModelRegistrationMode":{ + "shape":"ModelRegistrationMode", + "documentation":"Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to AutoModelRegistrationEnabled. To disable automatic model registration, set this value to AutoModelRegistrationDisabled. If not specified, AutomaticModelRegistration defaults to AutoModelRegistrationEnabled
The new weekly maintenance window start day and time to update. The maintenance window day and time should be in Coordinated Universal Time (UTC) 24-hour standard time. For example: TUE:03:30.
" + }, + "DefaultDomainIdList":{ + "shape":"DefaultDomainIdList", + "documentation":"List of SageMaker Domain IDs for which this MLflow App is the default.
" + }, + "AccountDefaultStatus":{ + "shape":"AccountDefaultStatus", + "documentation":"Indicates whether this this MLflow App is the default for the account.
" + } } }, "UpdateMlflowAppResponse":{ "type":"structure", "members":{ - "Arn":{"shape":"MlflowAppArn"} + "Arn":{ + "shape":"MlflowAppArn", + "documentation":"The ARN of the updated MLflow App.
" + } } }, "UpdateMlflowTrackingServerRequest":{ @@ -55200,11 +48624,21 @@ }, "AutomaticModelRegistration":{ "shape":"Boolean", - "documentation":"Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False
Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False
The new weekly maintenance window start day and time to update. The maintenance window day and time should be in Coordinated Universal Time (UTC) 24-hour standard time. For example: TUE:03:30.
" + }, + "S3BucketOwnerAccountId":{ + "shape":"AccountId", + "documentation":"The new expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage.
" + }, + "S3BucketOwnerVerification":{ + "shape":"Boolean", + "documentation":"Whether to enable or disable Amazon S3 Bucket Owenrship Verifaction whenever the MLflow Tracking Server interacts with Amazon Amazon S3.
", + "box":true } } }, @@ -55259,7 +48693,7 @@ }, "ModelPackageRegistrationType":{ "shape":"ModelPackageRegistrationType", - "internalonly":true + "documentation":"The package registration type of the model package input.
" }, "ApprovalDescription":{ "shape":"ApprovalDescription", @@ -55407,7 +48841,8 @@ }, "DisassociateLifecycleConfig":{ "shape":"DisassociateNotebookInstanceLifecycleConfig", - "documentation":"Set to true to remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error.
Set to true to remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error.
This parameter is no longer supported. Elastic Inference (EI) is no longer available.
This parameter was used to specify a list of the EI instance types to remove from this notebook instance.
" + "documentation":"This parameter is no longer supported. Elastic Inference (EI) is no longer available.
This parameter was used to specify a list of the EI instance types to remove from this notebook instance.
", + "box":true }, "DisassociateDefaultCodeRepository":{ "shape":"DisassociateDefaultCodeRepository", - "documentation":"The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
" + "documentation":"The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
", + "box":true }, "DisassociateAdditionalCodeRepositories":{ "shape":"DisassociateAdditionalCodeRepositories", - "documentation":"A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
" + "documentation":"A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error.
", + "box":true }, "RootAccess":{ "shape":"RootAccess", @@ -55666,10 +49104,6 @@ "TemplateProvidersToUpdate":{ "shape":"UpdateTemplateProviderList", "documentation":"The template providers to update in the project.
" - }, - "WorkflowDisabled":{ - "shape":"Boolean", - "internalonly":true } } }, @@ -55683,66 +49117,6 @@ } } }, - "UpdateQuotaAllocationRequest":{ - "type":"structure", - "required":["QuotaAllocationArn"], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"}, - "QuotaAllocationVersion":{"shape":"Integer"}, - "QuotaResources":{"shape":"QuotaResourceConfigList"}, - "OverQuota":{"shape":"OverQuota"}, - "PreemptionConfig":{"shape":"PreemptionConfig"}, - "ActivationState":{"shape":"ActivationStateV1"}, - "QuotaAllocationTarget":{"shape":"QuotaAllocationTarget"}, - "QuotaAllocationDescription":{"shape":"EntityDescription"} - } - }, - "UpdateQuotaAllocationResponse":{ - "type":"structure", - "required":["QuotaAllocationArn"], - "members":{ - "QuotaAllocationArn":{"shape":"QuotaAllocationArn"} - } - }, - "UpdateSharedModelRequest":{ - "type":"structure", - "required":["SharedModelId"], - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - }, - "Comment":{ - "shape":"Comment", - "internalonly":true - }, - "ModelArtifacts":{ - "shape":"SharedModelArtifacts", - "internalonly":true - }, - "Origin":{ - "shape":"Origin", - "internalonly":true - } - } - }, - "UpdateSharedModelResponse":{ - "type":"structure", - "members":{ - "SharedModelId":{ - "shape":"SharedModelId", - "internalonly":true - }, - "SharedModelVersion":{ - "shape":"SharedModelVersion", - "internalonly":true - } - } - }, "UpdateSpaceRequest":{ "type":"structure", "required":[ @@ -55829,52 +49203,6 @@ } } }, - "UpdateTrainingPlanRequest":{ - "type":"structure", - "required":["TrainingPlanName"], - "members":{ - "TrainingPlanName":{"shape":"TrainingPlanName"}, - "MaxWaitTimeInSeconds":{"shape":"TrainingPlanMaxWaitTimeInSeconds"}, - "RequestedStartTime":{"shape":"Timestamp"}, - "RequestedEndTime":{"shape":"Timestamp"}, - "InstanceCount":{"shape":"TrainingPlanInstanceCount"} - } - }, - "UpdateTrainingPlanResponse":{ - "type":"structure", - "required":[ - "TrainingPlanArn", - "Status" - ], - "members":{ - "TrainingPlanArn":{"shape":"TrainingPlanArn"}, - "Status":{"shape":"TrainingPlanStatus"} - } - }, - "UpdateTrialComponentInternalRequest":{ - "type":"structure", - "required":["TrialComponentName"], - "members":{ - "TrialComponentName":{"shape":"ExperimentEntityName"}, - "DisplayName":{"shape":"ExperimentEntityName"}, - "Status":{"shape":"TrialComponentStatus"}, - "StartTime":{"shape":"Timestamp"}, - "EndTime":{"shape":"Timestamp"}, - "Parameters":{"shape":"TrialComponentParameters"}, - "ParametersToRemove":{"shape":"ListTrialComponentKey256"}, - "InputArtifacts":{"shape":"TrialComponentArtifacts"}, - "InputArtifactsToRemove":{"shape":"ListTrialComponentKey256"}, - "OutputArtifacts":{"shape":"TrialComponentArtifacts"}, - "OutputArtifactsToRemove":{"shape":"ListTrialComponentKey256"}, - "CustomerDetails":{"shape":"CustomerDetails"} - } - }, - "UpdateTrialComponentInternalResponse":{ - "type":"structure", - "members":{ - "TrialComponentArn":{"shape":"TrialComponentArn"} - } - }, "UpdateTrialComponentRequest":{ "type":"structure", "required":["TrialComponentName"], @@ -55972,10 +49300,6 @@ "shape":"UserProfileName", "documentation":"The user profile name.
" }, - "UserPolicy":{ - "shape":"String2048", - "internalonly":true - }, "UserSettings":{ "shape":"UserSettings", "documentation":"A collection of settings.
" @@ -56039,14 +49363,6 @@ "shape":"MemberDefinitions", "documentation":"A list of MemberDefinition objects that contains objects that identify the workers that make up the work team.
Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. You should not provide input for both of these parameters in a single request.
For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools.
For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups. Be aware that user groups that are already in the work team must also be listed in Groups when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update.
An updated description for the work team.
" @@ -56071,126 +49387,6 @@ } } }, - "UpgradeMlflowTrackingServerVersionRequest":{ - "type":"structure", - "required":[ - "TrackingServerName", - "MlflowVersion" - ], - "members":{ - "TrackingServerName":{"shape":"TrackingServerName"}, - "MlflowVersion":{"shape":"String"} - } - }, - "UpgradeMlflowTrackingServerVersionResponse":{ - "type":"structure", - "members":{ - "TrackingServerArn":{"shape":"TrackingServerArn"} - } - }, - "UpgradeRollbackVersionDetails":{ - "type":"structure", - "members":{ - "SnapshotTime":{"shape":"Timestamp"}, - "PreviousVersion":{"shape":"MlflowVersion"} - }, - "internalonly":true - }, - "UpstreamCustomerArn":{ - "type":"string", - "max":256, - "min":0, - "pattern":"arn:aws[a-z\\-]*:[a-z0-9\\-]+:[a-zA-Z0-9\\-]*:[0-9]{12}:.+.*" - }, - "UpstreamPlatformConfig":{ - "type":"structure", - "members":{ - "CredentialProxyConfig":{ - "shape":"CredentialProxyConfig", - "internalonly":true - }, - "LogRoutingConfig":{ - "shape":"LogRoutingConfig", - "internalonly":true - }, - "VpcConfig":{"shape":"VpcConfig"}, - "AgentsCredentialProvider":{ - "shape":"AgentsCredentialProvider", - "internalonly":true - }, - "OutputDataConfig":{ - "shape":"UpstreamPlatformOutputDataConfig", - "internalonly":true - }, - "CheckpointConfig":{"shape":"CheckpointConfig"}, - "UpstreamCustomerAccountId":{ - "shape":"AccountId", - "internalonly":true - }, - "UpstreamCustomerArn":{ - "shape":"UpstreamCustomerArn", - "internalonly":true - }, - "EnableS3ContextKeysOnInputData":{ - "shape":"Boolean", - "internalonly":true - }, - "ExecutionRole":{ - "shape":"RoleArn", - "internalonly":true - } - }, - "internalonly":true - }, - "UpstreamPlatformOutputChannels":{ - "type":"list", - "member":{"shape":"OutputChannel"}, - "max":5, - "min":0 - }, - "UpstreamPlatformOutputDataConfig":{ - "type":"structure", - "members":{ - "KmsKeyId":{ - "shape":"KmsKeyId", - "internalonly":true - }, - "KmsEncryptionContext":{ - "shape":"KmsEncryptionContext", - "internalonly":true - }, - "Channels":{ - "shape":"UpstreamPlatformOutputChannels", - "internalonly":true - } - }, - "internalonly":true - }, - "UpstreamProcessingOutput":{ - "type":"structure", - "required":[ - "OutputName", - "UpstreamS3Output" - ], - "members":{ - "OutputName":{"shape":"String"}, - "UpstreamS3Output":{"shape":"ProcessingUpstreamS3Output"} - } - }, - "UpstreamProcessingOutputConfig":{ - "type":"structure", - "required":["Outputs"], - "members":{ - "Outputs":{"shape":"UpstreamProcessingOutputs"}, - "KmsKeyId":{"shape":"KmsKeyId"} - } - }, - "UpstreamProcessingOutputs":{ - "type":"list", - "member":{"shape":"UpstreamProcessingOutput"}, - "max":5, - "min":0 - }, "Url":{ "type":"string", "max":1024, @@ -56219,28 +49415,6 @@ }, "documentation":"Information about the user who created or modified a SageMaker resource.
" }, - "UserProfile":{ - "type":"structure", - "members":{ - "DomainId":{"shape":"DomainId"}, - "UserProfileArn":{"shape":"UserProfileArn"}, - "UserProfileName":{"shape":"UserProfileName"}, - "HomeEfsFileSystemUid":{"shape":"EfsUid"}, - "Status":{"shape":"UserProfileStatus"}, - "LastModifiedTime":{"shape":"LastModifiedTime"}, - "CreationTime":{"shape":"CreationTime"}, - "FailureReason":{"shape":"FailureReason"}, - "SingleSignOnUserIdentifier":{"shape":"SingleSignOnUserIdentifier"}, - "SingleSignOnUserValue":{"shape":"String256"}, - "UserPolicy":{ - "shape":"String2048", - "internalonly":true - }, - "UserSettings":{"shape":"UserSettings"}, - "Tags":{"shape":"TagList"} - }, - "internalonly":true - }, "UserProfileArn":{ "type":"string", "max":256, @@ -56283,12 +49457,6 @@ "min":0, "pattern":"[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}" }, - "UserProfileNameList":{ - "type":"list", - "member":{"shape":"UserProfileName"}, - "max":23, - "min":1 - }, "UserProfileSortKey":{ "type":"string", "enum":[ @@ -56315,10 +49483,6 @@ "shape":"RoleArn", "documentation":"The execution role for the user.
SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces.
" }, - "EnvironmentSettings":{ - "shape":"EnvironmentSettings", - "documentation":"The environment settings.
" - }, "SecurityGroups":{ "shape":"SecurityGroupIds", "documentation":"The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for communication.
Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly.
Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly, unless specified as part of the DefaultUserSettings for the domain.
Amazon SageMaker AI adds a security group to allow NFS traffic from Amazon SageMaker AI Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown.
SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.
" @@ -56351,14 +49515,6 @@ "shape":"CanvasAppSettings", "documentation":"The Canvas app settings.
SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas app.
" }, - "VSCodeAppSettings":{ - "shape":"VSCodeAppSettings", - "internalonly":true - }, - "SaviturAppSettings":{ - "shape":"SaviturAppSettings", - "internalonly":true - }, "CodeEditorAppSettings":{ "shape":"CodeEditorAppSettings", "documentation":"The Code Editor application settings.
SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.
" @@ -56387,10 +49543,6 @@ "shape":"CustomFileSystemConfigs", "documentation":"The settings for assigning a custom file system to a user profile. Permitted users can access this file system in Amazon SageMaker AI Studio.
SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces.
" }, - "EmrSettings":{ - "shape":"EmrSettings", - "internalonly":true - }, "StudioWebPortalSettings":{ "shape":"StudioWebPortalSettings", "documentation":"Studio settings. If these settings are applied on a user level, they take priority over the settings applied on a domain level.
" @@ -56425,15 +49577,6 @@ "max":10000000, "min":0 }, - "VSCodeAppSettings":{ - "type":"structure", - "members":{ - "DefaultResourceSpec":{"shape":"ResourceSpec"}, - "CustomImages":{"shape":"CustomImages"}, - "LifecycleConfigArns":{"shape":"LifecycleConfigArns"} - }, - "internalonly":true - }, "ValidationFraction":{ "type":"float", "box":true, @@ -56609,13 +49752,6 @@ "type":"integer", "min":1 }, - "Volumes":{ - "type":"map", - "key":{"shape":"String2048"}, - "value":{"shape":"String2048"}, - "max":10, - "min":0 - }, "VpcConfig":{ "type":"structure", "required":[ @@ -56652,10 +49788,6 @@ "max":5, "min":1 }, - "WaitForInstanceTermination":{ - "type":"boolean", - "box":true - }, "WaitIntervalInSeconds":{ "type":"integer", "box":true, @@ -56718,20 +49850,6 @@ }, "documentation":"Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL.
" }, - "WorkflowSteps":{ - "type":"string", - "max":1000000, - "min":0, - "pattern":"[\\u0020-\\uffff]+" - }, - "WorkflowType":{ - "type":"string", - "documentation":"Represents the workflow type we used. Whether we use NewJobWorkflow or DefaultJobWorkflow.
", - "enum":[ - "NewJobWorkflow", - "DefaultJobWorkflow" - ] - }, "Workforce":{ "type":"structure", "required":[ @@ -56910,6 +50028,17 @@ "type":"list", "member":{"shape":"Workforce"} }, + "WorkloadSpec":{ + "type":"structure", + "members":{ + "Inline":{ + "shape":"String", + "documentation":"An inline YAML or JSON string that defines benchmark parameters.
" + } + }, + "documentation":"The workload specification for benchmark tool configuration. Provide an inline YAML or JSON string.
", + "union":true + }, "WorkspaceSettings":{ "type":"structure", "members":{ @@ -56973,14 +50102,6 @@ "shape":"NotificationConfiguration", "documentation":"Configures SNS notifications of available or expiring work items for work teams.
" }, - "MembershipRule":{ - "shape":"MembershipRule", - "internalonly":true - }, - "MembershipType":{ - "shape":"MembershipType", - "internalonly":true - }, "WorkerAccessConfiguration":{ "shape":"WorkerAccessConfiguration", "documentation":"Describes any access constraints that have been defined for Amazon S3 resources.
" @@ -57003,24 +50124,6 @@ "Workteams":{ "type":"list", "member":{"shape":"Workteam"} - }, - "XAxisType":{ - "type":"string", - "enum":[ - "IterationNumber", - "Timestamp" - ] - }, - "isDualStackEndpoint":{ - "type":"boolean", - "box":true, - "internalonly":true - }, - "redirectUrl":{ - "type":"string", - "max":2000, - "min":0, - "pattern":"(https)://([^/]+)/?(.*)" } }, "documentation":"Provides APIs for creating and managing SageMaker resources.
Other Resources:
" diff --git a/sagemaker-core/src/sagemaker/__init__.py b/sagemaker-core/src/sagemaker/__init__.py index 71038bb89b..33b1b0d2b8 100644 --- a/sagemaker-core/src/sagemaker/__init__.py +++ b/sagemaker-core/src/sagemaker/__init__.py @@ -1,2 +1,3 @@ """Namespace package for SageMaker.""" -__path__ = __import__('pkgutil').extend_path(__path__, __name__) + +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sagemaker-core/src/sagemaker/core/__init__.py b/sagemaker-core/src/sagemaker/core/__init__.py index 498c85390a..133f0ec8a2 100644 --- a/sagemaker-core/src/sagemaker/core/__init__.py +++ b/sagemaker-core/src/sagemaker/core/__init__.py @@ -1,4 +1,5 @@ """SageMaker Core package for low-level resource management and SDK foundations.""" + from sagemaker.core.utils.utils import enable_textual_rich_console_and_traceback diff --git a/sagemaker-core/src/sagemaker/core/common_utils.py b/sagemaker-core/src/sagemaker/core/common_utils.py index b8d9ca6866..9b00b57994 100644 --- a/sagemaker-core/src/sagemaker/core/common_utils.py +++ b/sagemaker-core/src/sagemaker/core/common_utils.py @@ -686,7 +686,7 @@ def _create_or_update_code_dir( """Placeholder docstring""" code_dir = os.path.join(model_dir, "code") resolved_code_dir = _get_resolved_path(code_dir) - + # Validate that code_dir does not resolve to a sensitive system path for sensitive_path in _SENSITIVE_SYSTEM_PATHS: if resolved_code_dir != "/" and resolved_code_dir.startswith(sensitive_path): diff --git a/sagemaker-core/src/sagemaker/core/config_schema.py b/sagemaker-core/src/sagemaker/core/config_schema.py index c87ba3d02b..f352b2ab47 100644 --- a/sagemaker-core/src/sagemaker/core/config_schema.py +++ b/sagemaker-core/src/sagemaker/core/config_schema.py @@ -16,6 +16,33 @@ "Resources": { "type": "object", "properties": { + "AIBenchmarkJob": { + "type": "object", + "properties": { + "output_config": {"s3_output_location": {"type": "string"}}, + "role_arn": {"type": "string"}, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": {"type": "string"}, + }, + "subnets": { + "type": "array", + "items": {"type": "string"}, + }, + } + }, + }, + }, + "AIRecommendationJob": { + "type": "object", + "properties": { + "model_source": {"s3": {"s3_uri": {"type": "string"}}}, + "output_config": {"s3_output_location": {"type": "string"}}, + "role_arn": {"type": "string"}, + }, + }, "Algorithm": { "type": "object", "properties": { @@ -23,7 +50,6 @@ "additional_s3_data_source": { "s3_data_type": {"type": "string"}, "s3_uri": {"type": "string"}, - "manifest_s3_uri": {"type": "string"}, } }, "validation_specification": { @@ -123,9 +149,6 @@ "s3_output_location": {"type": "string"}, "kms_key_id": {"type": "string"}, }, - "resource_config": { - "volume_kms_key_id": {"type": "string"} - }, "vpc_config": { "security_group_ids": { "type": "array", @@ -138,46 +161,6 @@ }, }, }, - "CustomMonitoringJobDefinition": { - "type": "object", - "properties": { - "custom_monitoring_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "ground_truth_s3_input": {"s3_uri": {"type": "string"}}, - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "custom_monitoring_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, - }, "DataQualityJobDefinition": { "type": "object", "properties": { @@ -238,10 +221,6 @@ "security_group_id_for_domain_boundary": {"type": "string"}, "default_user_settings": { "execution_role": {"type": "string"}, - "environment_settings": { - "default_s3_artifact_path": {"type": "string"}, - "default_s3_kms_key_id": {"type": "string"}, - }, "security_groups": { "type": "array", "items": {"type": "string"}, @@ -282,16 +261,6 @@ }, } }, - "emr_settings": { - "assumable_role_arns": { - "type": "array", - "items": {"type": "string"}, - }, - "execution_role_arns": { - "type": "array", - "items": {"type": "string"}, - }, - }, }, "domain_settings": { "security_group_ids": { @@ -388,26 +357,6 @@ }, }, }, - "EvaluationJob": { - "type": "object", - "properties": { - "output_data_config": { - "s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "upstream_platform_config": { - "upstream_platform_customer_output_data_config": { - "s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, - "s3_kms_encryption_context": {"type": "string"}, - }, - "upstream_platform_customer_execution_role": { - "type": "string" - }, - }, - }, - }, "FeatureGroup": { "type": "object", "properties": { @@ -432,35 +381,14 @@ "kms_key_id": {"type": "string"}, }, "role_arn": {"type": "string"}, - "task_rendering_role_arn": {"type": "string"}, - "kms_key_id": {"type": "string"}, }, }, - "GroundTruthJob": { - "type": "object", - "properties": { - "input_config": { - "data_source": { - "s3_data_source": {"s3_uri": {"type": "string"}} - } - }, - "output_config": {"s3_output_path": {"type": "string"}}, - }, - }, - "GroundTruthWorkflow": { - "type": "object", - "properties": {"execution_role_arn": {"type": "string"}}, - }, "Hub": { "type": "object", "properties": { "s3_storage_config": {"s3_output_path": {"type": "string"}} }, }, - "HumanTaskUi": { - "type": "object", - "properties": {"kms_key_id": {"type": "string"}}, - }, "HyperParameterTuningJob": { "type": "object", "properties": { @@ -469,9 +397,6 @@ "output_data_config": { "s3_output_path": {"type": "string"}, "kms_key_id": {"type": "string"}, - "remove_job_name_from_s3_output_path": { - "type": "boolean" - }, }, "vpc_config": { "security_group_ids": { @@ -522,15 +447,6 @@ }, }, }, - "output_config": { - "kms_key_id": {"type": "string"}, - "compiled_output_config": { - "s3_output_uri": {"type": "string"} - }, - "benchmark_results_output_config": { - "s3_output_uri": {"type": "string"} - }, - }, }, }, "LabelingJob": { @@ -551,7 +467,6 @@ "human_task_config": { "ui_config": {"ui_template_s3_uri": {"type": "string"}} }, - "task_rendering_role_arn": {"type": "string"}, "label_category_config_s3_uri": {"type": "string"}, "labeling_job_algorithms_config": { "labeling_job_resource_config": { @@ -579,7 +494,11 @@ }, "MlflowTrackingServer": { "type": "object", - "properties": {"role_arn": {"type": "string"}}, + "properties": { + "role_arn": {"type": "string"}, + "s3_bucket_owner_account_id": {"type": "string"}, + "s3_bucket_owner_verification": {"type": "boolean"}, + }, }, "Model": { "type": "object", @@ -734,19 +653,6 @@ "report": {"s3_uri": {"type": "string"}} }, }, - "deployment_specification": { - "test_input": { - "data_source": { - "s3_data_source": { - "s3_data_type": {"type": "string"}, - "s3_uri": {"type": "string"}, - "s3_data_distribution_type": { - "type": "string" - }, - } - } - } - }, "drift_check_baselines": { "bias": { "config_file": {"s3_uri": {"type": "string"}}, @@ -851,219 +757,7 @@ } }, } - }, - "custom_monitoring_job_definition": { - "custom_monitoring_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "ground_truth_s3_input": { - "s3_uri": {"type": "string"} - }, - }, - "custom_monitoring_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, - "data_quality_job_definition": { - "data_quality_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "data_quality_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "data_quality_baseline_config": { - "constraints_resource": { - "s3_uri": {"type": "string"} - }, - "statistics_resource": { - "s3_uri": {"type": "string"} - }, - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, - "model_quality_job_definition": { - "model_quality_job_input": { - "ground_truth_s3_input": { - "s3_uri": {"type": "string"} - }, - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_quality_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "model_quality_baseline_config": { - "constraints_resource": { - "s3_uri": {"type": "string"} - } - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, - "model_bias_job_definition": { - "model_bias_job_input": { - "ground_truth_s3_input": { - "s3_uri": {"type": "string"} - }, - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_bias_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "model_bias_baseline_config": { - "constraints_resource": { - "s3_uri": {"type": "string"} - } - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, - "model_explainability_job_definition": { - "model_explainability_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": { - "type": "string" - }, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_explainability_job_output_config": { - "kms_key_id": {"type": "string"} - }, - "job_resources": { - "cluster_config": { - "volume_kms_key_id": {"type": "string"} - } - }, - "role_arn": {"type": "string"}, - "model_explainability_baseline_config": { - "constraints_resource": { - "s3_uri": {"type": "string"} - } - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - } - }, - }, + } }, }, "NotebookInstance": { @@ -1136,30 +830,16 @@ "role_arn": {"type": "string"}, }, }, - "QuotaAllocation": { - "type": "object", - "properties": { - "quota_allocation_target": { - "roles": {"type": "array", "items": {"type": "string"}} - } - }, - }, "TrainingJob": { "type": "object", "properties": { "model_artifacts": { "s3_model_artifacts": {"type": "string"} }, - "training_job_output": { - "s3_training_job_output": {"type": "string"} - }, "role_arn": {"type": "string"}, "output_data_config": { "s3_output_path": {"type": "string"}, "kms_key_id": {"type": "string"}, - "remove_job_name_from_s3_output_path": { - "type": "boolean" - }, }, "resource_config": { "volume_kms_key_id": {"type": "string"} @@ -1179,43 +859,7 @@ "tensor_board_output_config": { "s3_output_path": {"type": "string"} }, - "upstream_platform_config": { - "credential_proxy_config": { - "customer_credential_provider_kms_key_id": { - "type": "string" - }, - "platform_credential_provider_kms_key_id": { - "type": "string" - }, - }, - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": { - "type": "array", - "items": {"type": "string"}, - }, - }, - "output_data_config": { - "kms_key_id": {"type": "string"} - }, - "checkpoint_config": {"s3_uri": {"type": "string"}}, - "enable_s3_context_keys_on_input_data": { - "type": "boolean" - }, - "execution_role": {"type": "string"}, - }, "profiler_config": {"s3_output_path": {"type": "string"}}, - "processing_job_config": { - "processing_output_config": { - "kms_key_id": {"type": "string"} - }, - "upstream_processing_output_config": { - "kms_key_id": {"type": "string"} - }, - }, }, }, "TransformJob": { @@ -1247,10 +891,6 @@ "properties": { "user_settings": { "execution_role": {"type": "string"}, - "environment_settings": { - "default_s3_artifact_path": {"type": "string"}, - "default_s3_kms_key_id": {"type": "string"}, - }, "security_groups": { "type": "array", "items": {"type": "string"}, @@ -1291,16 +931,6 @@ }, } }, - "emr_settings": { - "assumable_role_arns": { - "type": "array", - "items": {"type": "string"}, - }, - "execution_role_arns": { - "type": "array", - "items": {"type": "string"}, - }, - }, } }, }, diff --git a/sagemaker-core/src/sagemaker/core/fw_utils.py b/sagemaker-core/src/sagemaker/core/fw_utils.py index f658ae9840..6964d8940b 100644 --- a/sagemaker-core/src/sagemaker/core/fw_utils.py +++ b/sagemaker-core/src/sagemaker/core/fw_utils.py @@ -458,9 +458,7 @@ def tar_and_upload_dir( try: source_files = _list_files_to_compress(script, directory) + dependencies - tar_file = utils.create_tar_file( - source_files, os.path.join(tmp, _TAR_SOURCE_FILENAME) - ) + tar_file = utils.create_tar_file(source_files, os.path.join(tmp, _TAR_SOURCE_FILENAME)) if kms_key: extra_args = {"ServerSideEncryption": "aws:kms", "SSEKMSKeyId": kms_key} @@ -1208,7 +1206,7 @@ def create_image_uri( the image uri """ from sagemaker.core import image_uris - + renamed_warning("The method create_image_uri") return image_uris.retrieve( framework=framework, diff --git a/sagemaker-core/src/sagemaker/core/git_utils.py b/sagemaker-core/src/sagemaker/core/git_utils.py index 08f9678840..4bcc296ecd 100644 --- a/sagemaker-core/src/sagemaker/core/git_utils.py +++ b/sagemaker-core/src/sagemaker/core/git_utils.py @@ -24,6 +24,7 @@ from pathlib import Path from urllib.parse import urlparse + def _sanitize_git_url(repo_url): """Sanitize Git repository URL to prevent URL injection attacks. @@ -84,6 +85,7 @@ def _sanitize_git_url(repo_url): return repo_url + def git_clone_repo(git_config, entry_point, source_dir=None, dependencies=None): """Git clone repo containing the training code and serving code. diff --git a/sagemaker-core/src/sagemaker/core/helper/session_helper.py b/sagemaker-core/src/sagemaker/core/helper/session_helper.py index 41957e30a2..bb1ad0e42a 100644 --- a/sagemaker-core/src/sagemaker/core/helper/session_helper.py +++ b/sagemaker-core/src/sagemaker/core/helper/session_helper.py @@ -240,6 +240,7 @@ def _initialize( self.sagemaker_client = sagemaker_client else: from sagemaker.core.user_agent import get_user_agent_extra_suffix + config = botocore.config.Config(user_agent_extra=get_user_agent_extra_suffix()) self.sagemaker_client = self.boto_session.client("sagemaker", config=config) @@ -1877,7 +1878,7 @@ def expand_role(self, role): if "/" in role: return role return self.boto_session.resource("iam").Role(role).arn - + def _expand_container_def(c_def): """Placeholder docstring""" @@ -2714,7 +2715,9 @@ def _live_logging_deploy_done(sagemaker_client, endpoint_name, paginator, pagina if endpoint_status != "Creating": stop = True if endpoint_status == "InService": - LOGGER.info("Created endpoint with name %s. Waiting for it to be InService", endpoint_name) + LOGGER.info( + "Created endpoint with name %s. Waiting for it to be InService", endpoint_name + ) else: time.sleep(poll) @@ -2974,4 +2977,4 @@ def container_def( c_def["Mode"] = container_mode if image_config: c_def["ImageConfig"] = image_config - return c_def \ No newline at end of file + return c_def diff --git a/sagemaker-core/src/sagemaker/core/image_retriever/image_retriever_utils.py b/sagemaker-core/src/sagemaker/core/image_retriever/image_retriever_utils.py index 6547ae0259..feeb6c6dde 100644 --- a/sagemaker-core/src/sagemaker/core/image_retriever/image_retriever_utils.py +++ b/sagemaker-core/src/sagemaker/core/image_retriever/image_retriever_utils.py @@ -185,7 +185,9 @@ def _validate_for_suppported_frameworks_and_instance_type(framework, instance_ty def config_for_framework(framework): """Loads the JSON config for the given framework.""" - fname = os.path.join(os.path.dirname(__file__), "..", "image_uri_config", "{}.json".format(framework)) + fname = os.path.join( + os.path.dirname(__file__), "..", "image_uri_config", "{}.json".format(framework) + ) with open(fname) as f: return json.load(f) diff --git a/sagemaker-core/src/sagemaker/core/iterators.py b/sagemaker-core/src/sagemaker/core/iterators.py index 60914cbdd0..4bb2156b1b 100644 --- a/sagemaker-core/src/sagemaker/core/iterators.py +++ b/sagemaker-core/src/sagemaker/core/iterators.py @@ -183,7 +183,7 @@ def __next__(self): # print and move on to next response byte print("Unknown event type:" + chunk) continue - + # Check buffer size before writing to prevent unbounded memory consumption chunk_size = len(chunk["PayloadPart"]["Bytes"]) current_size = self.buffer.getbuffer().nbytes @@ -192,6 +192,6 @@ def __next__(self): f"Line buffer exceeded maximum size of {_MAX_BUFFER_SIZE} bytes. " f"No newline found in stream." ) - + self.buffer.seek(0, io.SEEK_END) self.buffer.write(chunk["PayloadPart"]["Bytes"]) diff --git a/sagemaker-core/src/sagemaker/core/local/data.py b/sagemaker-core/src/sagemaker/core/local/data.py index 087e06c0bc..45aeeda1f0 100644 --- a/sagemaker-core/src/sagemaker/core/local/data.py +++ b/sagemaker-core/src/sagemaker/core/local/data.py @@ -121,7 +121,7 @@ def __init__(self, root_path): super(LocalFileDataSource, self).__init__() self.root_path = os.path.abspath(root_path) - + # Validate that the path is not in restricted locations for restricted_path in _SENSITIVE_SYSTEM_PATHS: if self.root_path != "/" and self.root_path.startswith(restricted_path): @@ -129,7 +129,7 @@ def __init__(self, root_path): f"Local Mode does not support mounting from restricted system paths. " f"Got: {root_path}" ) - + if not os.path.exists(self.root_path): raise RuntimeError("Invalid data source: %s does not exist." % self.root_path) diff --git a/sagemaker-core/src/sagemaker/core/local/utils.py b/sagemaker-core/src/sagemaker/core/local/utils.py index 4b8cdead66..2f2b5b713b 100644 --- a/sagemaker-core/src/sagemaker/core/local/utils.py +++ b/sagemaker-core/src/sagemaker/core/local/utils.py @@ -136,9 +136,9 @@ def get_child_process_ids(pid): """ if not str(pid).isdigit(): raise ValueError("Invalid PID") - + cmd = ["pgrep", "-P", str(pid)] - + process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, err = process.communicate() if err: diff --git a/sagemaker-core/src/sagemaker/core/model_registry.py b/sagemaker-core/src/sagemaker/core/model_registry.py index 5576580ea3..31ea5f7ec1 100644 --- a/sagemaker-core/src/sagemaker/core/model_registry.py +++ b/sagemaker-core/src/sagemaker/core/model_registry.py @@ -103,9 +103,9 @@ def get_model_package_args( if model_card is not None: original_req = {} if isinstance(model_card, ModelPackageModelCard): - original_req["ModelCardContent"] = model_card.model_card_content + original_req["ModelCardContent"] = model_card.model_card_content else: - original_req["ModelCardContent"] = model_card.content + original_req["ModelCardContent"] = model_card.content original_req["ModelCardStatus"] = model_card.model_card_status model_package_args["model_card"] = original_req return model_package_args diff --git a/sagemaker-core/src/sagemaker/core/modules/local_core/local_container.py b/sagemaker-core/src/sagemaker/core/modules/local_core/local_container.py index 06de1cf6ca..05b95e8151 100644 --- a/sagemaker-core/src/sagemaker/core/modules/local_core/local_container.py +++ b/sagemaker-core/src/sagemaker/core/modules/local_core/local_container.py @@ -68,7 +68,8 @@ def _rmtree(path, image=None, is_studio=False): logger.warning( "Failed to clean up root-owned files in %s. " "You may need to remove them manually with: sudo rm -rf %s", - path, path, + path, + path, ) raise try: @@ -82,7 +83,8 @@ def _rmtree(path, image=None, is_studio=False): logger.warning( "Failed to clean up root-owned files in %s. " "You may need to remove them manually with: sudo rm -rf %s", - path, path, + path, + path, ) raise diff --git a/sagemaker-core/src/sagemaker/core/processing.py b/sagemaker-core/src/sagemaker/core/processing.py index 62493719dc..c02a63c44c 100644 --- a/sagemaker-core/src/sagemaker/core/processing.py +++ b/sagemaker-core/src/sagemaker/core/processing.py @@ -489,7 +489,10 @@ def _normalize_outputs(self, outputs=None): # If the output's s3_uri is not an s3_uri, create one. parse_result = urlparse(output.s3_output.s3_uri) if parse_result.scheme != "s3": - if getattr(self.sagemaker_session, "local_mode", False) and parse_result.scheme == "file": + if ( + getattr(self.sagemaker_session, "local_mode", False) + and parse_result.scheme == "file" + ): normalized_outputs.append(output) continue if _pipeline_config: diff --git a/sagemaker-core/src/sagemaker/core/remote_function/client.py b/sagemaker-core/src/sagemaker/core/remote_function/client.py index 85e2cda868..962cf85d21 100644 --- a/sagemaker-core/src/sagemaker/core/remote_function/client.py +++ b/sagemaker-core/src/sagemaker/core/remote_function/client.py @@ -303,7 +303,7 @@ def remote( """ def _remote(func): - + if job_conda_env: RemoteExecutor._validate_env_name(job_conda_env) @@ -775,7 +775,7 @@ def __init__( + "without spark_config or use_torchrun or use_mpirun. " + "Please provide instance_count = 1" ) - + if job_conda_env: self._validate_env_name(job_conda_env) @@ -955,21 +955,22 @@ def _validate_submit_args(func, *args, **kwargs): + f"{'arguments' if len(missing_kwargs) > 1 else 'argument'}: " + f"{missing_kwargs_string}" ) - + @staticmethod def _validate_env_name(env_name: str) -> None: """Validate conda environment name to prevent command injection. - + Args: env_name (str): The environment name to validate - + Raises: ValueError: If the environment name contains invalid characters """ - + # Allow only alphanumeric, underscore, and hyphen import re - if not re.match(r'^[a-zA-Z0-9_-]+$', env_name): + + if not re.match(r"^[a-zA-Z0-9_-]+$", env_name): raise ValueError( f"Invalid environment name '{env_name}'. " "Only alphanumeric characters, underscores, and hyphens are allowed." diff --git a/sagemaker-core/src/sagemaker/core/remote_function/core/serialization.py b/sagemaker-core/src/sagemaker/core/remote_function/core/serialization.py index 28ed6061e4..7e292118d5 100644 --- a/sagemaker-core/src/sagemaker/core/remote_function/core/serialization.py +++ b/sagemaker-core/src/sagemaker/core/remote_function/core/serialization.py @@ -302,9 +302,7 @@ def json_serialize_obj_to_s3( ) -def deserialize_obj_from_s3( - sagemaker_session: Session, s3_uri: str, verification_key=None -) -> Any: +def deserialize_obj_from_s3(sagemaker_session: Session, s3_uri: str, verification_key=None) -> Any: """Downloads from S3 and then deserializes data objects. Called from both job (verifying client-uploaded args) and client (verifying @@ -394,6 +392,7 @@ def _upload_payload_and_metadata_to_s3( sagemaker_session, ) + def _upload_payload_and_metadata_to_s3_signed( bytes_to_upload: Union[bytes, io.BytesIO], private_key: ec.EllipticCurvePrivateKey, @@ -457,7 +456,6 @@ def _upload_payload_and_metadata_to_s3_hashed( ) - def deserialize_exception_from_s3(sagemaker_session: Session, s3_uri: str) -> Any: """Downloads from S3 and then deserializes exception with plain SHA-256 verification. diff --git a/sagemaker-core/src/sagemaker/core/remote_function/job.py b/sagemaker-core/src/sagemaker/core/remote_function/job.py index b2161f428d..4d38bc5df0 100644 --- a/sagemaker-core/src/sagemaker/core/remote_function/job.py +++ b/sagemaker-core/src/sagemaker/core/remote_function/job.py @@ -842,7 +842,9 @@ def _get_default_spark_image(session): class _Job: """Helper class that interacts with the SageMaker training service.""" - def __init__(self, job_name: str, s3_uri: str, sagemaker_session: Session, verification_key: str): + def __init__( + self, job_name: str, s3_uri: str, sagemaker_session: Session, verification_key: str + ): """Initialize a _Job object. Args: @@ -870,7 +872,9 @@ def from_describe_response(describe_training_job_response, sagemaker_session): """ job_name = describe_training_job_response["TrainingJobName"] s3_uri = describe_training_job_response["OutputDataConfig"]["S3OutputPath"] - verification_key = describe_training_job_response["Environment"]["REMOTE_FUNCTION_SECRET_KEY"] + verification_key = describe_training_job_response["Environment"][ + "REMOTE_FUNCTION_SECRET_KEY" + ] job = _Job(job_name, s3_uri, sagemaker_session, verification_key) job._last_describe_response = describe_training_job_response diff --git a/sagemaker-core/src/sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py b/sagemaker-core/src/sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py index 5f00317c23..b6eee717d7 100644 --- a/sagemaker-core/src/sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py +++ b/sagemaker-core/src/sagemaker/core/remote_function/runtime_environment/runtime_environment_manager.py @@ -96,43 +96,44 @@ class RuntimeEnvironmentManager: def _validate_path(self, path: str) -> str: """Validate and sanitize file path to prevent path traversal attacks. - + Args: path (str): The file path to validate - + Returns: str: The validated absolute path - + Raises: ValueError: If the path is invalid or contains suspicious patterns """ if not path: raise ValueError("Path cannot be empty") - + # Get absolute path to prevent path traversal abs_path = os.path.abspath(path) - + # Check for null bytes (common in path traversal attacks) - if '\x00' in path: + if "\x00" in path: raise ValueError(f"Invalid path contains null byte: {path}") - + return abs_path def _validate_env_name(self, env_name: str) -> None: """Validate conda environment name to prevent command injection. - + Args: env_name (str): The environment name to validate - + Raises: ValueError: If the environment name contains invalid characters """ if not env_name: raise ValueError("Environment name cannot be empty") - + # Allow only alphanumeric, underscore, and hyphen import re - if not re.match(r'^[a-zA-Z0-9_-]+$', env_name): + + if not re.match(r"^[a-zA-Z0-9_-]+$", env_name): raise ValueError( f"Invalid environment name '{env_name}'. " "Only alphanumeric characters, underscores, and hyphens are allowed." @@ -320,7 +321,17 @@ def _install_req_txt_in_conda_env(self, env_name, local_path): self._validate_env_name(env_name) validated_path = self._validate_path(local_path) - cmd = [self._get_conda_exe(), "run", "-n", env_name, "pip", "install", "-r", validated_path, "-U"] + cmd = [ + self._get_conda_exe(), + "run", + "-n", + env_name, + "pip", + "install", + "-r", + validated_path, + "-U", + ] logger.info("Activating conda env and installing requirements: %s", " ".join(cmd)) _run_shell_cmd(cmd) logger.info("Requirements installed successfully in conda env %s", env_name) @@ -344,26 +355,23 @@ def _export_conda_env_from_prefix(self, prefix, local_path): cmd = [self._get_conda_exe(), "env", "export", "-p", validated_prefix, "--no-builds"] logger.info("Exporting conda environment: %s", " ".join(cmd)) - + # Capture output and write to file instead of using shell redirection try: process = subprocess.Popen( - cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=False + cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False ) output, error_output = process.communicate() return_code = process.wait() - + if return_code: error_message = f"Encountered error while running command '{' '.join(cmd)}'. Reason: {error_output.decode('utf-8')}" raise RuntimeEnvironmentError(error_message) - + # Write the captured output to the file - with open(validated_path, 'w') as f: - f.write(output.decode('utf-8')) - + with open(validated_path, "w") as f: + f.write(output.decode("utf-8")) + logger.info("Conda environment %s exported successfully", validated_prefix) except Exception as e: raise RuntimeEnvironmentError(f"Failed to export conda environment: {str(e)}") @@ -501,7 +509,9 @@ def _run_shell_cmd(cmd: list): error_logs = _log_error(process) return_code = process.wait() if return_code: - error_message = f"Encountered error while running command '{' '.join(cmd)}'. Reason: {error_logs}" + error_message = ( + f"Encountered error while running command '{' '.join(cmd)}'. Reason: {error_logs}" + ) raise RuntimeEnvironmentError(error_message) diff --git a/sagemaker-core/src/sagemaker/core/resources.py b/sagemaker-core/src/sagemaker/core/resources.py index 49223e95cb..56c72cdcb5 100644 --- a/sagemaker-core/src/sagemaker/core/resources.py +++ b/sagemaker-core/src/sagemaker/core/resources.py @@ -1,3 +1,4 @@ + # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You @@ -27,18 +28,7 @@ from sagemaker.core.helper.pipeline_variable import StrPipeVar from sagemaker.core.utils.code_injection.codec import transform from sagemaker.core.utils.code_injection.constants import Color -from sagemaker.core.utils.utils import ( - SageMakerClient, - ResourceIterator, - Unassigned, - get_textual_rich_logger, - snake_to_pascal, - pascal_to_snake, - is_not_primitive, - is_not_str_dict, - is_primitive_list, - serialize, -) +from sagemaker.core.utils.utils import SageMakerClient, ResourceIterator, Unassigned, get_textual_rich_logger, snake_to_pascal, pascal_to_snake, is_not_primitive, is_not_str_dict, is_primitive_list, serialize from sagemaker.core.config.config_manager import SageMakerConfig from sagemaker.core.utils.logs import MultiLogStreamHandler from sagemaker.core.utils.exceptions import * @@ -51,20 +41,13 @@ class Base(BaseModel): - model_config = ConfigDict( - protected_namespaces=(), - validate_assignment=True, - extra="forbid", - arbitrary_types_allowed=True, - ) + model_config = ConfigDict(protected_namespaces=(), validate_assignment=True, extra="forbid", arbitrary_types_allowed=True) config_manager: ClassVar[SageMakerConfig] = SageMakerConfig() - + @classmethod - def get_sagemaker_client(cls, session=None, region_name=None, service_name="sagemaker"): - return SageMakerClient(session=session, region_name=region_name).get_client( - service_name=service_name - ) - + def get_sagemaker_client(cls, session = None, region_name = None, service_name = 'sagemaker'): + return SageMakerClient(session=session, region_name=region_name).get_client(service_name=service_name) + @staticmethod def get_updated_kwargs_with_configured_attributes( config_schema_for_resource: dict, resource_name: str, **kwargs @@ -87,23 +70,20 @@ def get_updated_kwargs_with_configured_attributes( except BaseException as e: logger.debug("Could not load Default Configs. Continuing.", exc_info=True) # Continue with existing kwargs if no default configs found - return kwargs - + return kwargs + + @staticmethod def populate_chained_attributes(resource_name: str, operation_input_args: Union[dict, object]): resource_name_in_snake_case = pascal_to_snake(resource_name) - updated_args = ( - vars(operation_input_args) - if type(operation_input_args) == object - else operation_input_args - ) + updated_args = vars(operation_input_args) if type(operation_input_args) == object else operation_input_args unassigned_args = [] keys = operation_input_args.keys() for arg in keys: value = operation_input_args.get(arg) arg_snake = pascal_to_snake(arg) - if value == Unassigned(): + if value == Unassigned() : unassigned_args.append(arg) elif value == None or not value: continue @@ -117,7 +97,10 @@ def populate_chained_attributes(resource_name: str, operation_input_args: Union[ elif isinstance(value, list) and is_primitive_list(value): continue elif isinstance(value, list) and value != []: - updated_args[arg] = [Base._get_chained_attribute(list_item) for list_item in value] + updated_args[arg] = [ + Base._get_chained_attribute(list_item) + for list_item in value + ] elif is_not_primitive(value) and is_not_str_dict(value) and type(value) == object: updated_args[arg] = Base._get_chained_attribute(item_value=value) @@ -129,11 +112,10 @@ def populate_chained_attributes(resource_name: str, operation_input_args: Union[ def _get_chained_attribute(item_value: Any): resource_name = type(item_value).__name__ class_object = globals()[resource_name] - return class_object( - **Base.populate_chained_attributes( - resource_name=resource_name, operation_input_args=vars(item_value) - ) - ) + return class_object(**Base.populate_chained_attributes( + resource_name=resource_name, + operation_input_args=vars(item_value) + )) @staticmethod def add_validate_call(func): @@ -141,96 +123,126 @@ def add_validate_call(func): def wrapper(*args, **kwargs): config = dict(arbitrary_types_allowed=True) return validate_call(config=config)(func)(*args, **kwargs) - return wrapper - -class Action(Base): +class AIBenchmarkJob(Base): """ - Class representing resource Action - + Class representing resource AIBenchmarkJob + Attributes: - action_name: The name of the action. - action_arn: The Amazon Resource Name (ARN) of the action. - source: The source of the action. - action_type: The type of the action. - description: The description of the action. - status: The status of the action. - properties: A list of the action's properties. - creation_time: When the action was created. - created_by: - last_modified_time: When the action was last modified. - last_modified_by: - metadata_properties: - lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. - + ai_benchmark_job_name: The name of the AI benchmark job. + ai_benchmark_job_arn: The Amazon Resource Name (ARN) of the AI benchmark job. + ai_benchmark_job_status: The status of the AI benchmark job. + benchmark_target: The target endpoint that was benchmarked. + output_config: The output configuration for the benchmark job, including the Amazon S3 output location and CloudWatch log information. + ai_workload_config_identifier: The name or Amazon Resource Name (ARN) of the AI workload configuration used for this benchmark job. + role_arn: The Amazon Resource Name (ARN) of the IAM role used by the benchmark job. + creation_time: A timestamp that indicates when the benchmark job was created. + failure_reason: If the benchmark job failed, the reason it failed. + network_config: The network configuration for the benchmark job. + start_time: A timestamp that indicates when the benchmark job started running. + end_time: A timestamp that indicates when the benchmark job completed. + tags: The tags associated with the benchmark job. + """ - - action_name: StrPipeVar - action_arn: Optional[StrPipeVar] = Unassigned() - source: Optional[ActionSource] = Unassigned() - action_type: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + ai_benchmark_job_name: StrPipeVar + ai_benchmark_job_arn: Optional[StrPipeVar] = Unassigned() + ai_benchmark_job_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + benchmark_target: Optional[AIBenchmarkTarget] = Unassigned() + output_config: Optional[AIBenchmarkOutputResult] = Unassigned() + ai_workload_config_identifier: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + network_config: Optional[AIBenchmarkNetworkConfig] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - lineage_group_arn: Optional[StrPipeVar] = Unassigned() - + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "action_name" - resource_name_split = resource_name.split("_") + resource_name = 'ai_benchmark_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object action") + logger.error("Name attribute not found for object ai_benchmark_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "output_config": { + "s3_output_location": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "AIBenchmarkJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - action_name: StrPipeVar, - source: ActionSource, - action_type: StrPipeVar, - description: Optional[StrPipeVar] = Unassigned(), - status: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), + ai_benchmark_job_name: StrPipeVar, + benchmark_target: AIBenchmarkTarget, + output_config: AIBenchmarkOutputConfig, + ai_workload_config_identifier: StrPipeVar, + role_arn: StrPipeVar, + network_config: Optional[AIBenchmarkNetworkConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Action"]: + ) -> Optional["AIBenchmarkJob"]: """ - Create a Action resource - + Create a AIBenchmarkJob resource + Parameters: - action_name: The name of the action. Must be unique to your account in an Amazon Web Services Region. - source: The source type, ID, and URI. - action_type: The action type. - description: The description of the action. - status: The status of the action. - properties: A list of properties to add to the action. - metadata_properties: - tags: A list of tags to apply to the action. + ai_benchmark_job_name: The name of the AI benchmark job. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region. + benchmark_target: The target endpoint to benchmark. Specify a SageMaker endpoint by providing its name or Amazon Resource Name (ARN). + output_config: The output configuration for the benchmark job, including the Amazon S3 location where benchmark results are stored. + ai_workload_config_identifier: The name or Amazon Resource Name (ARN) of the AI workload configuration to use for this benchmark job. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. + network_config: The network configuration for the benchmark job, including VPC settings. + tags: The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. session: Boto3 session. region: Region name. - + Returns: - The Action resource. - + The AIBenchmarkJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -239,64 +251,61 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating action resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ActionName": action_name, - "Source": source, - "ActionType": action_type, - "Description": description, - "Status": status, - "Properties": properties, - "MetadataProperties": metadata_properties, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Action", operation_input_args=operation_input_args - ) - + + logger.info("Creating ai_benchmark_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AIBenchmarkJobName': ai_benchmark_job_name, + 'BenchmarkTarget': benchmark_target, + 'OutputConfig': output_config, + 'AIWorkloadConfigIdentifier': ai_workload_config_identifier, + 'RoleArn': role_arn, + 'NetworkConfig': network_config, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='AIBenchmarkJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_action(**operation_input_args) + response = client.create_ai_benchmark_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(action_name=action_name, session=session, region=region) - + + return cls.get(ai_benchmark_job_name=ai_benchmark_job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - action_name: StrPipeVar, + ai_benchmark_job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Action"]: + ) -> Optional["AIBenchmarkJob"]: """ - Get a Action resource - + Get a AIBenchmarkJob resource + Parameters: - action_name: The name of the action to describe. + ai_benchmark_job_name: The name of the AI benchmark job to describe. session: Boto3 session. region: Region name. - + Returns: - The Action resource. - + The AIBenchmarkJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -307,38 +316,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ActionName": action_name, + 'AIBenchmarkJobName': ai_benchmark_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_action(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_ai_benchmark_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeActionResponse") - action = cls(**transformed_response) - return action - + transformed_response = transform(response, 'DescribeAIBenchmarkJobResponse') + ai_benchmark_job = cls(**transformed_response) + return ai_benchmark_job + @Base.add_validate_call def refresh( self, - ) -> Optional["Action"]: + + ) -> Optional["AIBenchmarkJob"]: """ - Refresh a Action resource - + Refresh a AIBenchmarkJob resource + Returns: - The Action resource. - + The AIBenchmarkJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -349,40 +357,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ActionName": self.action_name, + 'AIBenchmarkJobName': self.ai_benchmark_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_action(**operation_input_args) - + response = client.describe_ai_benchmark_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeActionResponse", self) + transform(response, 'DescribeAIBenchmarkJobResponse', self) return self - + @Base.add_validate_call - def update( + def delete( self, - description: Optional[StrPipeVar] = Unassigned(), - status: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - ) -> Optional["Action"]: + + ) -> None: """ - Update a Action resource - - Parameters: - properties_to_remove: A list of properties to remove. - - Returns: - The Action resource. - + Delete a AIBenchmarkJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -391,41 +390,29 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating action resource.") + client = Base.get_sagemaker_client() - + operation_input_args = { - "ActionName": self.action_name, - "Description": description, - "Status": status, - "Properties": properties, - "PropertiesToRemove": properties_to_remove, + 'AIBenchmarkJobName': self.ai_benchmark_job_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_action(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + + client.delete_ai_benchmark_job(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a Action resource - + Stop a AIBenchmarkJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -436,53 +423,110 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "ActionName": self.action_name, + 'AIBenchmarkJobName': self.ai_benchmark_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_action(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_ai_benchmark_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait( + self, + poll: int = 5, + timeout: Optional[int] = None, + + ) -> None: + """ + Wait for a AIBenchmarkJob resource. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for AIBenchmarkJob...") + status = Status("Current status:") + + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.ai_benchmark_job_status + status.update(f"Current status: [bold]{current_status}") + + if current_status in terminal_states: + logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="AIBenchmarkJob", status=current_status, reason=self.failure_reason) + + return + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="AIBenchmarkJob", status=current_status, message="Increase the timeout and try again.") + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, - source_uri: Optional[StrPipeVar] = Unassigned(), - action_type: Optional[StrPipeVar] = Unassigned(), - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Action"]: + ) -> ResourceIterator["AIBenchmarkJob"]: """ - Get all Action resources - + Get all AIBenchmarkJob resources + Parameters: - source_uri: A filter that returns only actions with the specified source URI. - action_type: A filter that returns only actions of the specified type. - created_after: A filter that returns only actions created on or after the specified time. - created_before: A filter that returns only actions created on or before the specified time. - sort_by: The property used to sort results. The default value is CreationTime. - sort_order: The sort order. The default value is Descending. - next_token: If the previous call to ListActions didn't return the full set of actions, the call returns a token for getting the next set of actions. - max_results: The maximum number of actions to return in the response. The default value is 10. + max_results: The maximum number of benchmark jobs to return in the response. + next_token: If the previous call to ListAIBenchmarkJobs didn't return the full set of jobs, the call returns a token for getting the next set. + name_contains: A string in the job name. This filter returns only jobs whose name contains the specified string. + status_equals: A filter that returns only benchmark jobs with the specified status. + creation_time_after: A filter that returns only jobs created after the specified time. + creation_time_before: A filter that returns only jobs created before the specified time. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Action resources. - + Iterator for listed AIBenchmarkJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -491,122 +535,156 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SourceUri": source_uri, - "ActionType": action_type, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_actions", - summaries_key="ActionSummaries", - summary_name="ActionSummary", - resource_cls=Action, - list_method_kwargs=operation_input_args, + list_method='list_ai_benchmark_jobs', + summaries_key='AIBenchmarkJobs', + summary_name='AIBenchmarkJobSummary', + resource_cls=AIBenchmarkJob, + list_method_kwargs=operation_input_args ) -class ActionInternal(Base): +class AIRecommendationJob(Base): """ - Class representing resource ActionInternal - + Class representing resource AIRecommendationJob + Attributes: - action_name: - source: - action_type: - customer_details: - creation_time: - description: - status: - properties: - metadata_properties: - tags: - action_arn: - + ai_recommendation_job_name: The name of the AI recommendation job. + ai_recommendation_job_arn: The Amazon Resource Name (ARN) of the AI recommendation job. + ai_recommendation_job_status: The status of the AI recommendation job. + model_source: The source of the model that was analyzed. + output_config: The output configuration for the recommendation job. + ai_workload_config_identifier: The name or Amazon Resource Name (ARN) of the AI workload configuration used for this recommendation job. + role_arn: The Amazon Resource Name (ARN) of the IAM role used by the recommendation job. + creation_time: A timestamp that indicates when the recommendation job was created. + failure_reason: If the recommendation job failed, the reason it failed. + inference_specification: The inference framework configuration. + optimize_model: Whether model optimization techniques were allowed. + performance_target: The performance targets specified for the recommendation job. + recommendations: The list of optimization recommendations generated by the job. Each recommendation includes optimization details, deployment configuration, expected performance metrics, and the associated benchmark job ARN. + compute_spec: The compute resource specification for the recommendation job. + start_time: A timestamp that indicates when the recommendation job started running. + end_time: A timestamp that indicates when the recommendation job completed. + tags: The tags associated with the recommendation job. + """ - - action_name: Union[StrPipeVar, object] - source: ActionSource - action_type: StrPipeVar - customer_details: CustomerDetails + ai_recommendation_job_name: StrPipeVar + ai_recommendation_job_arn: Optional[StrPipeVar] = Unassigned() + ai_recommendation_job_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + model_source: Optional[AIModelSource] = Unassigned() + output_config: Optional[AIRecommendationOutputResult] = Unassigned() + inference_specification: Optional[AIRecommendationInferenceSpecification] = Unassigned() + ai_workload_config_identifier: Optional[StrPipeVar] = Unassigned() + optimize_model: Optional[bool] = Unassigned() + performance_target: Optional[AIRecommendationPerformanceTarget] = Unassigned() + recommendations: Optional[List[AIRecommendation]] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + compute_spec: Optional[AIRecommendationComputeSpec] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() tags: Optional[List[Tag]] = Unassigned() - action_arn: Optional[StrPipeVar] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "action_internal_name" - resource_name_split = resource_name.split("_") + resource_name = 'ai_recommendation_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object action_internal") + logger.error("Name attribute not found for object ai_recommendation_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "model_source": { + "s3": { + "s3_uri": { + "type": "string" + } + } + }, + "output_config": { + "s3_output_location": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "AIRecommendationJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - action_name: Union[StrPipeVar, object], - source: ActionSource, - action_type: StrPipeVar, - customer_details: CustomerDetails, - creation_time: Optional[datetime.datetime] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - status: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), + ai_recommendation_job_name: StrPipeVar, + model_source: AIModelSource, + output_config: AIRecommendationOutputConfig, + ai_workload_config_identifier: StrPipeVar, + performance_target: AIRecommendationPerformanceTarget, + role_arn: StrPipeVar, + inference_specification: Optional[AIRecommendationInferenceSpecification] = Unassigned(), + optimize_model: Optional[bool] = Unassigned(), + compute_spec: Optional[AIRecommendationComputeSpec] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ActionInternal"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["AIRecommendationJob"]: """ - Create a ActionInternal resource - + Create a AIRecommendationJob resource + Parameters: - action_name: - source: - action_type: - customer_details: - creation_time: - description: - status: - properties: - metadata_properties: - tags: + ai_recommendation_job_name: The name of the AI recommendation job. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region. + model_source: The source of the model to optimize. Specify the Amazon S3 location of the model artifacts. + output_config: The output configuration for the recommendation job, including the Amazon S3 location for results and an optional model package group where the optimized model is registered. + ai_workload_config_identifier: The name or Amazon Resource Name (ARN) of the AI workload configuration to use for this recommendation job. + performance_target: The performance targets for the recommendation job. Specify constraints on metrics such as time to first token (ttft-ms), throughput, or cost. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. + inference_specification: The inference framework configuration. Specify the framework (such as LMI or vLLM) for the recommendation job. + optimize_model: Whether to allow model optimization techniques such as quantization, speculative decoding, and kernel tuning. The default is true. + compute_spec: The compute resource specification for the recommendation job. You can specify up to 3 instance types to consider, and optionally provide capacity reservation configuration. + tags: The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. session: Boto3 session. region: Region name. - + Returns: - The ActionInternal resource. - + The AIRecommendationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -615,146 +693,64 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "ActionName": action_name, - "Source": source, - "CreationTime": creation_time, - "ActionType": action_type, - "Description": description, - "Status": status, - "Properties": properties, - "MetadataProperties": metadata_properties, - "Tags": tags, - "CustomerDetails": customer_details, - } + + logger.info("Creating ai_recommendation_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AIRecommendationJobName': ai_recommendation_job_name, + 'ModelSource': model_source, + 'OutputConfig': output_config, + 'AIWorkloadConfigIdentifier': ai_workload_config_identifier, + 'PerformanceTarget': performance_target, + 'RoleArn': role_arn, + 'InferenceSpecification': inference_specification, + 'OptimizeModel': optimize_model, + 'ComputeSpec': compute_spec, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='AIRecommendationJob', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_action_internal API") - response = client.create_action_internal(**operation_input_args) + + # create the resource + response = client.create_ai_recommendation_job(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateActionInternalResponse") - return cls(**operation_input_args, **transformed_response) - - -class Algorithm(Base): - """ - Class representing resource Algorithm - - Attributes: - algorithm_name: The name of the algorithm being described. - algorithm_arn: The Amazon Resource Name (ARN) of the algorithm. - creation_time: A timestamp specifying when the algorithm was created. - training_specification: Details about training jobs run by this algorithm. - algorithm_status: The current status of the algorithm. - algorithm_status_details: Details about the current status of the algorithm. - algorithm_description: A brief summary about the algorithm. - inference_specification: Details about inference jobs that the algorithm runs. - validation_specification: Details about configurations for one or more training jobs that SageMaker runs to test the algorithm. - product_id: The product identifier of the algorithm. - certify_for_marketplace: Whether the algorithm is certified to be listed in Amazon Web Services Marketplace. - - """ - - algorithm_name: StrPipeVar - algorithm_arn: Optional[StrPipeVar] = Unassigned() - algorithm_description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - training_specification: Optional[TrainingSpecification] = Unassigned() - inference_specification: Optional[InferenceSpecification] = Unassigned() - validation_specification: Optional[AlgorithmValidationSpecification] = Unassigned() - algorithm_status: Optional[StrPipeVar] = Unassigned() - algorithm_status_details: Optional[AlgorithmStatusDetails] = Unassigned() - product_id: Optional[StrPipeVar] = Unassigned() - certify_for_marketplace: Optional[bool] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "algorithm_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object algorithm") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "training_specification": { - "additional_s3_data_source": { - "s3_data_type": {"type": "string"}, - "s3_uri": {"type": "string"}, - } - }, - "validation_specification": {"validation_role": {"type": "string"}}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Algorithm", **kwargs - ), - ) - - return wrapper - + + return cls.get(ai_recommendation_job_name=ai_recommendation_job_name, session=session, region=region) + @classmethod - @populate_inputs_decorator @Base.add_validate_call - def create( + def get( cls, - algorithm_name: StrPipeVar, - training_specification: TrainingSpecification, - algorithm_description: Optional[StrPipeVar] = Unassigned(), - inference_specification: Optional[InferenceSpecification] = Unassigned(), - validation_specification: Optional[AlgorithmValidationSpecification] = Unassigned(), - certify_for_marketplace: Optional[bool] = Unassigned(), - require_image_scan: Optional[bool] = Unassigned(), - workflow_disabled: Optional[bool] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + ai_recommendation_job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Algorithm"]: + ) -> Optional["AIRecommendationJob"]: """ - Create a Algorithm resource - + Get a AIRecommendationJob resource + Parameters: - algorithm_name: The name of the algorithm. - training_specification: Specifies details about training jobs run by this algorithm, including the following: The Amazon ECR path of the container and the version digest of the algorithm. The hyperparameters that the algorithm supports. The instance types that the algorithm supports for training. Whether the algorithm supports distributed training. The metrics that the algorithm emits to Amazon CloudWatch. Which metrics that the algorithm emits can be used as the objective metric for hyperparameter tuning jobs. The input channels that the algorithm supports for training data. For example, an algorithm might support train, validation, and test channels. - algorithm_description: A description of the algorithm. - inference_specification: Specifies details about inference jobs that the algorithm runs, including the following: The Amazon ECR paths of containers that contain the inference code and model artifacts. The instance types that the algorithm supports for transform jobs and real-time endpoints used for inference. The input and output content formats that the algorithm supports for inference. - validation_specification: Specifies configurations for one or more training jobs and that SageMaker runs to test the algorithm's training code and, optionally, one or more batch transform jobs that SageMaker runs to test the algorithm's inference code. - certify_for_marketplace: Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace. - require_image_scan: - workflow_disabled: - 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. + ai_recommendation_job_name: The name of the AI recommendation job to describe. session: Boto3 session. region: Region name. - + Returns: - The Algorithm resource. - + The AIRecommendationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -763,64 +759,39 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating algorithm resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + operation_input_args = { - "AlgorithmName": algorithm_name, - "AlgorithmDescription": algorithm_description, - "TrainingSpecification": training_specification, - "InferenceSpecification": inference_specification, - "ValidationSpecification": validation_specification, - "CertifyForMarketplace": certify_for_marketplace, - "RequireImageScan": require_image_scan, - "WorkflowDisabled": workflow_disabled, - "Tags": tags, + 'AIRecommendationJobName': ai_recommendation_job_name, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Algorithm", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_algorithm(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(algorithm_name=algorithm_name, session=session, region=region) - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_ai_recommendation_job(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeAIRecommendationJobResponse') + ai_recommendation_job = cls(**transformed_response) + return ai_recommendation_job + @Base.add_validate_call - def get( - cls, - algorithm_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Algorithm"]: + def refresh( + self, + + ) -> Optional["AIRecommendationJob"]: """ - Get a Algorithm resource - - Parameters: - algorithm_name: The name of the algorithm to describe. - session: Boto3 session. - region: Region name. - + Refresh a AIRecommendationJob resource + Returns: - The Algorithm resource. - + The AIRecommendationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -829,39 +800,33 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AlgorithmName": algorithm_name, + 'AIRecommendationJobName': self.ai_recommendation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_algorithm(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeAlgorithmOutput") - algorithm = cls(**transformed_response) - return algorithm - + + client = Base.get_sagemaker_client() + response = client.describe_ai_recommendation_job(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeAIRecommendationJobResponse', self) + return self + @Base.add_validate_call - def refresh( + def delete( self, - ) -> Optional["Algorithm"]: + + ) -> None: """ - Refresh a Algorithm resource - - Returns: - The Algorithm resource. - + Delete a AIRecommendationJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -870,31 +835,29 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "AlgorithmName": self.algorithm_name, + 'AIRecommendationJobName': self.ai_recommendation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_algorithm(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeAlgorithmOutput", self) - return self - + + client.delete_ai_recommendation_job(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a Algorithm resource - + Stop a AIRecommendationJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -903,93 +866,112 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "AlgorithmName": self.algorithm_name, + 'AIRecommendationJobName': self.ai_recommendation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_algorithm(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_ai_recommendation_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal["Pending", "InProgress", "Completed", "Failed", "Deleting"], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a Algorithm resource to reach certain status. - + Wait for a AIRecommendationJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for Algorithm to reach [bold]{target_status} status...") + progress.add_task("Waiting for AIRecommendationJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.algorithm_status + current_status = self.ai_recommendation_job_status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="AIRecommendationJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Algorithm", status=current_status, reason="(Unknown)" - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Algorithm", status=current_status) + raise TimeoutExceededError(resource_type="AIRecommendationJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + + @classmethod @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + def get_all( + cls, + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["AIRecommendationJob"]: """ - Wait for a Algorithm resource to be deleted. - + Get all AIRecommendationJob resources + Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - + max_results: The maximum number of recommendation jobs to return in the response. + next_token: If the previous call to ListAIRecommendationJobs didn't return the full set of jobs, the call returns a token for getting the next set. + name_contains: A string in the job name. This filter returns only jobs whose name contains the specified string. + status_equals: A filter that returns only recommendation jobs with the specified status. + creation_time_after: A filter that returns only jobs created after the specified time. + creation_time_before: A filter that returns only jobs created before the specified time. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed AIRecommendationJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -998,209 +980,96 @@ def wait_for_delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_ai_recommendation_jobs', + summaries_key='AIRecommendationJobs', + summary_name='AIRecommendationJobSummary', + resource_cls=AIRecommendationJob, + list_method_kwargs=operation_input_args ) - progress.add_task("Waiting for Algorithm to be deleted...") - status = Status("Current status:") - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.algorithm_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Algorithm", status=current_status) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Algorithm"]: - """ - Get all Algorithm resources - - Parameters: - creation_time_after: A filter that returns only algorithms created after the specified time (timestamp). - creation_time_before: A filter that returns only algorithms created before the specified time (timestamp). - max_results: The maximum number of algorithms to return in the response. - name_contains: A string in the algorithm name. This filter returns only algorithms whose name contains the specified string. - next_token: If the response to a previous ListAlgorithms request was truncated, the response includes a NextToken. To retrieve the next set of algorithms, use the token in the next request. - sort_by: The parameter by which to sort the results. The default is CreationTime. - sort_order: The sort order for the results. The default is Ascending. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed Algorithm resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_algorithms", - summaries_key="AlgorithmSummaryList", - summary_name="AlgorithmSummary", - resource_cls=Algorithm, - list_method_kwargs=operation_input_args, - ) - -class App(Base): +class AIWorkloadConfig(Base): """ - Class representing resource App - + Class representing resource AIWorkloadConfig + Attributes: - app_arn: The Amazon Resource Name (ARN) of the app. - app_type: The type of app. - app_name: The name of the app. - domain_id: The domain ID. - user_profile_name: The user profile name. - space_name: The name of the space. If this value is not set, then UserProfileName must be set. - status: The status. - 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. - recovery_mode: Indicates whether the application is launched in recovery mode. - last_health_check_timestamp: The timestamp of the last health check. - 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. - creation_time: The creation time of the application. After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application. - restart_time: - failure_reason: The failure reason. - resource_spec: The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. - built_in_lifecycle_config_arn: The lifecycle configuration that runs before the default lifecycle configuration - app_launch_configuration: - + ai_workload_config_name: The name of the AI workload configuration. + ai_workload_config_arn: The Amazon Resource Name (ARN) of the AI workload configuration. + creation_time: A timestamp that indicates when the AI workload configuration was created. + dataset_config: The dataset configuration for the workload. + ai_workload_configs: The benchmark tool configuration and workload specification. + tags: The tags associated with the AI workload configuration. + """ - - domain_id: StrPipeVar - app_type: StrPipeVar - app_name: StrPipeVar - app_arn: Optional[StrPipeVar] = Unassigned() - user_profile_name: Optional[StrPipeVar] = Unassigned() - space_name: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - effective_trusted_identity_propagation_status: Optional[StrPipeVar] = Unassigned() - recovery_mode: Optional[bool] = Unassigned() - last_health_check_timestamp: Optional[datetime.datetime] = Unassigned() - last_user_activity_timestamp: Optional[datetime.datetime] = Unassigned() + ai_workload_config_name: StrPipeVar + ai_workload_config_arn: Optional[StrPipeVar] = Unassigned() + dataset_config: Optional[AIDatasetConfig] = Unassigned() + ai_workload_configs: Optional[AIWorkloadConfigs] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - restart_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - resource_spec: Optional[ResourceSpec] = Unassigned() - built_in_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() - app_launch_configuration: Optional[AppLaunchConfiguration] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "app_name" - resource_name_split = resource_name.split("_") + resource_name = 'ai_workload_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object app") + logger.error("Name attribute not found for object ai_workload_config") return None - + @classmethod @Base.add_validate_call def create( cls, - domain_id: StrPipeVar, - app_type: StrPipeVar, - app_name: StrPipeVar, - user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - space_name: Optional[Union[StrPipeVar, object]] = Unassigned(), + ai_workload_config_name: StrPipeVar, + dataset_config: Optional[AIDatasetConfig] = Unassigned(), + ai_workload_configs: Optional[AIWorkloadConfigs] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - resource_spec: Optional[ResourceSpec] = Unassigned(), - persistent_volume_names: Optional[List[StrPipeVar]] = Unassigned(), - app_launch_configuration: Optional[AppLaunchConfiguration] = Unassigned(), - recovery_mode: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["App"]: + ) -> Optional["AIWorkloadConfig"]: """ - Create a App resource - + Create a AIWorkloadConfig resource + Parameters: - domain_id: The domain ID. - app_type: The type of app. - app_name: The name of the app. - user_profile_name: The user profile name. If this value is not set, then SpaceName must be set. - space_name: The name of the space. If this value is not set, then UserProfileName must be set. - tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. - resource_spec: The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. The value of InstanceType passed as part of the ResourceSpec in the CreateApp call overrides the value passed as part of the ResourceSpec configured for the user profile or the domain. If InstanceType is not specified in any of those three ResourceSpec values for a KernelGateway app, the CreateApp call fails with a request validation error. - persistent_volume_names: - app_launch_configuration: - recovery_mode: Indicates whether the application is launched in recovery mode. + ai_workload_config_name: The name of the AI workload configuration. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region. + dataset_config: The dataset configuration for the workload. Specify input data channels with their data sources for benchmark workloads. + ai_workload_configs: The benchmark tool configuration and workload specification. Provide the specification as an inline YAML or JSON string. + tags: The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. session: Boto3 session. region: Region name. - + Returns: - The App resource. - + The AIWorkloadConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1215,75 +1084,51 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating app resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating ai_workload_config resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "DomainId": domain_id, - "UserProfileName": user_profile_name, - "SpaceName": space_name, - "AppType": app_type, - "AppName": app_name, - "Tags": tags, - "ResourceSpec": resource_spec, - "PersistentVolumeNames": persistent_volume_names, - "AppLaunchConfiguration": app_launch_configuration, - "RecoveryMode": recovery_mode, + 'AIWorkloadConfigName': ai_workload_config_name, + 'DatasetConfig': dataset_config, + 'AIWorkloadConfigs': ai_workload_configs, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="App", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='AIWorkloadConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_app(**operation_input_args) + response = client.create_ai_workload_config(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - domain_id=domain_id, - app_type=app_type, - app_name=app_name, - session=session, - region=region, - ) - + + return cls.get(ai_workload_config_name=ai_workload_config_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - domain_id: StrPipeVar, - app_type: StrPipeVar, - app_name: StrPipeVar, - user_profile_name: Optional[StrPipeVar] = Unassigned(), - space_name: Optional[StrPipeVar] = Unassigned(), + ai_workload_config_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["App"]: + ) -> Optional["AIWorkloadConfig"]: """ - Get a App resource - + Get a AIWorkloadConfig resource + Parameters: - domain_id: The domain ID. - app_type: The type of app. - app_name: The name of the app. - user_profile_name: The user profile name. If this value is not set, then SpaceName must be set. - space_name: The name of the space. + ai_workload_config_name: The name of the AI workload configuration to describe. session: Boto3 session. region: Region name. - + Returns: - The App resource. - + The AIWorkloadConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1294,42 +1139,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": domain_id, - "UserProfileName": user_profile_name, - "SpaceName": space_name, - "AppType": app_type, - "AppName": app_name, + 'AIWorkloadConfigName': ai_workload_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_app(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_ai_workload_config(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeAppResponse") - app = cls(**transformed_response) - return app - + transformed_response = transform(response, 'DescribeAIWorkloadConfigResponse') + ai_workload_config = cls(**transformed_response) + return ai_workload_config + @Base.add_validate_call def refresh( self, - ) -> Optional["App"]: + + ) -> Optional["AIWorkloadConfig"]: """ - Refresh a App resource - + Refresh a AIWorkloadConfig resource + Returns: - The App resource. - + The AIWorkloadConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1340,40 +1180,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": self.user_profile_name, - "SpaceName": self.space_name, - "AppType": self.app_type, - "AppName": self.app_name, + 'AIWorkloadConfigName': self.ai_workload_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_app(**operation_input_args) - + response = client.describe_ai_workload_config(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeAppResponse", self) + transform(response, 'DescribeAIWorkloadConfigResponse', self) return self - + @Base.add_validate_call - def update( + def delete( self, - app_type: StrPipeVar, - user_profile_name: Optional[StrPipeVar] = Unassigned(), - space_name: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["App"]: + + ) -> None: """ - Update a App resource - - Returns: - The App resource. - + Delete a AIWorkloadConfig resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1385,38 +1216,51 @@ def update( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating app resource.") + client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": user_profile_name, - "SpaceName": space_name, - "AppType": app_type, - "AppName": self.app_name, + 'AIWorkloadConfigName': self.ai_workload_config_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_app(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + + client.delete_ai_workload_config(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @classmethod @Base.add_validate_call - def delete( - self, - ) -> None: + def get_all( + cls, + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["AIWorkloadConfig"]: """ - Delete a App resource - + Get all AIWorkloadConfig resources + + Parameters: + max_results: The maximum number of AI workload configurations to return in the response. + next_token: If the previous call to ListAIWorkloadConfigs didn't return the full set of configurations, the call returns a token for getting the next set of configurations. + name_contains: A string in the configuration name. This filter returns only configurations whose name contains the specified string. + creation_time_after: A filter that returns only configurations created after the specified time. + creation_time_before: A filter that returns only configurations created before the specified time. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed AIWorkloadConfig resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1425,287 +1269,117 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": self.user_profile_name, - "SpaceName": self.space_name, - "AppType": self.app_type, - "AppName": self.app_name, + 'NameContains': name_contains, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_ai_workload_configs', + summaries_key='AIWorkloadConfigs', + summary_name='AIWorkloadConfigSummary', + resource_cls=AIWorkloadConfig, + list_method_kwargs=operation_input_args + ) - client.delete_app(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Deleted", "Deleting", "Failed", "InService", "Pending"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a App resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for App to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="App", status=current_status, reason=self.failure_reason - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="App", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a App resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for App to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status.lower() == "deleted": - logger.info("Resource was deleted.") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="App", status=current_status) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - sort_order: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - domain_id_equals: Optional[StrPipeVar] = Unassigned(), - user_profile_name_equals: Optional[StrPipeVar] = Unassigned(), - space_name_equals: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["App"]: - """ - Get all App resources - - Parameters: - next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. - max_results: This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10. - sort_order: The sort order for the results. The default is Ascending. - sort_by: The parameter by which to sort the results. The default is CreationTime. - domain_id_equals: A parameter to search for the domain ID. - user_profile_name_equals: A parameter to search by user profile name. If SpaceNameEquals is set, then this value cannot be set. - space_name_equals: A parameter to search by space name. If UserProfileNameEquals is set, then this value cannot be set. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed App resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "SortOrder": sort_order, - "SortBy": sort_by, - "DomainIdEquals": domain_id_equals, - "UserProfileNameEquals": user_profile_name_equals, - "SpaceNameEquals": space_name_equals, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_apps", - summaries_key="Apps", - summary_name="AppDetails", - resource_cls=App, - list_method_kwargs=operation_input_args, - ) - - -class AppImageConfig(Base): +class Action(Base): """ - Class representing resource AppImageConfig - + Class representing resource Action + Attributes: - app_image_config_arn: The ARN of the AppImageConfig. - app_image_config_name: The name of the AppImageConfig. - creation_time: When the AppImageConfig was created. - last_modified_time: When the AppImageConfig was last modified. - kernel_gateway_image_config: The configuration of a KernelGateway app. - savitur_app_image_config: - jupyter_lab_app_image_config: The configuration of the JupyterLab app. - code_editor_app_image_config: The configuration of the Code Editor app. - + action_name: The name of the action. + action_arn: The Amazon Resource Name (ARN) of the action. + source: The source of the action. + action_type: The type of the action. + description: The description of the action. + status: The status of the action. + properties: A list of the action's properties. + creation_time: When the action was created. + created_by: + last_modified_time: When the action was last modified. + last_modified_by: + metadata_properties: + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. + """ - - app_image_config_name: StrPipeVar - app_image_config_arn: Optional[StrPipeVar] = Unassigned() + action_name: StrPipeVar + action_arn: Optional[StrPipeVar] = Unassigned() + source: Optional[ActionSource] = Unassigned() + action_type: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned() - savitur_app_image_config: Optional[SaviturAppImageConfig] = Unassigned() - jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned() - code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned() - + last_modified_by: Optional[UserContext] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "app_image_config_name" - resource_name_split = resource_name.split("_") + resource_name = 'action_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object app_image_config") + logger.error("Name attribute not found for object action") return None - + @classmethod @Base.add_validate_call def create( cls, - app_image_config_name: StrPipeVar, + action_name: StrPipeVar, + source: ActionSource, + action_type: StrPipeVar, + description: Optional[StrPipeVar] = Unassigned(), + status: Optional[StrPipeVar] = Unassigned(), + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + metadata_properties: Optional[MetadataProperties] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned(), - savitur_app_image_config: Optional[SaviturAppImageConfig] = Unassigned(), - jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned(), - code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AppImageConfig"]: + ) -> Optional["Action"]: """ - Create a AppImageConfig resource - + Create a Action resource + Parameters: - app_image_config_name: The name of the AppImageConfig. Must be unique to your account. - tags: A list of tags to apply to the AppImageConfig. - kernel_gateway_image_config: The KernelGatewayImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel will be shown to users before the image starts. Once the image runs, all kernels are visible in JupyterLab. - savitur_app_image_config: - jupyter_lab_app_image_config: The JupyterLabAppImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel is shown to users before the image starts. After the image runs, all kernels are visible in JupyterLab. - code_editor_app_image_config: The CodeEditorAppImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel is shown to users before the image starts. After the image runs, all kernels are visible in Code Editor. + action_name: The name of the action. Must be unique to your account in an Amazon Web Services Region. + source: The source type, ID, and URI. + action_type: The action type. + description: The description of the action. + status: The status of the action. + properties: A list of properties to add to the action. + metadata_properties: + tags: A list of tags to apply to the action. session: Boto3 session. region: Region name. - + Returns: - The AppImageConfig resource. - + The Action resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1714,62 +1388,60 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating app_image_config resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "AppImageConfigName": app_image_config_name, - "Tags": tags, - "KernelGatewayImageConfig": kernel_gateway_image_config, - "SaviturAppImageConfig": savitur_app_image_config, - "JupyterLabAppImageConfig": jupyter_lab_app_image_config, - "CodeEditorAppImageConfig": code_editor_app_image_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="AppImageConfig", operation_input_args=operation_input_args - ) - + + logger.info("Creating action resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ActionName': action_name, + 'Source': source, + 'ActionType': action_type, + 'Description': description, + 'Status': status, + 'Properties': properties, + 'MetadataProperties': metadata_properties, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Action', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_app_image_config(**operation_input_args) + response = client.create_action(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(app_image_config_name=app_image_config_name, session=session, region=region) - + + return cls.get(action_name=action_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - app_image_config_name: StrPipeVar, + action_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AppImageConfig"]: + ) -> Optional["Action"]: """ - Get a AppImageConfig resource - + Get a Action resource + Parameters: - app_image_config_name: The name of the AppImageConfig to describe. + action_name: The name of the action to describe. session: Boto3 session. region: Region name. - + Returns: - The AppImageConfig resource. - + The Action resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1780,38 +1452,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AppImageConfigName": app_image_config_name, + 'ActionName': action_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_app_image_config(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_action(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeAppImageConfigResponse") - app_image_config = cls(**transformed_response) - return app_image_config - + transformed_response = transform(response, 'DescribeActionResponse') + action = cls(**transformed_response) + return action + @Base.add_validate_call def refresh( self, - ) -> Optional["AppImageConfig"]: + + ) -> Optional["Action"]: """ - Refresh a AppImageConfig resource - + Refresh a Action resource + Returns: - The AppImageConfig resource. - + The Action resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1822,37 +1493,40 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AppImageConfigName": self.app_image_config_name, + 'ActionName': self.action_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_app_image_config(**operation_input_args) - + response = client.describe_action(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeAppImageConfigResponse", self) + transform(response, 'DescribeActionResponse', self) return self - + @Base.add_validate_call def update( self, - kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned(), - savitur_app_image_config: Optional[SaviturAppImageConfig] = Unassigned(), - jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned(), - code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned(), - ) -> Optional["AppImageConfig"]: + description: Optional[StrPipeVar] = Unassigned(), + status: Optional[StrPipeVar] = Unassigned(), + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), + ) -> Optional["Action"]: """ - Update a AppImageConfig resource - + Update a Action resource + + Parameters: + properties_to_remove: A list of properties to remove. + Returns: - The AppImageConfig resource. - + The Action resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1861,40 +1535,42 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating app_image_config resource.") + + logger.info("Updating action resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "AppImageConfigName": self.app_image_config_name, - "KernelGatewayImageConfig": kernel_gateway_image_config, - "SaviturAppImageConfig": savitur_app_image_config, - "JupyterLabAppImageConfig": jupyter_lab_app_image_config, - "CodeEditorAppImageConfig": code_editor_app_image_config, + 'ActionName': self.action_name, + 'Description': description, + 'Status': status, + 'Properties': properties, + 'PropertiesToRemove': properties_to_remove, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_app_image_config(**operation_input_args) + response = client.update_action(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a AppImageConfig resource - + Delete a Action resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1905,55 +1581,53 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "AppImageConfigName": self.app_image_config_name, + 'ActionName': self.action_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_app_image_config(**operation_input_args) - + + client.delete_action(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( cls, - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - modified_time_before: Optional[datetime.datetime] = Unassigned(), - modified_time_after: Optional[datetime.datetime] = Unassigned(), + source_uri: Optional[StrPipeVar] = Unassigned(), + action_type: Optional[StrPipeVar] = Unassigned(), + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["AppImageConfig"]: + ) -> ResourceIterator["Action"]: """ - Get all AppImageConfig resources - + Get all Action resources + Parameters: - max_results: The total number of items to return in the response. If the total number of items available is more than the value specified, a NextToken is provided in the response. To resume pagination, provide the NextToken value in the as part of a subsequent call. The default value is 10. - next_token: If the previous call to ListImages didn't return the full set of AppImageConfigs, the call returns a token for getting the next set of AppImageConfigs. - name_contains: A filter that returns only AppImageConfigs whose name contains the specified string. - creation_time_before: A filter that returns only AppImageConfigs created on or before the specified time. - creation_time_after: A filter that returns only AppImageConfigs created on or after the specified time. - modified_time_before: A filter that returns only AppImageConfigs modified on or before the specified time. - modified_time_after: A filter that returns only AppImageConfigs modified on or after the specified time. + source_uri: A filter that returns only actions with the specified source URI. + action_type: A filter that returns only actions of the specified type. + created_after: A filter that returns only actions created on or after the specified time. + created_before: A filter that returns only actions created on or before the specified time. sort_by: The property used to sort results. The default value is CreationTime. sort_order: The sort order. The default value is Descending. + next_token: If the previous call to ListActions didn't return the full set of actions, the call returns a token for getting the next set of actions. + max_results: The maximum number of actions to return in the response. The default value is 10. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed AppImageConfig resources. - + Iterator for listed Action resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -1962,114 +1636,139 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "ModifiedTimeBefore": modified_time_before, - "ModifiedTimeAfter": modified_time_after, - "SortBy": sort_by, - "SortOrder": sort_order, + 'SourceUri': source_uri, + 'ActionType': action_type, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_app_image_configs", - summaries_key="AppImageConfigs", - summary_name="AppImageConfigDetails", - resource_cls=AppImageConfig, - list_method_kwargs=operation_input_args, + list_method='list_actions', + summaries_key='ActionSummaries', + summary_name='ActionSummary', + resource_cls=Action, + list_method_kwargs=operation_input_args ) -class Artifact(Base): +class Algorithm(Base): """ - Class representing resource Artifact - + Class representing resource Algorithm + Attributes: - artifact_name: The name of the artifact. - artifact_arn: The Amazon Resource Name (ARN) of the artifact. - source: The source of the artifact. - artifact_type: The type of the artifact. - properties: A list of the artifact's properties. - creation_time: When the artifact was created. - created_by: - last_modified_time: When the artifact was last modified. - last_modified_by: - metadata_properties: - lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. - + algorithm_name: The name of the algorithm being described. + algorithm_arn: The Amazon Resource Name (ARN) of the algorithm. + creation_time: A timestamp specifying when the algorithm was created. + training_specification: Details about training jobs run by this algorithm. + algorithm_status: The current status of the algorithm. + algorithm_status_details: Details about the current status of the algorithm. + algorithm_description: A brief summary about the algorithm. + inference_specification: Details about inference jobs that the algorithm runs. + validation_specification: Details about configurations for one or more training jobs that SageMaker runs to test the algorithm. + product_id: The product identifier of the algorithm. + certify_for_marketplace: Whether the algorithm is certified to be listed in Amazon Web Services Marketplace. + """ - - artifact_arn: StrPipeVar - artifact_name: Optional[StrPipeVar] = Unassigned() - source: Optional[ArtifactSource] = Unassigned() - artifact_type: Optional[StrPipeVar] = Unassigned() - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + algorithm_name: StrPipeVar + algorithm_arn: Optional[StrPipeVar] = Unassigned() + algorithm_description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - lineage_group_arn: Optional[StrPipeVar] = Unassigned() - + training_specification: Optional[TrainingSpecification] = Unassigned() + inference_specification: Optional[InferenceSpecification] = Unassigned() + validation_specification: Optional[AlgorithmValidationSpecification] = Unassigned() + algorithm_status: Optional[StrPipeVar] = Unassigned() + algorithm_status_details: Optional[AlgorithmStatusDetails] = Unassigned() + product_id: Optional[StrPipeVar] = Unassigned() + certify_for_marketplace: Optional[bool] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "artifact_name" - resource_name_split = resource_name.split("_") + resource_name = 'algorithm_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object artifact") + logger.error("Name attribute not found for object algorithm") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "training_specification": { + "additional_s3_data_source": { + "s3_data_type": { + "type": "string" + }, + "s3_uri": { + "type": "string" + } + } + }, + "validation_specification": { + "validation_role": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Algorithm", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - source: ArtifactSource, - artifact_type: StrPipeVar, - artifact_name: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), + algorithm_name: StrPipeVar, + training_specification: TrainingSpecification, + algorithm_description: Optional[StrPipeVar] = Unassigned(), + inference_specification: Optional[InferenceSpecification] = Unassigned(), + validation_specification: Optional[AlgorithmValidationSpecification] = Unassigned(), + certify_for_marketplace: Optional[bool] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Artifact"]: + ) -> Optional["Algorithm"]: """ - Create a Artifact resource - + Create a Algorithm resource + Parameters: - source: The ID, ID type, and URI of the source. - artifact_type: The artifact type. - artifact_name: The name of the artifact. Must be unique to your account in an Amazon Web Services Region. - properties: A list of properties to add to the artifact. - metadata_properties: - tags: A list of tags to apply to the artifact. + algorithm_name: The name of the algorithm. + training_specification: Specifies details about training jobs run by this algorithm, including the following: The Amazon ECR path of the container and the version digest of the algorithm. The hyperparameters that the algorithm supports. The instance types that the algorithm supports for training. Whether the algorithm supports distributed training. The metrics that the algorithm emits to Amazon CloudWatch. Which metrics that the algorithm emits can be used as the objective metric for hyperparameter tuning jobs. The input channels that the algorithm supports for training data. For example, an algorithm might support train, validation, and test channels. + algorithm_description: A description of the algorithm. + inference_specification: Specifies details about inference jobs that the algorithm runs, including the following: The Amazon ECR paths of containers that contain the inference code and model artifacts. The instance types that the algorithm supports for transform jobs and real-time endpoints used for inference. The input and output content formats that the algorithm supports for inference. + validation_specification: Specifies configurations for one or more training jobs and that SageMaker runs to test the algorithm's training code and, optionally, one or more batch transform jobs that SageMaker runs to test the algorithm's inference code. + certify_for_marketplace: Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace. + 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. session: Boto3 session. region: Region name. - + Returns: - The Artifact resource. - + The Algorithm resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2078,62 +1777,58 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating artifact resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ArtifactName": artifact_name, - "Source": source, - "ArtifactType": artifact_type, - "Properties": properties, - "MetadataProperties": metadata_properties, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Artifact", operation_input_args=operation_input_args - ) - + + logger.info("Creating algorithm resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AlgorithmName': algorithm_name, + 'AlgorithmDescription': algorithm_description, + 'TrainingSpecification': training_specification, + 'InferenceSpecification': inference_specification, + 'ValidationSpecification': validation_specification, + 'CertifyForMarketplace': certify_for_marketplace, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Algorithm', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_artifact(**operation_input_args) + response = client.create_algorithm(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(artifact_arn=response["ArtifactArn"], session=session, region=region) - + + return cls.get(algorithm_name=algorithm_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - artifact_arn: StrPipeVar, + algorithm_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Artifact"]: + ) -> Optional["Algorithm"]: """ - Get a Artifact resource - + Get a Algorithm resource + Parameters: - artifact_arn: The Amazon Resource Name (ARN) of the artifact to describe. + algorithm_name: The name of the algorithm to describe. session: Boto3 session. region: Region name. - + Returns: - The Artifact resource. - + The Algorithm resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2142,40 +1837,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ArtifactArn": artifact_arn, + 'AlgorithmName': algorithm_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_artifact(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_algorithm(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeArtifactResponse") - artifact = cls(**transformed_response) - return artifact - + transformed_response = transform(response, 'DescribeAlgorithmOutput') + algorithm = cls(**transformed_response) + return algorithm + @Base.add_validate_call def refresh( self, - ) -> Optional["Artifact"]: + + ) -> Optional["Algorithm"]: """ - Refresh a Artifact resource - + Refresh a Algorithm resource + Returns: - The Artifact resource. - + The Algorithm resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2184,41 +1877,32 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ArtifactArn": self.artifact_arn, + 'AlgorithmName': self.algorithm_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_artifact(**operation_input_args) - + response = client.describe_algorithm(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeArtifactResponse", self) + transform(response, 'DescribeAlgorithmOutput', self) return self - + @Base.add_validate_call - def update( + def delete( self, - artifact_name: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - ) -> Optional["Artifact"]: + + ) -> None: """ - Update a Artifact resource - - Parameters: - properties_to_remove: A list of properties to remove. - - Returns: - The Artifact resource. - + Delete a Algorithm resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2228,39 +1912,90 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating artifact resource.") + client = Base.get_sagemaker_client() - + operation_input_args = { - "ArtifactArn": self.artifact_arn, - "ArtifactName": artifact_name, - "Properties": properties, - "PropertiesToRemove": properties_to_remove, + 'AlgorithmName': self.algorithm_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_artifact(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + + client.delete_algorithm(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def delete( + def wait_for_status( self, + target_status: Literal['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting'], + poll: int = 5, + timeout: Optional[int] = None ) -> None: """ - Delete a Artifact resource - + Wait for a Algorithm resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task(f"Waiting for Algorithm to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.algorithm_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="Algorithm", status=current_status, reason='(Unknown)') + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Algorithm", status=current_status) + time.sleep(poll) + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a Algorithm resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2269,56 +2004,70 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ArtifactArn": self.artifact_arn, - "Source": self.source, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_artifact(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for Algorithm to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.algorithm_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Algorithm", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, - source_uri: Optional[StrPipeVar] = Unassigned(), - artifact_type: Optional[StrPipeVar] = Unassigned(), - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Artifact"]: + ) -> ResourceIterator["Algorithm"]: """ - Get all Artifact resources - + Get all Algorithm resources + Parameters: - source_uri: A filter that returns only artifacts with the specified source URI. - artifact_type: A filter that returns only artifacts of the specified type. - created_after: A filter that returns only artifacts created on or after the specified time. - created_before: A filter that returns only artifacts created on or before the specified time. - sort_by: The property used to sort results. The default value is CreationTime. - sort_order: The sort order. The default value is Descending. - next_token: If the previous call to ListArtifacts didn't return the full set of artifacts, the call returns a token for getting the next set of artifacts. - max_results: The maximum number of artifacts to return in the response. The default value is 10. + creation_time_after: A filter that returns only algorithms created after the specified time (timestamp). + creation_time_before: A filter that returns only algorithms created before the specified time (timestamp). + max_results: The maximum number of algorithms to return in the response. + name_contains: A string in the algorithm name. This filter returns only algorithms whose name contains the specified string. + next_token: If the response to a previous ListAlgorithms request was truncated, the response includes a NextToken. To retrieve the next set of algorithms, use the token in the next request. + sort_by: The parameter by which to sort the results. The default is CreationTime. + sort_order: The sort order for the results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Artifact resources. - + Iterator for listed Algorithm resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2327,114 +2076,121 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SourceUri": source_uri, - "ArtifactType": artifact_type, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_artifacts", - summaries_key="ArtifactSummaries", - summary_name="ArtifactSummary", - resource_cls=Artifact, - list_method_kwargs=operation_input_args, + list_method='list_algorithms', + summaries_key='AlgorithmSummaryList', + summary_name='AlgorithmSummary', + resource_cls=Algorithm, + list_method_kwargs=operation_input_args ) -class ArtifactInternal(Base): +class App(Base): """ - Class representing resource ArtifactInternal - + Class representing resource App + Attributes: - source: - artifact_type: - customer_details: - artifact_name: - creation_time: - properties: - metadata_properties: - tags: - artifact_arn: - + app_arn: The Amazon Resource Name (ARN) of the app. + app_type: The type of app. + app_name: The name of the app. + domain_id: The domain ID. + user_profile_name: The user profile name. + space_name: The name of the space. If this value is not set, then UserProfileName must be set. + status: The status. + 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. + recovery_mode: Indicates whether the application is launched in recovery mode. + last_health_check_timestamp: The timestamp of the last health check. + 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. + creation_time: The creation time of the application. After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application. + failure_reason: The failure reason. + resource_spec: The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. + built_in_lifecycle_config_arn: The lifecycle configuration that runs before the default lifecycle configuration + """ - - source: ArtifactSource - artifact_type: StrPipeVar - customer_details: CustomerDetails - artifact_name: Optional[Union[StrPipeVar, object]] = Unassigned() + domain_id: StrPipeVar + app_type: StrPipeVar + app_name: StrPipeVar + app_arn: Optional[StrPipeVar] = Unassigned() + user_profile_name: Optional[StrPipeVar] = Unassigned() + space_name: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + effective_trusted_identity_propagation_status: Optional[StrPipeVar] = Unassigned() + recovery_mode: Optional[bool] = Unassigned() + last_health_check_timestamp: Optional[datetime.datetime] = Unassigned() + last_user_activity_timestamp: Optional[datetime.datetime] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - artifact_arn: Optional[StrPipeVar] = Unassigned() - + failure_reason: Optional[StrPipeVar] = Unassigned() + resource_spec: Optional[ResourceSpec] = Unassigned() + built_in_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "artifact_internal_name" - resource_name_split = resource_name.split("_") + resource_name = 'app_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object artifact_internal") + logger.error("Name attribute not found for object app") return None - + @classmethod @Base.add_validate_call def create( cls, - source: ArtifactSource, - artifact_type: StrPipeVar, - customer_details: CustomerDetails, - artifact_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - creation_time: Optional[datetime.datetime] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), + domain_id: StrPipeVar, + app_type: StrPipeVar, + app_name: StrPipeVar, + user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned(), + space_name: Optional[Union[StrPipeVar, object]] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), + resource_spec: Optional[ResourceSpec] = Unassigned(), + recovery_mode: Optional[bool] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ArtifactInternal"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["App"]: """ - Create a ArtifactInternal resource - + Create a App resource + Parameters: - source: - artifact_type: - customer_details: - artifact_name: - creation_time: - properties: - metadata_properties: - tags: + domain_id: The domain ID. + app_type: The type of app. + app_name: The name of the app. + user_profile_name: The user profile name. If this value is not set, then SpaceName must be set. + space_name: The name of the space. If this value is not set, then UserProfileName must be set. + tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. + resource_spec: The instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. The value of InstanceType passed as part of the ResourceSpec in the CreateApp call overrides the value passed as part of the ResourceSpec configured for the user profile or the domain. If InstanceType is not specified in any of those three ResourceSpec values for a KernelGateway app, the CreateApp call fails with a request validation error. + recovery_mode: Indicates whether the application is launched in recovery mode. session: Boto3 session. region: Region name. - + Returns: - The ArtifactInternal resource. - + The App resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2443,90 +2199,114 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + logger.info("Creating app resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'DomainId': domain_id, + 'UserProfileName': user_profile_name, + 'SpaceName': space_name, + 'AppType': app_type, + 'AppName': app_name, + 'Tags': tags, + 'ResourceSpec': resource_spec, + 'RecoveryMode': recovery_mode, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='App', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.create_app(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(domain_id=domain_id, app_type=app_type, app_name=app_name, session=session, region=region) + + @classmethod + @Base.add_validate_call + def get( + cls, + domain_id: StrPipeVar, + app_type: StrPipeVar, + app_name: StrPipeVar, + user_profile_name: Optional[StrPipeVar] = Unassigned(), + space_name: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["App"]: + """ + Get a App resource + + Parameters: + domain_id: The domain ID. + app_type: The type of app. + app_name: The name of the app. + user_profile_name: The user profile name. If this value is not set, then SpaceName must be set. + space_name: The name of the space. + session: Boto3 session. + region: Region name. + + Returns: + The App resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + operation_input_args = { - "ArtifactName": artifact_name, - "CreationTime": creation_time, - "Source": source, - "ArtifactType": artifact_type, - "Properties": properties, - "MetadataProperties": metadata_properties, - "Tags": tags, - "CustomerDetails": customer_details, + 'DomainId': domain_id, + 'UserProfileName': user_profile_name, + 'SpaceName': space_name, + 'AppType': app_type, + 'AppName': app_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_artifact_internal API") - response = client.create_artifact_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateArtifactInternalResponse") - return cls(**operation_input_args, **transformed_response) - - -class Association(Base): - """ - Class representing resource Association - - Attributes: - source_arn: The ARN of the source. - destination_arn: The Amazon Resource Name (ARN) of the destination. - source_type: The source type. - destination_type: The destination type. - association_type: The type of the association. - source_name: The name of the source. - destination_name: The name of the destination. - creation_time: When the association was created. - created_by: - - """ - - source_arn: Optional[StrPipeVar] = Unassigned() - destination_arn: Optional[StrPipeVar] = Unassigned() - source_type: Optional[StrPipeVar] = Unassigned() - destination_type: Optional[StrPipeVar] = Unassigned() - association_type: Optional[StrPipeVar] = Unassigned() - source_name: Optional[StrPipeVar] = Unassigned() - destination_name: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "association_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object association") - return None - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_app(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeAppResponse') + app = cls(**transformed_response) + return app + @Base.add_validate_call - def delete( + def refresh( self, - ) -> None: + + ) -> Optional["App"]: """ - Delete a Association resource - + Refresh a App resource + + Returns: + The App resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2537,60 +2317,35 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + operation_input_args = { - "SourceArn": self.source_arn, - "DestinationArn": self.destination_arn, + 'DomainId': self.domain_id, + 'UserProfileName': self.user_profile_name, + 'SpaceName': self.space_name, + 'AppType': self.app_type, + 'AppName': self.app_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_association(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod + + client = Base.get_sagemaker_client() + response = client.describe_app(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeAppResponse', self) + return self + @Base.add_validate_call - def get_all( - cls, - source_arn: Optional[StrPipeVar] = Unassigned(), - destination_arn: Optional[StrPipeVar] = Unassigned(), - source_type: Optional[StrPipeVar] = Unassigned(), - destination_type: Optional[StrPipeVar] = Unassigned(), - association_type: Optional[StrPipeVar] = Unassigned(), - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Association"]: + def delete( + self, + + ) -> None: """ - Get all Association resources - - Parameters: - source_arn: A filter that returns only associations with the specified source ARN. - destination_arn: A filter that returns only associations with the specified destination Amazon Resource Name (ARN). - source_type: A filter that returns only associations with the specified source type. - destination_type: A filter that returns only associations with the specified destination type. - association_type: A filter that returns only associations of the specified type. - created_after: A filter that returns only associations created on or after the specified time. - created_before: A filter that returns only associations created on or before the specified time. - sort_by: The property used to sort results. The default value is CreationTime. - sort_order: The sort order. The default value is Descending. - next_token: If the previous call to ListAssociations didn't return the full set of associations, the call returns a token for getting the next set of associations. - max_results: The maximum number of associations to return in the response. The default value is 10. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed Association resources. - + Delete a App resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2599,60 +2354,172 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client() + operation_input_args = { - "SourceArn": source_arn, - "DestinationArn": destination_arn, - "SourceType": source_type, - "DestinationType": destination_type, - "AssociationType": association_type, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'DomainId': self.domain_id, + 'UserProfileName': self.user_profile_name, + 'SpaceName': self.space_name, + 'AppType': self.app_type, + 'AppName': self.app_name, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_associations", - summaries_key="AssociationSummaries", - summary_name="AssociationSummary", - resource_cls=Association, - list_method_kwargs=operation_input_args, + + client.delete_app(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['Deleted', 'Deleting', 'Failed', 'InService', 'Pending'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a App resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - + progress.add_task(f"Waiting for App to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="App", status=current_status, reason=self.failure_reason) + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="App", status=current_status) + time.sleep(poll) + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a App resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for App to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.status + status.update(f"Current status: [bold]{current_status}") + + + if current_status.lower() == "deleted": + logger.info("Resource was deleted.") + return + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="App", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call - def add( + def get_all( cls, - source_arn: StrPipeVar, - destination_arn: StrPipeVar, - association_type: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + domain_id_equals: Optional[StrPipeVar] = Unassigned(), + user_profile_name_equals: Optional[StrPipeVar] = Unassigned(), + space_name_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["App"]: """ - Creates an association between the source and the destination. - + Get all App resources + Parameters: - source_arn: The ARN of the source. - destination_arn: The Amazon Resource Name (ARN) of the destination. - association_type: The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use. ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job. AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment. DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs. Produced - The source generated the destination. For example, a training job produced a model artifact. + next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. + max_results: This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10. + sort_order: The sort order for the results. The default is Ascending. + sort_by: The parameter by which to sort the results. The default is CreationTime. + domain_id_equals: A parameter to search for the domain ID. + user_profile_name_equals: A parameter to search by user profile name. If SpaceNameEquals is set, then this value cannot be set. + space_name_equals: A parameter to search by space name. If UserProfileNameEquals is set, then this value cannot be set. session: Boto3 session. region: Region name. - + + Returns: + Iterator for listed App resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2661,170 +2528,99 @@ def add( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SourceArn": source_arn, - "DestinationArn": destination_arn, - "AssociationType": association_type, + 'SortOrder': sort_order, + 'SortBy': sort_by, + 'DomainIdEquals': domain_id_equals, + 'UserProfileNameEquals': user_profile_name_equals, + 'SpaceNameEquals': space_name_equals, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + return ResourceIterator( + client=client, + list_method='list_apps', + summaries_key='Apps', + summary_name='AppDetails', + resource_cls=App, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling add_association API") - response = client.add_association(**operation_input_args) - logger.debug(f"Response: {response}") - -class AutoMLJob(Base): +class AppImageConfig(Base): """ - Class representing resource AutoMLJob - + Class representing resource AppImageConfig + Attributes: - auto_ml_job_name: Returns the name of the AutoML job. - auto_ml_job_arn: Returns the ARN of the AutoML job. - input_data_config: Returns the input data configuration for the AutoML job. - output_data_config: Returns the job's output data config. - role_arn: The ARN of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. - creation_time: Returns the creation time of the AutoML job. - last_modified_time: Returns the job's last modified time. - auto_ml_job_status: Returns the status of the AutoML job. - auto_ml_job_secondary_status: Returns the secondary status of the AutoML job. - auto_ml_job_objective: Returns the job's objective. - problem_type: Returns the job's problem type. - auto_ml_job_config: Returns the configuration for the AutoML job. - end_time: Returns the end time of the AutoML job. - failure_reason: Returns the failure reason for an AutoML job, when applicable. - partial_failure_reasons: Returns a list of reasons for partial failures within an AutoML job. - best_candidate: The best model candidate selected by SageMaker AI Autopilot using both the best objective metric and lowest InferenceLatency for an experiment. - generate_candidate_definitions_only: Indicates whether the output for an AutoML job generates candidate definitions only. - auto_ml_job_artifacts: Returns information on the job's artifacts found in AutoMLJobArtifacts. - image_url_overrides: - resolved_attributes: Contains ProblemType, AutoMLJobObjective, and CompletionCriteria. If you do not provide these values, they are inferred. - model_deploy_config: Indicates whether the model was deployed automatically to an endpoint and the name of that endpoint if deployed automatically. - model_deploy_result: Provides information about endpoint for the model deployment. - + app_image_config_arn: The ARN of the AppImageConfig. + app_image_config_name: The name of the AppImageConfig. + creation_time: When the AppImageConfig was created. + last_modified_time: When the AppImageConfig was last modified. + kernel_gateway_image_config: The configuration of a KernelGateway app. + jupyter_lab_app_image_config: The configuration of the JupyterLab app. + code_editor_app_image_config: The configuration of the Code Editor app. + """ - - auto_ml_job_name: StrPipeVar - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - input_data_config: Optional[List[AutoMLChannel]] = Unassigned() - output_data_config: Optional[AutoMLOutputDataConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() - problem_type: Optional[StrPipeVar] = Unassigned() - auto_ml_job_config: Optional[AutoMLJobConfig] = Unassigned() + app_image_config_name: StrPipeVar + app_image_config_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - partial_failure_reasons: Optional[List[AutoMLPartialFailureReason]] = Unassigned() - best_candidate: Optional[AutoMLCandidate] = Unassigned() - auto_ml_job_status: Optional[StrPipeVar] = Unassigned() - auto_ml_job_secondary_status: Optional[StrPipeVar] = Unassigned() - generate_candidate_definitions_only: Optional[bool] = Unassigned() - auto_ml_job_artifacts: Optional[AutoMLJobArtifacts] = Unassigned() - image_url_overrides: Optional[ImageUrlOverrides] = Unassigned() - resolved_attributes: Optional[ResolvedAttributes] = Unassigned() - model_deploy_config: Optional[ModelDeployConfig] = Unassigned() - model_deploy_result: Optional[ModelDeployResult] = Unassigned() - + kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned() + jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned() + code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "auto_ml_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'app_image_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object auto_ml_job") + logger.error("Name attribute not found for object app_image_config") return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "output_data_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "auto_ml_job_config": { - "security_config": { - "volume_kms_key_id": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - }, - "candidate_generation_config": { - "feature_specification_s3_uri": {"type": "string"} - }, - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "AutoMLJob", **kwargs - ), - ) - - return wrapper - + @classmethod - @populate_inputs_decorator @Base.add_validate_call def create( cls, - auto_ml_job_name: StrPipeVar, - input_data_config: List[AutoMLChannel], - output_data_config: AutoMLOutputDataConfig, - role_arn: StrPipeVar, - problem_type: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned(), - auto_ml_job_config: Optional[AutoMLJobConfig] = Unassigned(), - generate_candidate_definitions_only: Optional[bool] = Unassigned(), + app_image_config_name: StrPipeVar, tags: Optional[List[Tag]] = Unassigned(), - image_url_overrides: Optional[ImageUrlOverrides] = Unassigned(), - model_deploy_config: Optional[ModelDeployConfig] = Unassigned(), + kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned(), + jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned(), + code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLJob"]: + ) -> Optional["AppImageConfig"]: """ - Create a AutoMLJob resource - + Create a AppImageConfig resource + Parameters: - auto_ml_job_name: Identifies an Autopilot job. The name must be unique to your account and is case insensitive. - input_data_config: An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset. - output_data_config: Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV. - role_arn: The ARN of the role that is used to access the data. - problem_type: Defines the type of supervised learning problem available for the candidates. For more information, see SageMaker Autopilot problem types. - auto_ml_job_objective: Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See AutoMLJobObjective for the default values. - auto_ml_job_config: A collection of settings used to configure an AutoML job. - generate_candidate_definitions_only: Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings. - 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 ServicesResources. Tag keys must be unique per resource. - image_url_overrides: - model_deploy_config: Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. + app_image_config_name: The name of the AppImageConfig. Must be unique to your account. + tags: A list of tags to apply to the AppImageConfig. + kernel_gateway_image_config: The KernelGatewayImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel will be shown to users before the image starts. Once the image runs, all kernels are visible in JupyterLab. + jupyter_lab_app_image_config: The JupyterLabAppImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel is shown to users before the image starts. After the image runs, all kernels are visible in JupyterLab. + code_editor_app_image_config: The CodeEditorAppImageConfig. You can only specify one image kernel in the AppImageConfig API. This kernel is shown to users before the image starts. After the image runs, all kernels are visible in Code Editor. session: Boto3 session. region: Region name. - + Returns: - The AutoMLJob resource. - + The AppImageConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2834,67 +2630,56 @@ def create( error_code = e.response['Error']['Code'] ``` ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating auto_ml_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "AutoMLJobName": auto_ml_job_name, - "InputDataConfig": input_data_config, - "OutputDataConfig": output_data_config, - "ProblemType": problem_type, - "AutoMLJobObjective": auto_ml_job_objective, - "AutoMLJobConfig": auto_ml_job_config, - "RoleArn": role_arn, - "GenerateCandidateDefinitionsOnly": generate_candidate_definitions_only, - "Tags": tags, - "ImageUrlOverrides": image_url_overrides, - "ModelDeployConfig": model_deploy_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="AutoMLJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating app_image_config resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AppImageConfigName': app_image_config_name, + 'Tags': tags, + 'KernelGatewayImageConfig': kernel_gateway_image_config, + 'JupyterLabAppImageConfig': jupyter_lab_app_image_config, + 'CodeEditorAppImageConfig': code_editor_app_image_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='AppImageConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_auto_ml_job(**operation_input_args) + response = client.create_app_image_config(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(auto_ml_job_name=auto_ml_job_name, session=session, region=region) - + + return cls.get(app_image_config_name=app_image_config_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - auto_ml_job_name: StrPipeVar, + app_image_config_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLJob"]: + ) -> Optional["AppImageConfig"]: """ - Get a AutoMLJob resource - + Get a AppImageConfig resource + Parameters: - auto_ml_job_name: Requests information about an AutoML job using its unique name. + app_image_config_name: The name of the AppImageConfig to describe. session: Boto3 session. region: Region name. - + Returns: - The AutoMLJob resource. - + The AppImageConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2905,38 +2690,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AutoMLJobName": auto_ml_job_name, + 'AppImageConfigName': app_image_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_auto_ml_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_app_image_config(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeAutoMLJobResponse") - auto_ml_job = cls(**transformed_response) - return auto_ml_job - + transformed_response = transform(response, 'DescribeAppImageConfigResponse') + app_image_config = cls(**transformed_response) + return app_image_config + @Base.add_validate_call def refresh( self, - ) -> Optional["AutoMLJob"]: + + ) -> Optional["AppImageConfig"]: """ - Refresh a AutoMLJob resource - + Refresh a AppImageConfig resource + Returns: - The AutoMLJob resource. - + The AppImageConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2947,30 +2731,36 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AutoMLJobName": self.auto_ml_job_name, + 'AppImageConfigName': self.app_image_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_auto_ml_job(**operation_input_args) - + response = client.describe_app_image_config(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeAutoMLJobResponse", self) + transform(response, 'DescribeAppImageConfigResponse', self) return self - + @Base.add_validate_call - def delete( + def update( self, - ) -> None: + kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned(), + jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned(), + code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned(), + ) -> Optional["AppImageConfig"]: """ - Delete a AutoMLJob resource - + Update a AppImageConfig resource + + Returns: + The AppImageConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -2979,31 +2769,40 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessDeniedException - ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating app_image_config resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "AutoMLJobName": self.auto_ml_job_name, + 'AppImageConfigName': self.app_image_config_name, + 'KernelGatewayImageConfig': kernel_gateway_image_config, + 'JupyterLabAppImageConfig': jupyter_lab_app_image_config, + 'CodeEditorAppImageConfig': code_editor_app_image_config, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_auto_ml_job(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + # create the resource + response = client.update_app_image_config(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + @Base.add_validate_call - def stop(self) -> None: + def delete( + self, + + ) -> None: """ - Stop a AutoMLJob resource - + Delete a AppImageConfig resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3014,182 +2813,55 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client() + operation_input_args = { - "AutoMLJobName": self.auto_ml_job_name, + 'AppImageConfigName': self.app_image_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_auto_ml_job(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a AutoMLJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["Completed", "Failed", "Stopped"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for AutoMLJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.auto_ml_job_status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="AutoMLJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="AutoMLJob", status=current_status) - time.sleep(poll) - + + client.delete_app_image_config(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["AutoMLJob"]: - """ - Get all AutoMLJob resources - - Parameters: - creation_time_after: Request a list of jobs, using a filter for time. - creation_time_before: Request a list of jobs, using a filter for time. - last_modified_time_after: Request a list of jobs, using a filter for time. - last_modified_time_before: Request a list of jobs, using a filter for time. - name_contains: Request a list of jobs, using a search filter for name. - status_equals: Request a list of jobs, using a filter for status. - sort_order: The sort order for the results. The default is Descending. - sort_by: The parameter by which to sort the results. The default is Name. - max_results: Request a list of jobs up to a specified limit. - next_token: If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed AutoMLJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortOrder": sort_order, - "SortBy": sort_by, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_auto_ml_jobs", - summaries_key="AutoMLJobSummaries", - summary_name="AutoMLJobSummary", - resource_cls=AutoMLJob, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def get_all_candidates( - self, - status_equals: Optional[StrPipeVar] = Unassigned(), - candidate_name_equals: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + modified_time_before: Optional[datetime.datetime] = Unassigned(), + modified_time_after: Optional[datetime.datetime] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[AutoMLCandidate]: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["AppImageConfig"]: """ - List the candidates created for the job. - + Get all AppImageConfig resources + Parameters: - status_equals: List the candidates for the job and filter by status. - candidate_name_equals: List the candidates for the job and filter by candidate name. - sort_order: The sort order for the results. The default is Ascending. - sort_by: The parameter by which to sort the results. The default is Descending. - max_results: List the job's candidates up to a specified limit. - next_token: If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results. + max_results: The total number of items to return in the response. If the total number of items available is more than the value specified, a NextToken is provided in the response. To resume pagination, provide the NextToken value in the as part of a subsequent call. The default value is 10. + next_token: If the previous call to ListImages didn't return the full set of AppImageConfigs, the call returns a token for getting the next set of AppImageConfigs. + name_contains: A filter that returns only AppImageConfigs whose name contains the specified string. + creation_time_before: A filter that returns only AppImageConfigs created on or before the specified time. + creation_time_after: A filter that returns only AppImageConfigs created on or after the specified time. + modified_time_before: A filter that returns only AppImageConfigs modified on or before the specified time. + modified_time_after: A filter that returns only AppImageConfigs modified on or after the specified time. + sort_by: The property used to sort results. The default value is CreationTime. + sort_order: The sort order. The default value is Descending. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed AutoMLCandidate. - + Iterator for listed AppImageConfig resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3198,192 +2870,111 @@ def get_all_candidates( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "AutoMLJobName": self.auto_ml_job_name, - "StatusEquals": status_equals, - "CandidateNameEquals": candidate_name_equals, - "SortOrder": sort_order, - "SortBy": sort_by, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'ModifiedTimeBefore': modified_time_before, + 'ModifiedTimeAfter': modified_time_after, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + return ResourceIterator( client=client, - list_method="list_candidates_for_auto_ml_job", - summaries_key="Candidates", - summary_name="AutoMLCandidate", - resource_cls=AutoMLCandidate, - list_method_kwargs=operation_input_args, + list_method='list_app_image_configs', + summaries_key='AppImageConfigs', + summary_name='AppImageConfigDetails', + resource_cls=AppImageConfig, + list_method_kwargs=operation_input_args ) -class AutoMLJobV2(Base): +class Artifact(Base): """ - Class representing resource AutoMLJobV2 - + Class representing resource Artifact + Attributes: - auto_ml_job_name: Returns the name of the AutoML job V2. - auto_ml_job_arn: Returns the Amazon Resource Name (ARN) of the AutoML job V2. - auto_ml_job_input_data_config: Returns an array of channel objects describing the input data and their location. - output_data_config: Returns the job's output data config. - role_arn: The ARN of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. - creation_time: Returns the creation time of the AutoML job V2. - last_modified_time: Returns the job's last modified time. - auto_ml_job_status: Returns the status of the AutoML job V2. - auto_ml_job_secondary_status: Returns the secondary status of the AutoML job V2. - auto_ml_job_objective: Returns the job's objective. - auto_ml_problem_type_config: Returns the configuration settings of the problem type set for the AutoML job V2. - auto_ml_problem_type_config_name: Returns the name of the problem type configuration set for the AutoML job V2. - end_time: Returns the end time of the AutoML job V2. - failure_reason: Returns the reason for the failure of the AutoML job V2, when applicable. - partial_failure_reasons: Returns a list of reasons for partial failures within an AutoML job V2. - best_candidate: Information about the candidate produced by an AutoML training job V2, including its status, steps, and other properties. - auto_ml_job_artifacts: - image_url_overrides: - resolved_attributes: Returns the resolved attributes used by the AutoML job V2. - model_deploy_config: Indicates whether the model was deployed automatically to an endpoint and the name of that endpoint if deployed automatically. - model_deploy_result: Provides information about endpoint for the model deployment. - data_split_config: Returns the configuration settings of how the data are split into train and validation datasets. - security_config: Returns the security configuration for traffic encryption or Amazon VPC settings. - external_feature_transformers: - auto_ml_compute_config: The compute configuration used for the AutoML job V2. - + artifact_name: The name of the artifact. + artifact_arn: The Amazon Resource Name (ARN) of the artifact. + source: The source of the artifact. + artifact_type: The type of the artifact. + properties: A list of the artifact's properties. + creation_time: When the artifact was created. + created_by: + last_modified_time: When the artifact was last modified. + last_modified_by: + metadata_properties: + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. + """ - - auto_ml_job_name: StrPipeVar - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_input_data_config: Optional[List[AutoMLJobChannel]] = Unassigned() - output_data_config: Optional[AutoMLOutputDataConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() - auto_ml_problem_type_config: Optional[AutoMLProblemTypeConfig] = Unassigned() - auto_ml_problem_type_config_name: Optional[StrPipeVar] = Unassigned() + artifact_arn: StrPipeVar + artifact_name: Optional[StrPipeVar] = Unassigned() + source: Optional[ArtifactSource] = Unassigned() + artifact_type: Optional[StrPipeVar] = Unassigned() + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - partial_failure_reasons: Optional[List[AutoMLPartialFailureReason]] = Unassigned() - best_candidate: Optional[AutoMLCandidate] = Unassigned() - auto_ml_job_status: Optional[StrPipeVar] = Unassigned() - auto_ml_job_secondary_status: Optional[StrPipeVar] = Unassigned() - auto_ml_job_artifacts: Optional[AutoMLJobArtifacts] = Unassigned() - image_url_overrides: Optional[ImageUrlOverrides] = Unassigned() - resolved_attributes: Optional[AutoMLResolvedAttributes] = Unassigned() - model_deploy_config: Optional[ModelDeployConfig] = Unassigned() - model_deploy_result: Optional[ModelDeployResult] = Unassigned() - data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned() - security_config: Optional[AutoMLSecurityConfig] = Unassigned() - external_feature_transformers: Optional[AutoMLExternalFeatureTransformers] = Unassigned() - auto_ml_compute_config: Optional[AutoMLComputeConfig] = Unassigned() - + last_modified_by: Optional[UserContext] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "auto_ml_job_v2_name" - resource_name_split = resource_name.split("_") + resource_name = 'artifact_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object auto_ml_job_v2") + logger.error("Name attribute not found for object artifact") return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "output_data_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "auto_ml_problem_type_config": { - "time_series_forecasting_job_config": { - "feature_specification_s3_uri": {"type": "string"} - }, - "tabular_job_config": {"feature_specification_s3_uri": {"type": "string"}}, - }, - "security_config": { - "volume_kms_key_id": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - }, - "auto_ml_compute_config": { - "emr_serverless_compute_config": {"execution_role_arn": {"type": "string"}} - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "AutoMLJobV2", **kwargs - ), - ) - - return wrapper - + @classmethod - @populate_inputs_decorator @Base.add_validate_call def create( cls, - auto_ml_job_name: StrPipeVar, - auto_ml_job_input_data_config: List[AutoMLJobChannel], - output_data_config: AutoMLOutputDataConfig, - auto_ml_problem_type_config: AutoMLProblemTypeConfig, - role_arn: StrPipeVar, + source: ArtifactSource, + artifact_type: StrPipeVar, + artifact_name: Optional[StrPipeVar] = Unassigned(), + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + metadata_properties: Optional[MetadataProperties] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - security_config: Optional[AutoMLSecurityConfig] = Unassigned(), - auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned(), - model_deploy_config: Optional[ModelDeployConfig] = Unassigned(), - image_url_overrides: Optional[ImageUrlOverrides] = Unassigned(), - data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned(), - auto_ml_execution_mode: Optional[StrPipeVar] = Unassigned(), - external_feature_transformers: Optional[AutoMLExternalFeatureTransformers] = Unassigned(), - auto_ml_compute_config: Optional[AutoMLComputeConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLJobV2"]: + ) -> Optional["Artifact"]: """ - Create a AutoMLJobV2 resource - + Create a Artifact resource + Parameters: - auto_ml_job_name: Identifies an Autopilot job. The name must be unique to your account and is case insensitive. - auto_ml_job_input_data_config: An array of channel objects describing the input data and their location. Each channel is a named input source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats depend on the problem type: For tabular problem types: S3Prefix, ManifestFile. For image classification: S3Prefix, ManifestFile, AugmentedManifestFile. For text classification: S3Prefix. For time-series forecasting: S3Prefix. For text generation (LLMs fine-tuning): S3Prefix. - output_data_config: Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. - auto_ml_problem_type_config: Defines the configuration settings of one of the supported problem types. - role_arn: The ARN of the role that is used to access the data. - tags: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web ServicesResources. Tag keys must be unique per resource. - security_config: The security configuration for traffic encryption or Amazon VPC settings. - auto_ml_job_objective: Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective. For tabular problem types: You must either provide both the AutoMLJobObjective and indicate the type of supervised learning problem in AutoMLProblemTypeConfig (TabularJobConfig.ProblemType), or none at all. For text generation problem types (LLMs fine-tuning): Fine-tuning language models in Autopilot does not require setting the AutoMLJobObjective field. Autopilot fine-tunes LLMs without requiring multiple candidates to be trained and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your target model to enhance a default objective metric, the cross-entropy loss. After fine-tuning a language model, you can evaluate the quality of its generated text using different metrics. For a list of the available metrics, see Metrics for fine-tuning LLMs in Autopilot. - model_deploy_config: Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. - image_url_overrides: - data_split_config: This structure specifies how to split the data into train and validation datasets. The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size. This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically splits the input dataset into training and validation sets. - auto_ml_execution_mode: - external_feature_transformers: - auto_ml_compute_config: Specifies the compute configuration for the AutoML job V2. + source: The ID, ID type, and URI of the source. + artifact_type: The artifact type. + artifact_name: The name of the artifact. Must be unique to your account in an Amazon Web Services Region. + properties: A list of properties to add to the artifact. + metadata_properties: + tags: A list of tags to apply to the artifact. session: Boto3 session. region: Region name. - + Returns: - The AutoMLJobV2 resource. - + The Artifact resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3392,71 +2983,58 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating auto_ml_job_v2 resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "AutoMLJobName": auto_ml_job_name, - "AutoMLJobInputDataConfig": auto_ml_job_input_data_config, - "OutputDataConfig": output_data_config, - "AutoMLProblemTypeConfig": auto_ml_problem_type_config, - "RoleArn": role_arn, - "Tags": tags, - "SecurityConfig": security_config, - "AutoMLJobObjective": auto_ml_job_objective, - "ModelDeployConfig": model_deploy_config, - "ImageUrlOverrides": image_url_overrides, - "DataSplitConfig": data_split_config, - "AutoMLExecutionMode": auto_ml_execution_mode, - "ExternalFeatureTransformers": external_feature_transformers, - "AutoMLComputeConfig": auto_ml_compute_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="AutoMLJobV2", operation_input_args=operation_input_args - ) - + + logger.info("Creating artifact resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ArtifactName': artifact_name, + 'Source': source, + 'ArtifactType': artifact_type, + 'Properties': properties, + 'MetadataProperties': metadata_properties, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Artifact', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_auto_ml_job_v2(**operation_input_args) + response = client.create_artifact(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(auto_ml_job_name=auto_ml_job_name, session=session, region=region) - + + return cls.get(artifact_arn=response['ArtifactArn'], session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - auto_ml_job_name: StrPipeVar, + artifact_arn: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLJobV2"]: + ) -> Optional["Artifact"]: """ - Get a AutoMLJobV2 resource - + Get a Artifact resource + Parameters: - auto_ml_job_name: Requests information about an AutoML job V2 using its unique name. + artifact_arn: The Amazon Resource Name (ARN) of the artifact to describe. session: Boto3 session. region: Region name. - + Returns: - The AutoMLJobV2 resource. - + The Artifact resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3467,38 +3045,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AutoMLJobName": auto_ml_job_name, + 'ArtifactArn': artifact_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_auto_ml_job_v2(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_artifact(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeAutoMLJobV2Response") - auto_ml_job_v2 = cls(**transformed_response) - return auto_ml_job_v2 - + transformed_response = transform(response, 'DescribeArtifactResponse') + artifact = cls(**transformed_response) + return artifact + @Base.add_validate_call def refresh( self, - ) -> Optional["AutoMLJobV2"]: + + ) -> Optional["Artifact"]: """ - Refresh a AutoMLJobV2 resource - + Refresh a Artifact resource + Returns: - The AutoMLJobV2 resource. - + The Artifact resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3509,151 +3086,39 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "AutoMLJobName": self.auto_ml_job_name, + 'ArtifactArn': self.artifact_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_auto_ml_job_v2(**operation_input_args) - + response = client.describe_artifact(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeAutoMLJobV2Response", self) + transform(response, 'DescribeArtifactResponse', self) return self - + @Base.add_validate_call - def wait( + def update( self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a AutoMLJobV2 resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["Completed", "Failed", "Stopped"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for AutoMLJobV2...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.auto_ml_job_status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="AutoMLJobV2", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="AutoMLJobV2", status=current_status) - time.sleep(poll) - - -class AutoMLTask(Base): - """ - Class representing resource AutoMLTask - - Attributes: - auto_ml_job_arn: - auto_ml_task_arn: - candidate_name: - auto_ml_task_type: - auto_ml_task_status: - creation_time: - last_modified_time: - end_time: - failure_reason: - auto_ml_task_artifacts_location: - - """ - - auto_ml_task_arn: StrPipeVar - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - candidate_name: Optional[StrPipeVar] = Unassigned() - auto_ml_task_type: Optional[StrPipeVar] = Unassigned() - auto_ml_task_status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - auto_ml_task_artifacts_location: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "auto_ml_task_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object auto_ml_task") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - auto_ml_job_name: StrPipeVar, - auto_ml_task_context: AutoMLTaskContext, - auto_ml_task_type: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLTask"]: + artifact_name: Optional[StrPipeVar] = Unassigned(), + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), + ) -> Optional["Artifact"]: """ - Create a AutoMLTask resource - + Update a Artifact resource + Parameters: - auto_ml_job_name: - auto_ml_task_context: - auto_ml_task_type: - session: Boto3 session. - region: Region name. - + properties_to_remove: A list of properties to remove. + Returns: - The AutoMLTask resource. - + The Artifact resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3662,60 +3127,99 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating auto_ml_task resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Updating artifact resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "AutoMLJobName": auto_ml_job_name, - "AutoMLTaskContext": auto_ml_task_context, - "AutoMLTaskType": auto_ml_task_type, + 'ArtifactArn': self.artifact_arn, + 'ArtifactName': artifact_name, + 'Properties': properties, + 'PropertiesToRemove': properties_to_remove, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="AutoMLTask", operation_input_args=operation_input_args - ) - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_auto_ml_task(**operation_input_args) + response = client.update_artifact(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(auto_ml_task_arn=response["AutoMlTaskArn"], session=session, region=region) - + self.refresh() + + return self + + @Base.add_validate_call + def delete( + self, + + ) -> None: + """ + Delete a Artifact resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'ArtifactArn': self.artifact_arn, + 'Source': self.source, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_artifact(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @classmethod @Base.add_validate_call - def get( + def get_all( cls, - auto_ml_task_arn: StrPipeVar, + source_uri: Optional[StrPipeVar] = Unassigned(), + artifact_type: Optional[StrPipeVar] = Unassigned(), + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["AutoMLTask"]: + ) -> ResourceIterator["Artifact"]: """ - Get a AutoMLTask resource - + Get all Artifact resources + Parameters: - auto_ml_task_arn: + source_uri: A filter that returns only artifacts with the specified source URI. + artifact_type: A filter that returns only artifacts of the specified type. + created_after: A filter that returns only artifacts created on or after the specified time. + created_before: A filter that returns only artifacts created on or before the specified time. + sort_by: The property used to sort results. The default value is CreationTime. + sort_order: The sort order. The default value is Descending. + next_token: If the previous call to ListArtifacts didn't return the full set of artifacts, the call returns a token for getting the next set of artifacts. + max_results: The maximum number of artifacts to return in the response. The default value is 10. session: Boto3 session. region: Region name. - + Returns: - The AutoMLTask resource. - + Iterator for listed Artifact resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3726,38 +3230,84 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "AutoMLTaskArn": auto_ml_task_arn, + 'SourceUri': source_uri, + 'ArtifactType': artifact_type, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + return ResourceIterator( + client=client, + list_method='list_artifacts', + summaries_key='ArtifactSummaries', + summary_name='ArtifactSummary', + resource_cls=Artifact, + list_method_kwargs=operation_input_args ) - response = client.describe_auto_ml_task(**operation_input_args) - - logger.debug(response) - # deserialize the response - transformed_response = transform(response, "DescribeAutoMLTaskResponse") - auto_ml_task = cls(**transformed_response) - return auto_ml_task +class Association(Base): + """ + Class representing resource Association + + Attributes: + source_arn: The ARN of the source. + destination_arn: The Amazon Resource Name (ARN) of the destination. + source_type: The source type. + destination_type: The destination type. + association_type: The type of the association. + source_name: The name of the source. + destination_name: The name of the destination. + creation_time: When the association was created. + created_by: + + """ + source_arn: Optional[StrPipeVar] = Unassigned() + destination_arn: Optional[StrPipeVar] = Unassigned() + source_type: Optional[StrPipeVar] = Unassigned() + destination_type: Optional[StrPipeVar] = Unassigned() + association_type: Optional[StrPipeVar] = Unassigned() + source_name: Optional[StrPipeVar] = Unassigned() + destination_name: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'association_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object association") + return None + @Base.add_validate_call - def refresh( + def delete( self, - ) -> Optional["AutoMLTask"]: + + ) -> None: """ - Refresh a AutoMLTask resource - - Returns: - The AutoMLTask resource. - + Delete a Association resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3768,170 +3318,302 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "AutoMLTaskArn": self.auto_ml_task_arn, + 'SourceArn': self.source_arn, + 'DestinationArn': self.destination_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_auto_ml_task(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeAutoMLTaskResponse", self) - return self - + + client.delete_association(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @classmethod @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Completed", "InProgress", "Failed", "Stopped", "Stopping"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + def get_all( + cls, + source_arn: Optional[StrPipeVar] = Unassigned(), + destination_arn: Optional[StrPipeVar] = Unassigned(), + source_type: Optional[StrPipeVar] = Unassigned(), + destination_type: Optional[StrPipeVar] = Unassigned(), + association_type: Optional[StrPipeVar] = Unassigned(), + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["Association"]: """ - Wait for a AutoMLTask resource to reach certain status. - + Get all Association resources + Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. + source_arn: A filter that returns only associations with the specified source ARN. + destination_arn: A filter that returns only associations with the specified destination Amazon Resource Name (ARN). + source_type: A filter that returns only associations with the specified source type. + destination_type: A filter that returns only associations with the specified destination type. + association_type: A filter that returns only associations of the specified type. + created_after: A filter that returns only associations created on or after the specified time. + created_before: A filter that returns only associations created on or before the specified time. + sort_by: The property used to sort results. The default value is CreationTime. + sort_order: The sort order. The default value is Descending. + next_token: If the previous call to ListAssociations didn't return the full set of associations, the call returns a token for getting the next set of associations. + max_results: The maximum number of associations to return in the response. The default value is 10. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed Association resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'SourceArn': source_arn, + 'DestinationArn': destination_arn, + 'SourceType': source_type, + 'DestinationType': destination_type, + 'AssociationType': association_type, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_associations', + summaries_key='AssociationSummaries', + summary_name='AssociationSummary', + resource_cls=Association, + list_method_kwargs=operation_input_args ) - progress.add_task(f"Waiting for AutoMLTask to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.auto_ml_task_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="AutoMLTask", - status=current_status, - reason=self.failure_reason, - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="AutoMLTask", status=current_status) - time.sleep(poll) + + @classmethod + @Base.add_validate_call + def add( + cls, + source_arn: StrPipeVar, + destination_arn: StrPipeVar, + association_type: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Creates an association between the source and the destination. + + Parameters: + source_arn: The ARN of the source. + destination_arn: The Amazon Resource Name (ARN) of the destination. + association_type: The type of association. The following are suggested uses for each type. Amazon SageMaker places no restrictions on their use. ContributedTo - The source contributed to the destination or had a part in enabling the destination. For example, the training data contributed to the training job. AssociatedWith - The source is connected to the destination. For example, an approval workflow is associated with a model deployment. DerivedFrom - The destination is a modification of the source. For example, a digest output of a channel input for a processing job is derived from the original inputs. Produced - The source generated the destination. For example, a training job produced a model artifact. + session: Boto3 session. + region: Region name. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. + """ + + + operation_input_args = { + 'SourceArn': source_arn, + 'DestinationArn': destination_arn, + 'AssociationType': association_type, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling add_association API") + response = client.add_association(**operation_input_args) + logger.debug(f"Response: {response}") + -class CapacitySchedule(Base): +class AutoMLJob(Base): """ - Class representing resource CapacitySchedule - + Class representing resource AutoMLJob + Attributes: - capacity_schedule_arn: - capacity_schedule_type: - instance_type: - total_instance_count: - placement: - status: - requested_start_time: - owner_account_id: - available_instance_count: - availability_zone: - requested_end_time: - start_time: - end_time: - duration_in_hours: - capacity_block_offerings: - capacity_resources: - target_resources: - capacity_schedule_status_transitions: - + auto_ml_job_name: Returns the name of the AutoML job. + auto_ml_job_arn: Returns the ARN of the AutoML job. + input_data_config: Returns the input data configuration for the AutoML job. + output_data_config: Returns the job's output data config. + role_arn: The ARN of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. + creation_time: Returns the creation time of the AutoML job. + last_modified_time: Returns the job's last modified time. + auto_ml_job_status: Returns the status of the AutoML job. + auto_ml_job_secondary_status: Returns the secondary status of the AutoML job. + auto_ml_job_objective: Returns the job's objective. + problem_type: Returns the job's problem type. + auto_ml_job_config: Returns the configuration for the AutoML job. + end_time: Returns the end time of the AutoML job. + failure_reason: Returns the failure reason for an AutoML job, when applicable. + partial_failure_reasons: Returns a list of reasons for partial failures within an AutoML job. + best_candidate: The best model candidate selected by SageMaker AI Autopilot using both the best objective metric and lowest InferenceLatency for an experiment. + generate_candidate_definitions_only: Indicates whether the output for an AutoML job generates candidate definitions only. + auto_ml_job_artifacts: Returns information on the job's artifacts found in AutoMLJobArtifacts. + resolved_attributes: Contains ProblemType, AutoMLJobObjective, and CompletionCriteria. If you do not provide these values, they are inferred. + model_deploy_config: Indicates whether the model was deployed automatically to an endpoint and the name of that endpoint if deployed automatically. + model_deploy_result: Provides information about endpoint for the model deployment. + """ - - capacity_schedule_arn: Optional[StrPipeVar] = Unassigned() - owner_account_id: Optional[StrPipeVar] = Unassigned() - capacity_schedule_type: Optional[StrPipeVar] = Unassigned() - instance_type: Optional[StrPipeVar] = Unassigned() - total_instance_count: Optional[int] = Unassigned() - available_instance_count: Optional[int] = Unassigned() - placement: Optional[StrPipeVar] = Unassigned() - availability_zone: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - requested_start_time: Optional[datetime.datetime] = Unassigned() - requested_end_time: Optional[datetime.datetime] = Unassigned() - start_time: Optional[datetime.datetime] = Unassigned() + auto_ml_job_name: StrPipeVar + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + input_data_config: Optional[List[AutoMLChannel]] = Unassigned() + output_data_config: Optional[AutoMLOutputDataConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() + problem_type: Optional[StrPipeVar] = Unassigned() + auto_ml_job_config: Optional[AutoMLJobConfig] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() end_time: Optional[datetime.datetime] = Unassigned() - duration_in_hours: Optional[int] = Unassigned() - capacity_block_offerings: Optional[List[CapacityBlockOffering]] = Unassigned() - capacity_resources: Optional[CapacityResources] = Unassigned() - target_resources: Optional[List[StrPipeVar]] = Unassigned() - capacity_schedule_status_transitions: Optional[List[CapacityScheduleStatusTransition]] = ( - Unassigned() - ) - + last_modified_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + partial_failure_reasons: Optional[List[AutoMLPartialFailureReason]] = Unassigned() + best_candidate: Optional[AutoMLCandidate] = Unassigned() + auto_ml_job_status: Optional[StrPipeVar] = Unassigned() + auto_ml_job_secondary_status: Optional[StrPipeVar] = Unassigned() + generate_candidate_definitions_only: Optional[bool] = Unassigned() + auto_ml_job_artifacts: Optional[AutoMLJobArtifacts] = Unassigned() + resolved_attributes: Optional[ResolvedAttributes] = Unassigned() + model_deploy_config: Optional[ModelDeployConfig] = Unassigned() + model_deploy_result: Optional[ModelDeployResult] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "capacity_schedule_name" - resource_name_split = resource_name.split("_") + resource_name = 'auto_ml_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object capacity_schedule") + logger.error("Name attribute not found for object auto_ml_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "output_data_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "auto_ml_job_config": { + "security_config": { + "volume_kms_key_id": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "candidate_generation_config": { + "feature_specification_s3_uri": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "AutoMLJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - capacity_schedule_name: StrPipeVar, - capacity_schedule_offering_id: StrPipeVar, - target_services: Optional[List[StrPipeVar]] = Unassigned(), - max_wait_time_in_seconds: Optional[int] = Unassigned(), + auto_ml_job_name: StrPipeVar, + input_data_config: List[AutoMLChannel], + output_data_config: AutoMLOutputDataConfig, + role_arn: StrPipeVar, + problem_type: Optional[StrPipeVar] = Unassigned(), + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned(), + auto_ml_job_config: Optional[AutoMLJobConfig] = Unassigned(), + generate_candidate_definitions_only: Optional[bool] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + model_deploy_config: Optional[ModelDeployConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["CapacitySchedule"]: + ) -> Optional["AutoMLJob"]: """ - Create a CapacitySchedule resource - + Create a AutoMLJob resource + Parameters: - capacity_schedule_name: - capacity_schedule_offering_id: - target_services: - max_wait_time_in_seconds: + auto_ml_job_name: Identifies an Autopilot job. The name must be unique to your account and is case insensitive. + input_data_config: An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to InputDataConfig supported by HyperParameterTrainingJobDefinition. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset. + output_data_config: Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV. + role_arn: The ARN of the role that is used to access the data. + problem_type: Defines the type of supervised learning problem available for the candidates. For more information, see SageMaker Autopilot problem types. + auto_ml_job_objective: Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See AutoMLJobObjective for the default values. + auto_ml_job_config: A collection of settings used to configure an AutoML job. + generate_candidate_definitions_only: Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings. + 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 ServicesResources. Tag keys must be unique per resource. + model_deploy_config: Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. session: Boto3 session. region: Region name. - + Returns: - The CapacitySchedule resource. - + The AutoMLJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -3942,62 +3624,61 @@ def create( ``` ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating capacity_schedule resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CapacityScheduleName": capacity_schedule_name, - "CapacityScheduleOfferingId": capacity_schedule_offering_id, - "TargetServices": target_services, - "MaxWaitTimeInSeconds": max_wait_time_in_seconds, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="CapacitySchedule", operation_input_args=operation_input_args - ) - + + logger.info("Creating auto_ml_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AutoMLJobName': auto_ml_job_name, + 'InputDataConfig': input_data_config, + 'OutputDataConfig': output_data_config, + 'ProblemType': problem_type, + 'AutoMLJobObjective': auto_ml_job_objective, + 'AutoMLJobConfig': auto_ml_job_config, + 'RoleArn': role_arn, + 'GenerateCandidateDefinitionsOnly': generate_candidate_definitions_only, + 'Tags': tags, + 'ModelDeployConfig': model_deploy_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='AutoMLJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_capacity_schedule(**operation_input_args) + response = client.create_auto_ml_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - capacity_schedule_name=capacity_schedule_name, session=session, region=region - ) - + + return cls.get(auto_ml_job_name=auto_ml_job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - capacity_schedule_name: StrPipeVar, + auto_ml_job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["CapacitySchedule"]: + ) -> Optional["AutoMLJob"]: """ - Get a CapacitySchedule resource - + Get a AutoMLJob resource + Parameters: - capacity_schedule_name: + auto_ml_job_name: Requests information about an AutoML job using its unique name. session: Boto3 session. region: Region name. - + Returns: - The CapacitySchedule resource. - + The AutoMLJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4008,39 +3689,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CapacityScheduleName": capacity_schedule_name, + 'AutoMLJobName': auto_ml_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_capacity_schedule(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_auto_ml_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeCapacityScheduleResponse") - capacity_schedule = cls(**transformed_response) - return capacity_schedule - + transformed_response = transform(response, 'DescribeAutoMLJobResponse') + auto_ml_job = cls(**transformed_response) + return auto_ml_job + @Base.add_validate_call def refresh( self, - capacity_schedule_name: StrPipeVar, - ) -> Optional["CapacitySchedule"]: + + ) -> Optional["AutoMLJob"]: """ - Refresh a CapacitySchedule resource - + Refresh a AutoMLJob resource + Returns: - The CapacitySchedule resource. - + The AutoMLJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4051,43 +3730,28 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CapacityScheduleName": capacity_schedule_name, + 'AutoMLJobName': self.auto_ml_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_capacity_schedule(**operation_input_args) - + response = client.describe_auto_ml_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeCapacityScheduleResponse", self) + transform(response, 'DescribeAutoMLJobResponse', self) return self - + @Base.add_validate_call - def update( - self, - capacity_schedule_name: StrPipeVar, - max_wait_time_in_seconds: Optional[int] = Unassigned(), - requested_start_time: Optional[datetime.datetime] = Unassigned(), - requested_end_time: Optional[datetime.datetime] = Unassigned(), - instance_count: Optional[int] = Unassigned(), - ) -> Optional["CapacitySchedule"]: + def stop(self) -> None: """ - Update a CapacitySchedule resource - - Parameters: - capacity_schedule_name: - max_wait_time_in_seconds: - instance_count: - - Returns: - The CapacitySchedule resource. - + Stop a AutoMLJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4096,150 +3760,180 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating capacity_schedule resource.") - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "CapacityScheduleName": capacity_schedule_name, - "MaxWaitTimeInSeconds": max_wait_time_in_seconds, - "RequestedStartTime": requested_start_time, - "RequestedEndTime": requested_end_time, - "InstanceCount": instance_count, + 'AutoMLJobName': self.auto_ml_job_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_capacity_schedule(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + + client.stop_auto_ml_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def stop(self) -> None: - """ - Stop a CapacitySchedule resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "CapacityScheduleName": self.capacity_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_capacity_schedule(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal[ - "Pending", - "Confirmed", - "Active", - "Updating", - "Stopping", - "Stopped", - "Rejected", - "Withdrawn", - ], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a CapacitySchedule resource to reach certain status. - + Wait for a AutoMLJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for CapacitySchedule to reach [bold]{target_status} status...") + progress.add_task("Waiting for AutoMLJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.status + current_status = self.auto_ml_job_status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="AutoMLJob", status=current_status, reason=self.failure_reason) + return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="CapacitySchedule", status=current_status - ) + raise TimeoutExceededError(resource_type="AutoMLJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @classmethod @Base.add_validate_call - def load( + def get_all( cls, - capacity_schedule_name: StrPipeVar, - capacity_resource_arn: StrPipeVar, - target_resources: List[StrPipeVar], + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["CapacitySchedule"]: + ) -> ResourceIterator["AutoMLJob"]: """ - Import a CapacitySchedule resource - + Get all AutoMLJob resources + Parameters: - capacity_schedule_name: - capacity_resource_arn: - target_resources: + creation_time_after: Request a list of jobs, using a filter for time. + creation_time_before: Request a list of jobs, using a filter for time. + last_modified_time_after: Request a list of jobs, using a filter for time. + last_modified_time_before: Request a list of jobs, using a filter for time. + name_contains: Request a list of jobs, using a search filter for name. + status_equals: Request a list of jobs, using a filter for status. + sort_order: The sort order for the results. The default is Descending. + sort_by: The parameter by which to sort the results. The default is Name. + max_results: Request a list of jobs up to a specified limit. + next_token: If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results. session: Boto3 session. region: Region name. - + Returns: - The CapacitySchedule resource. - + Iterator for listed AutoMLJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortOrder': sort_order, + 'SortBy': sort_by, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_auto_ml_jobs', + summaries_key='AutoMLJobSummaries', + summary_name='AutoMLJobSummary', + resource_cls=AutoMLJob, + list_method_kwargs=operation_input_args + ) + + + @Base.add_validate_call + def get_all_candidates( + self, + status_equals: Optional[StrPipeVar] = Unassigned(), + candidate_name_equals: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, + region: Optional[str] = None, + ) -> ResourceIterator[AutoMLCandidate]: + """ + List the candidates created for the job. + + Parameters: + status_equals: List the candidates for the job and filter by status. + candidate_name_equals: List the candidates for the job and filter by candidate name. + sort_order: The sort order for the results. The default is Ascending. + sort_by: The parameter by which to sort the results. The default is Descending. + max_results: List the job's candidates up to a specified limit. + next_token: If the previous response was truncated, you receive this token. Use it in your next request to receive the next set of results. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed AutoMLCandidate. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4248,162 +3942,205 @@ def load( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceAlreadyExists - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - - logger.info(f"Importing capacity_schedule resource.") - client = SageMakerClient( - session=session, region_name=region, service_name="sagemaker" - ).client - + + operation_input_args = { - "CapacityScheduleName": capacity_schedule_name, - "CapacityResourceArn": capacity_resource_arn, - "TargetResources": target_resources, + 'AutoMLJobName': self.auto_ml_job_name, + 'StatusEquals': status_equals, + 'CandidateNameEquals': candidate_name_equals, + 'SortOrder': sort_order, + 'SortBy': sort_by, } - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # import the resource - response = client.import_capacity_schedule(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - capacity_schedule_name=capacity_schedule_name, session=session, region=region + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + + return ResourceIterator( + client=client, + list_method='list_candidates_for_auto_ml_job', + summaries_key='Candidates', + summary_name='AutoMLCandidate', + resource_cls=AutoMLCandidate, + list_method_kwargs=operation_input_args ) -class Cluster(Base): +class AutoMLJobV2(Base): """ - Class representing resource Cluster - + Class representing resource AutoMLJobV2 + Attributes: - cluster_arn: The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. - cluster_status: The status of the SageMaker HyperPod cluster. - instance_groups: The instance groups of the SageMaker HyperPod cluster. - cluster_name: The name of the SageMaker HyperPod cluster. - creation_time: The time when the SageMaker Cluster is created. - failure_message: The failure message of the SageMaker HyperPod cluster. - restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster. - vpc_config: - orchestrator: The type of orchestrator used for the SageMaker HyperPod cluster. - resilience_config: - 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. - node_recovery: The node recovery mode configured for the SageMaker HyperPod cluster. - node_provisioning_mode: The mode used for provisioning nodes in the cluster. - cluster_role: The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations. - auto_scaling: The current autoscaling configuration and status for the autoscaler. - custom_metadata: - + auto_ml_job_name: Returns the name of the AutoML job V2. + auto_ml_job_arn: Returns the Amazon Resource Name (ARN) of the AutoML job V2. + auto_ml_job_input_data_config: Returns an array of channel objects describing the input data and their location. + output_data_config: Returns the job's output data config. + role_arn: The ARN of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. + creation_time: Returns the creation time of the AutoML job V2. + last_modified_time: Returns the job's last modified time. + auto_ml_job_status: Returns the status of the AutoML job V2. + auto_ml_job_secondary_status: Returns the secondary status of the AutoML job V2. + auto_ml_job_objective: Returns the job's objective. + auto_ml_problem_type_config: Returns the configuration settings of the problem type set for the AutoML job V2. + auto_ml_problem_type_config_name: Returns the name of the problem type configuration set for the AutoML job V2. + end_time: Returns the end time of the AutoML job V2. + failure_reason: Returns the reason for the failure of the AutoML job V2, when applicable. + partial_failure_reasons: Returns a list of reasons for partial failures within an AutoML job V2. + best_candidate: Information about the candidate produced by an AutoML training job V2, including its status, steps, and other properties. + auto_ml_job_artifacts: + resolved_attributes: Returns the resolved attributes used by the AutoML job V2. + model_deploy_config: Indicates whether the model was deployed automatically to an endpoint and the name of that endpoint if deployed automatically. + model_deploy_result: Provides information about endpoint for the model deployment. + data_split_config: Returns the configuration settings of how the data are split into train and validation datasets. + security_config: Returns the security configuration for traffic encryption or Amazon VPC settings. + auto_ml_compute_config: The compute configuration used for the AutoML job V2. + """ - - cluster_name: StrPipeVar - cluster_arn: Optional[StrPipeVar] = Unassigned() - cluster_status: Optional[StrPipeVar] = Unassigned() + auto_ml_job_name: StrPipeVar + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_input_data_config: Optional[List[AutoMLJobChannel]] = Unassigned() + output_data_config: Optional[AutoMLOutputDataConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() + auto_ml_problem_type_config: Optional[AutoMLProblemTypeConfig] = Unassigned() + auto_ml_problem_type_config_name: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - failure_message: Optional[StrPipeVar] = Unassigned() - instance_groups: Optional[List[ClusterInstanceGroupDetails]] = Unassigned() - restricted_instance_groups: Optional[List[ClusterRestrictedInstanceGroupDetails]] = Unassigned() - vpc_config: Optional[VpcConfig] = Unassigned() - orchestrator: Optional[ClusterOrchestrator] = Unassigned() - resilience_config: Optional[ClusterResilienceConfig] = Unassigned() - tiered_storage_config: Optional[ClusterTieredStorageConfig] = Unassigned() - node_recovery: Optional[StrPipeVar] = Unassigned() - node_provisioning_mode: Optional[StrPipeVar] = Unassigned() - cluster_role: Optional[StrPipeVar] = Unassigned() - auto_scaling: Optional[ClusterAutoScalingConfigOutput] = Unassigned() - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - + end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + partial_failure_reasons: Optional[List[AutoMLPartialFailureReason]] = Unassigned() + best_candidate: Optional[AutoMLCandidate] = Unassigned() + auto_ml_job_status: Optional[StrPipeVar] = Unassigned() + auto_ml_job_secondary_status: Optional[StrPipeVar] = Unassigned() + auto_ml_job_artifacts: Optional[AutoMLJobArtifacts] = Unassigned() + resolved_attributes: Optional[AutoMLResolvedAttributes] = Unassigned() + model_deploy_config: Optional[ModelDeployConfig] = Unassigned() + model_deploy_result: Optional[ModelDeployResult] = Unassigned() + data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned() + security_config: Optional[AutoMLSecurityConfig] = Unassigned() + auto_ml_compute_config: Optional[AutoMLComputeConfig] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "cluster_name" - resource_name_split = resource_name.split("_") + resource_name = 'auto_ml_job_v2_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object cluster") + logger.error("Name attribute not found for object auto_ml_job_v2") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, + config_schema_for_resource = \ + { + "output_data_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "auto_ml_problem_type_config": { + "time_series_forecasting_job_config": { + "feature_specification_s3_uri": { + "type": "string" + } + }, + "tabular_job_config": { + "feature_specification_s3_uri": { + "type": "string" + } + } + }, + "security_config": { + "volume_kms_key_id": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Cluster", **kwargs - ), - ) - + }, + "auto_ml_compute_config": { + "emr_serverless_compute_config": { + "execution_role_arn": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "AutoMLJobV2", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - cluster_name: StrPipeVar, - instance_groups: Optional[List[ClusterInstanceGroupSpecification]] = Unassigned(), - restricted_instance_groups: Optional[ - List[ClusterRestrictedInstanceGroupSpecification] - ] = Unassigned(), - vpc_config: Optional[VpcConfig] = Unassigned(), + auto_ml_job_name: StrPipeVar, + auto_ml_job_input_data_config: List[AutoMLJobChannel], + output_data_config: AutoMLOutputDataConfig, + auto_ml_problem_type_config: AutoMLProblemTypeConfig, + role_arn: StrPipeVar, tags: Optional[List[Tag]] = Unassigned(), - orchestrator: Optional[ClusterOrchestrator] = Unassigned(), - resilience_config: Optional[ClusterResilienceConfig] = Unassigned(), - node_recovery: Optional[StrPipeVar] = Unassigned(), - tiered_storage_config: Optional[ClusterTieredStorageConfig] = Unassigned(), - node_provisioning_mode: Optional[StrPipeVar] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), - cluster_role: Optional[StrPipeVar] = Unassigned(), - auto_scaling: Optional[ClusterAutoScalingConfig] = Unassigned(), - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + security_config: Optional[AutoMLSecurityConfig] = Unassigned(), + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned(), + model_deploy_config: Optional[ModelDeployConfig] = Unassigned(), + data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned(), + auto_ml_compute_config: Optional[AutoMLComputeConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Cluster"]: + ) -> Optional["AutoMLJobV2"]: """ - Create a Cluster resource - + Create a AutoMLJobV2 resource + Parameters: - cluster_name: The name for the new SageMaker HyperPod cluster. - instance_groups: The instance groups to be created in the SageMaker HyperPod cluster. - restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster. - 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. - 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. - 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. - resilience_config: - 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. - 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. - 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. - dry_run: - 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. - auto_scaling: The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system. - custom_metadata: + auto_ml_job_name: Identifies an Autopilot job. The name must be unique to your account and is case insensitive. + auto_ml_job_input_data_config: An array of channel objects describing the input data and their location. Each channel is a named input source. Similar to the InputDataConfig attribute in the CreateAutoMLJob input parameters. The supported formats depend on the problem type: For tabular problem types: S3Prefix, ManifestFile. For image classification: S3Prefix, ManifestFile, AugmentedManifestFile. For text classification: S3Prefix. For time-series forecasting: S3Prefix. For text generation (LLMs fine-tuning): S3Prefix. + output_data_config: Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. + auto_ml_problem_type_config: Defines the configuration settings of one of the supported problem types. + role_arn: The ARN of the role that is used to access the data. + tags: An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, such as by purpose, owner, or environment. For more information, see Tagging Amazon Web ServicesResources. Tag keys must be unique per resource. + security_config: The security configuration for traffic encryption or Amazon VPC settings. + auto_ml_job_objective: Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. For the list of default values per problem type, see AutoMLJobObjective. For tabular problem types: You must either provide both the AutoMLJobObjective and indicate the type of supervised learning problem in AutoMLProblemTypeConfig (TabularJobConfig.ProblemType), or none at all. For text generation problem types (LLMs fine-tuning): Fine-tuning language models in Autopilot does not require setting the AutoMLJobObjective field. Autopilot fine-tunes LLMs without requiring multiple candidates to be trained and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your target model to enhance a default objective metric, the cross-entropy loss. After fine-tuning a language model, you can evaluate the quality of its generated text using different metrics. For a list of the available metrics, see Metrics for fine-tuning LLMs in Autopilot. + model_deploy_config: Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. + data_split_config: This structure specifies how to split the data into train and validation datasets. The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size. This attribute must not be set for the time-series forecasting problem type, as Autopilot automatically splits the input dataset into training and validation sets. + auto_ml_compute_config: Specifies the compute configuration for the AutoML job V2. session: Boto3 session. region: Region name. - + Returns: - The Cluster resource. - + The AutoMLJobV2 resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4412,51 +4149,354 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - DryRunOperation ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating cluster resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating auto_ml_job_v2 resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'AutoMLJobName': auto_ml_job_name, + 'AutoMLJobInputDataConfig': auto_ml_job_input_data_config, + 'OutputDataConfig': output_data_config, + 'AutoMLProblemTypeConfig': auto_ml_problem_type_config, + 'RoleArn': role_arn, + 'Tags': tags, + 'SecurityConfig': security_config, + 'AutoMLJobObjective': auto_ml_job_objective, + 'ModelDeployConfig': model_deploy_config, + 'DataSplitConfig': data_split_config, + 'AutoMLComputeConfig': auto_ml_compute_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='AutoMLJobV2', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.create_auto_ml_job_v2(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(auto_ml_job_name=auto_ml_job_name, session=session, region=region) + + @classmethod + @Base.add_validate_call + def get( + cls, + auto_ml_job_name: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["AutoMLJobV2"]: + """ + Get a AutoMLJobV2 resource + + Parameters: + auto_ml_job_name: Requests information about an AutoML job V2 using its unique name. + session: Boto3 session. + region: Region name. + + Returns: + The AutoMLJobV2 resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + operation_input_args = { - "ClusterName": cluster_name, - "InstanceGroups": instance_groups, - "RestrictedInstanceGroups": restricted_instance_groups, - "VpcConfig": vpc_config, - "Tags": tags, - "Orchestrator": orchestrator, - "ResilienceConfig": resilience_config, - "NodeRecovery": node_recovery, - "TieredStorageConfig": tiered_storage_config, - "NodeProvisioningMode": node_provisioning_mode, - "DryRun": dry_run, - "ClusterRole": cluster_role, - "AutoScaling": auto_scaling, - "CustomMetadata": custom_metadata, + 'AutoMLJobName': auto_ml_job_name, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Cluster", operation_input_args=operation_input_args + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_auto_ml_job_v2(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeAutoMLJobV2Response') + auto_ml_job_v2 = cls(**transformed_response) + return auto_ml_job_v2 + + @Base.add_validate_call + def refresh( + self, + + ) -> Optional["AutoMLJobV2"]: + """ + Refresh a AutoMLJobV2 resource + + Returns: + The AutoMLJobV2 resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'AutoMLJobName': self.auto_ml_job_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_auto_ml_job_v2(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeAutoMLJobV2Response', self) + return self + + @Base.add_validate_call + def wait( + self, + poll: int = 5, + timeout: Optional[int] = None, + + ) -> None: + """ + Wait for a AutoMLJobV2 resource. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) + progress.add_task("Waiting for AutoMLJobV2...") + status = Status("Current status:") + + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.auto_ml_job_status + status.update(f"Current status: [bold]{current_status}") + + if current_status in terminal_states: + logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="AutoMLJobV2", status=current_status, reason=self.failure_reason) + + return + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="AutoMLJobV2", status=current_status, message="Increase the timeout and try again.") + time.sleep(poll) + + +class Cluster(Base): + """ + Class representing resource Cluster + + Attributes: + cluster_arn: The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. + cluster_status: The status of the SageMaker HyperPod cluster. + instance_groups: The instance groups of the SageMaker HyperPod cluster. + cluster_name: The name of the SageMaker HyperPod cluster. + creation_time: The time when the SageMaker Cluster is created. + failure_message: The failure message of the SageMaker HyperPod cluster. + restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster. + vpc_config: + orchestrator: The type of orchestrator used for the SageMaker HyperPod cluster. + 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. + node_recovery: The node recovery mode configured for the SageMaker HyperPod cluster. + node_provisioning_mode: The mode used for provisioning nodes in the cluster. + cluster_role: The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations. + auto_scaling: The current autoscaling configuration and status for the autoscaler. + + """ + cluster_name: StrPipeVar + cluster_arn: Optional[StrPipeVar] = Unassigned() + cluster_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + failure_message: Optional[StrPipeVar] = Unassigned() + instance_groups: Optional[List[ClusterInstanceGroupDetails]] = Unassigned() + restricted_instance_groups: Optional[List[ClusterRestrictedInstanceGroupDetails]] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + orchestrator: Optional[ClusterOrchestrator] = Unassigned() + tiered_storage_config: Optional[ClusterTieredStorageConfig] = Unassigned() + node_recovery: Optional[StrPipeVar] = Unassigned() + node_provisioning_mode: Optional[StrPipeVar] = Unassigned() + cluster_role: Optional[StrPipeVar] = Unassigned() + auto_scaling: Optional[ClusterAutoScalingConfigOutput] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'cluster_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object cluster") + return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "cluster_role": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Cluster", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator + @Base.add_validate_call + def create( + cls, + cluster_name: StrPipeVar, + instance_groups: Optional[List[ClusterInstanceGroupSpecification]] = Unassigned(), + restricted_instance_groups: Optional[List[ClusterRestrictedInstanceGroupSpecification]] = Unassigned(), + vpc_config: Optional[VpcConfig] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + orchestrator: Optional[ClusterOrchestrator] = Unassigned(), + node_recovery: Optional[StrPipeVar] = Unassigned(), + tiered_storage_config: Optional[ClusterTieredStorageConfig] = Unassigned(), + node_provisioning_mode: Optional[StrPipeVar] = Unassigned(), + cluster_role: Optional[StrPipeVar] = Unassigned(), + auto_scaling: Optional[ClusterAutoScalingConfig] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["Cluster"]: + """ + Create a Cluster resource + + Parameters: + cluster_name: The name for the new SageMaker HyperPod cluster. + instance_groups: The instance groups to be created in the SageMaker HyperPod cluster. + restricted_instance_groups: The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster. + 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. + 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. + orchestrator: The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, supported values are "Eks" and "Slurm", which is to use an Amazon Elastic Kubernetes Service or Slurm cluster as the orchestrator. If you specify the Orchestrator field, you must provide exactly one orchestrator configuration: either Eks or Slurm. Specifying both or providing an empty configuration returns a validation error. + 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. + 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. + 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. + 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. + auto_scaling: The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system. + session: Boto3 session. + region: Region name. + + Returns: + The Cluster resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + """ + + logger.info("Creating cluster resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ClusterName': cluster_name, + 'InstanceGroups': instance_groups, + 'RestrictedInstanceGroups': restricted_instance_groups, + 'VpcConfig': vpc_config, + 'Tags': tags, + 'Orchestrator': orchestrator, + 'NodeRecovery': node_recovery, + 'TieredStorageConfig': tiered_storage_config, + 'NodeProvisioningMode': node_provisioning_mode, + 'ClusterRole': cluster_role, + 'AutoScaling': auto_scaling, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Cluster', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_cluster(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(cluster_name=cluster_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -4467,17 +4507,17 @@ def get( ) -> Optional["Cluster"]: """ Get a Cluster resource - + Parameters: cluster_name: The string name or the Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. session: Boto3 session. region: Region name. - + Returns: The Cluster resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4488,38 +4528,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ClusterName": cluster_name, + 'ClusterName': cluster_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_cluster(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeClusterResponse") + transformed_response = transform(response, 'DescribeClusterResponse') cluster = cls(**transformed_response) return cluster - + @Base.add_validate_call def refresh( self, - ) -> Optional["Cluster"]: + + ) -> Optional["Cluster"]: """ Refresh a Cluster resource - + Returns: The Cluster resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4530,51 +4569,46 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ClusterName": self.cluster_name, + 'ClusterName': self.cluster_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_cluster(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeClusterResponse", self) + transform(response, 'DescribeClusterResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( self, instance_groups: Optional[List[ClusterInstanceGroupSpecification]] = Unassigned(), - restricted_instance_groups: Optional[ - List[ClusterRestrictedInstanceGroupSpecification] - ] = Unassigned(), - resilience_config: Optional[ClusterResilienceConfig] = Unassigned(), + restricted_instance_groups: Optional[List[ClusterRestrictedInstanceGroupSpecification]] = Unassigned(), tiered_storage_config: Optional[ClusterTieredStorageConfig] = Unassigned(), node_recovery: Optional[StrPipeVar] = Unassigned(), instance_groups_to_delete: Optional[List[StrPipeVar]] = Unassigned(), node_provisioning_mode: Optional[StrPipeVar] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), cluster_role: Optional[StrPipeVar] = Unassigned(), auto_scaling: Optional[ClusterAutoScalingConfig] = Unassigned(), - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + orchestrator: Optional[ClusterOrchestrator] = Unassigned(), ) -> Optional["Cluster"]: """ Update a Cluster resource - + Parameters: instance_groups_to_delete: Specify the names of the instance groups to delete. Use a single , as the separator between multiple names. - dry_run: - + Returns: The Cluster resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4584,50 +4618,47 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating cluster resource.") client = Base.get_sagemaker_client() - - operation_input_args = { - "ClusterName": self.cluster_name, - "InstanceGroups": instance_groups, - "RestrictedInstanceGroups": restricted_instance_groups, - "ResilienceConfig": resilience_config, - "TieredStorageConfig": tiered_storage_config, - "NodeRecovery": node_recovery, - "InstanceGroupsToDelete": instance_groups_to_delete, - "NodeProvisioningMode": node_provisioning_mode, - "DryRun": dry_run, - "ClusterRole": cluster_role, - "AutoScaling": auto_scaling, - "CustomMetadata": custom_metadata, + + operation_input_args = { + 'ClusterName': self.cluster_name, + 'InstanceGroups': instance_groups, + 'RestrictedInstanceGroups': restricted_instance_groups, + 'TieredStorageConfig': tiered_storage_config, + 'NodeRecovery': node_recovery, + 'InstanceGroupsToDelete': instance_groups_to_delete, + 'NodeProvisioningMode': node_provisioning_mode, + 'ClusterRole': cluster_role, + 'AutoScaling': auto_scaling, + 'Orchestrator': orchestrator, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_cluster(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - dry_run: Optional[bool] = Unassigned(), - ) -> None: + + ) -> None: """ Delete a Cluster resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4637,88 +4668,76 @@ def delete( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "ClusterName": self.cluster_name, - "DryRun": dry_run, + 'ClusterName': self.cluster_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_cluster(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Creating", - "Deleting", - "Failed", - "InService", - "RollingBack", - "SystemUpdating", - "Updating", - ], + target_status: Literal['Creating', 'Deleting', 'Failed', 'InService', 'RollingBack', 'SystemUpdating', 'Updating'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a Cluster resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for Cluster to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.cluster_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Cluster", status=current_status, reason="(Unknown)" - ) - + raise FailedStatusError(resource_type="Cluster", status=current_status, reason='(Unknown)') + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Cluster", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -4727,13 +4746,13 @@ def wait_for_delete( ) -> None: """ Wait for a Cluster resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4747,39 +4766,34 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for Cluster to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.cluster_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Cluster", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -4795,7 +4809,7 @@ def get_all( ) -> ResourceIterator["Cluster"]: """ Get all Cluster resources - + Parameters: 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. 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. @@ -4807,12 +4821,12 @@ def get_all( training_plan_arn: The Amazon Resource Name (ARN); of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . session: Boto3 session. region: Region name. - + Returns: Iterator for listed Cluster resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4822,33 +4836,32 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "TrainingPlanArn": training_plan_arn, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'TrainingPlanArn': training_plan_arn, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_clusters", - summaries_key="ClusterSummaries", - summary_name="ClusterSummary", + list_method='list_clusters', + summaries_key='ClusterSummaries', + summary_name='ClusterSummary', resource_cls=Cluster, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def get_node( self, @@ -4859,18 +4872,18 @@ def get_node( ) -> Optional[ClusterNodeDetails]: """ Retrieves information of a node (also called a instance interchangeably) of a SageMaker HyperPod cluster. - + Parameters: node_id: The ID of the SageMaker HyperPod cluster node. 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. session: Boto3 session. region: Region name. - + Returns: ClusterNodeDetails - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4881,27 +4894,27 @@ def get_node( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "ClusterName": self.cluster_name, - "NodeId": node_id, - "NodeLogicalId": node_logical_id, + 'ClusterName': self.cluster_name, + 'NodeId': node_id, + 'NodeLogicalId': node_logical_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling describe_cluster_node API") response = client.describe_cluster_node(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "DescribeClusterNodeResponse") + + transformed_response = transform(response, 'DescribeClusterNodeResponse') return ClusterNodeDetails(**transformed_response) - + + @Base.add_validate_call def get_all_nodes( self, @@ -4910,13 +4923,12 @@ def get_all_nodes( instance_group_name_contains: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - include_node_logical_ids: Optional[bool] = Unassigned(), - session: Optional[Session] = None, + include_node_logical_ids: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> ResourceIterator[ClusterNodeDetails]: """ Retrieves the list of instances (also called nodes interchangeably) in a SageMaker HyperPod cluster. - + Parameters: creation_time_after: A filter that returns nodes in a SageMaker HyperPod cluster created after the specified time. 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. creation_time_before: 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. @@ -4928,12 +4940,12 @@ def get_all_nodes( 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. session: Boto3 session. region: Region name. - + Returns: Iterator for listed ClusterNodeDetails. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -4944,54 +4956,53 @@ def get_all_nodes( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "ClusterName": self.cluster_name, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "InstanceGroupNameContains": instance_group_name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "IncludeNodeLogicalIds": include_node_logical_ids, + 'ClusterName': self.cluster_name, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'InstanceGroupNameContains': instance_group_name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'IncludeNodeLogicalIds': include_node_logical_ids, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_cluster_nodes", - summaries_key="ClusterNodeSummaries", - summary_name="ClusterNodeSummary", + list_method='list_cluster_nodes', + summaries_key='ClusterNodeSummaries', + summary_name='ClusterNodeSummary', resource_cls=ClusterNodeDetails, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def update_software( self, deployment_config: Optional[DeploymentConfiguration] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), image_id: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ Updates the platform software of a SageMaker HyperPod cluster for security patching. - + Parameters: deployment_config: The configuration to use when updating the AMI versions. - dry_run: 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. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5001,53 +5012,50 @@ def update_software( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "ClusterName": self.cluster_name, - "InstanceGroups": self.instance_groups, - "DeploymentConfig": deployment_config, - "DryRun": dry_run, - "ImageId": image_id, + 'ClusterName': self.cluster_name, + 'InstanceGroups': self.instance_groups, + 'DeploymentConfig': deployment_config, + 'ImageId': image_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling update_cluster_software API") response = client.update_cluster_software(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def batch_delete_nodes( self, node_ids: Optional[List[StrPipeVar]] = Unassigned(), node_logical_ids: Optional[List[StrPipeVar]] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> Optional[BatchDeleteClusterNodesResponse]: """ Deletes specific nodes within a SageMaker HyperPod cluster. - + Parameters: - 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. + 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. 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. - dry_run: session: Boto3 session. region: Region name. - + Returns: BatchDeleteClusterNodesResponse - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5056,50 +5064,40 @@ def batch_delete_nodes( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - DryRunOperation ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "ClusterName": self.cluster_name, - "NodeIds": node_ids, - "NodeLogicalIds": node_logical_ids, - "DryRun": dry_run, + 'ClusterName': self.cluster_name, + 'NodeIds': node_ids, + 'NodeLogicalIds': node_logical_ids, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling batch_delete_cluster_nodes API") response = client.batch_delete_cluster_nodes(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "BatchDeleteClusterNodesResponse") + + transformed_response = transform(response, 'BatchDeleteClusterNodesResponse') return BatchDeleteClusterNodesResponse(**transformed_response) class ClusterHealthCheck(Base): """ Class representing resource ClusterHealthCheck - - """ - - -class ClusterNode(Base): - """ - Class representing resource ClusterNode - + """ class ClusterSchedulerConfig(Base): """ Class representing resource ClusterSchedulerConfig - + Attributes: cluster_scheduler_config_arn: ARN of the cluster policy. cluster_scheduler_config_id: ID of the cluster policy. @@ -5108,21 +5106,22 @@ class ClusterSchedulerConfig(Base): status: Status of the cluster policy. creation_time: Creation time of the cluster policy. failure_reason: Failure reason of the cluster policy. + status_details: Additional details about the status of the cluster policy. This field provides context when the policy is in a non-active state, such as during creation, updates, or if failures occur. cluster_arn: ARN of the cluster where the cluster policy is applied. scheduler_config: Cluster policy configuration. This policy is used for task prioritization and fair-share allocation. This helps prioritize critical workloads and distributes idle compute across entities. description: Description of the cluster policy. - created_by: + created_by: last_modified_time: Last modified time of the cluster policy. - last_modified_by: - + last_modified_by: + """ - cluster_scheduler_config_id: StrPipeVar cluster_scheduler_config_arn: Optional[StrPipeVar] = Unassigned() name: Optional[StrPipeVar] = Unassigned() cluster_scheduler_config_version: Optional[int] = Unassigned() status: Optional[StrPipeVar] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() + status_details: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() cluster_arn: Optional[StrPipeVar] = Unassigned() scheduler_config: Optional[SchedulerConfig] = Unassigned() description: Optional[StrPipeVar] = Unassigned() @@ -5130,23 +5129,23 @@ class ClusterSchedulerConfig(Base): created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "cluster_scheduler_config_name" - resource_name_split = resource_name.split("_") + resource_name = 'cluster_scheduler_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object cluster_scheduler_config") return None - + @classmethod @Base.add_validate_call def create( @@ -5156,28 +5155,26 @@ def create( scheduler_config: SchedulerConfig, description: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, ) -> Optional["ClusterSchedulerConfig"]: """ Create a ClusterSchedulerConfig resource - + Parameters: name: Name for the cluster policy. cluster_arn: ARN of the cluster. scheduler_config: Configuration about the monitoring schedule. description: Description of the cluster policy. tags: Tags of the cluster policy. - dry_run: session: Boto3 session. region: Region name. - + Returns: The ClusterSchedulerConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5187,46 +5184,36 @@ def create( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating cluster_scheduler_config resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "Name": name, - "ClusterArn": cluster_arn, - "SchedulerConfig": scheduler_config, - "Description": description, - "Tags": tags, - "DryRun": dry_run, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ClusterSchedulerConfig", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Name': name, + 'ClusterArn': cluster_arn, + 'SchedulerConfig': scheduler_config, + 'Description': description, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ClusterSchedulerConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_cluster_scheduler_config(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - cluster_scheduler_config_id=response["ClusterSchedulerConfigId"], - session=session, - region=region, - ) - + + return cls.get(cluster_scheduler_config_id=response['ClusterSchedulerConfigId'], session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -5238,18 +5225,18 @@ def get( ) -> Optional["ClusterSchedulerConfig"]: """ Get a ClusterSchedulerConfig resource - + Parameters: cluster_scheduler_config_id: ID of the cluster policy. cluster_scheduler_config_version: Version of the cluster policy. session: Boto3 session. region: Region name. - + Returns: The ClusterSchedulerConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5260,39 +5247,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ClusterSchedulerConfigId": cluster_scheduler_config_id, - "ClusterSchedulerConfigVersion": cluster_scheduler_config_version, + 'ClusterSchedulerConfigId': cluster_scheduler_config_id, + 'ClusterSchedulerConfigVersion': cluster_scheduler_config_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_cluster_scheduler_config(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeClusterSchedulerConfigResponse") + transformed_response = transform(response, 'DescribeClusterSchedulerConfigResponse') cluster_scheduler_config = cls(**transformed_response) return cluster_scheduler_config - + @Base.add_validate_call def refresh( self, - ) -> Optional["ClusterSchedulerConfig"]: + + ) -> Optional["ClusterSchedulerConfig"]: """ Refresh a ClusterSchedulerConfig resource - + Returns: The ClusterSchedulerConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5303,42 +5289,40 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ClusterSchedulerConfigId": self.cluster_scheduler_config_id, - "ClusterSchedulerConfigVersion": self.cluster_scheduler_config_version, + 'ClusterSchedulerConfigId': self.cluster_scheduler_config_id, + 'ClusterSchedulerConfigVersion': self.cluster_scheduler_config_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_cluster_scheduler_config(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeClusterSchedulerConfigResponse", self) + transform(response, 'DescribeClusterSchedulerConfigResponse', self) return self - + @Base.add_validate_call def update( self, target_version: int, scheduler_config: Optional[SchedulerConfig] = Unassigned(), description: Optional[StrPipeVar] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), ) -> Optional["ClusterSchedulerConfig"]: """ Update a ClusterSchedulerConfig resource - + Parameters: target_version: Target version. - dry_run: - + Returns: The ClusterSchedulerConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5348,43 +5332,41 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating cluster_scheduler_config resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "ClusterSchedulerConfigId": self.cluster_scheduler_config_id, - "TargetVersion": target_version, - "SchedulerConfig": scheduler_config, - "Description": description, - "DryRun": dry_run, + 'ClusterSchedulerConfigId': self.cluster_scheduler_config_id, + 'TargetVersion': target_version, + 'SchedulerConfig': scheduler_config, + 'Description': description, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_cluster_scheduler_config(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - dry_run: Optional[bool] = Unassigned(), - ) -> None: + + ) -> None: """ Delete a ClusterSchedulerConfig resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5393,99 +5375,76 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - DryRunOperation ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "ClusterSchedulerConfigId": self.cluster_scheduler_config_id, - "DryRun": dry_run, + 'ClusterSchedulerConfigId': self.cluster_scheduler_config_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_cluster_scheduler_config(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Creating", - "CreateFailed", - "CreateRollbackFailed", - "Created", - "Updating", - "UpdateFailed", - "UpdateRollbackFailed", - "Updated", - "Deleting", - "DeleteFailed", - "DeleteRollbackFailed", - "Deleted", - ], + target_status: Literal['Creating', 'CreateFailed', 'CreateRollbackFailed', 'Created', 'Updating', 'UpdateFailed', 'UpdateRollbackFailed', 'Updated', 'Deleting', 'DeleteFailed', 'DeleteRollbackFailed', 'Deleted'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a ClusterSchedulerConfig resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task( - f"Waiting for ClusterSchedulerConfig to reach [bold]{target_status} status..." - ) + progress.add_task(f"Waiting for ClusterSchedulerConfig to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ClusterSchedulerConfig", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="ClusterSchedulerConfig", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ClusterSchedulerConfig", status=current_status - ) + raise TimeoutExceededError(resource_type="ClusterSchedulerConfig", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -5494,13 +5453,13 @@ def wait_for_delete( ) -> None: """ Wait for a ClusterSchedulerConfig resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5514,45 +5473,38 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for ClusterSchedulerConfig to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + + if current_status.lower() == "deleted": logger.info("Resource was deleted.") return - + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ClusterSchedulerConfig", status=current_status - ) + raise TimeoutExceededError(resource_type="ClusterSchedulerConfig", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -5569,7 +5521,7 @@ def get_all( ) -> ResourceIterator["ClusterSchedulerConfig"]: """ Get all ClusterSchedulerConfig resources - + Parameters: created_after: Filter for after this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. created_before: Filter for before this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. @@ -5582,12 +5534,12 @@ def get_all( max_results: The maximum number of cluster policies to list. session: Boto3 session. region: Region name. - + Returns: Iterator for listed ClusterSchedulerConfig resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5597,70 +5549,67 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "NameContains": name_contains, - "ClusterArn": cluster_arn, - "Status": status, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'NameContains': name_contains, + 'ClusterArn': cluster_arn, + 'Status': status, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_cluster_scheduler_configs", - summaries_key="ClusterSchedulerConfigSummaries", - summary_name="ClusterSchedulerConfigSummary", + list_method='list_cluster_scheduler_configs', + summaries_key='ClusterSchedulerConfigSummaries', + summary_name='ClusterSchedulerConfigSummary', resource_cls=ClusterSchedulerConfig, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class CodeRepository(Base): """ Class representing resource CodeRepository - + Attributes: code_repository_name: The name of the Git repository. code_repository_arn: The Amazon Resource Name (ARN) of the Git repository. creation_time: The date and time that the repository was created. last_modified_time: The date and time that the repository was last changed. git_config: Configuration details about the repository, including the URL where the repository is located, the default branch, and the Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the repository. - + """ - code_repository_name: StrPipeVar code_repository_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() git_config: Optional[GitConfig] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "code_repository_name" - resource_name_split = resource_name.split("_") + resource_name = 'code_repository_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object code_repository") return None - + @classmethod @Base.add_validate_call def create( @@ -5673,19 +5622,19 @@ def create( ) -> Optional["CodeRepository"]: """ Create a CodeRepository resource - + Parameters: code_repository_name: The name of the Git repository. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). git_config: Specifies details about the repository, including the URL where the repository is located, the default branch, and credentials to use to access the repository. 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. session: Boto3 session. region: Region name. - + Returns: The CodeRepository resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5698,33 +5647,29 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating code_repository resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "CodeRepositoryName": code_repository_name, - "GitConfig": git_config, - "Tags": tags, + 'CodeRepositoryName': code_repository_name, + 'GitConfig': git_config, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="CodeRepository", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='CodeRepository', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_code_repository(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(code_repository_name=code_repository_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -5735,17 +5680,17 @@ def get( ) -> Optional["CodeRepository"]: """ Get a CodeRepository resource - + Parameters: code_repository_name: The name of the Git repository to describe. session: Boto3 session. region: Region name. - + Returns: The CodeRepository resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5755,38 +5700,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "CodeRepositoryName": code_repository_name, + 'CodeRepositoryName': code_repository_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_code_repository(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeCodeRepositoryOutput") + transformed_response = transform(response, 'DescribeCodeRepositoryOutput') code_repository = cls(**transformed_response) return code_repository - + @Base.add_validate_call def refresh( self, - ) -> Optional["CodeRepository"]: + + ) -> Optional["CodeRepository"]: """ Refresh a CodeRepository resource - + Returns: The CodeRepository resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5796,21 +5740,21 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "CodeRepositoryName": self.code_repository_name, + 'CodeRepositoryName': self.code_repository_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_code_repository(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeCodeRepositoryOutput", self) + transform(response, 'DescribeCodeRepositoryOutput', self) return self - + @Base.add_validate_call def update( self, @@ -5818,12 +5762,12 @@ def update( ) -> Optional["CodeRepository"]: """ Update a CodeRepository resource - + Returns: The CodeRepository resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5834,35 +5778,36 @@ def update( ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - + logger.info("Updating code_repository resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "CodeRepositoryName": self.code_repository_name, - "GitConfig": git_config, + 'CodeRepositoryName': self.code_repository_name, + 'GitConfig': git_config, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_code_repository(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a CodeRepository resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5872,20 +5817,20 @@ def delete( error_code = e.response['Error']['Code'] ``` """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "CodeRepositoryName": self.code_repository_name, + 'CodeRepositoryName': self.code_repository_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_code_repository(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -5896,13 +5841,12 @@ def get_all( last_modified_time_before: Optional[datetime.datetime] = Unassigned(), name_contains: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> ResourceIterator["CodeRepository"]: """ Gets a list of the Git repositories in your account. - + Parameters: creation_time_after: A filter that returns only Git repositories that were created after the specified time. creation_time_before: A filter that returns only Git repositories that were created before the specified time. @@ -5915,12 +5859,12 @@ def get_all( sort_order: The sort order for results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: Iterator for listed CodeRepository. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -5930,38 +5874,38 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_code_repositories", - summaries_key="CodeRepositorySummaryList", - summary_name="CodeRepositorySummary", + list_method='list_code_repositories', + summaries_key='CodeRepositorySummaryList', + summary_name='CodeRepositorySummary', resource_cls=CodeRepository, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class CompilationJob(Base): """ Class representing resource CompilationJob - + Attributes: compilation_job_name: The name of the model compilation job. compilation_job_arn: The Amazon Resource Name (ARN) of the model compilation job. @@ -5969,22 +5913,20 @@ class CompilationJob(Base): stopping_condition: Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker AI ends the compilation job. Use this API to cap model training costs. creation_time: The time that the model compilation job was created. last_modified_time: The time that the status of the model compilation job was last modified. - failure_reason: If a model compilation job failed, the reason it failed. + failure_reason: If a model compilation job failed, the reason it failed. model_artifacts: Information about the location in Amazon S3 that has been configured for storing the model artifacts used in the compilation job. role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI assumes to perform the model compilation job. input_config: Information about the location in Amazon S3 of the input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained. output_config: Information about the output location for the compiled model and the target device that the model runs on. - compilation_start_time: The time when the model compilation job started the CompilationJob instances. You are billed for the time between this timestamp and the timestamp in the CompilationEndTime field. In Amazon CloudWatch Logs, the start time might be later than this time. That's because it takes time to download the compilation job, which depends on the size of the compilation job container. - compilation_end_time: The time when the model compilation job on a compilation job instance ended. For a successful or stopped job, this is when the job's model artifacts have finished uploading. For a failed job, this is when Amazon SageMaker AI detected that the job failed. + compilation_start_time: The time when the model compilation job started the CompilationJob instances. You are billed for the time between this timestamp and the timestamp in the CompilationEndTime field. In Amazon CloudWatch Logs, the start time might be later than this time. That's because it takes time to download the compilation job, which depends on the size of the compilation job container. + compilation_end_time: The time when the model compilation job on a compilation job instance ended. For a successful or stopped job, this is when the job's model artifacts have finished uploading. For a failed job, this is when Amazon SageMaker AI detected that the job failed. inference_image: The inference image to use when compiling a model. Specify an image only if the target device is a cloud instance. model_package_version_arn: The Amazon Resource Name (ARN) of the versioned model package that was provided to SageMaker Neo when you initiated a compilation job. model_digests: Provides a BLAKE2 hash value that identifies the compiled model artifacts in Amazon S3. - resource_config: vpc_config: A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud. derived_information: Information that SageMaker Neo automatically derived about the model. - + """ - compilation_job_name: StrPipeVar compilation_job_arn: Optional[StrPipeVar] = Unassigned() compilation_job_status: Optional[StrPipeVar] = Unassigned() @@ -6001,51 +5943,70 @@ class CompilationJob(Base): role_arn: Optional[StrPipeVar] = Unassigned() input_config: Optional[InputConfig] = Unassigned() output_config: Optional[OutputConfig] = Unassigned() - resource_config: Optional[NeoResourceConfig] = Unassigned() vpc_config: Optional[NeoVpcConfig] = Unassigned() derived_information: Optional[DerivedInformation] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "compilation_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'compilation_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object compilation_job") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_artifacts": {"s3_model_artifacts": {"type": "string"}}, - "role_arn": {"type": "string"}, - "input_config": {"s3_uri": {"type": "string"}}, - "output_config": { - "s3_output_location": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, + config_schema_for_resource = \ + { + "model_artifacts": { + "s3_model_artifacts": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "CompilationJob", **kwargs - ), - ) - + }, + "role_arn": { + "type": "string" + }, + "input_config": { + "s3_uri": { + "type": "string" + } + }, + "output_config": { + "s3_output_location": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "CompilationJob", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -6057,7 +6018,6 @@ def create( stopping_condition: StoppingCondition, model_package_version_arn: Optional[StrPipeVar] = Unassigned(), input_config: Optional[InputConfig] = Unassigned(), - resource_config: Optional[NeoResourceConfig] = Unassigned(), vpc_config: Optional[NeoVpcConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, @@ -6065,25 +6025,24 @@ def create( ) -> Optional["CompilationJob"]: """ Create a CompilationJob resource - + Parameters: - compilation_job_name: A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account. - role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. During model compilation, Amazon SageMaker AI needs your permission to: Read input data from an S3 bucket Write model artifacts to an S3 bucket Write logs to Amazon CloudWatch Logs Publish metrics to Amazon CloudWatch You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles. + compilation_job_name: A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. During model compilation, Amazon SageMaker AI needs your permission to: Read input data from an S3 bucket Write model artifacts to an S3 bucket Write logs to Amazon CloudWatch Logs Publish metrics to Amazon CloudWatch You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles. output_config: Provides information about the output location for the compiled model and the target device the model runs on. stopping_condition: Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker AI ends the compilation job. Use this API to cap model training costs. model_package_version_arn: The Amazon Resource Name (ARN) of a versioned model package. Provide either a ModelPackageVersionArn or an InputConfig object in the request syntax. The presence of both objects in the CreateCompilationJob request will return an exception. input_config: Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained. - resource_config: vpc_config: A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation 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. session: Boto3 session. region: Region name. - + Returns: The CompilationJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6098,39 +6057,34 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating compilation_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CompilationJobName": compilation_job_name, - "RoleArn": role_arn, - "ModelPackageVersionArn": model_package_version_arn, - "InputConfig": input_config, - "OutputConfig": output_config, - "ResourceConfig": resource_config, - "VpcConfig": vpc_config, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="CompilationJob", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'CompilationJobName': compilation_job_name, + 'RoleArn': role_arn, + 'ModelPackageVersionArn': model_package_version_arn, + 'InputConfig': input_config, + 'OutputConfig': output_config, + 'VpcConfig': vpc_config, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='CompilationJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_compilation_job(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(compilation_job_name=compilation_job_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -6141,17 +6095,17 @@ def get( ) -> Optional["CompilationJob"]: """ Get a CompilationJob resource - + Parameters: compilation_job_name: The name of the model compilation job that you want information about. session: Boto3 session. region: Region name. - + Returns: The CompilationJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6162,38 +6116,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CompilationJobName": compilation_job_name, + 'CompilationJobName': compilation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_compilation_job(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeCompilationJobResponse") + transformed_response = transform(response, 'DescribeCompilationJobResponse') compilation_job = cls(**transformed_response) return compilation_job - + @Base.add_validate_call def refresh( self, - ) -> Optional["CompilationJob"]: + + ) -> Optional["CompilationJob"]: """ Refresh a CompilationJob resource - + Returns: The CompilationJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6204,30 +6157,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CompilationJobName": self.compilation_job_name, + 'CompilationJobName': self.compilation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_compilation_job(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeCompilationJobResponse", self) + transform(response, 'DescribeCompilationJobResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a CompilationJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6238,27 +6192,27 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "CompilationJobName": self.compilation_job_name, + 'CompilationJobName': self.compilation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_compilation_job(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def stop(self) -> None: """ Stop a CompilationJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6269,79 +6223,77 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "CompilationJobName": self.compilation_job_name, + 'CompilationJobName': self.compilation_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.stop_compilation_job(**operation_input_args) - + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait( self, poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ Wait for a CompilationJob resource. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - + """ - terminal_states = ["COMPLETED", "FAILED", "STOPPED"] + terminal_states = ['COMPLETED', 'FAILED', 'STOPPED'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for CompilationJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.compilation_job_status status.update(f"Current status: [bold]{current_status}") - + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="CompilationJob", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="CompilationJob", status=current_status, reason=self.failure_reason) + return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="CompilationJob", status=current_status) + raise TimeoutExceededError(resource_type="CompilationJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -6359,11 +6311,11 @@ def get_all( ) -> ResourceIterator["CompilationJob"]: """ Get all CompilationJob resources - + Parameters: next_token: If the result of the previous ListCompilationJobs request was truncated, the response includes a NextToken. To retrieve the next set of model compilation jobs, use the token in the next request. max_results: The maximum number of model compilation jobs to return in the response. - creation_time_after: A filter that returns the model compilation jobs that were created after a specified time. + creation_time_after: A filter that returns the model compilation jobs that were created after a specified time. creation_time_before: A filter that returns the model compilation jobs that were created before a specified time. last_modified_time_after: A filter that returns the model compilation jobs that were modified after a specified time. last_modified_time_before: A filter that returns the model compilation jobs that were modified before a specified time. @@ -6373,12 +6325,12 @@ def get_all( sort_order: The sort order for results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: Iterator for listed CompilationJob resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6388,40 +6340,38 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_compilation_jobs", - summaries_key="CompilationJobSummaries", - summary_name="CompilationJobSummary", + list_method='list_compilation_jobs', + summaries_key='CompilationJobSummaries', + summary_name='CompilationJobSummary', resource_cls=CompilationJob, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class ComputeQuota(Base): """ Class representing resource ComputeQuota - + Attributes: compute_quota_arn: ARN of the compute allocation definition. compute_quota_id: ID of the compute allocation definition. @@ -6435,12 +6385,11 @@ class ComputeQuota(Base): cluster_arn: ARN of the cluster. compute_quota_config: Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks. activation_state: The state of the compute allocation being described. Use to enable or disable compute allocation. Default is Enabled. - created_by: + created_by: last_modified_time: Last modified time of the compute allocation configuration. - last_modified_by: - + last_modified_by: + """ - compute_quota_id: StrPipeVar compute_quota_arn: Optional[StrPipeVar] = Unassigned() name: Optional[StrPipeVar] = Unassigned() @@ -6456,23 +6405,23 @@ class ComputeQuota(Base): created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "compute_quota_name" - resource_name_split = resource_name.split("_") + resource_name = 'compute_quota_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object compute_quota") return None - + @classmethod @Base.add_validate_call def create( @@ -6484,13 +6433,12 @@ def create( description: Optional[StrPipeVar] = Unassigned(), activation_state: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, ) -> Optional["ComputeQuota"]: """ Create a ComputeQuota resource - + Parameters: name: Name to the compute allocation definition. cluster_arn: ARN of the cluster. @@ -6499,15 +6447,14 @@ def create( description: Description of the compute allocation definition. activation_state: The state of the compute allocation being described. Use to enable or disable compute allocation. Default is Enabled. tags: Tags of the compute allocation definition. - dry_run: session: Boto3 session. region: Region name. - + Returns: The ComputeQuota resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6517,44 +6464,38 @@ def create( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating compute_quota resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "Name": name, - "Description": description, - "ClusterArn": cluster_arn, - "ComputeQuotaConfig": compute_quota_config, - "ComputeQuotaTarget": compute_quota_target, - "ActivationState": activation_state, - "Tags": tags, - "DryRun": dry_run, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ComputeQuota", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Name': name, + 'Description': description, + 'ClusterArn': cluster_arn, + 'ComputeQuotaConfig': compute_quota_config, + 'ComputeQuotaTarget': compute_quota_target, + 'ActivationState': activation_state, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ComputeQuota', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_compute_quota(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(compute_quota_id=response["ComputeQuotaId"], session=session, region=region) - + + return cls.get(compute_quota_id=response['ComputeQuotaId'], session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -6566,18 +6507,18 @@ def get( ) -> Optional["ComputeQuota"]: """ Get a ComputeQuota resource - + Parameters: compute_quota_id: ID of the compute allocation definition. compute_quota_version: Version of the compute allocation definition. session: Boto3 session. region: Region name. - + Returns: The ComputeQuota resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6588,39 +6529,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ComputeQuotaId": compute_quota_id, - "ComputeQuotaVersion": compute_quota_version, + 'ComputeQuotaId': compute_quota_id, + 'ComputeQuotaVersion': compute_quota_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_compute_quota(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeComputeQuotaResponse") + transformed_response = transform(response, 'DescribeComputeQuotaResponse') compute_quota = cls(**transformed_response) return compute_quota - + @Base.add_validate_call def refresh( self, - ) -> Optional["ComputeQuota"]: + + ) -> Optional["ComputeQuota"]: """ Refresh a ComputeQuota resource - + Returns: The ComputeQuota resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6631,22 +6571,22 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ComputeQuotaId": self.compute_quota_id, - "ComputeQuotaVersion": self.compute_quota_version, + 'ComputeQuotaId': self.compute_quota_id, + 'ComputeQuotaVersion': self.compute_quota_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_compute_quota(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeComputeQuotaResponse", self) + transform(response, 'DescribeComputeQuotaResponse', self) return self - + @Base.add_validate_call def update( self, @@ -6655,20 +6595,18 @@ def update( compute_quota_target: Optional[ComputeQuotaTarget] = Unassigned(), activation_state: Optional[StrPipeVar] = Unassigned(), description: Optional[StrPipeVar] = Unassigned(), - dry_run: Optional[bool] = Unassigned(), ) -> Optional["ComputeQuota"]: """ Update a ComputeQuota resource - + Parameters: target_version: Target version. - dry_run: - + Returns: The ComputeQuota resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6678,45 +6616,43 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - DryRunOperation ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating compute_quota resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "ComputeQuotaId": self.compute_quota_id, - "TargetVersion": target_version, - "ComputeQuotaConfig": compute_quota_config, - "ComputeQuotaTarget": compute_quota_target, - "ActivationState": activation_state, - "Description": description, - "DryRun": dry_run, + 'ComputeQuotaId': self.compute_quota_id, + 'TargetVersion': target_version, + 'ComputeQuotaConfig': compute_quota_config, + 'ComputeQuotaTarget': compute_quota_target, + 'ActivationState': activation_state, + 'Description': description, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_compute_quota(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - dry_run: Optional[bool] = Unassigned(), - ) -> None: + + ) -> None: """ Delete a ComputeQuota resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6725,95 +6661,76 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - DryRunOperation ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "ComputeQuotaId": self.compute_quota_id, - "DryRun": dry_run, + 'ComputeQuotaId': self.compute_quota_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_compute_quota(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Creating", - "CreateFailed", - "CreateRollbackFailed", - "Created", - "Updating", - "UpdateFailed", - "UpdateRollbackFailed", - "Updated", - "Deleting", - "DeleteFailed", - "DeleteRollbackFailed", - "Deleted", - ], + target_status: Literal['Creating', 'CreateFailed', 'CreateRollbackFailed', 'Created', 'Updating', 'UpdateFailed', 'UpdateRollbackFailed', 'Updated', 'Deleting', 'DeleteFailed', 'DeleteRollbackFailed', 'Deleted'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a ComputeQuota resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for ComputeQuota to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ComputeQuota", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="ComputeQuota", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="ComputeQuota", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -6822,13 +6739,13 @@ def wait_for_delete( ) -> None: """ Wait for a ComputeQuota resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6842,45 +6759,38 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for ComputeQuota to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + + if current_status.lower() == "deleted": logger.info("Resource was deleted.") return - + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ComputeQuota", status=current_status - ) + raise TimeoutExceededError(resource_type="ComputeQuota", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -6897,7 +6807,7 @@ def get_all( ) -> ResourceIterator["ComputeQuota"]: """ Get all ComputeQuota resources - + Parameters: created_after: Filter for after this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. created_before: Filter for before this creation time. The input for this parameter is a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. @@ -6910,12 +6820,12 @@ def get_all( max_results: The maximum number of compute allocation definitions to list. session: Boto3 session. region: Region name. - + Returns: Iterator for listed ComputeQuota resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -6925,39 +6835,37 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "NameContains": name_contains, - "Status": status, - "ClusterArn": cluster_arn, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'NameContains': name_contains, + 'Status': status, + 'ClusterArn': cluster_arn, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_compute_quotas", - summaries_key="ComputeQuotaSummaries", - summary_name="ComputeQuotaSummary", + list_method='list_compute_quotas', + summaries_key='ComputeQuotaSummaries', + summary_name='ComputeQuotaSummary', resource_cls=ComputeQuota, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class Context(Base): """ Class representing resource Context - + Attributes: context_name: The name of the context. context_arn: The Amazon Resource Name (ARN) of the context. @@ -6966,13 +6874,12 @@ class Context(Base): description: The description of the context. properties: A list of the context's properties. creation_time: When the context was created. - created_by: + created_by: last_modified_time: When the context was last modified. - last_modified_by: + last_modified_by: lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. - + """ - context_name: StrPipeVar context_arn: Optional[StrPipeVar] = Unassigned() source: Optional[ContextSource] = Unassigned() @@ -6984,23 +6891,23 @@ class Context(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() lineage_group_arn: Optional[StrPipeVar] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "context_name" - resource_name_split = resource_name.split("_") + resource_name = 'context_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object context") return None - + @classmethod @Base.add_validate_call def create( @@ -7016,7 +6923,7 @@ def create( ) -> Optional["Context"]: """ Create a Context resource - + Parameters: context_name: The name of the context. Must be unique to your account in an Amazon Web Services Region. source: The source type, ID, and URI. @@ -7026,12 +6933,12 @@ def create( tags: A list of tags to apply to the context. session: Boto3 session. region: Region name. - + Returns: The Context resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7045,36 +6952,32 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating context resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ContextName": context_name, - "Source": source, - "ContextType": context_type, - "Description": description, - "Properties": properties, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Context", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ContextName': context_name, + 'Source': source, + 'ContextType': context_type, + 'Description': description, + 'Properties': properties, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Context', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_context(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(context_name=context_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -7085,17 +6988,17 @@ def get( ) -> Optional["Context"]: """ Get a Context resource - + Parameters: context_name: The name of the context to describe. session: Boto3 session. region: Region name. - + Returns: The Context resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7106,38 +7009,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ContextName": context_name, + 'ContextName': context_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_context(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeContextResponse") + transformed_response = transform(response, 'DescribeContextResponse') context = cls(**transformed_response) return context - + @Base.add_validate_call def refresh( self, - ) -> Optional["Context"]: + + ) -> Optional["Context"]: """ Refresh a Context resource - + Returns: The Context resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7148,21 +7050,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ContextName": self.context_name, + 'ContextName': self.context_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_context(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeContextResponse", self) + transform(response, 'DescribeContextResponse', self) return self - + @Base.add_validate_call def update( self, @@ -7172,15 +7074,15 @@ def update( ) -> Optional["Context"]: """ Update a Context resource - + Parameters: properties_to_remove: A list of properties to remove. - + Returns: The Context resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7192,37 +7094,38 @@ def update( ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating context resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "ContextName": self.context_name, - "Description": description, - "Properties": properties, - "PropertiesToRemove": properties_to_remove, + 'ContextName': self.context_name, + 'Description': description, + 'Properties': properties, + 'PropertiesToRemove': properties_to_remove, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_context(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a Context resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7233,20 +7136,20 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "ContextName": self.context_name, + 'ContextName': self.context_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_context(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -7262,7 +7165,7 @@ def get_all( ) -> ResourceIterator["Context"]: """ Get all Context resources - + Parameters: source_uri: A filter that returns only contexts with the specified source URI. context_type: A filter that returns only contexts of the specified type. @@ -7274,12 +7177,12 @@ def get_all( max_results: The maximum number of contexts to return in the response. The default value is 10. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Context resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7290,112 +7193,192 @@ def get_all( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SourceUri": source_uri, - "ContextType": context_type, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'SourceUri': source_uri, + 'ContextType': context_type, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_contexts", - summaries_key="ContextSummaries", - summary_name="ContextSummary", + list_method='list_contexts', + summaries_key='ContextSummaries', + summary_name='ContextSummary', resource_cls=Context, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) -class ContextInternal(Base): +class DataQualityJobDefinition(Base): """ - Class representing resource ContextInternal - + Class representing resource DataQualityJobDefinition + Attributes: - context_name: - source: - context_type: - customer_details: - creation_time: - description: - properties: - tags: - context_arn: - + job_definition_arn: The Amazon Resource Name (ARN) of the data quality monitoring job definition. + job_definition_name: The name of the data quality monitoring job definition. + creation_time: The time that the data quality monitoring job definition was created. + data_quality_app_specification: Information about the container that runs the data quality monitoring job. + data_quality_job_input: The list of inputs for the data quality monitoring job. Currently endpoints are supported. + data_quality_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + data_quality_baseline_config: The constraints and baselines for the data quality monitoring job definition. + network_config: The networking configuration for the data quality monitoring job. + stopping_condition: + """ - - context_name: Union[StrPipeVar, object] - source: ContextSource - context_type: StrPipeVar - customer_details: CustomerDetails + job_definition_name: StrPipeVar + job_definition_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - context_arn: Optional[StrPipeVar] = Unassigned() - + data_quality_baseline_config: Optional[DataQualityBaselineConfig] = Unassigned() + data_quality_app_specification: Optional[DataQualityAppSpecification] = Unassigned() + data_quality_job_input: Optional[DataQualityJobInput] = Unassigned() + data_quality_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() + job_resources: Optional[MonitoringResources] = Unassigned() + network_config: Optional[MonitoringNetworkConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "context_internal_name" - resource_name_split = resource_name.split("_") + resource_name = 'data_quality_job_definition_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object context_internal") + logger.error("Name attribute not found for object data_quality_job_definition") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "data_quality_job_input": { + "endpoint_input": { + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + }, + "batch_transform_input": { + "data_captured_destination_s3_uri": { + "type": "string" + }, + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + } + }, + "data_quality_job_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "job_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + }, + "data_quality_baseline_config": { + "constraints_resource": { + "s3_uri": { + "type": "string" + } + }, + "statistics_resource": { + "s3_uri": { + "type": "string" + } + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "DataQualityJobDefinition", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - context_name: Union[StrPipeVar, object], - source: ContextSource, - context_type: StrPipeVar, - customer_details: CustomerDetails, - creation_time: Optional[datetime.datetime] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + job_definition_name: StrPipeVar, + data_quality_app_specification: DataQualityAppSpecification, + data_quality_job_input: DataQualityJobInput, + data_quality_job_output_config: MonitoringOutputConfig, + job_resources: MonitoringResources, + role_arn: StrPipeVar, + data_quality_baseline_config: Optional[DataQualityBaselineConfig] = Unassigned(), + network_config: Optional[MonitoringNetworkConfig] = Unassigned(), + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ContextInternal"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["DataQualityJobDefinition"]: """ - Create a ContextInternal resource - + Create a DataQualityJobDefinition resource + Parameters: - context_name: - source: - context_type: - customer_details: - creation_time: - description: - properties: - tags: + job_definition_name: The name for the monitoring job definition. + data_quality_app_specification: Specifies the container that runs the monitoring job. + data_quality_job_input: A list of inputs for the monitoring job. Currently endpoints are supported as monitoring inputs. + data_quality_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + data_quality_baseline_config: Configures the constraints and baselines for the monitoring job. + network_config: Specifies networking configuration for the monitoring job. + stopping_condition: + 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. session: Boto3 session. region: Region name. - + Returns: - The ContextInternal resource. - + The DataQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7404,311 +7387,42 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "ContextName": context_name, - "Source": source, - "CreationTime": creation_time, - "ContextType": context_type, - "Description": description, - "Properties": properties, - "Tags": tags, - "CustomerDetails": customer_details, - } + + logger.info("Creating data_quality_job_definition resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'JobDefinitionName': job_definition_name, + 'DataQualityBaselineConfig': data_quality_baseline_config, + 'DataQualityAppSpecification': data_quality_app_specification, + 'DataQualityJobInput': data_quality_job_input, + 'DataQualityJobOutputConfig': data_quality_job_output_config, + 'JobResources': job_resources, + 'NetworkConfig': network_config, + 'RoleArn': role_arn, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='DataQualityJobDefinition', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_context_internal API") - response = client.create_context_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateContextInternalResponse") - return cls(**operation_input_args, **transformed_response) - - -class CrossAccountTrainingJob(Base): - """ - Class representing resource CrossAccountTrainingJob - - Attributes: - training_job_name: - algorithm_specification: - cross_account_role_arn: - input_data_config: - output_data_config: - resource_config: - stopping_condition: - training_job_arn: - hyper_parameters: - vpc_config: - tags: - environment: - source_arn: - source_account: - - """ - - training_job_name: Union[StrPipeVar, object] - algorithm_specification: AlgorithmSpecification - cross_account_role_arn: StrPipeVar - input_data_config: List[Channel] - output_data_config: OutputDataConfig - resource_config: ResourceConfig - stopping_condition: StoppingCondition - training_job_arn: StrPipeVar - hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - vpc_config: Optional[VpcConfig] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - source_arn: Optional[StrPipeVar] = Unassigned() - source_account: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "cross_account_training_job_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object cross_account_training_job") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - training_job_name: Union[StrPipeVar, object], - algorithm_specification: AlgorithmSpecification, - cross_account_role_arn: StrPipeVar, - input_data_config: List[Channel], - output_data_config: OutputDataConfig, - resource_config: ResourceConfig, - stopping_condition: StoppingCondition, - hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - vpc_config: Optional[VpcConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - source_arn: Optional[StrPipeVar] = Unassigned(), - source_account: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["CrossAccountTrainingJob"]: - """ - Create a CrossAccountTrainingJob resource - - Parameters: - training_job_name: - algorithm_specification: - cross_account_role_arn: - input_data_config: - output_data_config: - resource_config: - stopping_condition: - hyper_parameters: - vpc_config: - tags: - environment: - source_arn: - source_account: - session: Boto3 session. - region: Region name. - - Returns: - The CrossAccountTrainingJob resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "TrainingJobName": training_job_name, - "HyperParameters": hyper_parameters, - "AlgorithmSpecification": algorithm_specification, - "CrossAccountRoleArn": cross_account_role_arn, - "InputDataConfig": input_data_config, - "OutputDataConfig": output_data_config, - "ResourceConfig": resource_config, - "VpcConfig": vpc_config, - "StoppingCondition": stopping_condition, - "Tags": tags, - "Environment": environment, - "SourceArn": source_arn, - "SourceAccount": source_account, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_cross_account_training_job API") - response = client.create_cross_account_training_job(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateCrossAccountTrainingJobResponse") - return cls(**operation_input_args, **transformed_response) - - -class CustomMonitoringJobDefinition(Base): - """ - Class representing resource CustomMonitoringJobDefinition - - Attributes: - job_definition_arn: - job_definition_name: - creation_time: - custom_monitoring_app_specification: - custom_monitoring_job_input: - job_resources: - role_arn: - custom_monitoring_job_output_config: - network_config: - stopping_condition: - - """ - - job_definition_name: StrPipeVar - job_definition_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - custom_monitoring_app_specification: Optional[CustomMonitoringAppSpecification] = Unassigned() - custom_monitoring_job_input: Optional[CustomMonitoringJobInput] = Unassigned() - custom_monitoring_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() - job_resources: Optional[MonitoringResources] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "custom_monitoring_job_definition_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object custom_monitoring_job_definition") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - job_definition_name: StrPipeVar, - custom_monitoring_app_specification: CustomMonitoringAppSpecification, - custom_monitoring_job_input: CustomMonitoringJobInput, - job_resources: MonitoringResources, - role_arn: StrPipeVar, - custom_monitoring_job_output_config: Optional[MonitoringOutputConfig] = Unassigned(), - network_config: Optional[MonitoringNetworkConfig] = Unassigned(), - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["CustomMonitoringJobDefinition"]: - """ - Create a CustomMonitoringJobDefinition resource - - Parameters: - job_definition_name: - custom_monitoring_app_specification: - custom_monitoring_job_input: - job_resources: - role_arn: - custom_monitoring_job_output_config: - network_config: - stopping_condition: - tags: - session: Boto3 session. - region: Region name. - - Returns: - The CustomMonitoringJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating custom_monitoring_job_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobDefinitionName": job_definition_name, - "CustomMonitoringAppSpecification": custom_monitoring_app_specification, - "CustomMonitoringJobInput": custom_monitoring_job_input, - "CustomMonitoringJobOutputConfig": custom_monitoring_job_output_config, - "JobResources": job_resources, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="CustomMonitoringJobDefinition", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_custom_monitoring_job_definition(**operation_input_args) + response = client.create_data_quality_job_definition(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(job_definition_name=job_definition_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -7716,20 +7430,20 @@ def get( job_definition_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["CustomMonitoringJobDefinition"]: + ) -> Optional["DataQualityJobDefinition"]: """ - Get a CustomMonitoringJobDefinition resource - + Get a DataQualityJobDefinition resource + Parameters: - job_definition_name: + job_definition_name: The name of the data quality monitoring job definition to describe. session: Boto3 session. region: Region name. - + Returns: - The CustomMonitoringJobDefinition resource. - + The DataQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7740,38 +7454,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobDefinitionName": job_definition_name, + 'JobDefinitionName': job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_custom_monitoring_job_definition(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_data_quality_job_definition(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeCustomMonitoringJobDefinitionResponse") - custom_monitoring_job_definition = cls(**transformed_response) - return custom_monitoring_job_definition - + transformed_response = transform(response, 'DescribeDataQualityJobDefinitionResponse') + data_quality_job_definition = cls(**transformed_response) + return data_quality_job_definition + @Base.add_validate_call def refresh( self, - ) -> Optional["CustomMonitoringJobDefinition"]: + + ) -> Optional["DataQualityJobDefinition"]: """ - Refresh a CustomMonitoringJobDefinition resource - + Refresh a DataQualityJobDefinition resource + Returns: - The CustomMonitoringJobDefinition resource. - + The DataQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7782,30 +7495,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobDefinitionName": self.job_definition_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_custom_monitoring_job_definition(**operation_input_args) - + response = client.describe_data_quality_job_definition(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeCustomMonitoringJobDefinitionResponse", self) + transform(response, 'DescribeDataQualityJobDefinitionResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a CustomMonitoringJobDefinition resource - + Delete a DataQualityJobDefinition resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7816,20 +7530,20 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "JobDefinitionName": self.job_definition_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_custom_monitoring_job_definition(**operation_input_args) - + + client.delete_data_quality_job_definition(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -7842,27 +7556,27 @@ def get_all( creation_time_after: Optional[datetime.datetime] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["CustomMonitoringJobDefinition"]: + ) -> ResourceIterator["DataQualityJobDefinition"]: """ - Get all CustomMonitoringJobDefinition resources - + Get all DataQualityJobDefinition resources + Parameters: - endpoint_name: - sort_by: - sort_order: - next_token: - max_results: - name_contains: - creation_time_before: - creation_time_after: + endpoint_name: A filter that lists the data quality job definitions associated with the specified endpoint. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: If the result of the previous ListDataQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of transform jobs, use the token in the next request.> + max_results: The maximum number of data quality monitoring job definitions to return in the response. + name_contains: A string in the data quality monitoring job definition name. This filter returns only data quality monitoring job definitions whose name contains the specified string. + creation_time_before: A filter that returns only data quality monitoring job definitions created before the specified time. + creation_time_after: A filter that returns only data quality monitoring job definitions created after the specified time. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed CustomMonitoringJobDefinition resources. - + Iterator for listed DataQualityJobDefinition resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -7872,232 +7586,104 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - } - custom_key_mapping = { - "monitoring_job_definition_name": "job_definition_name", - "monitoring_job_definition_arn": "job_definition_arn", + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, } + custom_key_mapping = {"monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn"} # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_custom_monitoring_job_definitions", - summaries_key="JobDefinitionSummaries", - summary_name="MonitoringJobDefinitionSummary", - resource_cls=CustomMonitoringJobDefinition, + list_method='list_data_quality_job_definitions', + summaries_key='JobDefinitionSummaries', + summary_name='MonitoringJobDefinitionSummary', + resource_cls=DataQualityJobDefinition, custom_key_mapping=custom_key_mapping, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) -class DataQualityJobDefinition(Base): +class Device(Base): """ - Class representing resource DataQualityJobDefinition - + Class representing resource Device + Attributes: - job_definition_arn: The Amazon Resource Name (ARN) of the data quality monitoring job definition. - job_definition_name: The name of the data quality monitoring job definition. - creation_time: The time that the data quality monitoring job definition was created. - data_quality_app_specification: Information about the container that runs the data quality monitoring job. - data_quality_job_input: The list of inputs for the data quality monitoring job. Currently endpoints are supported. - data_quality_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - data_quality_baseline_config: The constraints and baselines for the data quality monitoring job definition. - network_config: The networking configuration for the data quality monitoring job. - stopping_condition: - + device_name: The unique identifier of the device. + device_fleet_name: The name of the fleet the device belongs to. + registration_time: The timestamp of the last registration or de-reregistration. + device_arn: The Amazon Resource Name (ARN) of the device. + description: A description of the device. + iot_thing_name: The Amazon Web Services Internet of Things (IoT) object thing name associated with the device. + latest_heartbeat: The last heartbeat received from the device. + models: Models on the device. + max_models: The maximum number of models. + next_token: The response from the last list when returning a list large enough to need tokening. + agent_version: Edge Manager agent version. + """ - - job_definition_name: StrPipeVar - job_definition_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - data_quality_baseline_config: Optional[DataQualityBaselineConfig] = Unassigned() - data_quality_app_specification: Optional[DataQualityAppSpecification] = Unassigned() - data_quality_job_input: Optional[DataQualityJobInput] = Unassigned() - data_quality_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() - job_resources: Optional[MonitoringResources] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "data_quality_job_definition_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + device_name: StrPipeVar + device_fleet_name: StrPipeVar + device_arn: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + iot_thing_name: Optional[StrPipeVar] = Unassigned() + registration_time: Optional[datetime.datetime] = Unassigned() + latest_heartbeat: Optional[datetime.datetime] = Unassigned() + models: Optional[List[EdgeModel]] = Unassigned() + max_models: Optional[int] = Unassigned() + next_token: Optional[StrPipeVar] = Unassigned() + agent_version: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'device_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object data_quality_job_definition") + logger.error("Name attribute not found for object device") return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "data_quality_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": {"type": "string"}, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "data_quality_job_output_config": {"kms_key_id": {"type": "string"}}, - "job_resources": {"cluster_config": {"volume_kms_key_id": {"type": "string"}}}, - "role_arn": {"type": "string"}, - "data_quality_baseline_config": { - "constraints_resource": {"s3_uri": {"type": "string"}}, - "statistics_resource": {"s3_uri": {"type": "string"}}, - }, - "network_config": { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "DataQualityJobDefinition", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - job_definition_name: StrPipeVar, - data_quality_app_specification: DataQualityAppSpecification, - data_quality_job_input: DataQualityJobInput, - data_quality_job_output_config: MonitoringOutputConfig, - job_resources: MonitoringResources, - role_arn: StrPipeVar, - data_quality_baseline_config: Optional[DataQualityBaselineConfig] = Unassigned(), - network_config: Optional[MonitoringNetworkConfig] = Unassigned(), - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["DataQualityJobDefinition"]: - """ - Create a DataQualityJobDefinition resource - - Parameters: - job_definition_name: The name for the monitoring job definition. - data_quality_app_specification: Specifies the container that runs the monitoring job. - data_quality_job_input: A list of inputs for the monitoring job. Currently endpoints are supported as monitoring inputs. - data_quality_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - data_quality_baseline_config: Configures the constraints and baselines for the monitoring job. - network_config: Specifies networking configuration for the monitoring job. - stopping_condition: - 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. - session: Boto3 session. - region: Region name. - - Returns: - The DataQualityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating data_quality_job_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobDefinitionName": job_definition_name, - "DataQualityBaselineConfig": data_quality_baseline_config, - "DataQualityAppSpecification": data_quality_app_specification, - "DataQualityJobInput": data_quality_job_input, - "DataQualityJobOutputConfig": data_quality_job_output_config, - "JobResources": job_resources, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="DataQualityJobDefinition", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_data_quality_job_definition(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(job_definition_name=job_definition_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( cls, - job_definition_name: StrPipeVar, + device_name: StrPipeVar, + device_fleet_name: StrPipeVar, + next_token: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["DataQualityJobDefinition"]: + ) -> Optional["Device"]: """ - Get a DataQualityJobDefinition resource - + Get a Device resource + Parameters: - job_definition_name: The name of the data quality monitoring job definition to describe. + device_name: The unique ID of the device. + device_fleet_name: The name of the fleet the devices belong to. + next_token: Next token of device description. session: Boto3 session. region: Region name. - + Returns: - The DataQualityJobDefinition resource. - + The Device resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8108,38 +7694,39 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobDefinitionName": job_definition_name, + 'NextToken': next_token, + 'DeviceName': device_name, + 'DeviceFleetName': device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_data_quality_job_definition(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_device(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeDataQualityJobDefinitionResponse") - data_quality_job_definition = cls(**transformed_response) - return data_quality_job_definition - + transformed_response = transform(response, 'DescribeDeviceResponse') + device = cls(**transformed_response) + return device + @Base.add_validate_call def refresh( self, - ) -> Optional["DataQualityJobDefinition"]: + + ) -> Optional["Device"]: """ - Refresh a DataQualityJobDefinition resource - + Refresh a Device resource + Returns: - The DataQualityJobDefinition resource. - + The Device resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8150,87 +7737,50 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobDefinitionName": self.job_definition_name, + 'NextToken': self.next_token, + 'DeviceName': self.device_name, + 'DeviceFleetName': self.device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_data_quality_job_definition(**operation_input_args) - + response = client.describe_device(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeDataQualityJobDefinitionResponse", self) + transform(response, 'DescribeDeviceResponse', self) return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a DataQualityJobDefinition resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_data_quality_job_definition(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( cls, - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), + latest_heartbeat_after: Optional[datetime.datetime] = Unassigned(), + model_name: Optional[StrPipeVar] = Unassigned(), + device_fleet_name: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["DataQualityJobDefinition"]: + ) -> ResourceIterator["Device"]: """ - Get all DataQualityJobDefinition resources - + Get all Device resources + Parameters: - endpoint_name: A filter that lists the data quality job definitions associated with the specified endpoint. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: If the result of the previous ListDataQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of transform jobs, use the token in the next request.> - max_results: The maximum number of data quality monitoring job definitions to return in the response. - name_contains: A string in the data quality monitoring job definition name. This filter returns only data quality monitoring job definitions whose name contains the specified string. - creation_time_before: A filter that returns only data quality monitoring job definitions created before the specified time. - creation_time_after: A filter that returns only data quality monitoring job definitions created after the specified time. + next_token: The response from the last list when returning a list large enough to need tokening. + max_results: Maximum number of results to select. + latest_heartbeat_after: Select fleets where the job was updated after X + model_name: A filter that searches devices that contains this name in any of their models. + device_fleet_name: Filter for fleets containing this name in their device fleet name. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed DataQualityJobDefinition resources. - + Iterator for listed Device resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8240,303 +7790,93 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - } - custom_key_mapping = { - "monitoring_job_definition_name": "job_definition_name", - "monitoring_job_definition_arn": "job_definition_arn", + 'LatestHeartbeatAfter': latest_heartbeat_after, + 'ModelName': model_name, + 'DeviceFleetName': device_fleet_name, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_data_quality_job_definitions", - summaries_key="JobDefinitionSummaries", - summary_name="MonitoringJobDefinitionSummary", - resource_cls=DataQualityJobDefinition, - custom_key_mapping=custom_key_mapping, - list_method_kwargs=operation_input_args, + list_method='list_devices', + summaries_key='DeviceSummaries', + summary_name='DeviceSummary', + resource_cls=Device, + list_method_kwargs=operation_input_args ) -class Device(Base): +class DeviceFleet(Base): """ - Class representing resource Device - + Class representing resource DeviceFleet + Attributes: - device_name: The unique identifier of the device. - device_fleet_name: The name of the fleet the device belongs to. - registration_time: The timestamp of the last registration or de-reregistration. - device_arn: The Amazon Resource Name (ARN) of the device. - description: A description of the device. - iot_thing_name: The Amazon Web Services Internet of Things (IoT) object thing name associated with the device. - latest_heartbeat: The last heartbeat received from the device. - models: Models on the device. - max_models: The maximum number of models. - next_token: The response from the last list when returning a list large enough to need tokening. - agent_version: Edge Manager agent version. - + device_fleet_name: The name of the fleet. + device_fleet_arn: The The Amazon Resource Name (ARN) of the fleet. + output_config: The output configuration for storing sampled data. + creation_time: Timestamp of when the device fleet was created. + last_modified_time: Timestamp of when the device fleet was last updated. + description: A description of the fleet. + role_arn: The Amazon Resource Name (ARN) that has access to Amazon Web Services Internet of Things (IoT). + iot_role_alias: The Amazon Resource Name (ARN) alias created in Amazon Web Services Internet of Things (IoT). + """ - - device_name: StrPipeVar device_fleet_name: StrPipeVar - device_arn: Optional[StrPipeVar] = Unassigned() + device_fleet_arn: Optional[StrPipeVar] = Unassigned() + output_config: Optional[EdgeOutputConfig] = Unassigned() description: Optional[StrPipeVar] = Unassigned() - iot_thing_name: Optional[StrPipeVar] = Unassigned() - registration_time: Optional[datetime.datetime] = Unassigned() - latest_heartbeat: Optional[datetime.datetime] = Unassigned() - models: Optional[List[EdgeModel]] = Unassigned() - max_models: Optional[int] = Unassigned() - next_token: Optional[StrPipeVar] = Unassigned() - agent_version: Optional[StrPipeVar] = Unassigned() - + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + iot_role_alias: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "device_name" - resource_name_split = resource_name.split("_") + resource_name = 'device_fleet_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object device") - return None - - @classmethod - @Base.add_validate_call - def get( - cls, - device_name: StrPipeVar, - device_fleet_name: StrPipeVar, - next_token: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Device"]: - """ - Get a Device resource - - Parameters: - device_name: The unique ID of the device. - device_fleet_name: The name of the fleet the devices belong to. - next_token: Next token of device description. - session: Boto3 session. - region: Region name. - - Returns: - The Device resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "NextToken": next_token, - "DeviceName": device_name, - "DeviceFleetName": device_fleet_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_device(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeDeviceResponse") - device = cls(**transformed_response) - return device - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["Device"]: - """ - Refresh a Device resource - - Returns: - The Device resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "NextToken": self.next_token, - "DeviceName": self.device_name, - "DeviceFleetName": self.device_fleet_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_device(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeDeviceResponse", self) - return self - - @classmethod - @Base.add_validate_call - def get_all( - cls, - latest_heartbeat_after: Optional[datetime.datetime] = Unassigned(), - model_name: Optional[StrPipeVar] = Unassigned(), - device_fleet_name: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Device"]: - """ - Get all Device resources - - Parameters: - next_token: The response from the last list when returning a list large enough to need tokening. - max_results: Maximum number of results to select. - latest_heartbeat_after: Select fleets where the job was updated after X - model_name: A filter that searches devices that contains this name in any of their models. - device_fleet_name: Filter for fleets containing this name in their device fleet name. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed Device resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "LatestHeartbeatAfter": latest_heartbeat_after, - "ModelName": model_name, - "DeviceFleetName": device_fleet_name, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_devices", - summaries_key="DeviceSummaries", - summary_name="DeviceSummary", - resource_cls=Device, - list_method_kwargs=operation_input_args, - ) - - -class DeviceFleet(Base): - """ - Class representing resource DeviceFleet - - Attributes: - device_fleet_name: The name of the fleet. - device_fleet_arn: The The Amazon Resource Name (ARN) of the fleet. - output_config: The output configuration for storing sampled data. - creation_time: Timestamp of when the device fleet was created. - last_modified_time: Timestamp of when the device fleet was last updated. - description: A description of the fleet. - role_arn: The Amazon Resource Name (ARN) that has access to Amazon Web Services Internet of Things (IoT). - iot_role_alias: The Amazon Resource Name (ARN) alias created in Amazon Web Services Internet of Things (IoT). - - """ - - device_fleet_name: StrPipeVar - device_fleet_arn: Optional[StrPipeVar] = Unassigned() - output_config: Optional[EdgeOutputConfig] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - iot_role_alias: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "device_fleet_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object device_fleet") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "output_config": { - "s3_output_location": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "iot_role_alias": {"type": "string"}, + config_schema_for_resource = \ + { + "output_config": { + "s3_output_location": { + "type": "string" + }, + "kms_key_id": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "DeviceFleet", **kwargs - ), - ) - + }, + "role_arn": { + "type": "string" + }, + "iot_role_alias": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "DeviceFleet", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -8553,7 +7893,7 @@ def create( ) -> Optional["DeviceFleet"]: """ Create a DeviceFleet resource - + Parameters: device_fleet_name: The name of the fleet that the device belongs to. output_config: The output configuration for storing sample data collected by the fleet. @@ -8563,12 +7903,12 @@ def create( enable_iot_role_alias: Whether to create an Amazon Web Services IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet". session: Boto3 session. region: Region name. - + Returns: The DeviceFleet resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8583,36 +7923,32 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating device_fleet resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "DeviceFleetName": device_fleet_name, - "RoleArn": role_arn, - "Description": description, - "OutputConfig": output_config, - "Tags": tags, - "EnableIotRoleAlias": enable_iot_role_alias, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="DeviceFleet", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'DeviceFleetName': device_fleet_name, + 'RoleArn': role_arn, + 'Description': description, + 'OutputConfig': output_config, + 'Tags': tags, + 'EnableIotRoleAlias': enable_iot_role_alias, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='DeviceFleet', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_device_fleet(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(device_fleet_name=device_fleet_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -8623,17 +7959,17 @@ def get( ) -> Optional["DeviceFleet"]: """ Get a DeviceFleet resource - + Parameters: device_fleet_name: The name of the fleet. session: Boto3 session. region: Region name. - + Returns: The DeviceFleet resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8644,38 +7980,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DeviceFleetName": device_fleet_name, + 'DeviceFleetName': device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_device_fleet(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeDeviceFleetResponse") + transformed_response = transform(response, 'DescribeDeviceFleetResponse') device_fleet = cls(**transformed_response) return device_fleet - + @Base.add_validate_call def refresh( self, - ) -> Optional["DeviceFleet"]: + + ) -> Optional["DeviceFleet"]: """ Refresh a DeviceFleet resource - + Returns: The DeviceFleet resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8686,21 +8021,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, + 'DeviceFleetName': self.device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_device_fleet(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeDeviceFleetResponse", self) + transform(response, 'DescribeDeviceFleetResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( @@ -8712,15 +8047,15 @@ def update( ) -> Optional["DeviceFleet"]: """ Update a DeviceFleet resource - + Parameters: enable_iot_role_alias: Whether to create an Amazon Web Services IoT Role Alias during device fleet creation. The name of the role alias generated will match this pattern: "SageMakerEdge-{DeviceFleetName}". For example, if your device fleet is called "demo-fleet", the name of the role alias will be "SageMakerEdge-demo-fleet". - + Returns: The DeviceFleet resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8731,38 +8066,39 @@ def update( ``` ResourceInUse: Resource being accessed is in use. """ - + logger.info("Updating device_fleet resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, - "RoleArn": role_arn, - "Description": description, - "OutputConfig": output_config, - "EnableIotRoleAlias": enable_iot_role_alias, + 'DeviceFleetName': self.device_fleet_name, + 'RoleArn': role_arn, + 'Description': description, + 'OutputConfig': output_config, + 'EnableIotRoleAlias': enable_iot_role_alias, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_device_fleet(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a DeviceFleet resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8773,20 +8109,20 @@ def delete( ``` ResourceInUse: Resource being accessed is in use. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, + 'DeviceFleetName': self.device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_device_fleet(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -8803,7 +8139,7 @@ def get_all( ) -> ResourceIterator["DeviceFleet"]: """ Get all DeviceFleet resources - + Parameters: next_token: The response from the last list when returning a list large enough to need tokening. max_results: The maximum number of results to select. @@ -8816,12 +8152,12 @@ def get_all( sort_order: What direction to sort in. session: Boto3 session. region: Region name. - + Returns: Iterator for listed DeviceFleet resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8831,34 +8167,33 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_device_fleets", - summaries_key="DeviceFleetSummaries", - summary_name="DeviceFleetSummary", + list_method='list_device_fleets', + summaries_key='DeviceFleetSummaries', + summary_name='DeviceFleetSummary', resource_cls=DeviceFleet, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def deregister_devices( self, @@ -8868,14 +8203,14 @@ def deregister_devices( ) -> None: """ Deregisters the specified devices. - + Parameters: device_names: The unique IDs of the devices. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8885,41 +8220,43 @@ def deregister_devices( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, - "DeviceNames": device_names, + 'DeviceFleetName': self.device_fleet_name, + 'DeviceNames': device_names, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling deregister_devices API") response = client.deregister_devices(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def get_report( self, + session: Optional[Session] = None, region: Optional[str] = None, ) -> Optional[GetDeviceFleetReportResponse]: """ Describes a fleet. - + Parameters: session: Boto3 session. region: Region name. - + Returns: GetDeviceFleetReportResponse - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8929,25 +8266,25 @@ def get_report( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, + 'DeviceFleetName': self.device_fleet_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling get_device_fleet_report API") response = client.get_device_fleet_report(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "GetDeviceFleetReportResponse") + + transformed_response = transform(response, 'GetDeviceFleetReportResponse') return GetDeviceFleetReportResponse(**transformed_response) - + + @Base.add_validate_call def register_devices( self, @@ -8958,15 +8295,15 @@ def register_devices( ) -> None: """ Register devices. - + Parameters: devices: A list of devices to register with SageMaker Edge Manager. tags: The tags associated with devices. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -8977,24 +8314,25 @@ def register_devices( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, - "Devices": devices, - "Tags": tags, + 'DeviceFleetName': self.device_fleet_name, + 'Devices': devices, + 'Tags': tags, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling register_devices API") response = client.register_devices(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def update_devices( self, @@ -9004,14 +8342,14 @@ def update_devices( ) -> None: """ Updates one or more devices in a fleet. - + Parameters: devices: List of devices to register with Edge Manager agent. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9021,28 +8359,28 @@ def update_devices( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "DeviceFleetName": self.device_fleet_name, - "Devices": devices, + 'DeviceFleetName': self.device_fleet_name, + 'Devices': devices, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling update_devices API") response = client.update_devices(**operation_input_args) logger.debug(f"Response: {response}") + class Domain(Base): """ Class representing resource Domain - + Attributes: domain_arn: The domain's Amazon Resource Name (ARN). domain_id: The domain ID. @@ -9056,22 +8394,19 @@ class Domain(Base): failure_reason: The failure reason. security_group_id_for_domain_boundary: The ID of the security group that authorizes traffic between the RSessionGateway apps and the RStudioServerPro app. auth_mode: The domain's authentication mode. - default_user_settings: Settings which are applied to UserProfiles in this domain if settings are not explicitly specified in a given UserProfile. + default_user_settings: Settings which are applied to UserProfiles in this domain if settings are not explicitly specified in a given UserProfile. domain_settings: A collection of Domain settings. - app_network_access: - 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 + 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 home_efs_file_system_kms_key_id: Use KmsKeyId. subnet_ids: The VPC subnets that the domain uses for communication. url: The domain's URL. vpc_id: The ID of the Amazon Virtual Private Cloud (VPC) that the domain uses for communication. kms_key_id: The Amazon Web Services KMS customer managed key used to encrypt the EFS volume attached to the domain. app_security_group_management: The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided. - app_storage_type: tag_propagation: Indicates whether custom tag propagation is supported for the domain. default_space_settings: The default settings for shared spaces that users create in the domain. - + """ - domain_id: StrPipeVar domain_arn: Optional[StrPipeVar] = Unassigned() domain_name: Optional[StrPipeVar] = Unassigned() @@ -9086,7 +8421,6 @@ class Domain(Base): auth_mode: Optional[StrPipeVar] = Unassigned() default_user_settings: Optional[UserSettings] = Unassigned() domain_settings: Optional[DomainSettings] = Unassigned() - app_network_access: Optional[StrPipeVar] = Unassigned() app_network_access_type: Optional[StrPipeVar] = Unassigned() home_efs_file_system_kms_key_id: Optional[StrPipeVar] = Unassigned() subnet_ids: Optional[List[StrPipeVar]] = Unassigned() @@ -9094,90 +8428,166 @@ class Domain(Base): vpc_id: Optional[StrPipeVar] = Unassigned() kms_key_id: Optional[StrPipeVar] = Unassigned() app_security_group_management: Optional[StrPipeVar] = Unassigned() - app_storage_type: Optional[StrPipeVar] = Unassigned() tag_propagation: Optional[StrPipeVar] = Unassigned() default_space_settings: Optional[DefaultSpaceSettings] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "domain_name" - resource_name_split = resource_name.split("_") + resource_name = 'domain_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object domain") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "security_group_id_for_domain_boundary": {"type": "string"}, - "default_user_settings": { - "execution_role": {"type": "string"}, - "security_groups": {"type": "array", "items": {"type": "string"}}, - "sharing_settings": { - "s3_output_path": {"type": "string"}, - "s3_kms_key_id": {"type": "string"}, - }, - "canvas_app_settings": { - "time_series_forecasting_settings": { - "amazon_forecast_role_arn": {"type": "string"} - }, - "model_register_settings": { - "cross_account_model_register_role_arn": {"type": "string"} - }, - "workspace_settings": { - "s3_artifact_path": {"type": "string"}, - "s3_kms_key_id": {"type": "string"}, - }, - "generative_ai_settings": {"amazon_bedrock_role_arn": {"type": "string"}}, - "emr_serverless_settings": {"execution_role_arn": {"type": "string"}}, - }, - "jupyter_lab_app_settings": { - "emr_settings": { - "assumable_role_arns": {"type": "array", "items": {"type": "string"}}, - "execution_role_arns": {"type": "array", "items": {"type": "string"}}, - } - }, + config_schema_for_resource = \ + { + "security_group_id_for_domain_boundary": { + "type": "string" + }, + "default_user_settings": { + "execution_role": { + "type": "string" + }, + "security_groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "sharing_settings": { + "s3_output_path": { + "type": "string" + }, + "s3_kms_key_id": { + "type": "string" + } + }, + "canvas_app_settings": { + "time_series_forecasting_settings": { + "amazon_forecast_role_arn": { + "type": "string" + } + }, + "model_register_settings": { + "cross_account_model_register_role_arn": { + "type": "string" + } + }, + "workspace_settings": { + "s3_artifact_path": { + "type": "string" }, - "domain_settings": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "r_studio_server_pro_domain_settings": { - "domain_execution_role_arn": {"type": "string"} - }, - "execution_role_identity_config": {"type": "string"}, + "s3_kms_key_id": { + "type": "string" + } + }, + "generative_ai_settings": { + "amazon_bedrock_role_arn": { + "type": "string" + } + }, + "emr_serverless_settings": { + "execution_role_arn": { + "type": "string" + } + } + }, + "jupyter_lab_app_settings": { + "emr_settings": { + "assumable_role_arns": { + "type": "array", + "items": { + "type": "string" + } }, - "home_efs_file_system_kms_key_id": {"type": "string"}, - "subnet_ids": {"type": "array", "items": {"type": "string"}}, - "kms_key_id": {"type": "string"}, - "app_security_group_management": {"type": "string"}, - "default_space_settings": { - "execution_role": {"type": "string"}, - "security_groups": {"type": "array", "items": {"type": "string"}}, - "jupyter_lab_app_settings": { - "emr_settings": { - "assumable_role_arns": {"type": "array", "items": {"type": "string"}}, - "execution_role_arns": {"type": "array", "items": {"type": "string"}}, - } - }, + "execution_role_arns": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "domain_settings": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "r_studio_server_pro_domain_settings": { + "domain_execution_role_arn": { + "type": "string" + } + }, + "execution_role_identity_config": { + "type": "string" + }, + "unified_studio_settings": { + "project_s3_path": { + "type": "string" + } + } + }, + "home_efs_file_system_kms_key_id": { + "type": "string" + }, + "subnet_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "kms_key_id": { + "type": "string" + }, + "app_security_group_management": { + "type": "string" + }, + "default_space_settings": { + "execution_role": { + "type": "string" + }, + "security_groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "jupyter_lab_app_settings": { + "emr_settings": { + "assumable_role_arns": { + "type": "array", + "items": { + "type": "string" + } }, + "execution_role_arns": { + "type": "array", + "items": { + "type": "string" + } + } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Domain", **kwargs - ), - ) - + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Domain", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -9190,12 +8600,10 @@ def create( subnet_ids: Optional[List[StrPipeVar]] = Unassigned(), vpc_id: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - app_network_access: Optional[StrPipeVar] = Unassigned(), app_network_access_type: Optional[StrPipeVar] = Unassigned(), home_efs_file_system_kms_key_id: Optional[StrPipeVar] = Unassigned(), kms_key_id: Optional[StrPipeVar] = Unassigned(), app_security_group_management: Optional[StrPipeVar] = Unassigned(), - app_storage_type: Optional[StrPipeVar] = Unassigned(), tag_propagation: Optional[StrPipeVar] = Unassigned(), default_space_settings: Optional[DefaultSpaceSettings] = Unassigned(), session: Optional[Session] = None, @@ -9203,7 +8611,7 @@ def create( ) -> Optional["Domain"]: """ Create a Domain resource - + Parameters: domain_name: A name for the domain. auth_mode: The mode of authentication that members use to access the domain. @@ -9212,22 +8620,20 @@ def create( 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. 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. 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. - app_network_access: - 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 + 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 home_efs_file_system_kms_key_id: Use KmsKeyId. kms_key_id: SageMaker AI uses Amazon Web Services KMS to encrypt EFS and EBS volumes attached to the domain with an Amazon Web Services managed key by default. For more control, specify a customer managed key. app_security_group_management: The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided. If setting up the domain for use with RStudio, this value must be set to Service. - app_storage_type: tag_propagation: Indicates whether custom tag propagation is supported for the domain. Defaults to DISABLED. default_space_settings: The default settings for shared spaces that users create in the domain. session: Boto3 session. region: Region name. - + Returns: The Domain resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9242,45 +8648,39 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating domain resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "DomainName": domain_name, - "AuthMode": auth_mode, - "DefaultUserSettings": default_user_settings, - "DomainSettings": domain_settings, - "SubnetIds": subnet_ids, - "VpcId": vpc_id, - "Tags": tags, - "AppNetworkAccess": app_network_access, - "AppNetworkAccessType": app_network_access_type, - "HomeEfsFileSystemKmsKeyId": home_efs_file_system_kms_key_id, - "KmsKeyId": kms_key_id, - "AppSecurityGroupManagement": app_security_group_management, - "AppStorageType": app_storage_type, - "TagPropagation": tag_propagation, - "DefaultSpaceSettings": default_space_settings, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Domain", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'DomainName': domain_name, + 'AuthMode': auth_mode, + 'DefaultUserSettings': default_user_settings, + 'DomainSettings': domain_settings, + 'SubnetIds': subnet_ids, + 'VpcId': vpc_id, + 'Tags': tags, + 'AppNetworkAccessType': app_network_access_type, + 'HomeEfsFileSystemKmsKeyId': home_efs_file_system_kms_key_id, + 'KmsKeyId': kms_key_id, + 'AppSecurityGroupManagement': app_security_group_management, + 'TagPropagation': tag_propagation, + 'DefaultSpaceSettings': default_space_settings, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Domain', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_domain(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(domain_id=response["DomainId"], session=session, region=region) - + + return cls.get(domain_id=response['DomainId'], session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -9291,17 +8691,17 @@ def get( ) -> Optional["Domain"]: """ Get a Domain resource - + Parameters: domain_id: The domain ID. session: Boto3 session. region: Region name. - + Returns: The Domain resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9312,38 +8712,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": domain_id, + 'DomainId': domain_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_domain(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeDomainResponse") + transformed_response = transform(response, 'DescribeDomainResponse') domain = cls(**transformed_response) return domain - + @Base.add_validate_call def refresh( self, - ) -> Optional["Domain"]: + + ) -> Optional["Domain"]: """ Refresh a Domain resource - + Returns: The Domain resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9354,21 +8753,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": self.domain_id, + 'DomainId': self.domain_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_domain(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeDomainResponse", self) + transform(response, 'DescribeDomainResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( @@ -9384,15 +8783,15 @@ def update( ) -> Optional["Domain"]: """ Update a Domain resource - + Parameters: domain_settings_for_update: A collection of DomainSettings configuration values to update. - + Returns: The Domain resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9405,43 +8804,43 @@ def update( ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating domain resource.") client = Base.get_sagemaker_client() - - operation_input_args = { - "DomainId": self.domain_id, - "DefaultUserSettings": default_user_settings, - "DomainSettingsForUpdate": domain_settings_for_update, - "AppSecurityGroupManagement": app_security_group_management, - "DefaultSpaceSettings": default_space_settings, - "SubnetIds": subnet_ids, - "AppNetworkAccessType": app_network_access_type, - "TagPropagation": tag_propagation, - "VpcId": vpc_id, + + operation_input_args = { + 'DomainId': self.domain_id, + 'DefaultUserSettings': default_user_settings, + 'DomainSettingsForUpdate': domain_settings_for_update, + 'AppSecurityGroupManagement': app_security_group_management, + 'DefaultSpaceSettings': default_space_settings, + 'SubnetIds': subnet_ids, + 'AppNetworkAccessType': app_network_access_type, + 'TagPropagation': tag_propagation, + 'VpcId': vpc_id, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_domain(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, retention_policy: Optional[RetentionPolicy] = Unassigned(), - ) -> None: + ) -> None: """ Delete a Domain resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9453,85 +8852,75 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "RetentionPolicy": retention_policy, + 'DomainId': self.domain_id, + 'RetentionPolicy': retention_policy, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_domain(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Deleting", - "Failed", - "InService", - "Pending", - "Updating", - "Update_Failed", - "Delete_Failed", - ], + target_status: Literal['Deleting', 'Failed', 'InService', 'Pending', 'Updating', 'Update_Failed', 'Delete_Failed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a Domain resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for Domain to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Domain", status=current_status, reason=self.failure_reason - ) - + raise FailedStatusError(resource_type="Domain", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Domain", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -9540,13 +8929,13 @@ def wait_for_delete( ) -> None: """ Wait for a Domain resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9560,47 +8949,37 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for Domain to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if ( - "delete_failed" in current_status.lower() - or "deletefailed" in current_status.lower() - ): - raise DeleteFailedStatusError( - resource_type="Domain", reason=self.failure_reason - ) - + + if "delete_failed" in current_status.lower() or "deletefailed" in current_status.lower(): + raise DeleteFailedStatusError(resource_type="Domain", reason=self.failure_reason) + + + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Domain", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -9610,32 +8989,30 @@ def get_all( ) -> ResourceIterator["Domain"]: """ Get all Domain resources. - + Parameters: session: Boto3 session. region: Region name. - + Returns: Iterator for listed Domain resources. - + """ - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + return ResourceIterator( client=client, - list_method="list_domains", - summaries_key="Domains", - summary_name="DomainDetails", - resource_cls=Domain, + list_method='list_domains', + summaries_key='Domains', + summary_name='DomainDetails', + resource_cls=Domain ) class EdgeDeploymentPlan(Base): """ Class representing resource EdgeDeploymentPlan - + Attributes: edge_deployment_plan_arn: The ARN of edge deployment plan. edge_deployment_plan_name: The name of the edge deployment plan. @@ -9648,9 +9025,8 @@ class EdgeDeploymentPlan(Base): next_token: Token to use when calling the next set of stages in the edge deployment plan. creation_time: The time when the edge deployment plan was created. last_modified_time: The time when the edge deployment plan was last updated. - + """ - edge_deployment_plan_name: StrPipeVar edge_deployment_plan_arn: Optional[StrPipeVar] = Unassigned() model_configs: Optional[List[EdgeDeploymentModelConfig]] = Unassigned() @@ -9662,23 +9038,23 @@ class EdgeDeploymentPlan(Base): next_token: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "edge_deployment_plan_name" - resource_name_split = resource_name.split("_") + resource_name = 'edge_deployment_plan_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object edge_deployment_plan") return None - + @classmethod @Base.add_validate_call def create( @@ -9693,7 +9069,7 @@ def create( ) -> Optional["EdgeDeploymentPlan"]: """ Create a EdgeDeploymentPlan resource - + Parameters: edge_deployment_plan_name: The name of the edge deployment plan. model_configs: List of models associated with the edge deployment plan. @@ -9702,12 +9078,12 @@ def create( tags: List of tags with which to tag the edge deployment plan. session: Boto3 session. region: Region name. - + Returns: The EdgeDeploymentPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9721,37 +9097,31 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating edge_deployment_plan resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EdgeDeploymentPlanName": edge_deployment_plan_name, - "ModelConfigs": model_configs, - "DeviceFleetName": device_fleet_name, - "Stages": stages, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="EdgeDeploymentPlan", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'EdgeDeploymentPlanName': edge_deployment_plan_name, + 'ModelConfigs': model_configs, + 'DeviceFleetName': device_fleet_name, + 'Stages': stages, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='EdgeDeploymentPlan', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_edge_deployment_plan(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - edge_deployment_plan_name=edge_deployment_plan_name, session=session, region=region - ) - + + return cls.get(edge_deployment_plan_name=edge_deployment_plan_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -9764,19 +9134,19 @@ def get( ) -> Optional["EdgeDeploymentPlan"]: """ Get a EdgeDeploymentPlan resource - + Parameters: edge_deployment_plan_name: The name of the deployment plan to describe. next_token: If the edge deployment plan has enough stages to require tokening, then this is the response from the last list of stages returned. max_results: The maximum number of results to select (50 by default). session: Boto3 session. region: Region name. - + Returns: The EdgeDeploymentPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9787,41 +9157,39 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EdgeDeploymentPlanName": edge_deployment_plan_name, - "NextToken": next_token, - "MaxResults": max_results, + 'EdgeDeploymentPlanName': edge_deployment_plan_name, + 'NextToken': next_token, + 'MaxResults': max_results, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_edge_deployment_plan(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeEdgeDeploymentPlanResponse") + transformed_response = transform(response, 'DescribeEdgeDeploymentPlanResponse') edge_deployment_plan = cls(**transformed_response) return edge_deployment_plan - + @Base.add_validate_call def refresh( self, - max_results: Optional[int] = Unassigned(), - ) -> Optional["EdgeDeploymentPlan"]: + max_results: Optional[int] = Unassigned(), + ) -> Optional["EdgeDeploymentPlan"]: """ Refresh a EdgeDeploymentPlan resource - + Returns: The EdgeDeploymentPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9832,32 +9200,33 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "NextToken": self.next_token, - "MaxResults": max_results, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'NextToken': self.next_token, + 'MaxResults': max_results, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_edge_deployment_plan(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeEdgeDeploymentPlanResponse", self) + transform(response, 'DescribeEdgeDeploymentPlanResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a EdgeDeploymentPlan resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9868,20 +9237,20 @@ def delete( ``` ResourceInUse: Resource being accessed is in use. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_edge_deployment_plan(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -9899,7 +9268,7 @@ def get_all( ) -> ResourceIterator["EdgeDeploymentPlan"]: """ Get all EdgeDeploymentPlan resources - + Parameters: next_token: The response from the last list when returning a list large enough to need tokening. max_results: The maximum number of results to select (50 by default). @@ -9913,12 +9282,12 @@ def get_all( sort_order: The direction of the sorting (ascending or descending). session: Boto3 session. region: Region name. - + Returns: Iterator for listed EdgeDeploymentPlan resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9928,50 +9297,50 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "DeviceFleetNameContains": device_fleet_name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'DeviceFleetNameContains': device_fleet_name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_edge_deployment_plans", - summaries_key="EdgeDeploymentPlanSummaries", - summary_name="EdgeDeploymentPlanSummary", + list_method='list_edge_deployment_plans', + summaries_key='EdgeDeploymentPlanSummaries', + summary_name='EdgeDeploymentPlanSummary', resource_cls=EdgeDeploymentPlan, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def create_stage( self, + session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ Creates a new stage in an existing edge deployment plan. - + Parameters: session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -9982,23 +9351,24 @@ def create_stage( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "Stages": self.stages, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'Stages': self.stages, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling create_edge_deployment_stage API") response = client.create_edge_deployment_stage(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def delete_stage( self, @@ -10008,14 +9378,14 @@ def delete_stage( ) -> None: """ Delete a stage in an edge deployment plan if (and only if) the stage is inactive. - + Parameters: stage_name: The name of the stage. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10026,23 +9396,24 @@ def delete_stage( ``` ResourceInUse: Resource being accessed is in use. """ - + + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "StageName": stage_name, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'StageName': stage_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling delete_edge_deployment_stage API") response = client.delete_edge_deployment_stage(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def start_stage( self, @@ -10052,14 +9423,14 @@ def start_stage( ) -> None: """ Starts a stage in an edge deployment plan. - + Parameters: stage_name: The name of the stage to start. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10069,23 +9440,24 @@ def start_stage( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "StageName": stage_name, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'StageName': stage_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling start_edge_deployment_stage API") response = client.start_edge_deployment_stage(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def stop_stage( self, @@ -10095,14 +9467,14 @@ def stop_stage( ) -> None: """ Stops a stage in an edge deployment plan. - + Parameters: stage_name: The name of the stage to stop. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10112,46 +9484,46 @@ def stop_stage( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "StageName": stage_name, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'StageName': stage_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling stop_edge_deployment_stage API") response = client.stop_edge_deployment_stage(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def get_all_stage_devices( self, stage_name: StrPipeVar, - exclude_devices_deployed_in_other_stage: Optional[bool] = Unassigned(), - session: Optional[Session] = None, + exclude_devices_deployed_in_other_stage: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> ResourceIterator[DeviceDeploymentSummary]: """ Lists devices allocated to the stage, containing detailed device information and deployment status. - + Parameters: stage_name: The name of the stage in the deployment. max_results: The maximum number of requests to select. exclude_devices_deployed_in_other_stage: Toggle for excluding devices deployed in other stages. session: Boto3 session. region: Region name. - + Returns: Iterator for listed DeviceDeploymentSummary. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10161,34 +9533,34 @@ def get_all_stage_devices( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "EdgeDeploymentPlanName": self.edge_deployment_plan_name, - "ExcludeDevicesDeployedInOtherStage": exclude_devices_deployed_in_other_stage, - "StageName": stage_name, + 'EdgeDeploymentPlanName': self.edge_deployment_plan_name, + 'ExcludeDevicesDeployedInOtherStage': exclude_devices_deployed_in_other_stage, + 'StageName': stage_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_stage_devices", - summaries_key="DeviceDeploymentSummaries", - summary_name="DeviceDeploymentSummary", + list_method='list_stage_devices', + summaries_key='DeviceDeploymentSummaries', + summary_name='DeviceDeploymentSummary', resource_cls=DeviceDeploymentSummary, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class EdgePackagingJob(Base): """ Class representing resource EdgePackagingJob - + Attributes: edge_packaging_job_arn: The Amazon Resource Name (ARN) of the edge packaging job. edge_packaging_job_name: The name of the edge packaging job. @@ -10205,9 +9577,8 @@ class EdgePackagingJob(Base): model_artifact: The Amazon Simple Storage (S3) URI where model artifacts ares stored. model_signature: The signature document of files in the model artifact. preset_deployment_output: The output of a SageMaker Edge Manager deployable resource. - + """ - edge_packaging_job_name: StrPipeVar edge_packaging_job_arn: Optional[StrPipeVar] = Unassigned() compilation_job_name: Optional[StrPipeVar] = Unassigned() @@ -10223,42 +9594,44 @@ class EdgePackagingJob(Base): model_artifact: Optional[StrPipeVar] = Unassigned() model_signature: Optional[StrPipeVar] = Unassigned() preset_deployment_output: Optional[EdgePresetDeploymentOutput] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "edge_packaging_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'edge_packaging_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object edge_packaging_job") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "role_arn": {"type": "string"}, - "output_config": { - "s3_output_location": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + }, + "output_config": { + "s3_output_location": { + "type": "string" + }, + "kms_key_id": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "EdgePackagingJob", **kwargs - ), - ) - + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "EdgePackagingJob", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -10277,7 +9650,7 @@ def create( ) -> Optional["EdgePackagingJob"]: """ Create a EdgePackagingJob resource - + Parameters: edge_packaging_job_name: The name of the edge packaging job. compilation_job_name: The name of the SageMaker Neo compilation job that will be used to locate model artifacts for packaging. @@ -10289,12 +9662,12 @@ def create( tags: Creates tags for the packaging job. session: Boto3 session. region: Region name. - + Returns: The EdgePackagingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10308,40 +9681,34 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating edge_packaging_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EdgePackagingJobName": edge_packaging_job_name, - "CompilationJobName": compilation_job_name, - "ModelName": model_name, - "ModelVersion": model_version, - "RoleArn": role_arn, - "OutputConfig": output_config, - "ResourceKey": resource_key, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="EdgePackagingJob", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'EdgePackagingJobName': edge_packaging_job_name, + 'CompilationJobName': compilation_job_name, + 'ModelName': model_name, + 'ModelVersion': model_version, + 'RoleArn': role_arn, + 'OutputConfig': output_config, + 'ResourceKey': resource_key, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='EdgePackagingJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_edge_packaging_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - edge_packaging_job_name=edge_packaging_job_name, session=session, region=region - ) - + + return cls.get(edge_packaging_job_name=edge_packaging_job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -10352,17 +9719,17 @@ def get( ) -> Optional["EdgePackagingJob"]: """ Get a EdgePackagingJob resource - + Parameters: edge_packaging_job_name: The name of the edge packaging job. session: Boto3 session. region: Region name. - + Returns: The EdgePackagingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10373,38 +9740,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EdgePackagingJobName": edge_packaging_job_name, + 'EdgePackagingJobName': edge_packaging_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_edge_packaging_job(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeEdgePackagingJobResponse") + transformed_response = transform(response, 'DescribeEdgePackagingJobResponse') edge_packaging_job = cls(**transformed_response) return edge_packaging_job - + @Base.add_validate_call def refresh( self, - ) -> Optional["EdgePackagingJob"]: + + ) -> Optional["EdgePackagingJob"]: """ Refresh a EdgePackagingJob resource - + Returns: The EdgePackagingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10415,28 +9781,28 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EdgePackagingJobName": self.edge_packaging_job_name, + 'EdgePackagingJobName': self.edge_packaging_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_edge_packaging_job(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeEdgePackagingJobResponse", self) + transform(response, 'DescribeEdgePackagingJobResponse', self) return self - + @Base.add_validate_call def stop(self) -> None: """ Stop a EdgePackagingJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10446,81 +9812,77 @@ def stop(self) -> None: error_code = e.response['Error']['Code'] ``` """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "EdgePackagingJobName": self.edge_packaging_job_name, + 'EdgePackagingJobName': self.edge_packaging_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.stop_edge_packaging_job(**operation_input_args) - + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait( self, poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ Wait for a EdgePackagingJob resource. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - + """ - terminal_states = ["COMPLETED", "FAILED", "STOPPED"] + terminal_states = ['COMPLETED', 'FAILED', 'STOPPED'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for EdgePackagingJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.edge_packaging_job_status status.update(f"Current status: [bold]{current_status}") - + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="EdgePackagingJob", - status=current_status, - reason=self.edge_packaging_job_status_message, - ) - + raise FailedStatusError(resource_type="EdgePackagingJob", status=current_status, reason=self.edge_packaging_job_status_message) + return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="EdgePackagingJob", status=current_status - ) + raise TimeoutExceededError(resource_type="EdgePackagingJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -10539,7 +9901,7 @@ def get_all( ) -> ResourceIterator["EdgePackagingJob"]: """ Get all EdgePackagingJob resources - + Parameters: next_token: The response from the last list when returning a list large enough to need tokening. max_results: Maximum number of results to select. @@ -10554,12 +9916,12 @@ def get_all( sort_order: What direction to sort by. session: Boto3 session. region: Region name. - + Returns: Iterator for listed EdgePackagingJob resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10569,66 +9931,60 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "ModelNameContains": model_name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'ModelNameContains': model_name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_edge_packaging_jobs", - summaries_key="EdgePackagingJobSummaries", - summary_name="EdgePackagingJobSummary", + list_method='list_edge_packaging_jobs', + summaries_key='EdgePackagingJobSummaries', + summary_name='EdgePackagingJobSummary', resource_cls=EdgePackagingJob, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class Endpoint(Base): """ Class representing resource Endpoint - + Attributes: endpoint_name: Name of the endpoint. endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. - endpoint_status: The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use the FailureReason value returned by DescribeEndpoint for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. UpdateRollbackFailed: Both the rolling deployment and auto-rollback failed. Your endpoint is in service with a mix of the old and new endpoint configurations. For information about how to remedy this issue and restore the endpoint's status to InService, see Rolling Deployments. + endpoint_status: The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use the FailureReason value returned by DescribeEndpoint for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. UpdateRollbackFailed: Both the rolling deployment and auto-rollback failed. Your endpoint is in service with a mix of the old and new endpoint configurations. For information about how to remedy this issue and restore the endpoint's status to InService, see Rolling Deployments. creation_time: A timestamp that shows when the endpoint was created. last_modified_time: A timestamp that shows when the endpoint was last modified. endpoint_config_name: The name of the endpoint configuration associated with this endpoint. - deletion_condition: production_variants: An array of ProductionVariantSummary objects, one for each model hosted behind this endpoint. - data_capture_config: - failure_reason: If the status of the endpoint is Failed, the reason why it failed. + data_capture_config: + failure_reason: If the status of the endpoint is Failed, the reason why it failed. last_deployment_config: The most recent deployment configuration for the endpoint. async_inference_config: Returns the description of an endpoint configuration created using the CreateEndpointConfig API. pending_deployment_summary: Returns the summary of an in-progress deployment. This field is only returned when the endpoint is creating or updating with a new endpoint configuration. explainer_config: The configuration parameters for an explainer. shadow_production_variants: An array of ProductionVariantSummary objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants. - graph_config_name: - metrics_config: The Configuration parameters for Utilization metrics. - + metrics_config: The configuration parameters for utilization metrics. + """ - endpoint_name: StrPipeVar endpoint_arn: Optional[StrPipeVar] = Unassigned() endpoint_config_name: Optional[StrPipeVar] = Unassigned() - deletion_condition: Optional[EndpointDeletionCondition] = Unassigned() production_variants: Optional[List[ProductionVariantSummary]] = Unassigned() data_capture_config: Optional[DataCaptureConfigSummary] = Unassigned() endpoint_status: Optional[StrPipeVar] = Unassigned() @@ -10640,52 +9996,57 @@ class Endpoint(Base): pending_deployment_summary: Optional[PendingDeploymentSummary] = Unassigned() explainer_config: Optional[ExplainerConfig] = Unassigned() shadow_production_variants: Optional[List[ProductionVariantSummary]] = Unassigned() - graph_config_name: Optional[StrPipeVar] = Unassigned() metrics_config: Optional[MetricsConfig] = Unassigned() serializer: Optional[BaseSerializer] = None deserializer: Optional[BaseDeserializer] = None - + def get_name(self) -> str: attributes = vars(self) - resource_name = "endpoint_name" - resource_name_split = resource_name.split("_") + resource_name = 'endpoint_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object endpoint") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "data_capture_config": { - "destination_s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "async_inference_config": { - "output_config": { - "kms_key_id": {"type": "string"}, - "s3_output_path": {"type": "string"}, - "s3_failure_path": {"type": "string"}, - } - }, + config_schema_for_resource = \ + { + "data_capture_config": { + "destination_s3_uri": { + "type": "string" + }, + "kms_key_id": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Endpoint", **kwargs - ), - ) - + }, + "async_inference_config": { + "output_config": { + "kms_key_id": { + "type": "string" + }, + "s3_output_path": { + "type": "string" + }, + "s3_failure_path": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Endpoint", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -10693,8 +10054,6 @@ def create( cls, endpoint_name: StrPipeVar, endpoint_config_name: Union[StrPipeVar, object], - graph_config_name: Optional[StrPipeVar] = Unassigned(), - deletion_condition: Optional[EndpointDeletionCondition] = Unassigned(), deployment_config: Optional[DeploymentConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, @@ -10702,22 +10061,20 @@ def create( ) -> Optional["Endpoint"]: """ Create a Endpoint resource - + Parameters: endpoint_name: The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in CreateEndpoint, but the case is preserved and must be matched in InvokeEndpoint. - endpoint_config_name: The name of an endpoint configuration. For more information, see CreateEndpointConfig. - graph_config_name: - deletion_condition: - deployment_config: + endpoint_config_name: The name of an endpoint configuration. For more information, see CreateEndpointConfig. + deployment_config: 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. session: Boto3 session. region: Region name. - + Returns: The Endpoint resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10731,36 +10088,30 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating endpoint resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "EndpointName": endpoint_name, - "EndpointConfigName": endpoint_config_name, - "GraphConfigName": graph_config_name, - "DeletionCondition": deletion_condition, - "DeploymentConfig": deployment_config, - "Tags": tags, + 'EndpointName': endpoint_name, + 'EndpointConfigName': endpoint_config_name, + 'DeploymentConfig': deployment_config, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Endpoint", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='Endpoint', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_endpoint(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(endpoint_name=endpoint_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -10771,17 +10122,17 @@ def get( ) -> Optional["Endpoint"]: """ Get a Endpoint resource - + Parameters: endpoint_name: The name of the endpoint. session: Boto3 session. region: Region name. - + Returns: The Endpoint resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10791,38 +10142,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "EndpointName": endpoint_name, + 'EndpointName': endpoint_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_endpoint(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeEndpointOutput") + transformed_response = transform(response, 'DescribeEndpointOutput') endpoint = cls(**transformed_response) return endpoint - + @Base.add_validate_call def refresh( self, - ) -> Optional["Endpoint"]: + + ) -> Optional["Endpoint"]: """ Refresh a Endpoint resource - + Returns: The Endpoint resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10832,21 +10182,21 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "EndpointName": self.endpoint_name, + 'EndpointName': self.endpoint_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_endpoint(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeEndpointOutput", self) + transform(response, 'DescribeEndpointOutput', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( @@ -10858,18 +10208,18 @@ def update( ) -> Optional["Endpoint"]: """ Update a Endpoint resource - + Parameters: retain_all_variant_properties: When updating endpoint resources, enables or disables the retention of variant properties, such as the instance count or the variant weight. To retain the variant properties of an endpoint when updating it, set RetainAllVariantProperties to true. To use the variant properties specified in a new EndpointConfig call when updating an endpoint, set RetainAllVariantProperties to false. The default is false. - exclude_retained_variant_properties: When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. + exclude_retained_variant_properties: When you are updating endpoint resources with RetainAllVariantProperties, whose value is set to true, ExcludeRetainedVariantProperties specifies the list of type VariantProperty to override with the values provided by EndpointConfig. If you don't specify a value for ExcludeRetainedVariantProperties, no variant properties are overridden. deployment_config: The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations. retain_deployment_config: Specifies whether to reuse the last deployment configuration. The default value is false (the configuration is not reused). - + Returns: The Endpoint resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10880,40 +10230,40 @@ def update( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + logger.info("Updating endpoint resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "EndpointName": self.endpoint_name, - "EndpointConfigName": self.endpoint_config_name, - "RetainAllVariantProperties": retain_all_variant_properties, - "ExcludeRetainedVariantProperties": exclude_retained_variant_properties, - "DeploymentConfig": deployment_config, - "RetainDeploymentConfig": retain_deployment_config, + 'EndpointName': self.endpoint_name, + 'EndpointConfigName': self.endpoint_config_name, + 'RetainAllVariantProperties': retain_all_variant_properties, + 'ExcludeRetainedVariantProperties': exclude_retained_variant_properties, + 'DeploymentConfig': deployment_config, + 'RetainDeploymentConfig': retain_deployment_config, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_endpoint(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - force_delete: Optional[bool] = Unassigned(), - ) -> None: + + ) -> None: """ Delete a Endpoint resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -10923,109 +10273,74 @@ def delete( error_code = e.response['Error']['Code'] ``` """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "EndpointName": self.endpoint_name, - "ForceDelete": force_delete, + 'EndpointName': self.endpoint_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_endpoint(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "OutOfService", - "Creating", - "Updating", - "SystemUpdating", - "RollingBack", - "InService", - "Deleting", - "Failed", - "UpdateRollbackFailed", - ], + target_status: Literal['OutOfService', 'Creating', 'Updating', 'SystemUpdating', 'RollingBack', 'InService', 'Deleting', 'Failed', 'UpdateRollbackFailed'], poll: int = 5, - timeout: Optional[int] = None, - logs: Optional[bool] = False, + timeout: Optional[int] = None ) -> None: """ Wait for a Endpoint resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - logs: Whether to print logs while waiting. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for Endpoint to reach [bold]{target_status} status...") status = Status("Current status:") - - if logs: - instance_count = ( - sum(variant.current_instance_count for variant in self.production_variants) - if self.production_variants and not isinstance(self.production_variants, Unassigned) - else 1 - ) - log_group_name = f"/aws/sagemaker/Endpoints/{self.get_name()}" - logger.info(f"log_group_name") - logger.info(log_group_name) - multi_stream_logger = MultiLogStreamHandler( - log_group_name=f"/aws/sagemaker/Endpoints/{self.get_name()}", - log_stream_name_prefix=self.get_name(), - expected_stream_count=instance_count, - ) - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.endpoint_status status.update(f"Current status: [bold]{current_status}") - - if logs and multi_stream_logger.ready(): - stream_log_events = multi_stream_logger.get_latest_log_events() - for stream_id, event in stream_log_events: - logger.info(f"{stream_id}:\n{event['message']}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Endpoint", status=current_status, reason=self.failure_reason - ) - + raise FailedStatusError(resource_type="Endpoint", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Endpoint", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -11034,13 +10349,13 @@ def wait_for_delete( ) -> None: """ Wait for a Endpoint resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11054,39 +10369,34 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for Endpoint to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.endpoint_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Endpoint", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -11104,7 +10414,7 @@ def get_all( ) -> ResourceIterator["Endpoint"]: """ Get all Endpoint resources - + Parameters: sort_by: Sorts the list of results. The default is CreationTime. sort_order: The sort order for results. The default is Descending. @@ -11113,17 +10423,17 @@ def get_all( name_contains: A string in endpoint names. This filter returns only endpoints whose name contains the specified string. creation_time_before: A filter that returns only endpoints that were created before the specified time (timestamp). creation_time_after: A filter that returns only endpoints with a creation time greater than or equal to the specified time (timestamp). - last_modified_time_before: A filter that returns only endpoints that were modified before the specified timestamp. - last_modified_time_after: A filter that returns only endpoints that were modified after the specified timestamp. + last_modified_time_before: A filter that returns only endpoints that were modified before the specified timestamp. + last_modified_time_after: A filter that returns only endpoints that were modified after the specified timestamp. status_equals: A filter that returns only endpoints with the specified status. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Endpoint resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11133,35 +10443,34 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "StatusEquals": status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'StatusEquals': status_equals, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_endpoints", - summaries_key="Endpoints", - summary_name="EndpointSummary", + list_method='list_endpoints', + summaries_key='Endpoints', + summary_name='EndpointSummary', resource_cls=Endpoint, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def update_weights_and_capacities( self, @@ -11171,14 +10480,14 @@ def update_weights_and_capacities( ) -> None: """ Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint. - + Parameters: desired_weights_and_capacities: An object that provides new capacity and weight values for a variant. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11189,23 +10498,24 @@ def update_weights_and_capacities( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + + operation_input_args = { - "EndpointName": self.endpoint_name, - "DesiredWeightsAndCapacities": desired_weights_and_capacities, + 'EndpointName': self.endpoint_name, + 'DesiredWeightsAndCapacities': desired_weights_and_capacities, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling update_endpoint_weights_and_capacities API") response = client.update_endpoint_weights_and_capacities(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def invoke( self, @@ -11225,27 +10535,27 @@ def invoke( ) -> Optional[InvokeEndpointOutput]: """ 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. - + Parameters: 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. content_type: The MIME type of the input data in the request body. accept: The desired MIME type of the inference response from the model container. - 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. + 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. target_model: The model to request for inference when invoking a multi-model endpoint. - 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 + 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 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. 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. - 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. + 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. inference_component_name: If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke. 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. session: Boto3 session. region: Region name. - + Returns: InvokeEndpointOutput - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11261,54 +10571,49 @@ def invoke( ServiceUnavailable: The service is currently unavailable. ValidationError: There was an error validating your request. """ - + + use_serializer = False - if (self.serializer is not None and self.deserializer is None) or ( - self.serializer is None and self.deserializer is not None - ): - raise ValueError( - "Both serializer and deserializer must be provided together, or neither should be provided" - ) + if ((self.serializer is not None and self.deserializer is None) or + (self.serializer is None and self.deserializer is not None)): + raise ValueError("Both serializer and deserializer must be provided together, or neither should be provided") if self.serializer is not None and self.deserializer is not None: use_serializer = True if use_serializer: body = self.serializer.serialize(body) operation_input_args = { - "EndpointName": self.endpoint_name, - "Body": body, - "ContentType": content_type, - "Accept": accept, - "CustomAttributes": custom_attributes, - "TargetModel": target_model, - "TargetVariant": target_variant, - "TargetContainerHostname": target_container_hostname, - "InferenceId": inference_id, - "EnableExplanations": enable_explanations, - "InferenceComponentName": inference_component_name, - "SessionId": session_id, + 'EndpointName': self.endpoint_name, + 'Body': body, + 'ContentType': content_type, + 'Accept': accept, + 'CustomAttributes': custom_attributes, + 'TargetModel': target_model, + 'TargetVariant': target_variant, + 'TargetContainerHostname': target_container_hostname, + 'InferenceId': inference_id, + 'EnableExplanations': enable_explanations, + 'InferenceComponentName': inference_component_name, + 'SessionId': session_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-runtime" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-runtime') + logger.debug(f"Calling invoke_endpoint API") response = client.invoke_endpoint(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "InvokeEndpointOutput") + + transformed_response = transform(response, 'InvokeEndpointOutput') # Deserialize the body if a deserializer is provided if use_serializer: body_content = transformed_response["body"] - deserialized_body = self.deserializer.deserialize( - body_content, transformed_response["content_type"] - ) + deserialized_body = self.deserializer.deserialize(body_content, transformed_response["content_type"]) transformed_response["body"] = deserialized_body return InvokeEndpointOutput(**transformed_response) - + + @Base.add_validate_call def invoke_async( self, @@ -11324,23 +10629,23 @@ def invoke_async( ) -> Optional[InvokeEndpointAsyncOutput]: """ 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. - + Parameters: input_location: The Amazon S3 URI where the inference request payload is stored. content_type: The MIME type of the input data in the request body. accept: The desired MIME type of the inference response from the model container. - 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. - inference_id: The identifier for the inference request. Amazon SageMaker will generate an identifier for you if none is specified. + 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. + inference_id: The identifier for the inference request. Amazon SageMaker will generate an identifier for you if none is specified. 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. 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. session: Boto3 session. region: Region name. - + Returns: InvokeEndpointAsyncOutput - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11353,32 +10658,32 @@ def invoke_async( ServiceUnavailable: The service is currently unavailable. ValidationError: There was an error validating your request. """ - + + operation_input_args = { - "EndpointName": self.endpoint_name, - "ContentType": content_type, - "Accept": accept, - "CustomAttributes": custom_attributes, - "InferenceId": inference_id, - "InputLocation": input_location, - "RequestTTLSeconds": request_ttl_seconds, - "InvocationTimeoutSeconds": invocation_timeout_seconds, + 'EndpointName': self.endpoint_name, + 'ContentType': content_type, + 'Accept': accept, + 'CustomAttributes': custom_attributes, + 'InferenceId': inference_id, + 'InputLocation': input_location, + 'RequestTTLSeconds': request_ttl_seconds, + 'InvocationTimeoutSeconds': invocation_timeout_seconds, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-runtime" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-runtime') + logger.debug(f"Calling invoke_endpoint_async API") response = client.invoke_endpoint_async(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "InvokeEndpointAsyncOutput") + + transformed_response = transform(response, 'InvokeEndpointAsyncOutput') return InvokeEndpointAsyncOutput(**transformed_response) - + + @Base.add_validate_call def invoke_with_response_stream( self, @@ -11396,25 +10701,25 @@ def invoke_with_response_stream( ) -> Optional[InvokeEndpointWithResponseStreamOutput]: """ Invokes a model at the specified endpoint to return the inference response as a stream. - + Parameters: 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. content_type: The MIME type of the input data in the request body. accept: The desired MIME type of the inference response from the model container. - 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. - 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 + 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. + 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 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. inference_id: An identifier that you assign to your request. inference_component_name: If the endpoint hosts one or more inference components, this parameter specifies the name of inference component to invoke for a streaming response. session_id: The ID of a stateful session to handle your request. You can't create a stateful session by using the InvokeEndpointWithResponseStream action. Instead, you can create one by using the InvokeEndpoint action. In your request, you specify NEW_SESSION for the SessionId request parameter. The response to that request provides the session ID for the NewSessionId response parameter. session: Boto3 session. region: Region name. - + Returns: InvokeEndpointWithResponseStreamOutput - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11430,56 +10735,54 @@ def invoke_with_response_stream( ServiceUnavailable: The service is currently unavailable. ValidationError: There was an error validating your request. """ - + + operation_input_args = { - "EndpointName": self.endpoint_name, - "Body": body, - "ContentType": content_type, - "Accept": accept, - "CustomAttributes": custom_attributes, - "TargetVariant": target_variant, - "TargetContainerHostname": target_container_hostname, - "InferenceId": inference_id, - "InferenceComponentName": inference_component_name, - "SessionId": session_id, + 'EndpointName': self.endpoint_name, + 'Body': body, + 'ContentType': content_type, + 'Accept': accept, + 'CustomAttributes': custom_attributes, + 'TargetVariant': target_variant, + 'TargetContainerHostname': target_container_hostname, + 'InferenceId': inference_id, + 'InferenceComponentName': inference_component_name, + 'SessionId': session_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-runtime" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-runtime') + logger.debug(f"Calling invoke_endpoint_with_response_stream API") response = client.invoke_endpoint_with_response_stream(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "InvokeEndpointWithResponseStreamOutput") + + transformed_response = transform(response, 'InvokeEndpointWithResponseStreamOutput') return InvokeEndpointWithResponseStreamOutput(**transformed_response) class EndpointConfig(Base): """ Class representing resource EndpointConfig - + Attributes: endpoint_config_name: Name of the SageMaker endpoint configuration. endpoint_config_arn: The Amazon Resource Name (ARN) of the endpoint configuration. production_variants: An array of ProductionVariant objects, one for each model that you want to host at this endpoint. creation_time: A timestamp that shows when the endpoint configuration was created. - data_capture_config: + data_capture_config: kms_key_id: Amazon Web Services KMS key ID Amazon SageMaker uses to encrypt data when storing it on the ML storage volume attached to the instance. async_inference_config: Returns the description of an endpoint configuration created using the CreateEndpointConfig API. explainer_config: The configuration parameters for an explainer. shadow_production_variants: An array of ProductionVariant objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants. execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that you assigned to the endpoint configuration. - vpc_config: + vpc_config: enable_network_isolation: Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers. - metrics_config: The Configuration parameters for Utilization metrics. - + metrics_config: The configuration parameters for utilization metrics. + """ - endpoint_config_name: StrPipeVar endpoint_config_arn: Optional[StrPipeVar] = Unassigned() production_variants: Optional[List[ProductionVariant]] = Unassigned() @@ -11493,54 +10796,74 @@ class EndpointConfig(Base): vpc_config: Optional[VpcConfig] = Unassigned() enable_network_isolation: Optional[bool] = Unassigned() metrics_config: Optional[MetricsConfig] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "endpoint_config_name" - resource_name_split = resource_name.split("_") + resource_name = 'endpoint_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object endpoint_config") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "data_capture_config": { - "destination_s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "kms_key_id": {"type": "string"}, - "async_inference_config": { - "output_config": { - "kms_key_id": {"type": "string"}, - "s3_output_path": {"type": "string"}, - "s3_failure_path": {"type": "string"}, - } - }, - "execution_role_arn": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, + config_schema_for_resource = \ + { + "data_capture_config": { + "destination_s3_uri": { + "type": "string" + }, + "kms_key_id": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "EndpointConfig", **kwargs - ), - ) - + }, + "kms_key_id": { + "type": "string" + }, + "async_inference_config": { + "output_config": { + "kms_key_id": { + "type": "string" + }, + "s3_output_path": { + "type": "string" + }, + "s3_failure_path": { + "type": "string" + } + } + }, + "execution_role_arn": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "EndpointConfig", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -11563,28 +10886,28 @@ def create( ) -> Optional["EndpointConfig"]: """ Create a EndpointConfig resource - + Parameters: - endpoint_config_name: The name of the endpoint configuration. You specify this name in a CreateEndpoint request. + endpoint_config_name: The name of the endpoint configuration. You specify this name in a CreateEndpoint request. production_variants: An array of ProductionVariant objects, one for each model that you want to host at this endpoint. - data_capture_config: + data_capture_config: 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. - kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMS Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. + kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMS Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. async_inference_config: Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order for your Endpoint to be invoked using InvokeEndpointAsync. explainer_config: A member of CreateEndpointConfig that enables explainers. shadow_production_variants: An array of ProductionVariant objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants. If you use this field, you can only specify one variant for ProductionVariants and one variant for ShadowProductionVariants. - execution_role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf. For more information, see SageMaker AI Roles. To be able to pass this role to Amazon SageMaker AI, the caller of this action must have the iam:PassRole permission. - vpc_config: + execution_role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf. For more information, see SageMaker AI Roles. To be able to pass this role to Amazon SageMaker AI, the caller of this action must have the iam:PassRole permission. + vpc_config: enable_network_isolation: Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers. - metrics_config: The Configuration parameters for Utilization metrics. + metrics_config: The configuration parameters for utilization metrics. session: Boto3 session. region: Region name. - + Returns: The EndpointConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11598,42 +10921,38 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating endpoint_config resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EndpointConfigName": endpoint_config_name, - "ProductionVariants": production_variants, - "DataCaptureConfig": data_capture_config, - "Tags": tags, - "KmsKeyId": kms_key_id, - "AsyncInferenceConfig": async_inference_config, - "ExplainerConfig": explainer_config, - "ShadowProductionVariants": shadow_production_variants, - "ExecutionRoleArn": execution_role_arn, - "VpcConfig": vpc_config, - "EnableNetworkIsolation": enable_network_isolation, - "MetricsConfig": metrics_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="EndpointConfig", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'EndpointConfigName': endpoint_config_name, + 'ProductionVariants': production_variants, + 'DataCaptureConfig': data_capture_config, + 'Tags': tags, + 'KmsKeyId': kms_key_id, + 'AsyncInferenceConfig': async_inference_config, + 'ExplainerConfig': explainer_config, + 'ShadowProductionVariants': shadow_production_variants, + 'ExecutionRoleArn': execution_role_arn, + 'VpcConfig': vpc_config, + 'EnableNetworkIsolation': enable_network_isolation, + 'MetricsConfig': metrics_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='EndpointConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_endpoint_config(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(endpoint_config_name=endpoint_config_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -11644,17 +10963,17 @@ def get( ) -> Optional["EndpointConfig"]: """ Get a EndpointConfig resource - + Parameters: endpoint_config_name: The name of the endpoint configuration. session: Boto3 session. region: Region name. - + Returns: The EndpointConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11664,38 +10983,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "EndpointConfigName": endpoint_config_name, + 'EndpointConfigName': endpoint_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_endpoint_config(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeEndpointConfigOutput") + transformed_response = transform(response, 'DescribeEndpointConfigOutput') endpoint_config = cls(**transformed_response) return endpoint_config - + @Base.add_validate_call def refresh( self, - ) -> Optional["EndpointConfig"]: + + ) -> Optional["EndpointConfig"]: """ Refresh a EndpointConfig resource - + Returns: The EndpointConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11705,30 +11023,31 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "EndpointConfigName": self.endpoint_config_name, + 'EndpointConfigName': self.endpoint_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_endpoint_config(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeEndpointConfigOutput", self) + transform(response, 'DescribeEndpointConfigOutput', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a EndpointConfig resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11738,20 +11057,20 @@ def delete( error_code = e.response['Error']['Code'] ``` """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "EndpointConfigName": self.endpoint_config_name, + 'EndpointConfigName': self.endpoint_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_endpoint_config(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -11766,23 +11085,23 @@ def get_all( ) -> ResourceIterator["EndpointConfig"]: """ Get all EndpointConfig resources - + Parameters: sort_by: The field to sort results by. The default is CreationTime. sort_order: The sort order for results. The default is Descending. - next_token: If the result of the previous ListEndpointConfig request was truncated, the response includes a NextToken. To retrieve the next set of endpoint configurations, use the token in the next request. + next_token: If the result of the previous ListEndpointConfig request was truncated, the response includes a NextToken. To retrieve the next set of endpoint configurations, use the token in the next request. max_results: The maximum number of training jobs to return in the response. - name_contains: A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains the specified string. + name_contains: A string in the endpoint configuration name. This filter returns only endpoint configurations whose name contains the specified string. creation_time_before: A filter that returns only endpoint configurations created before the specified time (timestamp). creation_time_after: A filter that returns only endpoint configurations with a creation time greater than or equal to the specified time (timestamp). session: Boto3 session. region: Region name. - + Returns: Iterator for listed EndpointConfig resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11792,91 +11111,100 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_endpoint_configs", - summaries_key="EndpointConfigs", - summary_name="EndpointConfigSummary", + list_method='list_endpoint_configs', + summaries_key='EndpointConfigs', + summary_name='EndpointConfigSummary', resource_cls=EndpointConfig, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) -''' -class EndpointConfigInternal(Base): - """ - Class representing resource EndpointConfigInternal +class Experiment(Base): + """ + Class representing resource Experiment + Attributes: - endpoint_config_input: - account_id: - auto_ml_job_arn: - endpoint_config_output: - + experiment_name: The name of the experiment. + experiment_arn: The Amazon Resource Name (ARN) of the experiment. + display_name: The name of the experiment as displayed. If DisplayName isn't specified, ExperimentName is displayed. + source: The Amazon Resource Name (ARN) of the source and, optionally, the type. + description: The description of the experiment. + creation_time: When the experiment was created. + created_by: Who created the experiment. + last_modified_time: When the experiment was last modified. + last_modified_by: Who last modified the experiment. + """ - - endpoint_config_input: CreateEndpointConfigInput - account_id: StrPipeVar - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - endpoint_config_output: Optional[CreateEndpointConfigOutput] = Unassigned() - + experiment_name: StrPipeVar + experiment_arn: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + source: Optional[ExperimentSource] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "endpoint_config_internal_name" - resource_name_split = resource_name.split("_") + resource_name = 'experiment_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object endpoint_config_internal") + logger.error("Name attribute not found for object experiment") return None - + @classmethod @Base.add_validate_call def create( cls, - endpoint_config_input: CreateEndpointConfigInput, - account_id: StrPipeVar, - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), + experiment_name: StrPipeVar, + display_name: Optional[StrPipeVar] = Unassigned(), + description: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["EndpointConfigInternal"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["Experiment"]: """ - Create a EndpointConfigInternal resource - + Create a Experiment resource + Parameters: - endpoint_config_input: - account_id: - auto_ml_job_arn: + experiment_name: The name of the experiment. The name must be unique in your Amazon Web Services account and is not case-sensitive. + display_name: The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify DisplayName, the value in ExperimentName is displayed. + description: The description of the experiment. + tags: A list of tags to associate with the experiment. You can use Search API to search on the tags. session: Boto3 session. region: Region name. - + Returns: - The EndpointConfigInternal resource. - + The Experiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11885,40 +11213,97 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + logger.info("Creating experiment resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "EndpointConfigInput": endpoint_config_input, - "AccountId": account_id, - "AutoMLJobArn": auto_ml_job_arn, + 'ExperimentName': experiment_name, + 'DisplayName': display_name, + 'Description': description, + 'Tags': tags, } + + operation_input_args = Base.populate_chained_attributes(resource_name='Experiment', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_endpoint_config_internal API") - response = client.create_endpoint_config_internal(**operation_input_args) + + # create the resource + response = client.create_experiment(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateEndpointConfigOutputInternal") - return cls(**operation_input_args, **transformed_response) - + + return cls.get(experiment_name=experiment_name, session=session, region=region) + + @classmethod @Base.add_validate_call - def delete( + def get( + cls, + experiment_name: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["Experiment"]: + """ + Get a Experiment resource + + Parameters: + experiment_name: The name of the experiment to describe. + session: Boto3 session. + region: Region name. + + Returns: + The Experiment resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'ExperimentName': experiment_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_experiment(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeExperimentResponse') + experiment = cls(**transformed_response) + return experiment + + @Base.add_validate_call + def refresh( self, - ) -> None: + + ) -> Optional["Experiment"]: """ - Delete a EndpointConfigInternal resource - + Refresh a Experiment resource + + Returns: + The Experiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -11927,94 +11312,37 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + operation_input_args = { - "EndpointConfigInput": self.endpoint_config_input, - "AccountId": self.account_id, - "AutoMLJobArn": self.auto_ml_job_arn, + 'ExperimentName': self.experiment_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_endpoint_config_internal(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - -class EndpointInternal(Base): - """ - Class representing resource EndpointInternal - - Attributes: - endpoint_input: - account_id: - auto_ml_job_arn: - fas_credentials: - encrypted_fas_credentials: - billing_mode: - endpoint_output: - - """ - - endpoint_input: CreateEndpointInput - account_id: StrPipeVar - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - encrypted_fas_credentials: Optional[StrPipeVar] = Unassigned() - billing_mode: Optional[StrPipeVar] = Unassigned() - endpoint_output: Optional[CreateEndpointOutput] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "endpoint_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object endpoint_internal") - return None - - @classmethod + + client = Base.get_sagemaker_client() + response = client.describe_experiment(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeExperimentResponse', self) + return self + @Base.add_validate_call - def create( - cls, - endpoint_input: CreateEndpointInput, - account_id: StrPipeVar, - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - encrypted_fas_credentials: Optional[StrPipeVar] = Unassigned(), - billing_mode: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["EndpointInternal"]: + def update( + self, + display_name: Optional[StrPipeVar] = Unassigned(), + description: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["Experiment"]: """ - Create a EndpointInternal resource - - Parameters: - endpoint_input: - account_id: - auto_ml_job_arn: - fas_credentials: - encrypted_fas_credentials: - billing_mode: - session: Boto3 session. - region: Region name. - + Update a Experiment resource + Returns: - The EndpointInternal resource. - + The Experiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12023,43 +11351,40 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating experiment resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "EndpointInput": endpoint_input, - "AccountId": account_id, - "AutoMLJobArn": auto_ml_job_arn, - "FasCredentials": fas_credentials, - "EncryptedFasCredentials": encrypted_fas_credentials, - "BillingMode": billing_mode, + 'ExperimentName': self.experiment_name, + 'DisplayName': display_name, + 'Description': description, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_endpoint_internal API") - response = client.create_endpoint_internal(**operation_input_args) + + # create the resource + response = client.update_experiment(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateEndpointOutputInternal") - return cls(**operation_input_args, **transformed_response) - + self.refresh() + + return self + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a EndpointInternal resource - + Delete a Experiment resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12068,118 +11393,217 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "EndpointInput": self.endpoint_input, - "AccountId": self.account_id, - "AutoMLJobArn": self.auto_ml_job_arn, + 'ExperimentName': self.experiment_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_endpoint_internal(**operation_input_args) - + + client.delete_experiment(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @classmethod + @Base.add_validate_call + def get_all( + cls, + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["Experiment"]: + """ + Get all Experiment resources + + Parameters: + created_after: A filter that returns only experiments created after the specified time. + created_before: A filter that returns only experiments created before the specified time. + sort_by: The property used to sort results. The default value is CreationTime. + sort_order: The sort order. The default value is Descending. + next_token: If the previous call to ListExperiments didn't return the full set of experiments, the call returns a token for getting the next set of experiments. + max_results: The maximum number of experiments to return in the response. The default value is 10. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed Experiment resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_experiments', + summaries_key='ExperimentSummaries', + summary_name='ExperimentSummary', + resource_cls=Experiment, + list_method_kwargs=operation_input_args + ) -class EvaluationJob(Base): +class FeatureGroup(Base): """ - Class representing resource EvaluationJob - + Class representing resource FeatureGroup + Attributes: - evaluation_job_name: - evaluation_job_arn: - creation_time: - evaluation_job_status: - output_data_config: - role_arn: - evaluation_method: - input_data_config: - evaluation_config: - failure_reason: - description: - tags: - model_config: - job_id: - upstream_platform_config: - + feature_group_arn: The Amazon Resource Name (ARN) of the FeatureGroup. + feature_group_name: he name of the FeatureGroup. + record_identifier_feature_name: The name of the Feature used for RecordIdentifier, whose value uniquely identifies a record stored in the feature store. + event_time_feature_name: The name of the feature that stores the EventTime of a Record in a FeatureGroup. An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup have a corresponding EventTime. + feature_definitions: A list of the Features in the FeatureGroup. Each feature is defined by a FeatureName and FeatureType. + creation_time: A timestamp indicating when SageMaker created the FeatureGroup. + next_token: A token to resume pagination of the list of Features (FeatureDefinitions). + last_modified_time: A timestamp indicating when the feature group was last updated. + online_store_config: The configuration for the OnlineStore. + offline_store_config: The configuration of the offline store. It includes the following configurations: Amazon S3 location of the offline store. Configuration of the Glue data catalog. Table format of the offline store. Option to disable the automatic creation of a Glue table for the offline store. Encryption configuration. + throughput_config: + role_arn: The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. + feature_group_status: The status of the feature group. + offline_store_status: The status of the OfflineStore. Notifies you if replicating data into the OfflineStore has failed. Returns either: Active or Blocked + last_update_status: A value indicating whether the update made to the feature group was successful. + failure_reason: The reason that the FeatureGroup failed to be replicated in the OfflineStore. This is failure can occur because: The FeatureGroup could not be created in the OfflineStore. The FeatureGroup could not be deleted from the OfflineStore. + description: A free form description of the feature group. + online_store_total_size_bytes: The size of the OnlineStore in bytes. + """ - - evaluation_job_name: StrPipeVar - evaluation_job_arn: Optional[StrPipeVar] = Unassigned() + feature_group_name: StrPipeVar + feature_group_arn: Optional[StrPipeVar] = Unassigned() + record_identifier_feature_name: Optional[StrPipeVar] = Unassigned() + event_time_feature_name: Optional[StrPipeVar] = Unassigned() + feature_definitions: Optional[List[FeatureDefinition]] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + online_store_config: Optional[OnlineStoreConfig] = Unassigned() + offline_store_config: Optional[OfflineStoreConfig] = Unassigned() + throughput_config: Optional[ThroughputConfigDescription] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + feature_group_status: Optional[StrPipeVar] = Unassigned() + offline_store_status: Optional[OfflineStoreStatus] = Unassigned() + last_update_status: Optional[LastUpdateStatus] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() - evaluation_job_status: Optional[StrPipeVar] = Unassigned() description: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - output_data_config: Optional[EvaluationJobOutputDataConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - evaluation_method: Optional[StrPipeVar] = Unassigned() - model_config: Optional[EvaluationJobModelConfig] = Unassigned() - input_data_config: Optional[EvaluationJobInputDataConfig] = Unassigned() - evaluation_config: Optional[EvaluationJobEvaluationConfig] = Unassigned() - job_id: Optional[StrPipeVar] = Unassigned() - upstream_platform_config: Optional[EvaluationJobUpstreamPlatformConfig] = Unassigned() - + next_token: Optional[StrPipeVar] = Unassigned() + online_store_total_size_bytes: Optional[int] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "evaluation_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'feature_group_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object evaluation_job") + logger.error("Name attribute not found for object feature_group") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "online_store_config": { + "security_config": { + "kms_key_id": { + "type": "string" + } + } + }, + "offline_store_config": { + "s3_storage_config": { + "s3_uri": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + }, + "resolved_output_s3_uri": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "FeatureGroup", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - evaluation_job_name: StrPipeVar, - evaluation_method: StrPipeVar, - output_data_config: EvaluationJobOutputDataConfig, - input_data_config: EvaluationJobInputDataConfig, - evaluation_config: EvaluationJobEvaluationConfig, - role_arn: StrPipeVar, + feature_group_name: StrPipeVar, + record_identifier_feature_name: StrPipeVar, + event_time_feature_name: StrPipeVar, + feature_definitions: List[FeatureDefinition], + online_store_config: Optional[OnlineStoreConfig] = Unassigned(), + offline_store_config: Optional[OfflineStoreConfig] = Unassigned(), + throughput_config: Optional[ThroughputConfig] = Unassigned(), + role_arn: Optional[StrPipeVar] = Unassigned(), description: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - model_config: Optional[EvaluationJobModelConfig] = Unassigned(), - upstream_platform_config: Optional[EvaluationJobUpstreamPlatformConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["EvaluationJob"]: + ) -> Optional["FeatureGroup"]: """ - Create a EvaluationJob resource - + Create a FeatureGroup resource + Parameters: - evaluation_job_name: - evaluation_method: - output_data_config: - input_data_config: - evaluation_config: - role_arn: - description: - tags: - model_config: - upstream_platform_config: + feature_group_name: The name of the FeatureGroup. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. The name: Must start with an alphanumeric character. Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed. + record_identifier_feature_name: The name of the Feature whose value uniquely identifies a Record defined in the FeatureStore. Only the latest record per identifier value will be stored in the OnlineStore. RecordIdentifierFeatureName must be one of feature definitions' names. You use the RecordIdentifierFeatureName to access data in a FeatureStore. This name: Must start with an alphanumeric character. Can only contains alphanumeric characters, hyphens, underscores. Spaces are not allowed. + event_time_feature_name: The name of the feature that stores the EventTime of a Record in a FeatureGroup. An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup must have a corresponding EventTime. An EventTime can be a String or Fractional. Fractional: EventTime feature values must be a Unix timestamp in seconds. String: EventTime feature values must be an ISO-8601 string in the format. The following formats are supported yyyy-MM-dd'T'HH:mm:ssZ and yyyy-MM-dd'T'HH:mm:ss.SSSZ where yyyy, MM, and dd represent the year, month, and day respectively and HH, mm, ss, and if applicable, SSS represent the hour, month, second and milliseconds respsectively. 'T' and Z are constants. + feature_definitions: A list of Feature names and types. Name and Type is compulsory per Feature. Valid feature FeatureTypes are Integral, Fractional and String. FeatureNames cannot be any of the following: is_deleted, write_time, api_invocation_time You can create up to 2,500 FeatureDefinitions per FeatureGroup. + online_store_config: You can turn the OnlineStore on or off by specifying True for the EnableOnlineStore flag in OnlineStoreConfig. You can also include an Amazon Web Services KMS key ID (KMSKeyId) for at-rest encryption of the OnlineStore. The default value is False. + offline_store_config: Use this to configure an OfflineFeatureStore. This parameter allows you to specify: The Amazon Simple Storage Service (Amazon S3) location of an OfflineStore. A configuration for an Amazon Web Services Glue or Amazon Web Services Hive data catalog. An KMS encryption key to encrypt the Amazon S3 location used for OfflineStore. If KMS encryption key is not specified, by default we encrypt all data at rest using Amazon Web Services KMS key. By defining your bucket-level key for SSE, you can reduce Amazon Web Services KMS requests costs by up to 99 percent. Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg. To learn more about this parameter, see OfflineStoreConfig. + throughput_config: + role_arn: The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. + description: A free-form description of a FeatureGroup. + tags: Tags used to identify Features in each FeatureGroup. session: Boto3 session. region: Region name. - + Returns: - The EvaluationJob resource. - + The FeatureGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12194,61 +11618,59 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating evaluation_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EvaluationJobName": evaluation_job_name, - "Description": description, - "EvaluationMethod": evaluation_method, - "Tags": tags, - "ModelConfig": model_config, - "OutputDataConfig": output_data_config, - "InputDataConfig": input_data_config, - "EvaluationConfig": evaluation_config, - "RoleArn": role_arn, - "UpstreamPlatformConfig": upstream_platform_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="EvaluationJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating feature_group resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'FeatureGroupName': feature_group_name, + 'RecordIdentifierFeatureName': record_identifier_feature_name, + 'EventTimeFeatureName': event_time_feature_name, + 'FeatureDefinitions': feature_definitions, + 'OnlineStoreConfig': online_store_config, + 'OfflineStoreConfig': offline_store_config, + 'ThroughputConfig': throughput_config, + 'RoleArn': role_arn, + 'Description': description, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='FeatureGroup', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_evaluation_job(**operation_input_args) + response = client.create_feature_group(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(evaluation_job_name=evaluation_job_name, session=session, region=region) - + + return cls.get(feature_group_name=feature_group_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - evaluation_job_name: StrPipeVar, + feature_group_name: StrPipeVar, + next_token: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["EvaluationJob"]: + ) -> Optional["FeatureGroup"]: """ - Get a EvaluationJob resource - + Get a FeatureGroup resource + Parameters: - evaluation_job_name: + feature_group_name: The name or Amazon Resource Name (ARN) of the FeatureGroup you want described. + next_token: A token to resume pagination of the list of Features (FeatureDefinitions). 2,500 Features are returned by default. session: Boto3 session. region: Region name. - + Returns: - The EvaluationJob resource. - + The FeatureGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12259,38 +11681,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EvaluationJobName": evaluation_job_name, + 'FeatureGroupName': feature_group_name, + 'NextToken': next_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_evaluation_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_feature_group(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeEvaluationJobResponse") - evaluation_job = cls(**transformed_response) - return evaluation_job - + transformed_response = transform(response, 'DescribeFeatureGroupResponse') + feature_group = cls(**transformed_response) + return feature_group + @Base.add_validate_call def refresh( self, - ) -> Optional["EvaluationJob"]: + + ) -> Optional["FeatureGroup"]: """ - Refresh a EvaluationJob resource - + Refresh a FeatureGroup resource + Returns: - The EvaluationJob resource. - + The FeatureGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12301,30 +11723,41 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "EvaluationJobName": self.evaluation_job_name, + 'FeatureGroupName': self.feature_group_name, + 'NextToken': self.next_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_evaluation_job(**operation_input_args) - + response = client.describe_feature_group(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeEvaluationJobResponse", self) + transform(response, 'DescribeFeatureGroupResponse', self) return self - + + @populate_inputs_decorator @Base.add_validate_call - def delete( + def update( self, - ) -> None: + feature_additions: Optional[List[FeatureDefinition]] = Unassigned(), + online_store_config: Optional[OnlineStoreConfigUpdate] = Unassigned(), + throughput_config: Optional[ThroughputConfigUpdate] = Unassigned(), + ) -> Optional["FeatureGroup"]: """ - Delete a EvaluationJob resource - + Update a FeatureGroup resource + + Parameters: + feature_additions: Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group. + + Returns: + The FeatureGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12333,30 +11766,41 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating feature_group resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "EvaluationJobName": self.evaluation_job_name, + 'FeatureGroupName': self.feature_group_name, + 'FeatureAdditions': feature_additions, + 'OnlineStoreConfig': online_store_config, + 'ThroughputConfig': throughput_config, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_evaluation_job(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + # create the resource + response = client.update_feature_group(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + @Base.add_validate_call - def stop(self) -> None: + def delete( + self, + + ) -> None: """ - Stop a EvaluationJob resource - + Delete a FeatureGroup resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12367,112 +11811,165 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client() + operation_input_args = { - "EvaluationJobName": self.evaluation_job_name, + 'FeatureGroupName': self.feature_group_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_evaluation_job(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + + client.delete_feature_group(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait( + def wait_for_status( self, + target_status: Literal['Creating', 'Created', 'CreateFailed', 'Deleting', 'DeleteFailed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a EvaluationJob resource. - + Wait for a FeatureGroup resource to reach certain status. + Parameters: + target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - """ - terminal_states = ["Completed", "Failed", "Stopped"] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for EvaluationJob...") + progress.add_task(f"Waiting for FeatureGroup to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.evaluation_job_status + current_status = self.feature_group_status status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: + + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="EvaluationJob", - status=current_status, - reason=self.failure_reason, - ) - return - + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="FeatureGroup", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="EvaluationJob", status=current_status) + raise TimeoutExceededError(resource_type="FeatureGroup", status=current_status) time.sleep(poll) - + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a FeatureGroup resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for FeatureGroup to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.feature_group_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="FeatureGroup", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, + name_contains: Optional[StrPipeVar] = Unassigned(), + feature_group_status_equals: Optional[StrPipeVar] = Unassigned(), + offline_store_status_equals: Optional[StrPipeVar] = Unassigned(), creation_time_after: Optional[datetime.datetime] = Unassigned(), creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["EvaluationJob"]: + ) -> ResourceIterator["FeatureGroup"]: """ - Get all EvaluationJob resources - + Get all FeatureGroup resources + Parameters: - creation_time_after: - creation_time_before: - name_contains: - next_token: - max_results: - sort_by: - sort_order: - status_equals: + name_contains: A string that partially matches one or more FeatureGroups names. Filters FeatureGroups by name. + feature_group_status_equals: A FeatureGroup status. Filters by FeatureGroup status. + offline_store_status_equals: An OfflineStore status. Filters by OfflineStore status. + creation_time_after: Use this parameter to search for FeatureGroupss created after a specific date and time. + creation_time_before: Use this parameter to search for FeatureGroupss created before a specific date and time. + sort_order: The order in which feature groups are listed. + sort_by: The value on which the feature group list is sorted. + max_results: The maximum number of results returned by ListFeatureGroups. + next_token: A token to resume pagination of ListFeatureGroups results. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed EvaluationJob resources. - + Iterator for listed FeatureGroup resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12482,104 +11979,57 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "StatusEquals": status_equals, + 'NameContains': name_contains, + 'FeatureGroupStatusEquals': feature_group_status_equals, + 'OfflineStoreStatusEquals': offline_store_status_equals, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortOrder': sort_order, + 'SortBy': sort_by, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_evaluation_jobs", - summaries_key="EvaluationJobSummaries", - summary_name="EvaluationJobSummary", - resource_cls=EvaluationJob, - list_method_kwargs=operation_input_args, + list_method='list_feature_groups', + summaries_key='FeatureGroupSummaries', + summary_name='FeatureGroupSummary', + resource_cls=FeatureGroup, + list_method_kwargs=operation_input_args ) -''' - -class Experiment(Base): - """ - Class representing resource Experiment - - Attributes: - experiment_name: The name of the experiment. - experiment_arn: The Amazon Resource Name (ARN) of the experiment. - display_name: The name of the experiment as displayed. If DisplayName isn't specified, ExperimentName is displayed. - source: The Amazon Resource Name (ARN) of the source and, optionally, the type. - description: The description of the experiment. - creation_time: When the experiment was created. - created_by: Who created the experiment. - last_modified_time: When the experiment was last modified. - last_modified_by: Who last modified the experiment. - - """ - - experiment_name: StrPipeVar - experiment_arn: Optional[StrPipeVar] = Unassigned() - display_name: Optional[StrPipeVar] = Unassigned() - source: Optional[ExperimentSource] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "experiment_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object experiment") - return None - - @classmethod + + @Base.add_validate_call - def create( - cls, - experiment_name: StrPipeVar, - display_name: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + def get_record( + self, + record_identifier_value_as_string: StrPipeVar, + feature_names: Optional[List[StrPipeVar]] = Unassigned(), + expiration_time_response: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Experiment"]: + region: Optional[str] = None, + ) -> Optional[GetRecordResponse]: """ - Create a Experiment resource - + Use for OnlineStore serving from a FeatureStore. + Parameters: - experiment_name: The name of the experiment. The name must be unique in your Amazon Web Services account and is not case-sensitive. - display_name: The name of the experiment as displayed. The name doesn't need to be unique. If you don't specify DisplayName, the value in ExperimentName is displayed. - description: The description of the experiment. - tags: A list of tags to associate with the experiment. You can use Search API to search on the tags. + record_identifier_value_as_string: The value that corresponds to RecordIdentifier type and uniquely identifies the record in the FeatureGroup. + feature_names: List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. + expiration_time_response: Parameter to request ExpiresAt in response. If Enabled, GetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, GetRecord will return null. session: Boto3 session. region: Region name. - + Returns: - The Experiment resource. - + GetRecordResponse + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12588,102 +12038,55 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + AccessForbidden: You do not have permission to perform an action. + InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. + ResourceNotFound: Resource being access is not found. + ServiceUnavailable: The service is currently unavailable. + ValidationError: There was an error validating your request. """ - - logger.info("Creating experiment resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "ExperimentName": experiment_name, - "DisplayName": display_name, - "Description": description, - "Tags": tags, + 'FeatureGroupName': self.feature_group_name, + 'RecordIdentifierValueAsString': record_identifier_value_as_string, + 'FeatureNames': feature_names, + 'ExpirationTimeResponse': expiration_time_response, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Experiment", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_experiment(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-featurestore-runtime') + + logger.debug(f"Calling get_record API") + response = client.get_record(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(experiment_name=experiment_name, session=session, region=region) - - @classmethod + + transformed_response = transform(response, 'GetRecordResponse') + return GetRecordResponse(**transformed_response) + + @Base.add_validate_call - def get( - cls, - experiment_name: StrPipeVar, + def put_record( + self, + record: List[FeatureValue], + target_stores: Optional[List[StrPipeVar]] = Unassigned(), + ttl_duration: Optional[TtlDuration] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Experiment"]: + region: Optional[str] = None, + ) -> None: """ - Get a Experiment resource - + The PutRecord API is used to ingest a list of Records into your feature group. + Parameters: - experiment_name: The name of the experiment to describe. + record: List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following: Use GetRecord to retrieve the latest record. Update the record returned from GetRecord. Use PutRecord to update feature values. + target_stores: A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the FeatureGroup. + ttl_duration: Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide. session: Boto3 session. region: Region name. - - Returns: - The Experiment resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ExperimentName": experiment_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_experiment(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeExperimentResponse") - experiment = cls(**transformed_response) - return experiment - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["Experiment"]: - """ - Refresh a Experiment resource - - Returns: - The Experiment resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12692,78 +12095,54 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ExperimentName": self.experiment_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_experiment(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeExperimentResponse", self) - return self - - @Base.add_validate_call - def update( - self, - display_name: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["Experiment"]: - """ - Update a Experiment resource - - Returns: - The Experiment resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. + AccessForbidden: You do not have permission to perform an action. + InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. + ServiceUnavailable: The service is currently unavailable. + ValidationError: There was an error validating your request. """ - - logger.info("Updating experiment resource.") - client = Base.get_sagemaker_client() - + + operation_input_args = { - "ExperimentName": self.experiment_name, - "DisplayName": display_name, - "Description": description, + 'FeatureGroupName': self.feature_group_name, + 'Record': record, + 'TargetStores': target_stores, + 'TtlDuration': ttl_duration, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_experiment(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-featurestore-runtime') + + logger.debug(f"Calling put_record API") + response = client.put_record(**operation_input_args) logger.debug(f"Response: {response}") - self.refresh() - - return self - + + + @Base.add_validate_call - def delete( + def delete_record( self, + record_identifier_value_as_string: StrPipeVar, + event_time: StrPipeVar, + target_stores: Optional[List[StrPipeVar]] = Unassigned(), + deletion_mode: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, ) -> None: """ - Delete a Experiment resource - + Deletes a Record from a FeatureGroup in the OnlineStore. + + Parameters: + record_identifier_value_as_string: The value for the RecordIdentifier that uniquely identifies the record, in string format. + event_time: Timestamp indicating when the deletion event occurred. EventTime can be used to query data at a certain point in time. + target_stores: A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the FeatureGroup. + deletion_mode: The name of the deletion mode for deleting the record. By default, the deletion mode is set to SoftDelete. + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12772,51 +12151,54 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. + AccessForbidden: You do not have permission to perform an action. + InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. + ServiceUnavailable: The service is currently unavailable. + ValidationError: There was an error validating your request. """ - - client = Base.get_sagemaker_client() - + + operation_input_args = { - "ExperimentName": self.experiment_name, + 'FeatureGroupName': self.feature_group_name, + 'RecordIdentifierValueAsString': record_identifier_value_as_string, + 'EventTime': event_time, + 'TargetStores': target_stores, + 'DeletionMode': deletion_mode, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_experiment(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-featurestore-runtime') + + logger.debug(f"Calling delete_record API") + response = client.delete_record(**operation_input_args) + logger.debug(f"Response: {response}") + + + @Base.add_validate_call - def get_all( - cls, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), + def batch_get_record( + self, + identifiers: List[BatchGetRecordIdentifier], + expiration_time_response: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Experiment"]: + region: Optional[str] = None, + ) -> Optional[BatchGetRecordResponse]: """ - Get all Experiment resources - + Retrieves a batch of Records from a FeatureGroup. + Parameters: - created_after: A filter that returns only experiments created after the specified time. - created_before: A filter that returns only experiments created before the specified time. - sort_by: The property used to sort results. The default value is CreationTime. - sort_order: The sort order. The default value is Descending. - next_token: If the previous call to ListExperiments didn't return the full set of experiments, the call returns a token for getting the next set of experiments. - max_results: The maximum number of experiments to return in the response. The default value is 10. + identifiers: A list containing the name or Amazon Resource Name (ARN) of the FeatureGroup, the list of names of Features to be retrieved, and the corresponding RecordIdentifier values as strings. + expiration_time_response: Parameter to request ExpiresAt in response. If Enabled, BatchGetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, BatchGetRecord will return null. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Experiment resources. - + BatchGetRecordResponse + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12825,107 +12207,94 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + AccessForbidden: You do not have permission to perform an action. + InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. + ServiceUnavailable: The service is currently unavailable. + ValidationError: There was an error validating your request. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'Identifiers': identifiers, + 'ExpirationTimeResponse': expiration_time_response, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_experiments", - summaries_key="ExperimentSummaries", - summary_name="ExperimentSummary", - resource_cls=Experiment, - list_method_kwargs=operation_input_args, - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-featurestore-runtime') + + logger.debug(f"Calling batch_get_record API") + response = client.batch_get_record(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'BatchGetRecordResponse') + return BatchGetRecordResponse(**transformed_response) -class ExperimentInternal(Base): +class FeatureMetadata(Base): """ - Class representing resource ExperimentInternal - + Class representing resource FeatureMetadata + Attributes: - experiment_name: - customer_details: - display_name: - description: - source: - creation_time: - tags: - experiment_arn: - + feature_group_arn: The Amazon Resource Number (ARN) of the feature group that contains the feature. + feature_group_name: The name of the feature group that you've specified. + feature_name: The name of the feature that you've specified. + feature_type: The data type of the feature. + creation_time: A timestamp indicating when the feature was created. + last_modified_time: A timestamp indicating when the metadata for the feature group was modified. For example, if you add a parameter describing the feature, the timestamp changes to reflect the last time you + description: The description you added to describe the feature. + parameters: The key-value pairs that you added to describe the feature. + """ - - experiment_name: Union[StrPipeVar, object] - customer_details: CustomerDetails - display_name: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - source: Optional[InputExperimentSource] = Unassigned() + feature_group_name: StrPipeVar + feature_name: StrPipeVar + feature_group_arn: Optional[StrPipeVar] = Unassigned() + feature_type: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - experiment_arn: Optional[StrPipeVar] = Unassigned() - + last_modified_time: Optional[datetime.datetime] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + parameters: Optional[List[FeatureParameter]] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "experiment_internal_name" - resource_name_split = resource_name.split("_") + resource_name = 'feature_metadata_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object experiment_internal") + logger.error("Name attribute not found for object feature_metadata") return None - + @classmethod @Base.add_validate_call - def create( + def get( cls, - experiment_name: Union[StrPipeVar, object], - customer_details: CustomerDetails, - display_name: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - source: Optional[InputExperimentSource] = Unassigned(), - creation_time: Optional[datetime.datetime] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + feature_group_name: StrPipeVar, + feature_name: StrPipeVar, session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ExperimentInternal"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["FeatureMetadata"]: """ - Create a ExperimentInternal resource - + Get a FeatureMetadata resource + Parameters: - experiment_name: - customer_details: - display_name: - description: - source: - creation_time: - tags: + feature_group_name: The name or Amazon Resource Name (ARN) of the feature group containing the feature. + feature_name: The name of the feature. session: Boto3 session. region: Region name. - + Returns: - The ExperimentInternal resource. - + The FeatureMetadata resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -12934,173 +12303,218 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ExperimentName": experiment_name, - "DisplayName": display_name, - "Description": description, - "Source": source, - "CreationTime": creation_time, - "Tags": tags, - "CustomerDetails": customer_details, + 'FeatureGroupName': feature_group_name, + 'FeatureName': feature_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_experiment_internal API") - response = client.create_experiment_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateExperimentInternalResponse") - return cls(**operation_input_args, **transformed_response) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_feature_metadata(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeFeatureMetadataResponse') + feature_metadata = cls(**transformed_response) + return feature_metadata + + @Base.add_validate_call + def refresh( + self, + + ) -> Optional["FeatureMetadata"]: + """ + Refresh a FeatureMetadata resource + + Returns: + The FeatureMetadata resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'FeatureGroupName': self.feature_group_name, + 'FeatureName': self.feature_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_feature_metadata(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeFeatureMetadataResponse', self) + return self + + @Base.add_validate_call + def update( + self, + description: Optional[StrPipeVar] = Unassigned(), + parameter_additions: Optional[List[FeatureParameter]] = Unassigned(), + parameter_removals: Optional[List[StrPipeVar]] = Unassigned(), + ) -> Optional["FeatureMetadata"]: + """ + Update a FeatureMetadata resource + + Parameters: + parameter_additions: A list of key-value pairs that you can add to better describe the feature. + parameter_removals: A list of parameter keys that you can specify to remove parameters that describe your feature. + + Returns: + The FeatureMetadata resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + logger.info("Updating feature_metadata resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'FeatureGroupName': self.feature_group_name, + 'FeatureName': self.feature_name, + 'Description': description, + 'ParameterAdditions': parameter_additions, + 'ParameterRemovals': parameter_removals, + } + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.update_feature_metadata(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self -class FeatureGroup(Base): +class FlowDefinition(Base): """ - Class representing resource FeatureGroup - + Class representing resource FlowDefinition + Attributes: - feature_group_arn: The Amazon Resource Name (ARN) of the FeatureGroup. - feature_group_name: he name of the FeatureGroup. - record_identifier_feature_name: The name of the Feature used for RecordIdentifier, whose value uniquely identifies a record stored in the feature store. - event_time_feature_name: The name of the feature that stores the EventTime of a Record in a FeatureGroup. An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup have a corresponding EventTime. - feature_definitions: A list of the Features in the FeatureGroup. Each feature is defined by a FeatureName and FeatureType. - creation_time: A timestamp indicating when SageMaker created the FeatureGroup. - next_token: A token to resume pagination of the list of Features (FeatureDefinitions). - last_modified_time: A timestamp indicating when the feature group was last updated. - online_store_config: The configuration for the OnlineStore. - offline_store_config: The configuration of the offline store. It includes the following configurations: Amazon S3 location of the offline store. Configuration of the Glue data catalog. Table format of the offline store. Option to disable the automatic creation of a Glue table for the offline store. Encryption configuration. - throughput_config: - role_arn: The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. - feature_group_status: The status of the feature group. - offline_store_status: The status of the OfflineStore. Notifies you if replicating data into the OfflineStore has failed. Returns either: Active or Blocked - last_update_status: A value indicating whether the update made to the feature group was successful. - failure_reason: The reason that the FeatureGroup failed to be replicated in the OfflineStore. This is failure can occur because: The FeatureGroup could not be created in the OfflineStore. The FeatureGroup could not be deleted from the OfflineStore. - description: A free form description of the feature group. - online_store_replicas: - online_store_read_write_type: - online_store_total_size_bytes: The size of the OnlineStore in bytes. - online_store_total_item_count: - created_by: - last_modified_by: - + flow_definition_arn: The Amazon Resource Name (ARN) of the flow defintion. + flow_definition_name: The Amazon Resource Name (ARN) of the flow definition. + flow_definition_status: The status of the flow definition. Valid values are listed below. + creation_time: The timestamp when the flow definition was created. + output_config: An object containing information about the output file. + role_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) execution role for the flow definition. + human_loop_request_source: Container for configuring the source of human task requests. Used to specify if Amazon Rekognition or Amazon Textract is used as an integration source. + human_loop_activation_config: An object containing information about what triggers a human review workflow. + human_loop_config: An object containing information about who works on the task, the workforce task price, and other task details. + failure_reason: The reason your flow definition failed. + """ - - feature_group_name: StrPipeVar - feature_group_arn: Optional[StrPipeVar] = Unassigned() - record_identifier_feature_name: Optional[StrPipeVar] = Unassigned() - event_time_feature_name: Optional[StrPipeVar] = Unassigned() - feature_definitions: Optional[List[FeatureDefinition]] = Unassigned() + flow_definition_name: StrPipeVar + flow_definition_arn: Optional[StrPipeVar] = Unassigned() + flow_definition_status: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - online_store_config: Optional[OnlineStoreConfig] = Unassigned() - offline_store_config: Optional[OfflineStoreConfig] = Unassigned() - throughput_config: Optional[ThroughputConfigDescription] = Unassigned() + human_loop_request_source: Optional[HumanLoopRequestSource] = Unassigned() + human_loop_activation_config: Optional[HumanLoopActivationConfig] = Unassigned() + human_loop_config: Optional[HumanLoopConfig] = Unassigned() + output_config: Optional[FlowDefinitionOutputConfig] = Unassigned() role_arn: Optional[StrPipeVar] = Unassigned() - feature_group_status: Optional[StrPipeVar] = Unassigned() - offline_store_status: Optional[OfflineStoreStatus] = Unassigned() - last_update_status: Optional[LastUpdateStatus] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - next_token: Optional[StrPipeVar] = Unassigned() - online_store_replicas: Optional[List[OnlineStoreReplica]] = Unassigned() - online_store_read_write_type: Optional[StrPipeVar] = Unassigned() - online_store_total_size_bytes: Optional[int] = Unassigned() - online_store_total_item_count: Optional[int] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "feature_group_name" - resource_name_split = resource_name.split("_") + resource_name = 'flow_definition_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object feature_group") + logger.error("Name attribute not found for object flow_definition") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "online_store_config": {"security_config": {"kms_key_id": {"type": "string"}}}, - "offline_store_config": { - "s3_storage_config": { - "s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, - "resolved_output_s3_uri": {"type": "string"}, - } - }, - "role_arn": {"type": "string"}, + config_schema_for_resource = \ + { + "output_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "FeatureGroup", **kwargs - ), - ) - + }, + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "FlowDefinition", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - feature_group_name: StrPipeVar, - record_identifier_feature_name: StrPipeVar, - event_time_feature_name: StrPipeVar, - feature_definitions: List[FeatureDefinition], - online_store_config: Optional[OnlineStoreConfig] = Unassigned(), - offline_store_config: Optional[OfflineStoreConfig] = Unassigned(), - throughput_config: Optional[ThroughputConfig] = Unassigned(), - role_arn: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), + flow_definition_name: StrPipeVar, + output_config: FlowDefinitionOutputConfig, + role_arn: StrPipeVar, + human_loop_request_source: Optional[HumanLoopRequestSource] = Unassigned(), + human_loop_activation_config: Optional[HumanLoopActivationConfig] = Unassigned(), + human_loop_config: Optional[HumanLoopConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - use_pre_prod_offline_store_replicator_lambda: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["FeatureGroup"]: + ) -> Optional["FlowDefinition"]: """ - Create a FeatureGroup resource - + Create a FlowDefinition resource + Parameters: - feature_group_name: The name of the FeatureGroup. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. The name: Must start with an alphanumeric character. Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed. - record_identifier_feature_name: The name of the Feature whose value uniquely identifies a Record defined in the FeatureStore. Only the latest record per identifier value will be stored in the OnlineStore. RecordIdentifierFeatureName must be one of feature definitions' names. You use the RecordIdentifierFeatureName to access data in a FeatureStore. This name: Must start with an alphanumeric character. Can only contains alphanumeric characters, hyphens, underscores. Spaces are not allowed. - event_time_feature_name: The name of the feature that stores the EventTime of a Record in a FeatureGroup. An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup. All Records in the FeatureGroup must have a corresponding EventTime. An EventTime can be a String or Fractional. Fractional: EventTime feature values must be a Unix timestamp in seconds. String: EventTime feature values must be an ISO-8601 string in the format. The following formats are supported yyyy-MM-dd'T'HH:mm:ssZ and yyyy-MM-dd'T'HH:mm:ss.SSSZ where yyyy, MM, and dd represent the year, month, and day respectively and HH, mm, ss, and if applicable, SSS represent the hour, month, second and milliseconds respsectively. 'T' and Z are constants. - feature_definitions: A list of Feature names and types. Name and Type is compulsory per Feature. Valid feature FeatureTypes are Integral, Fractional and String. FeatureNames cannot be any of the following: is_deleted, write_time, api_invocation_time You can create up to 2,500 FeatureDefinitions per FeatureGroup. - online_store_config: You can turn the OnlineStore on or off by specifying True for the EnableOnlineStore flag in OnlineStoreConfig. You can also include an Amazon Web Services KMS key ID (KMSKeyId) for at-rest encryption of the OnlineStore. The default value is False. - offline_store_config: Use this to configure an OfflineFeatureStore. This parameter allows you to specify: The Amazon Simple Storage Service (Amazon S3) location of an OfflineStore. A configuration for an Amazon Web Services Glue or Amazon Web Services Hive data catalog. An KMS encryption key to encrypt the Amazon S3 location used for OfflineStore. If KMS encryption key is not specified, by default we encrypt all data at rest using Amazon Web Services KMS key. By defining your bucket-level key for SSE, you can reduce Amazon Web Services KMS requests costs by up to 99 percent. Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg. To learn more about this parameter, see OfflineStoreConfig. - throughput_config: - role_arn: The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided. - description: A free-form description of a FeatureGroup. - tags: Tags used to identify Features in each FeatureGroup. - use_pre_prod_offline_store_replicator_lambda: + flow_definition_name: The name of your flow definition. + output_config: An object containing information about where the human review results will be uploaded. + role_arn: The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298. + human_loop_request_source: Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source. + human_loop_activation_config: An object containing information about the events that trigger a human workflow. + human_loop_config: An object containing information about the tasks the human reviewers will perform. + tags: An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define. session: Boto3 session. region: Region name. - + Returns: - The FeatureGroup resource. - + The FlowDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13115,64 +12529,54 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating feature_group resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "FeatureGroupName": feature_group_name, - "RecordIdentifierFeatureName": record_identifier_feature_name, - "EventTimeFeatureName": event_time_feature_name, - "FeatureDefinitions": feature_definitions, - "OnlineStoreConfig": online_store_config, - "OfflineStoreConfig": offline_store_config, - "ThroughputConfig": throughput_config, - "RoleArn": role_arn, - "Description": description, - "Tags": tags, - "UsePreProdOfflineStoreReplicatorLambda": use_pre_prod_offline_store_replicator_lambda, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="FeatureGroup", operation_input_args=operation_input_args - ) - + + logger.info("Creating flow_definition resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'FlowDefinitionName': flow_definition_name, + 'HumanLoopRequestSource': human_loop_request_source, + 'HumanLoopActivationConfig': human_loop_activation_config, + 'HumanLoopConfig': human_loop_config, + 'OutputConfig': output_config, + 'RoleArn': role_arn, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='FlowDefinition', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_feature_group(**operation_input_args) + response = client.create_flow_definition(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(feature_group_name=feature_group_name, session=session, region=region) - + + return cls.get(flow_definition_name=flow_definition_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - feature_group_name: StrPipeVar, - next_token: Optional[StrPipeVar] = Unassigned(), + flow_definition_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["FeatureGroup"]: + ) -> Optional["FlowDefinition"]: """ - Get a FeatureGroup resource - + Get a FlowDefinition resource + Parameters: - feature_group_name: The name or Amazon Resource Name (ARN) of the FeatureGroup you want described. - next_token: A token to resume pagination of the list of Features (FeatureDefinitions). 2,500 Features are returned by default. + flow_definition_name: The name of the flow definition. session: Boto3 session. region: Region name. - + Returns: - The FeatureGroup resource. - + The FlowDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13183,39 +12587,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "FeatureGroupName": feature_group_name, - "NextToken": next_token, + 'FlowDefinitionName': flow_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_feature_group(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_flow_definition(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeFeatureGroupResponse") - feature_group = cls(**transformed_response) - return feature_group - + transformed_response = transform(response, 'DescribeFlowDefinitionResponse') + flow_definition = cls(**transformed_response) + return flow_definition + @Base.add_validate_call def refresh( self, - ) -> Optional["FeatureGroup"]: + + ) -> Optional["FlowDefinition"]: """ - Refresh a FeatureGroup resource - + Refresh a FlowDefinition resource + Returns: - The FeatureGroup resource. - + The FlowDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13226,44 +12628,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "NextToken": self.next_token, + 'FlowDefinitionName': self.flow_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_feature_group(**operation_input_args) - + response = client.describe_flow_definition(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeFeatureGroupResponse", self) + transform(response, 'DescribeFlowDefinitionResponse', self) return self - - @populate_inputs_decorator + @Base.add_validate_call - def update( + def delete( self, - add_online_store_replica: Optional[AddOnlineStoreReplicaAction] = Unassigned(), - feature_additions: Optional[List[FeatureDefinition]] = Unassigned(), - online_store_config: Optional[OnlineStoreConfigUpdate] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - throughput_config: Optional[ThroughputConfigUpdate] = Unassigned(), - ) -> Optional["FeatureGroup"]: + + ) -> None: """ - Update a FeatureGroup resource - - Parameters: - add_online_store_replica: - feature_additions: Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group. - - Returns: - The FeatureGroup resource. - + Delete a FlowDefinition resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13272,124 +12661,77 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating feature_group resource.") + client = Base.get_sagemaker_client() - + operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "AddOnlineStoreReplica": add_online_store_replica, - "FeatureAdditions": feature_additions, - "OnlineStoreConfig": online_store_config, - "Description": description, - "ThroughputConfig": throughput_config, + 'FlowDefinitionName': self.flow_definition_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_feature_group(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a FeatureGroup resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "FeatureGroupName": self.feature_group_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_feature_group(**operation_input_args) - + + client.delete_flow_definition(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Creating", "Created", "CreateFailed", "Deleting", "DeleteFailed"], + target_status: Literal['Initializing', 'Active', 'Failed', 'Deleting'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a FeatureGroup resource to reach certain status. - + Wait for a FlowDefinition resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for FeatureGroup to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for FlowDefinition to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.feature_group_status + current_status = self.flow_definition_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="FeatureGroup", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="FlowDefinition", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="FeatureGroup", status=current_status) + raise TimeoutExceededError(resource_type="FlowDefinition", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -13397,14 +12739,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a FeatureGroup resource to be deleted. - + Wait for a FlowDefinition resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13418,76 +12760,61 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for FeatureGroup to be deleted...") + progress.add_task("Waiting for FlowDefinition to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.feature_group_status + current_status = self.flow_definition_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="FeatureGroup", status=current_status - ) + raise TimeoutExceededError(resource_type="FlowDefinition", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - name_contains: Optional[StrPipeVar] = Unassigned(), - feature_group_status_equals: Optional[StrPipeVar] = Unassigned(), - offline_store_status_equals: Optional[StrPipeVar] = Unassigned(), creation_time_after: Optional[datetime.datetime] = Unassigned(), creation_time_before: Optional[datetime.datetime] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["FeatureGroup"]: + ) -> ResourceIterator["FlowDefinition"]: """ - Get all FeatureGroup resources - + Get all FlowDefinition resources + Parameters: - name_contains: A string that partially matches one or more FeatureGroups names. Filters FeatureGroups by name. - feature_group_status_equals: A FeatureGroup status. Filters by FeatureGroup status. - offline_store_status_equals: An OfflineStore status. Filters by OfflineStore status. - creation_time_after: Use this parameter to search for FeatureGroupss created after a specific date and time. - creation_time_before: Use this parameter to search for FeatureGroupss created before a specific date and time. - sort_order: The order in which feature groups are listed. - sort_by: The value on which the feature group list is sorted. - max_results: The maximum number of results returned by ListFeatureGroups. - next_token: A token to resume pagination of ListFeatureGroups results. + creation_time_after: A filter that returns only flow definitions with a creation time greater than or equal to the specified timestamp. + creation_time_before: A filter that returns only flow definitions that were created before the specified timestamp. + sort_order: An optional value that specifies whether you want the results sorted in Ascending or Descending order. + next_token: A token to resume pagination. + max_results: The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken will be provided in the output that you can use to resume pagination. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed FeatureGroup resources. - + Iterator for listed FlowDefinition resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13497,58 +12824,120 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NameContains": name_contains, - "FeatureGroupStatusEquals": feature_group_status_equals, - "OfflineStoreStatusEquals": offline_store_status_equals, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "SortOrder": sort_order, - "SortBy": sort_by, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_feature_groups", - summaries_key="FeatureGroupSummaries", - summary_name="FeatureGroupSummary", - resource_cls=FeatureGroup, - list_method_kwargs=operation_input_args, + list_method='list_flow_definitions', + summaries_key='FlowDefinitionSummaries', + summary_name='FlowDefinitionSummary', + resource_cls=FlowDefinition, + list_method_kwargs=operation_input_args ) + +class Hub(Base): + """ + Class representing resource Hub + + Attributes: + hub_name: The name of the hub. + hub_arn: The Amazon Resource Name (ARN) of the hub. + hub_status: The status of the hub. + creation_time: The date and time that the hub was created. + last_modified_time: The date and time that the hub was last modified. + hub_display_name: The display name of the hub. + hub_description: A description of the hub. + hub_search_keywords: The searchable keywords for the hub. + s3_storage_config: The Amazon S3 storage configuration for the hub. + failure_reason: The failure reason if importing hub content failed. + + """ + hub_name: StrPipeVar + hub_arn: Optional[StrPipeVar] = Unassigned() + hub_display_name: Optional[StrPipeVar] = Unassigned() + hub_description: Optional[StrPipeVar] = Unassigned() + hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned() + s3_storage_config: Optional[HubS3StorageConfig] = Unassigned() + hub_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'hub_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object hub") + return None + + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "s3_storage_config": { + "s3_output_path": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Hub", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator @Base.add_validate_call - def get_record( - self, - record_identifier_value_as_string: StrPipeVar, - feature_names: Optional[List[StrPipeVar]] = Unassigned(), - expiration_time_response: Optional[StrPipeVar] = Unassigned(), + def create( + cls, + hub_name: StrPipeVar, + hub_description: StrPipeVar, + hub_display_name: Optional[StrPipeVar] = Unassigned(), + hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), + s3_storage_config: Optional[HubS3StorageConfig] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[GetRecordResponse]: + region: Optional[StrPipeVar] = None, + ) -> Optional["Hub"]: """ - Use for OnlineStore serving from a FeatureStore. - + Create a Hub resource + Parameters: - record_identifier_value_as_string: The value that corresponds to RecordIdentifier type and uniquely identifies the record in the FeatureGroup. - feature_names: List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. - expiration_time_response: Parameter to request ExpiresAt in response. If Enabled, GetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, GetRecord will return null. + hub_name: The name of the hub to create. + hub_description: A description of the hub. + hub_display_name: The display name of the hub. + hub_search_keywords: The searchable keywords for the hub. + s3_storage_config: The Amazon S3 storage configuration for the hub. + tags: Any tags to associate with the hub. session: Boto3 session. region: Region name. - + Returns: - GetRecordResponse - + The Hub resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13557,55 +12946,59 @@ def get_record( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessForbidden: You do not have permission to perform an action. - InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. - ResourceNotFound: Resource being access is not found. - ServiceUnavailable: The service is currently unavailable. - ValidationError: There was an error validating your request. + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "RecordIdentifierValueAsString": record_identifier_value_as_string, - "FeatureNames": feature_names, - "ExpirationTimeResponse": expiration_time_response, - } + + logger.info("Creating hub resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'HubName': hub_name, + 'HubDescription': hub_description, + 'HubDisplayName': hub_display_name, + 'HubSearchKeywords': hub_search_keywords, + 'S3StorageConfig': s3_storage_config, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Hub', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-featurestore-runtime" - ) - - logger.debug(f"Calling get_record API") - response = client.get_record(**operation_input_args) + + # create the resource + response = client.create_hub(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "GetRecordResponse") - return GetRecordResponse(**transformed_response) - + + return cls.get(hub_name=hub_name, session=session, region=region) + + @classmethod @Base.add_validate_call - def put_record( - self, - record: List[FeatureValue], - target_stores: Optional[List[StrPipeVar]] = Unassigned(), - ttl_duration: Optional[TtlDuration] = Unassigned(), + def get( + cls, + hub_name: StrPipeVar, session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + region: Optional[StrPipeVar] = None, + ) -> Optional["Hub"]: """ - The PutRecord API is used to ingest a list of Records into your feature group. - + Get a Hub resource + Parameters: - record: List of FeatureValues to be inserted. This will be a full over-write. If you only want to update few of the feature values, do the following: Use GetRecord to retrieve the latest record. Update the record returned from GetRecord. Use PutRecord to update feature values. - target_stores: A list of stores to which you're adding the record. By default, Feature Store adds the record to all of the stores that you're using for the FeatureGroup. - ttl_duration: Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide. + hub_name: The name of the hub to describe. session: Boto3 session. region: Region name. - + + Returns: + The Hub resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13614,53 +13007,39 @@ def put_record( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessForbidden: You do not have permission to perform an action. - InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. - ServiceUnavailable: The service is currently unavailable. - ValidationError: There was an error validating your request. + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "Record": record, - "TargetStores": target_stores, - "TtlDuration": ttl_duration, + 'HubName': hub_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-featurestore-runtime" - ) - - logger.debug(f"Calling put_record API") - response = client.put_record(**operation_input_args) - logger.debug(f"Response: {response}") - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_hub(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeHubResponse') + hub = cls(**transformed_response) + return hub + @Base.add_validate_call - def delete_record( + def refresh( self, - record_identifier_value_as_string: StrPipeVar, - event_time: StrPipeVar, - target_stores: Optional[List[StrPipeVar]] = Unassigned(), - deletion_mode: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + + ) -> Optional["Hub"]: """ - Deletes a Record from a FeatureGroup in the OnlineStore. - - Parameters: - record_identifier_value_as_string: The value for the RecordIdentifier that uniquely identifies the record, in string format. - event_time: Timestamp indicating when the deletion event occurred. EventTime can be used to query data at a certain point in time. - target_stores: A list of stores from which you're deleting the record. By default, Feature Store deletes the record from all of the stores that you're using for the FeatureGroup. - deletion_mode: The name of the deletion mode for deleting the record. By default, the deletion mode is set to SoftDelete. - session: Boto3 session. - region: Region name. - + Refresh a Hub resource + + Returns: + The Hub resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13669,53 +13048,39 @@ def delete_record( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessForbidden: You do not have permission to perform an action. - InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. - ServiceUnavailable: The service is currently unavailable. - ValidationError: There was an error validating your request. + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "RecordIdentifierValueAsString": record_identifier_value_as_string, - "EventTime": event_time, - "TargetStores": target_stores, - "DeletionMode": deletion_mode, + 'HubName': self.hub_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-featurestore-runtime" - ) - - logger.debug(f"Calling delete_record API") - response = client.delete_record(**operation_input_args) - logger.debug(f"Response: {response}") - + + client = Base.get_sagemaker_client() + response = client.describe_hub(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeHubResponse', self) + return self + + @populate_inputs_decorator @Base.add_validate_call - def batch_get_record( + def update( self, - identifiers: List[BatchGetRecordIdentifier], - expiration_time_response: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[BatchGetRecordResponse]: + hub_description: Optional[StrPipeVar] = Unassigned(), + hub_display_name: Optional[StrPipeVar] = Unassigned(), + hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), + ) -> Optional["Hub"]: """ - Retrieves a batch of Records from a FeatureGroup. - - Parameters: - identifiers: A list containing the name or Amazon Resource Name (ARN) of the FeatureGroup, the list of names of Features to be retrieved, and the corresponding RecordIdentifier values as strings. - expiration_time_response: Parameter to request ExpiresAt in response. If Enabled, BatchGetRecord will return the value of ExpiresAt, if it is not null. If Disabled and null, BatchGetRecord will return null. - session: Boto3 session. - region: Region name. - + Update a Hub resource + Returns: - BatchGetRecordResponse - + The Hub resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13724,150 +13089,40 @@ def batch_get_record( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessForbidden: You do not have permission to perform an action. - InternalFailure: An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. - ServiceUnavailable: The service is currently unavailable. - ValidationError: There was an error validating your request. + ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating hub resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "Identifiers": identifiers, - "ExpirationTimeResponse": expiration_time_response, + 'HubName': self.hub_name, + 'HubDescription': hub_description, + 'HubDisplayName': hub_display_name, + 'HubSearchKeywords': hub_search_keywords, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-featurestore-runtime" - ) - - logger.debug(f"Calling batch_get_record API") - response = client.batch_get_record(**operation_input_args) + + # create the resource + response = client.update_hub(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "BatchGetRecordResponse") - return BatchGetRecordResponse(**transformed_response) - - -class FeatureGroupInternal(Base): - """ - Class representing resource FeatureGroupInternal - - Attributes: - feature_group_name: - record_identifier_feature_name: - event_time_feature_name: - feature_definitions: - feature_group_arn: - online_store_config: - offline_store_config: - role_arn: - description: - tags: - use_pre_prod_offline_store_replicator_lambda: - account_id: - aws_payer_token: - fas_credentials: - created_by: - ignore_sweeper_execution: - storage_account_stage_test_override: - online_store_metadata: - online_store_replica_metadata: - - """ - - feature_group_name: Union[StrPipeVar, object] - record_identifier_feature_name: StrPipeVar - event_time_feature_name: StrPipeVar - feature_definitions: List[FeatureDefinition] - feature_group_arn: StrPipeVar - online_store_config: Optional[OnlineStoreConfig] = Unassigned() - offline_store_config: Optional[OfflineStoreConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - use_pre_prod_offline_store_replicator_lambda: Optional[bool] = Unassigned() - account_id: Optional[StrPipeVar] = Unassigned() - aws_payer_token: Optional[StrPipeVar] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - ignore_sweeper_execution: Optional[bool] = Unassigned() - storage_account_stage_test_override: Optional[StrPipeVar] = Unassigned() - online_store_metadata: Optional[OnlineStoreMetadata] = Unassigned() - online_store_replica_metadata: Optional[OnlineStoreReplicaMetadata] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "feature_group_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object feature_group_internal") - return None - - @classmethod + self.refresh() + + return self + @Base.add_validate_call - def create( - cls, - feature_group_name: Union[StrPipeVar, object], - record_identifier_feature_name: StrPipeVar, - event_time_feature_name: StrPipeVar, - feature_definitions: List[FeatureDefinition], - online_store_config: Optional[OnlineStoreConfig] = Unassigned(), - offline_store_config: Optional[OfflineStoreConfig] = Unassigned(), - role_arn: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - use_pre_prod_offline_store_replicator_lambda: Optional[bool] = Unassigned(), - account_id: Optional[StrPipeVar] = Unassigned(), - aws_payer_token: Optional[StrPipeVar] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - created_by: Optional[UserContext] = Unassigned(), - ignore_sweeper_execution: Optional[bool] = Unassigned(), - storage_account_stage_test_override: Optional[StrPipeVar] = Unassigned(), - online_store_metadata: Optional[OnlineStoreMetadata] = Unassigned(), - online_store_replica_metadata: Optional[OnlineStoreReplicaMetadata] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["FeatureGroupInternal"]: + def delete( + self, + + ) -> None: """ - Create a FeatureGroupInternal resource - - Parameters: - feature_group_name: - record_identifier_feature_name: - event_time_feature_name: - feature_definitions: - online_store_config: - offline_store_config: - role_arn: - description: - tags: - use_pre_prod_offline_store_replicator_lambda: - account_id: - aws_payer_token: - fas_credentials: - created_by: - ignore_sweeper_execution: - storage_account_stage_test_override: - online_store_metadata: - online_store_replica_metadata: - session: Boto3 session. - region: Region name. - - Returns: - The FeatureGroupInternal resource. - + Delete a Hub resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13877,114 +13132,91 @@ def create( error_code = e.response['Error']['Code'] ``` ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "FeatureGroupName": feature_group_name, - "RecordIdentifierFeatureName": record_identifier_feature_name, - "EventTimeFeatureName": event_time_feature_name, - "FeatureDefinitions": feature_definitions, - "OnlineStoreConfig": online_store_config, - "OfflineStoreConfig": offline_store_config, - "RoleArn": role_arn, - "Description": description, - "Tags": tags, - "UsePreProdOfflineStoreReplicatorLambda": use_pre_prod_offline_store_replicator_lambda, - "AccountId": account_id, - "AwsPayerToken": aws_payer_token, - "FasCredentials": fas_credentials, - "CreatedBy": created_by, - "IgnoreSweeperExecution": ignore_sweeper_execution, - "StorageAccountStageTestOverride": storage_account_stage_test_override, - "OnlineStoreMetadata": online_store_metadata, - "OnlineStoreReplicaMetadata": online_store_replica_metadata, + 'HubName': self.hub_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client.delete_hub(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['InService', 'Creating', 'Updating', 'Deleting', 'CreateFailed', 'UpdateFailed', 'DeleteFailed'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a Hub resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - - logger.debug(f"Calling create_feature_group_internal API") - response = client.create_feature_group_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateFeatureGroupInternalResponse") - return cls(**operation_input_args, **transformed_response) - - -class FeatureMetadata(Base): - """ - Class representing resource FeatureMetadata - - Attributes: - feature_group_arn: The Amazon Resource Number (ARN) of the feature group that contains the feature. - feature_group_name: The name of the feature group that you've specified. - feature_name: The name of the feature that you've specified. - feature_type: The data type of the feature. - creation_time: A timestamp indicating when the feature was created. - last_modified_time: A timestamp indicating when the metadata for the feature group was modified. For example, if you add a parameter describing the feature, the timestamp changes to reflect the last time you - feature_identifier: - description: The description you added to describe the feature. - parameters: The key-value pairs that you added to describe the feature. - - """ - - feature_group_name: StrPipeVar - feature_name: StrPipeVar - feature_group_arn: Optional[StrPipeVar] = Unassigned() - feature_identifier: Optional[StrPipeVar] = Unassigned() - feature_type: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - parameters: Optional[List[FeatureParameter]] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "feature_metadata_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object feature_metadata") - return None - - @classmethod + progress.add_task(f"Waiting for Hub to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.hub_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="Hub", status=current_status, reason=self.failure_reason) + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Hub", status=current_status) + time.sleep(poll) + @Base.add_validate_call - def get( - cls, - feature_group_name: StrPipeVar, - feature_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["FeatureMetadata"]: + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: """ - Get a FeatureMetadata resource - + Wait for a Hub resource to be deleted. + Parameters: - feature_group_name: The name or Amazon Resource Name (ARN) of the feature group containing the feature. - feature_name: The name of the feature. - session: Boto3 session. - region: Region name. - - Returns: - The FeatureMetadata resource. - + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -13993,86 +13225,74 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - operation_input_args = { - "FeatureGroupName": feature_group_name, - "FeatureName": feature_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - response = client.describe_feature_metadata(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeFeatureMetadataResponse") - feature_metadata = cls(**transformed_response) - return feature_metadata - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["FeatureMetadata"]: - """ - Refresh a FeatureMetadata resource - - Returns: - The FeatureMetadata resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` + progress.add_task("Waiting for Hub to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: try: - # AWS service call here + self.refresh() + current_status = self.hub_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Hub", status=current_status) except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "FeatureName": self.feature_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_feature_metadata(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeFeatureMetadataResponse", self) - return self - + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + + @classmethod @Base.add_validate_call - def update( - self, - description: Optional[StrPipeVar] = Unassigned(), - parameter_additions: Optional[List[FeatureParameter]] = Unassigned(), - parameter_removals: Optional[List[StrPipeVar]] = Unassigned(), - ) -> Optional["FeatureMetadata"]: + def get_all( + cls, + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["Hub"]: """ - Update a FeatureMetadata resource - + Get all Hub resources + Parameters: - parameter_additions: A list of key-value pairs that you can add to better describe the feature. - parameter_removals: A list of parameter keys that you can specify to remove parameters that describe your feature. - + name_contains: Only list hubs with names that contain the specified string. + creation_time_before: Only list hubs that were created before the time specified. + creation_time_after: Only list hubs that were created after the time specified. + last_modified_time_before: Only list hubs that were last modified before the time specified. + last_modified_time_after: Only list hubs that were last modified after the time specified. + sort_by: Sort hubs by either name or creation time. + sort_order: Sort hubs by ascending or descending order. + max_results: The maximum number of hubs to list. + next_token: If the response to a previous ListHubs request was truncated, the response includes a NextToken. To retrieve the next set of hubs, use the token in the next request. + session: Boto3 session. + region: Region name. + Returns: - The FeatureMetadata resource. - + Iterator for listed Hub resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14081,142 +13301,125 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating feature_metadata resource.") - client = Base.get_sagemaker_client() - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "FeatureGroupName": self.feature_group_name, - "FeatureName": self.feature_name, - "Description": description, - "ParameterAdditions": parameter_additions, - "ParameterRemovals": parameter_removals, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_feature_metadata(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self + + return ResourceIterator( + client=client, + list_method='list_hubs', + summaries_key='HubSummaries', + summary_name='HubInfo', + resource_cls=Hub, + list_method_kwargs=operation_input_args + ) -class FlowDefinition(Base): +class HubContent(Base): """ - Class representing resource FlowDefinition - + Class representing resource HubContent + Attributes: - flow_definition_arn: The Amazon Resource Name (ARN) of the flow defintion. - flow_definition_name: The Amazon Resource Name (ARN) of the flow definition. - flow_definition_status: The status of the flow definition. Valid values are listed below. - creation_time: The timestamp when the flow definition was created. - output_config: An object containing information about the output file. - role_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) execution role for the flow definition. - human_loop_request_source: Container for configuring the source of human task requests. Used to specify if Amazon Rekognition or Amazon Textract is used as an integration source. - human_loop_activation_config: An object containing information about what triggers a human review workflow. - human_loop_config: An object containing information about who works on the task, the workforce task price, and other task details. - workflow_steps: - task_rendering_role_arn: - kms_key_id: - failure_reason: The reason your flow definition failed. - + hub_content_name: The name of the hub content. + hub_content_arn: The Amazon Resource Name (ARN) of the hub content. + hub_content_version: The version of the hub content. + hub_content_type: The type of hub content. + document_schema_version: The document schema version for the hub content. + hub_name: The name of the hub that contains the content. + hub_arn: The Amazon Resource Name (ARN) of the hub that contains the content. + hub_content_document: The hub content document that describes information about the hub content such as type, associated containers, scripts, and more. + hub_content_status: The status of the hub content. + creation_time: The date and time that hub content was created. + hub_content_display_name: The display name of the hub content. + hub_content_description: A description of the hub content. + hub_content_markdown: A string that provides a description of the hub content. This string can include links, tables, and standard markdown formating. + sage_maker_public_hub_content_arn: The ARN of the public hub content. + reference_min_version: The minimum version of the hub content. + support_status: The support status of the hub content. + hub_content_search_keywords: The searchable keywords for the hub content. + hub_content_dependencies: The location of any dependencies that the hub content has, such as scripts, model artifacts, datasets, or notebooks. + failure_reason: The failure reason if importing hub content failed. + last_modified_time: The last modified time of the hub content. + """ - - flow_definition_name: StrPipeVar - flow_definition_arn: Optional[StrPipeVar] = Unassigned() - flow_definition_status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - human_loop_request_source: Optional[HumanLoopRequestSource] = Unassigned() - human_loop_activation_config: Optional[HumanLoopActivationConfig] = Unassigned() - human_loop_config: Optional[HumanLoopConfig] = Unassigned() - workflow_steps: Optional[StrPipeVar] = Unassigned() - output_config: Optional[FlowDefinitionOutputConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - task_rendering_role_arn: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() + hub_name: StrPipeVar + hub_content_type: StrPipeVar + hub_content_name: StrPipeVar + hub_content_arn: Optional[StrPipeVar] = Unassigned() + hub_content_version: Optional[StrPipeVar] = Unassigned() + document_schema_version: Optional[StrPipeVar] = Unassigned() + hub_arn: Optional[StrPipeVar] = Unassigned() + hub_content_display_name: Optional[StrPipeVar] = Unassigned() + hub_content_description: Optional[StrPipeVar] = Unassigned() + hub_content_markdown: Optional[StrPipeVar] = Unassigned() + hub_content_document: Optional[StrPipeVar] = Unassigned() + sage_maker_public_hub_content_arn: Optional[StrPipeVar] = Unassigned() + reference_min_version: Optional[StrPipeVar] = Unassigned() + support_status: Optional[StrPipeVar] = Unassigned() + hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned() + hub_content_dependencies: Optional[List[HubContentDependency]] = Unassigned() + hub_content_status: Optional[StrPipeVar] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() - + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + hub_name: Optional[str] = Unassigned() def get_name(self) -> str: attributes = vars(self) - resource_name = "flow_definition_name" - resource_name_split = resource_name.split("_") + resource_name = 'hub_content_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object flow_definition") + logger.error("Name attribute not found for object hub_content") return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "output_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "FlowDefinition", **kwargs - ), - ) - - return wrapper - + @classmethod - @populate_inputs_decorator @Base.add_validate_call - def create( + def get( cls, - flow_definition_name: StrPipeVar, - output_config: FlowDefinitionOutputConfig, - role_arn: StrPipeVar, - human_loop_request_source: Optional[HumanLoopRequestSource] = Unassigned(), - human_loop_activation_config: Optional[HumanLoopActivationConfig] = Unassigned(), - human_loop_config: Optional[HumanLoopConfig] = Unassigned(), - workflow_steps: Optional[StrPipeVar] = Unassigned(), - task_rendering_role_arn: Optional[StrPipeVar] = Unassigned(), - kms_key_id: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + hub_name: StrPipeVar, + hub_content_type: StrPipeVar, + hub_content_name: StrPipeVar, + hub_content_version: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["FlowDefinition"]: + ) -> Optional["HubContent"]: """ - Create a FlowDefinition resource - + Get a HubContent resource + Parameters: - flow_definition_name: The name of your flow definition. - output_config: An object containing information about where the human review results will be uploaded. - role_arn: The Amazon Resource Name (ARN) of the role needed to call other services on your behalf. For example, arn:aws:iam::1234567890:role/service-role/AmazonSageMaker-ExecutionRole-20180111T151298. - human_loop_request_source: Container for configuring the source of human task requests. Use to specify if Amazon Rekognition or Amazon Textract is used as an integration source. - human_loop_activation_config: An object containing information about the events that trigger a human workflow. - human_loop_config: An object containing information about the tasks the human reviewers will perform. - workflow_steps: - task_rendering_role_arn: - kms_key_id: - tags: An array of key-value pairs that contain metadata to help you categorize and organize a flow definition. Each tag consists of a key and a value, both of which you define. + hub_name: The name of the hub that contains the content to describe. + hub_content_type: The type of content in the hub. + hub_content_name: The name of the content to describe. + hub_content_version: The version of the content to describe. session: Boto3 session. region: Region name. - + Returns: - The FlowDefinition resource. - + The HubContent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14225,67 +13428,42 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating flow_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + operation_input_args = { - "FlowDefinitionName": flow_definition_name, - "HumanLoopRequestSource": human_loop_request_source, - "HumanLoopActivationConfig": human_loop_activation_config, - "HumanLoopConfig": human_loop_config, - "WorkflowSteps": workflow_steps, - "OutputConfig": output_config, - "RoleArn": role_arn, - "TaskRenderingRoleArn": task_rendering_role_arn, - "KmsKeyId": kms_key_id, - "Tags": tags, + 'HubName': hub_name, + 'HubContentType': hub_content_type, + 'HubContentName': hub_content_name, + 'HubContentVersion': hub_content_version, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="FlowDefinition", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_flow_definition(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(flow_definition_name=flow_definition_name, session=session, region=region) - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_hub_content(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeHubContentResponse') + hub_content = cls(**transformed_response) + return hub_content + @Base.add_validate_call - def get( - cls, - flow_definition_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["FlowDefinition"]: + def refresh( + self, + + ) -> Optional["HubContent"]: """ - Get a FlowDefinition resource - - Parameters: - flow_definition_name: The name of the flow definition. - session: Boto3 session. - region: Region name. - + Refresh a HubContent resource + Returns: - The FlowDefinition resource. - + The HubContent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14296,38 +13474,43 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "FlowDefinitionName": flow_definition_name, + 'HubName': self.hub_name, + 'HubContentType': self.hub_content_type, + 'HubContentName': self.hub_content_name, + 'HubContentVersion': self.hub_content_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_flow_definition(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeFlowDefinitionResponse") - flow_definition = cls(**transformed_response) - return flow_definition - + + client = Base.get_sagemaker_client() + response = client.describe_hub_content(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeHubContentResponse', self) + return self + @Base.add_validate_call - def refresh( + def update( self, - ) -> Optional["FlowDefinition"]: + hub_content_type: StrPipeVar, + hub_content_version: StrPipeVar, + hub_content_display_name: Optional[StrPipeVar] = Unassigned(), + hub_content_description: Optional[StrPipeVar] = Unassigned(), + hub_content_markdown: Optional[StrPipeVar] = Unassigned(), + hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), + support_status: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["HubContent"]: """ - Refresh a FlowDefinition resource - + Update a HubContent resource + Returns: - The FlowDefinition resource. - + The HubContent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14336,32 +13519,46 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - operation_input_args = { - "FlowDefinitionName": self.flow_definition_name, + + logger.info("Updating hub_content resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'HubName': self.hub_name, + 'HubContentName': self.hub_content_name, + 'HubContentType': hub_content_type, + 'HubContentVersion': hub_content_version, + 'HubContentDisplayName': hub_content_display_name, + 'HubContentDescription': hub_content_description, + 'HubContentMarkdown': hub_content_markdown, + 'HubContentSearchKeywords': hub_content_search_keywords, + 'SupportStatus': support_status, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_flow_definition(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeFlowDefinitionResponse", self) + + # create the resource + response = client.update_hub_content(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a FlowDefinition resource - + Delete a HubContent resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14373,93 +13570,117 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "FlowDefinitionName": self.flow_definition_name, + 'HubName': self.hub_name, + 'HubContentType': self.hub_content_type, + 'HubContentName': self.hub_content_name, + 'HubContentVersion': self.hub_content_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_flow_definition(**operation_input_args) - + + client.delete_hub_content(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Initializing", "Active", "Failed", "Deleting"], + target_status: Literal['Supported', 'Deprecated', 'Restricted'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a FlowDefinition resource to reach certain status. - + Wait for a HubContent resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for FlowDefinition to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for HubContent to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.flow_definition_status + current_status = self.support_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="FlowDefinition", - status=current_status, - reason=self.failure_reason, - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="FlowDefinition", status=current_status) + raise TimeoutExceededError(resource_type="HubContent", status=current_status) time.sleep(poll) - + + @classmethod @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + def load( + cls, + hub_content_name: StrPipeVar, + hub_content_type: StrPipeVar, + document_schema_version: StrPipeVar, + hub_name: StrPipeVar, + hub_content_document: StrPipeVar, + hub_content_version: Optional[StrPipeVar] = Unassigned(), + hub_content_display_name: Optional[StrPipeVar] = Unassigned(), + hub_content_description: Optional[StrPipeVar] = Unassigned(), + hub_content_markdown: Optional[StrPipeVar] = Unassigned(), + support_status: Optional[StrPipeVar] = Unassigned(), + hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["HubContent"]: """ - Wait for a FlowDefinition resource to be deleted. - + Import a HubContent resource + Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - + hub_content_name: The name of the hub content to import. + hub_content_type: The type of hub content to import. + document_schema_version: The version of the hub content schema to import. + hub_name: The name of the hub to import content into. + hub_content_document: The hub content document that describes information about the hub content such as type, associated containers, scripts, and more. + hub_content_version: The version of the hub content to import. + hub_content_display_name: The display name of the hub content to import. + hub_content_description: A description of the hub content to import. + hub_content_markdown: A string that provides a description of the hub content. This string can include links, tables, and standard markdown formating. + support_status: The status of the hub content resource. + hub_content_search_keywords: The searchable keywords of the hub content. + tags: Any tags associated with the hub content. + session: Boto3 session. + region: Region name. + + Returns: + The HubContent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14468,73 +13689,72 @@ def wait_for_delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for FlowDefinition to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.flow_definition_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="FlowDefinition", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod + + logger.info(f"Importing hub_content resource.") + client = SageMakerClient(session=session, region_name=region, service_name='sagemaker').client + + operation_input_args = { + 'HubContentName': hub_content_name, + 'HubContentVersion': hub_content_version, + 'HubContentType': hub_content_type, + 'DocumentSchemaVersion': document_schema_version, + 'HubName': hub_name, + 'HubContentDisplayName': hub_content_display_name, + 'HubContentDescription': hub_content_description, + 'HubContentMarkdown': hub_content_markdown, + 'HubContentDocument': hub_content_document, + 'SupportStatus': support_status, + 'HubContentSearchKeywords': hub_content_search_keywords, + 'Tags': tags, + } + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # import the resource + response = client.import_hub_content(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(hub_name=hub_name, hub_content_type=hub_content_type, hub_content_name=hub_content_name, session=session, region=region) + + @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), + def get_all_versions( + self, + min_version: Optional[StrPipeVar] = Unassigned(), + max_schema_version: Optional[StrPipeVar] = Unassigned(), creation_time_before: Optional[datetime.datetime] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["FlowDefinition"]: + creation_time_after: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, + region: Optional[str] = None, + ) -> ResourceIterator["HubContent"]: """ - Get all FlowDefinition resources - + List hub content versions. + Parameters: - creation_time_after: A filter that returns only flow definitions with a creation time greater than or equal to the specified timestamp. - creation_time_before: A filter that returns only flow definitions that were created before the specified timestamp. - sort_order: An optional value that specifies whether you want the results sorted in Ascending or Descending order. - next_token: A token to resume pagination. - max_results: The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken will be provided in the output that you can use to resume pagination. + min_version: The lower bound of the hub content versions to list. + max_schema_version: The upper bound of the hub content schema version. + creation_time_before: Only list hub content versions that were created before the time specified. + creation_time_after: Only list hub content versions that were created after the time specified. + sort_by: Sort hub content versions by either name or creation time. + sort_order: Sort hub content versions by ascending or descending order. + max_results: The maximum number of hub content versions to list. + next_token: If the response to a previous ListHubContentVersions request was truncated, the response includes a NextToken. To retrieve the next set of hub content versions, use the token in the next request. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed FlowDefinition resources. - + Iterator for listed HubContent. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14543,108 +13763,111 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "SortOrder": sort_order, + 'HubName': self.hub_name, + 'HubContentType': self.hub_content_type, + 'HubContentName': self.hub_content_name, + 'MinVersion': min_version, + 'MaxSchemaVersion': max_schema_version, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_flow_definitions", - summaries_key="FlowDefinitionSummaries", - summary_name="FlowDefinitionSummary", - resource_cls=FlowDefinition, - list_method_kwargs=operation_input_args, + list_method='list_hub_content_versions', + summaries_key='HubContentSummaries', + summary_name='HubContentInfo', + resource_cls=HubContent, + list_method_kwargs=operation_input_args ) -class GroundTruthJob(Base): +class HubContentPresignedUrls(Base): """ - Class representing resource GroundTruthJob - + Class representing resource HubContentPresignedUrls + Attributes: - ground_truth_project_arn: - ground_truth_workflow_arn: - ground_truth_job_arn: - ground_truth_job_name: - ground_truth_job_status: - input_config: - output_config: - created_at: - ground_truth_job_description: - failure_reason: - + hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub. + hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference. + 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. + 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. + hub_content_version: The version of the hub content. If not specified, the latest version is used. + access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation. + 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. + 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. + """ - - ground_truth_job_name: StrPipeVar - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_job_description: Optional[StrPipeVar] = Unassigned() - ground_truth_job_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_job_status: Optional[StrPipeVar] = Unassigned() - input_config: Optional[GroundTruthJobInputConfig] = Unassigned() - output_config: Optional[GroundTruthJobOutputConfig] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - + hub_name: Union[StrPipeVar, object] + hub_content_type: StrPipeVar + hub_content_name: Union[StrPipeVar, object] + authorized_url_configs: List[AuthorizedUrl] + hub_content_version: Optional[StrPipeVar] = Unassigned() + access_config: Optional[PresignedUrlAccessConfig] = Unassigned() + max_results: Optional[int] = Unassigned() + next_token: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "ground_truth_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'hub_content_presigned_urls_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object ground_truth_job") + logger.error("Name attribute not found for object hub_content_presigned_urls") return None - + @classmethod @Base.add_validate_call def create( cls, - ground_truth_project_name: Union[StrPipeVar, object], - ground_truth_workflow_name: Union[StrPipeVar, object], - ground_truth_job_name: StrPipeVar, - input_config: GroundTruthJobInputConfig, - output_config: GroundTruthJobOutputConfig, - ground_truth_job_description: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthJob"]: + hub_name: Union[StrPipeVar, object], + hub_content_type: StrPipeVar, + hub_content_name: Union[StrPipeVar, object], + hub_content_version: Optional[StrPipeVar] = Unassigned(), + access_config: Optional[PresignedUrlAccessConfig] = Unassigned(), + max_results: Optional[int] = Unassigned(), + next_token: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional["HubContentPresignedUrls"]: """ - Create a GroundTruthJob resource - + Create a HubContentPresignedUrls resource + Parameters: - ground_truth_project_name: - ground_truth_workflow_name: - ground_truth_job_name: - input_config: - output_config: - ground_truth_job_description: + hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub. + hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference. + 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. + hub_content_version: The version of the hub content. If not specified, the latest version is used. + access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation. + 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. + next_token: A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthJob resource. - + The HubContentPresignedUrls resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14653,73 +13876,102 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating ground_truth_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": ground_truth_workflow_name, - "GroundTruthJobName": ground_truth_job_name, - "GroundTruthJobDescription": ground_truth_job_description, - "InputConfig": input_config, - "OutputConfig": output_config, + 'HubName': hub_name, + 'HubContentType': hub_content_type, + 'HubContentName': hub_content_name, + 'HubContentVersion': hub_content_version, + 'AccessConfig': access_config, + 'MaxResults': max_results, + 'NextToken': next_token, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="GroundTruthJob", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_ground_truth_job(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_hub_content_presigned_urls API") + response = client.create_hub_content_presigned_urls(**operation_input_args) logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'CreateHubContentPresignedUrlsResponse') + return cls(**operation_input_args, **transformed_response) - return cls.get( - ground_truth_project_name=ground_truth_project_name, - ground_truth_workflow_name=ground_truth_workflow_name, - ground_truth_job_name=ground_truth_job_name, - session=session, - region=region, - ) +class HubContentReference(Base): + """ + Class representing resource HubContentReference + + Attributes: + hub_name: The name of the hub to add the hub content reference to. + sage_maker_public_hub_content_arn: The ARN of the public hub content to reference. + hub_arn: The ARN of the hub that the hub content reference was added to. + hub_content_arn: The ARN of the hub content. + hub_content_name: The name of the hub content to reference. + min_version: The minimum version of the hub content to reference. + tags: Any tags associated with the hub content to reference. + + """ + hub_name: Union[StrPipeVar, object] + sage_maker_public_hub_content_arn: StrPipeVar + hub_arn: StrPipeVar + hub_content_arn: StrPipeVar + hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned() + min_version: Optional[StrPipeVar] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'hub_content_reference_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object hub_content_reference") + return None + @classmethod @Base.add_validate_call - def get( + def create( cls, - ground_truth_project_name: StrPipeVar, - ground_truth_workflow_name: StrPipeVar, - ground_truth_job_name: StrPipeVar, + hub_name: Union[StrPipeVar, object], + sage_maker_public_hub_content_arn: StrPipeVar, + hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned(), + min_version: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthJob"]: + region: Optional[str] = None, + ) -> Optional["HubContentReference"]: """ - Get a GroundTruthJob resource - + Create a HubContentReference resource + Parameters: - ground_truth_project_name: - ground_truth_workflow_name: - ground_truth_job_name: + hub_name: The name of the hub to add the hub content reference to. + sage_maker_public_hub_content_arn: The ARN of the public hub content to reference. + hub_content_name: The name of the hub content to reference. + min_version: The minimum version of the hub content to reference. + tags: Any tags associated with the hub content to reference. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthJob resource. - + The HubContentReference resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14728,44 +13980,52 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": ground_truth_workflow_name, - "GroundTruthJobName": ground_truth_job_name, + 'HubName': hub_name, + 'SageMakerPublicHubContentArn': sage_maker_public_hub_content_arn, + 'HubContentName': hub_content_name, + 'MinVersion': min_version, + 'Tags': tags, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_ground_truth_job(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeGroundTruthJobResponse") - ground_truth_job = cls(**transformed_response) - return ground_truth_job - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_hub_content_reference API") + response = client.create_hub_content_reference(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'CreateHubContentReferenceResponse') + return cls(**operation_input_args, **transformed_response) + @Base.add_validate_call - def refresh( + def update( self, - ground_truth_project_name: StrPipeVar, - ground_truth_workflow_name: StrPipeVar, - ) -> Optional["GroundTruthJob"]: + hub_content_type: StrPipeVar, + min_version: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["HubContentReference"]: """ - Refresh a GroundTruthJob resource - + Update a HubContentReference resource + + Parameters: + hub_content_type: The content type of the resource that you want to update. Only specify a ModelReference resource for this API. To update a Model or Notebook resource, use the UpdateHubContent API instead. + Returns: - The GroundTruthJob resource. - + The HubContentReference resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14774,147 +14034,127 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating hub_content_reference resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": ground_truth_workflow_name, - "GroundTruthJobName": self.ground_truth_job_name, + 'HubName': self.hub_name, + 'HubContentName': self.hub_content_name, + 'HubContentType': hub_content_type, + 'MinVersion': min_version, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_ground_truth_job(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeGroundTruthJobResponse", self) + + # create the resource + response = client.update_hub_content_reference(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + return self - + @Base.add_validate_call - def wait( + def delete( self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + hub_content_type: StrPipeVar, + ) -> None: """ - Wait for a GroundTruthJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - + Delete a HubContentReference resource + Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. """ - terminal_states = ["Completed", "Failed"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for GroundTruthJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.ground_truth_job_status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="GroundTruthJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="GroundTruthJob", status=current_status) - time.sleep(poll) + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'HubName': self.hub_name, + 'HubContentType': hub_content_type, + 'HubContentName': self.hub_content_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_hub_content_reference(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") -class GroundTruthProject(Base): +class HumanTaskUi(Base): """ - Class representing resource GroundTruthProject - + Class representing resource HumanTaskUi + Attributes: - ground_truth_project_arn: - ground_truth_project_name: - ground_truth_project_description: - point_of_contact: - ground_truth_project_status: - created_at: - + human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface (worker task template). + human_task_ui_name: The name of the human task user interface (worker task template). + creation_time: The timestamp when the human task user interface was created. + ui_template: + human_task_ui_status: The status of the human task user interface (worker task template). Valid values are listed below. + """ - - ground_truth_project_name: StrPipeVar - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_project_description: Optional[StrPipeVar] = Unassigned() - point_of_contact: Optional[GroundTruthProjectPointOfContact] = Unassigned() - ground_truth_project_status: Optional[StrPipeVar] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - + human_task_ui_name: StrPipeVar + human_task_ui_arn: Optional[StrPipeVar] = Unassigned() + human_task_ui_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + ui_template: Optional[UiTemplateInfo] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "ground_truth_project_name" - resource_name_split = resource_name.split("_") + resource_name = 'human_task_ui_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object ground_truth_project") + logger.error("Name attribute not found for object human_task_ui") return None - + @classmethod @Base.add_validate_call def create( cls, - ground_truth_project_name: StrPipeVar, - ground_truth_project_description: Optional[StrPipeVar] = Unassigned(), - point_of_contact: Optional[GroundTruthProjectPointOfContact] = Unassigned(), + human_task_ui_name: StrPipeVar, + ui_template: UiTemplate, + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthProject"]: + ) -> Optional["HumanTaskUi"]: """ - Create a GroundTruthProject resource - + Create a HumanTaskUi resource + Parameters: - ground_truth_project_name: - ground_truth_project_description: - point_of_contact: + human_task_ui_name: The name of the user interface you are creating. + ui_template: + tags: An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthProject resource. - + The HumanTaskUi resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14923,61 +14163,56 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating ground_truth_project resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating human_task_ui resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthProjectDescription": ground_truth_project_description, - "PointOfContact": point_of_contact, + 'HumanTaskUiName': human_task_ui_name, + 'UiTemplate': ui_template, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="GroundTruthProject", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='HumanTaskUi', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_ground_truth_project(**operation_input_args) + response = client.create_human_task_ui(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - ground_truth_project_name=ground_truth_project_name, session=session, region=region - ) - + + return cls.get(human_task_ui_name=human_task_ui_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - ground_truth_project_name: StrPipeVar, + human_task_ui_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthProject"]: + ) -> Optional["HumanTaskUi"]: """ - Get a GroundTruthProject resource - + Get a HumanTaskUi resource + Parameters: - ground_truth_project_name: + human_task_ui_name: The name of the human task user interface (worker task template) you want information about. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthProject resource. - + The HumanTaskUi resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -14988,38 +14223,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, + 'HumanTaskUiName': human_task_ui_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_ground_truth_project(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_human_task_ui(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeGroundTruthProjectResponse") - ground_truth_project = cls(**transformed_response) - return ground_truth_project - + transformed_response = transform(response, 'DescribeHumanTaskUiResponse') + human_task_ui = cls(**transformed_response) + return human_task_ui + @Base.add_validate_call def refresh( self, - ) -> Optional["GroundTruthProject"]: + + ) -> Optional["HumanTaskUi"]: """ - Refresh a GroundTruthProject resource - + Refresh a HumanTaskUi resource + Returns: - The GroundTruthProject resource. - + The HumanTaskUi resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15030,171 +14264,367 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "GroundTruthProjectName": self.ground_truth_project_name, + 'HumanTaskUiName': self.human_task_ui_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_ground_truth_project(**operation_input_args) - + response = client.describe_human_task_ui(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeGroundTruthProjectResponse", self) + transform(response, 'DescribeHumanTaskUiResponse', self) return self - + + @Base.add_validate_call + def delete( + self, + + ) -> None: + """ + Delete a HumanTaskUi resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'HumanTaskUiName': self.human_task_ui_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_human_task_ui(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Pending", "Active"], + target_status: Literal['Active', 'Deleting'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a GroundTruthProject resource to reach certain status. - + Wait for a HumanTaskUi resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task( - f"Waiting for GroundTruthProject to reach [bold]{target_status} status..." - ) + progress.add_task(f"Waiting for HumanTaskUi to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.ground_truth_project_status + current_status = self.human_task_ui_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="GroundTruthProject", status=current_status - ) + raise TimeoutExceededError(resource_type="HumanTaskUi", status=current_status) time.sleep(poll) - + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a HumanTaskUi resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for HumanTaskUi to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.human_task_ui_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="HumanTaskUi", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["GroundTruthProject"]: + ) -> ResourceIterator["HumanTaskUi"]: """ - Get all GroundTruthProject resources. - + Get all HumanTaskUi resources + Parameters: + creation_time_after: A filter that returns only human task user interfaces with a creation time greater than or equal to the specified timestamp. + creation_time_before: A filter that returns only human task user interfaces that were created before the specified timestamp. + sort_order: An optional value that specifies whether you want the results sorted in Ascending or Descending order. + next_token: A token to resume pagination. + max_results: The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken will be provided in the output that you can use to resume pagination. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed GroundTruthProject resources. - + Iterator for listed HumanTaskUi resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` """ - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + return ResourceIterator( client=client, - list_method="list_ground_truth_projects", - summaries_key="GroundTruthProjectSummaries", - summary_name="GroundTruthProjectSummary", - resource_cls=GroundTruthProject, + list_method='list_human_task_uis', + summaries_key='HumanTaskUiSummaries', + summary_name='HumanTaskUiSummary', + resource_cls=HumanTaskUi, + list_method_kwargs=operation_input_args ) -class GroundTruthWorkflow(Base): +class HyperParameterTuningJob(Base): """ - Class representing resource GroundTruthWorkflow - + Class representing resource HyperParameterTuningJob + Attributes: - ground_truth_project_arn: - ground_truth_workflow_arn: - ground_truth_workflow_name: - ground_truth_workflow_definition_spec: - execution_role_arn: - created_at: - + hyper_parameter_tuning_job_name: The name of the hyperparameter tuning job. + hyper_parameter_tuning_job_arn: The Amazon Resource Name (ARN) of the tuning job. + hyper_parameter_tuning_job_config: The HyperParameterTuningJobConfig object that specifies the configuration of the tuning job. + hyper_parameter_tuning_job_status: The status of the tuning job. + creation_time: The date and time that the tuning job started. + training_job_status_counters: The TrainingJobStatusCounters object that specifies the number of training jobs, categorized by status, that this tuning job launched. + objective_status_counters: The ObjectiveStatusCounters object that specifies the number of training jobs, categorized by the status of their final objective metric, that this tuning job launched. + training_job_definition: The HyperParameterTrainingJobDefinition object that specifies the definition of the training jobs that this tuning job launches. + training_job_definitions: A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job. + hyper_parameter_tuning_end_time: The date and time that the tuning job ended. + last_modified_time: The date and time that the status of the tuning job was modified. + best_training_job: A TrainingJobSummary object that describes the training job that completed with the best current HyperParameterTuningJobObjective. + overall_best_training_job: If the hyperparameter tuning job is an warm start tuning job with a WarmStartType of IDENTICAL_DATA_AND_ALGORITHM, this is the TrainingJobSummary for the training job with the best objective metric value of all training jobs launched by this tuning job and all parent jobs specified for the warm start tuning job. + warm_start_config: The configuration for starting the hyperparameter parameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job. + autotune: A flag to indicate if autotune is enabled for the hyperparameter tuning job. + failure_reason: If the tuning job failed, the reason it failed. + tuning_job_completion_details: Tuning job completion information returned as the response from a hyperparameter tuning job. This information tells if your tuning job has or has not converged. It also includes the number of training jobs that have not improved model performance as evaluated against the objective function. + consumed_resources: + """ - - ground_truth_workflow_name: StrPipeVar - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_definition_spec: Optional[StrPipeVar] = Unassigned() - execution_role_arn: Optional[StrPipeVar] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - + hyper_parameter_tuning_job_name: StrPipeVar + hyper_parameter_tuning_job_arn: Optional[StrPipeVar] = Unassigned() + hyper_parameter_tuning_job_config: Optional[HyperParameterTuningJobConfig] = Unassigned() + training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned() + training_job_definitions: Optional[List[HyperParameterTrainingJobDefinition]] = Unassigned() + hyper_parameter_tuning_job_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + hyper_parameter_tuning_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + training_job_status_counters: Optional[TrainingJobStatusCounters] = Unassigned() + objective_status_counters: Optional[ObjectiveStatusCounters] = Unassigned() + best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() + overall_best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() + warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned() + autotune: Optional[Autotune] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + tuning_job_completion_details: Optional[HyperParameterTuningJobCompletionDetails] = Unassigned() + consumed_resources: Optional[HyperParameterTuningJobConsumedResources] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "ground_truth_workflow_name" - resource_name_split = resource_name.split("_") + resource_name = 'hyper_parameter_tuning_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object ground_truth_workflow") + logger.error("Name attribute not found for object hyper_parameter_tuning_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "training_job_definition": { + "role_arn": { + "type": "string" + }, + "output_data_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "resource_config": { + "volume_kms_key_id": { + "type": "string" + } + }, + "hyper_parameter_tuning_resource_config": { + "volume_kms_key_id": { + "type": "string" + } + }, + "checkpoint_config": { + "s3_uri": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "HyperParameterTuningJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - ground_truth_project_name: Union[StrPipeVar, object], - ground_truth_workflow_name: StrPipeVar, - ground_truth_workflow_definition_spec: StrPipeVar, - execution_role_arn: StrPipeVar, + hyper_parameter_tuning_job_name: StrPipeVar, + hyper_parameter_tuning_job_config: HyperParameterTuningJobConfig, + training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned(), + training_job_definitions: Optional[List[HyperParameterTrainingJobDefinition]] = Unassigned(), + warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + autotune: Optional[Autotune] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthWorkflow"]: + ) -> Optional["HyperParameterTuningJob"]: """ - Create a GroundTruthWorkflow resource - + Create a HyperParameterTuningJob resource + Parameters: - ground_truth_project_name: - ground_truth_workflow_name: - ground_truth_workflow_definition_spec: - execution_role_arn: + hyper_parameter_tuning_job_name: The name of the tuning job. This name is the prefix for the names of all training jobs that this tuning job launches. The name must be unique within the same Amazon Web Services account and Amazon Web Services Region. The name must have 1 to 32 characters. Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name is not case sensitive. + hyper_parameter_tuning_job_config: The HyperParameterTuningJobConfig object that describes the tuning job, including the search strategy, the objective metric used to evaluate training jobs, ranges of parameters to search, and resource limits for the tuning job. For more information, see How Hyperparameter Tuning Works. + training_job_definition: The HyperParameterTrainingJobDefinition object that describes the training jobs that this tuning job launches, including static hyperparameters, input data configuration, output data configuration, resource configuration, and stopping condition. + training_job_definitions: A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job. + warm_start_config: Specifies the configuration for starting the hyperparameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job. All training jobs launched by the new hyperparameter tuning job are evaluated by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM as the WarmStartType value for the warm start configuration, the training job that performs the best in the new tuning job is compared to the best training jobs from the parent tuning jobs. From these, the training job that performs the best as measured by the objective metric is returned as the overall best training job. All training jobs launched by parent hyperparameter tuning jobs and the new hyperparameter tuning jobs count against the limit of training jobs for the tuning job. + 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 that you specify for the tuning job are also added to all training jobs that the tuning job launches. + autotune: Configures SageMaker Automatic model tuning (AMT) to automatically find optimal parameters for the following fields: ParameterRanges: The names and ranges of parameters that a hyperparameter tuning job can optimize. ResourceLimits: The maximum resources that can be used for a training job. These resources include the maximum number of training jobs, the maximum runtime of a tuning job, and the maximum number of training jobs to run at the same time. TrainingJobEarlyStoppingType: A flag that specifies whether or not to use early stopping for training jobs launched by a hyperparameter tuning job. RetryStrategy: The number of times to retry a training job. Strategy: Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training jobs that it launches. ConvergenceDetected: A flag to indicate that Automatic model tuning (AMT) has detected model convergence. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthWorkflow resource. - + The HyperParameterTuningJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15203,68 +14633,60 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating ground_truth_workflow resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": ground_truth_workflow_name, - "GroundTruthWorkflowDefinitionSpec": ground_truth_workflow_definition_spec, - "ExecutionRoleArn": execution_role_arn, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="GroundTruthWorkflow", operation_input_args=operation_input_args - ) - + + logger.info("Creating hyper_parameter_tuning_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'HyperParameterTuningJobName': hyper_parameter_tuning_job_name, + 'HyperParameterTuningJobConfig': hyper_parameter_tuning_job_config, + 'TrainingJobDefinition': training_job_definition, + 'TrainingJobDefinitions': training_job_definitions, + 'WarmStartConfig': warm_start_config, + 'Tags': tags, + 'Autotune': autotune, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='HyperParameterTuningJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_ground_truth_workflow(**operation_input_args) + response = client.create_hyper_parameter_tuning_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - ground_truth_project_name=ground_truth_project_name, - ground_truth_workflow_name=ground_truth_workflow_name, - session=session, - region=region, - ) - + + return cls.get(hyper_parameter_tuning_job_name=hyper_parameter_tuning_job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - ground_truth_project_name: StrPipeVar, - ground_truth_workflow_name: StrPipeVar, + hyper_parameter_tuning_job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["GroundTruthWorkflow"]: + ) -> Optional["HyperParameterTuningJob"]: """ - Get a GroundTruthWorkflow resource - + Get a HyperParameterTuningJob resource + Parameters: - ground_truth_project_name: - ground_truth_workflow_name: + hyper_parameter_tuning_job_name: The name of the tuning job. session: Boto3 session. region: Region name. - + Returns: - The GroundTruthWorkflow resource. - + The HyperParameterTuningJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15275,40 +14697,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": ground_truth_workflow_name, + 'HyperParameterTuningJobName': hyper_parameter_tuning_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_ground_truth_workflow(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_hyper_parameter_tuning_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeGroundTruthWorkflowResponse") - ground_truth_workflow = cls(**transformed_response) - return ground_truth_workflow - + transformed_response = transform(response, 'DescribeHyperParameterTuningJobResponse') + hyper_parameter_tuning_job = cls(**transformed_response) + return hyper_parameter_tuning_job + @Base.add_validate_call def refresh( self, - ground_truth_project_name: StrPipeVar, - ) -> Optional["GroundTruthWorkflow"]: + + ) -> Optional["HyperParameterTuningJob"]: """ - Refresh a GroundTruthWorkflow resource - + Refresh a HyperParameterTuningJob resource + Returns: - The GroundTruthWorkflow resource. - + The HyperParameterTuningJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15319,263 +14738,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "GroundTruthProjectName": ground_truth_project_name, - "GroundTruthWorkflowName": self.ground_truth_workflow_name, + 'HyperParameterTuningJobName': self.hyper_parameter_tuning_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_ground_truth_workflow(**operation_input_args) - + response = client.describe_hyper_parameter_tuning_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeGroundTruthWorkflowResponse", self) + transform(response, 'DescribeHyperParameterTuningJobResponse', self) return self - - -class Hub(Base): - """ - Class representing resource Hub - - Attributes: - hub_name: The name of the hub. - hub_arn: The Amazon Resource Name (ARN) of the hub. - hub_status: The status of the hub. - creation_time: The date and time that the hub was created. - last_modified_time: The date and time that the hub was last modified. - hub_display_name: The display name of the hub. - hub_description: A description of the hub. - hub_search_keywords: The searchable keywords for the hub. - s3_storage_config: The Amazon S3 storage configuration for the hub. - failure_reason: The failure reason if importing hub content failed. - - """ - - hub_name: StrPipeVar - hub_arn: Optional[StrPipeVar] = Unassigned() - hub_display_name: Optional[StrPipeVar] = Unassigned() - hub_description: Optional[StrPipeVar] = Unassigned() - hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned() - s3_storage_config: Optional[HubS3StorageConfig] = Unassigned() - hub_status: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "hub_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object hub") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "s3_storage_config": {"s3_output_path": {"type": "string"}} - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Hub", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - hub_name: StrPipeVar, - hub_description: StrPipeVar, - hub_display_name: Optional[StrPipeVar] = Unassigned(), - hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), - s3_storage_config: Optional[HubS3StorageConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Hub"]: - """ - Create a Hub resource - - Parameters: - hub_name: The name of the hub to create. - hub_description: A description of the hub. - hub_display_name: The display name of the hub. - hub_search_keywords: The searchable keywords for the hub. - s3_storage_config: The Amazon S3 storage configuration for the hub. - tags: Any tags to associate with the hub. - session: Boto3 session. - region: Region name. - - Returns: - The Hub resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating hub resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "HubName": hub_name, - "HubDescription": hub_description, - "HubDisplayName": hub_display_name, - "HubSearchKeywords": hub_search_keywords, - "S3StorageConfig": s3_storage_config, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Hub", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_hub(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(hub_name=hub_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - hub_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Hub"]: - """ - Get a Hub resource - - Parameters: - hub_name: The name of the hub to describe. - session: Boto3 session. - region: Region name. - - Returns: - The Hub resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "HubName": hub_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_hub(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeHubResponse") - hub = cls(**transformed_response) - return hub - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["Hub"]: - """ - Refresh a Hub resource - - Returns: - The Hub resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "HubName": self.hub_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_hub(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeHubResponse", self) - return self - - @populate_inputs_decorator + @Base.add_validate_call - def update( + def delete( self, - hub_description: Optional[StrPipeVar] = Unassigned(), - hub_display_name: Optional[StrPipeVar] = Unassigned(), - hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), - ) -> Optional["Hub"]: + + ) -> None: """ - Update a Hub resource - - Returns: - The Hub resource. - + Delete a HyperParameterTuningJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15584,39 +14771,28 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating hub resource.") + client = Base.get_sagemaker_client() - + operation_input_args = { - "HubName": self.hub_name, - "HubDescription": hub_description, - "HubDisplayName": hub_display_name, - "HubSearchKeywords": hub_search_keywords, + 'HyperParameterTuningJobName': self.hyper_parameter_tuning_job_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_hub(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + + client.delete_hyper_parameter_tuning_job(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a Hub resource - + Stop a HyperParameterTuningJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15625,87 +14801,79 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "HubName": self.hub_name, + 'HyperParameterTuningJobName': self.hyper_parameter_tuning_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_hub(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_hyper_parameter_tuning_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal[ - "InService", - "Creating", - "Updating", - "Deleting", - "CreateFailed", - "UpdateFailed", - "DeleteFailed", - ], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a Hub resource to reach certain status. - + Wait for a HyperParameterTuningJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['Completed', 'Failed', 'Stopped', 'DeleteFailed'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for Hub to reach [bold]{target_status} status...") + progress.add_task("Waiting for HyperParameterTuningJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.hub_status + current_status = self.hyper_parameter_tuning_job_status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="HyperParameterTuningJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Hub", status=current_status, reason=self.failure_reason - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Hub", status=current_status) + raise TimeoutExceededError(resource_type="HyperParameterTuningJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -15713,14 +14881,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a Hub resource to be deleted. - + Wait for a HyperParameterTuningJob resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15734,74 +14902,71 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for Hub to be deleted...") + progress.add_task("Waiting for HyperParameterTuningJob to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.hub_status + current_status = self.hyper_parameter_tuning_job_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Hub", status=current_status) + raise TimeoutExceededError(resource_type="HyperParameterTuningJob", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Hub"]: + ) -> ResourceIterator["HyperParameterTuningJob"]: """ - Get all Hub resources - + Get all HyperParameterTuningJob resources + Parameters: - name_contains: Only list hubs with names that contain the specified string. - creation_time_before: Only list hubs that were created before the time specified. - creation_time_after: Only list hubs that were created after the time specified. - last_modified_time_before: Only list hubs that were last modified before the time specified. - last_modified_time_after: Only list hubs that were last modified after the time specified. - sort_by: Sort hubs by either name or creation time. - sort_order: Sort hubs by ascending or descending order. - max_results: The maximum number of hubs to list. - next_token: If the response to a previous ListHubs request was truncated, the response includes a NextToken. To retrieve the next set of hubs, use the token in the next request. + next_token: If the result of the previous ListHyperParameterTuningJobs request was truncated, the response includes a NextToken. To retrieve the next set of tuning jobs, use the token in the next request. + max_results: The maximum number of tuning jobs to return. The default value is 10. + sort_by: The field to sort results by. The default is Name. + sort_order: The sort order for results. The default is Ascending. + name_contains: A string in the tuning job name. This filter returns only tuning jobs whose name contains the specified string. + creation_time_after: A filter that returns only tuning jobs that were created after the specified time. + creation_time_before: A filter that returns only tuning jobs that were created before the specified time. + last_modified_time_after: A filter that returns only tuning jobs that were modified after the specified time. + last_modified_time_before: A filter that returns only tuning jobs that were modified before the specified time. + status_equals: A filter that returns only tuning jobs with the specified status. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Hub resources. - + Iterator for listed HyperParameterTuningJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15811,128 +14976,239 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'StatusEquals': status_equals, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_hyper_parameter_tuning_jobs', + summaries_key='HyperParameterTuningJobSummaries', + summary_name='HyperParameterTuningJobSummary', + resource_cls=HyperParameterTuningJob, + list_method_kwargs=operation_input_args ) - + + + @Base.add_validate_call + def get_all_training_jobs( + self, + status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, + region: Optional[str] = None, + ) -> ResourceIterator[HyperParameterTrainingJobSummary]: + """ + Gets a list of TrainingJobSummary objects that describe the training jobs that a hyperparameter tuning job launched. + + Parameters: + next_token: If the result of the previous ListTrainingJobsForHyperParameterTuningJob request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request. + max_results: The maximum number of training jobs to return. The default value is 10. + status_equals: A filter that returns only training jobs with the specified status. + sort_by: The field to sort results by. The default is Name. If the value of this field is FinalObjectiveMetricValue, any training jobs that did not return an objective metric are not listed. + sort_order: The sort order for results. The default is Ascending. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed HyperParameterTrainingJobSummary. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "SortBy": sort_by, - "SortOrder": sort_order, + 'HyperParameterTuningJobName': self.hyper_parameter_tuning_job_name, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_hubs", - summaries_key="HubSummaries", - summary_name="HubInfo", - resource_cls=Hub, - list_method_kwargs=operation_input_args, + list_method='list_training_jobs_for_hyper_parameter_tuning_job', + summaries_key='TrainingJobSummaries', + summary_name='HyperParameterTrainingJobSummary', + resource_cls=HyperParameterTrainingJobSummary, + list_method_kwargs=operation_input_args ) -class HubContent(Base): +class Image(Base): """ - Class representing resource HubContent - + Class representing resource Image + Attributes: - hub_content_name: The name of the hub content. - hub_content_arn: The Amazon Resource Name (ARN) of the hub content. - hub_content_version: The version of the hub content. - hub_content_type: The type of hub content. - document_schema_version: The document schema version for the hub content. - hub_name: The name of the hub that contains the content. - hub_arn: The Amazon Resource Name (ARN) of the hub that contains the content. - hub_content_document: The hub content document that describes information about the hub content such as type, associated containers, scripts, and more. - hub_content_status: The status of the hub content. - creation_time: The date and time that hub content was created. - hub_content_display_name: The display name of the hub content. - hub_content_description: A description of the hub content. - hub_content_markdown: A string that provides a description of the hub content. This string can include links, tables, and standard markdown formating. - sage_maker_public_hub_content_arn: The ARN of the public hub content. - reference_min_version: The minimum version of the hub content. - support_status: The support status of the hub content. - hub_content_search_keywords: The searchable keywords for the hub content. - hub_content_dependencies: The location of any dependencies that the hub content has, such as scripts, model artifacts, datasets, or notebooks. - failure_reason: The failure reason if importing hub content failed. - last_modified_time: The last modified time of the hub content. - + creation_time: When the image was created. + description: The description of the image. + display_name: The name of the image as displayed. + failure_reason: When a create, update, or delete operation fails, the reason for the failure. + image_arn: The ARN of the image. + image_name: The name of the image. + image_status: The status of the image. + last_modified_time: When the image was last modified. + role_arn: The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. + """ - - hub_name: StrPipeVar - hub_content_type: StrPipeVar - hub_content_name: StrPipeVar - hub_content_arn: Optional[StrPipeVar] = Unassigned() - hub_content_version: Optional[StrPipeVar] = Unassigned() - document_schema_version: Optional[StrPipeVar] = Unassigned() - hub_arn: Optional[StrPipeVar] = Unassigned() - hub_content_display_name: Optional[StrPipeVar] = Unassigned() - hub_content_description: Optional[StrPipeVar] = Unassigned() - hub_content_markdown: Optional[StrPipeVar] = Unassigned() - hub_content_document: Optional[StrPipeVar] = Unassigned() - sage_maker_public_hub_content_arn: Optional[StrPipeVar] = Unassigned() - reference_min_version: Optional[StrPipeVar] = Unassigned() - support_status: Optional[StrPipeVar] = Unassigned() - hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned() - hub_content_dependencies: Optional[List[HubContentDependency]] = Unassigned() - hub_content_status: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() + image_name: StrPipeVar creation_time: Optional[datetime.datetime] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + image_arn: Optional[StrPipeVar] = Unassigned() + image_status: Optional[StrPipeVar] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - hub_name: Optional[str] = Unassigned() - + role_arn: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "hub_content_name" - resource_name_split = resource_name.split("_") + resource_name = 'image_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object hub_content") + logger.error("Name attribute not found for object image") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Image", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator + @Base.add_validate_call + def create( + cls, + image_name: StrPipeVar, + role_arn: StrPipeVar, + description: Optional[StrPipeVar] = Unassigned(), + display_name: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["Image"]: + """ + Create a Image resource + + Parameters: + image_name: The name of the image. Must be unique to your account. + role_arn: The ARN of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. + description: The description of the image. + display_name: The display name of the image. If not provided, ImageName is displayed. + tags: A list of tags to apply to the image. + session: Boto3 session. + region: Region name. + + Returns: + The Image resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + """ + + logger.info("Creating image resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Description': description, + 'DisplayName': display_name, + 'ImageName': image_name, + 'RoleArn': role_arn, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Image', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.create_image(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(image_name=image_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - hub_name: StrPipeVar, - hub_content_type: StrPipeVar, - hub_content_name: StrPipeVar, - hub_content_version: Optional[StrPipeVar] = Unassigned(), + image_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HubContent"]: + ) -> Optional["Image"]: """ - Get a HubContent resource - + Get a Image resource + Parameters: - hub_name: The name of the hub that contains the content to describe. - hub_content_type: The type of content in the hub. - hub_content_name: The name of the content to describe. - hub_content_version: The version of the content to describe. + image_name: The name of the image to describe. session: Boto3 session. region: Region name. - + Returns: - The HubContent resource. - + The Image resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15943,41 +15219,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HubName": hub_name, - "HubContentType": hub_content_type, - "HubContentName": hub_content_name, - "HubContentVersion": hub_content_version, + 'ImageName': image_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_hub_content(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_image(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeHubContentResponse") - hub_content = cls(**transformed_response) - return hub_content - + transformed_response = transform(response, 'DescribeImageResponse') + image = cls(**transformed_response) + return image + @Base.add_validate_call def refresh( self, - ) -> Optional["HubContent"]: + + ) -> Optional["Image"]: """ - Refresh a HubContent resource - + Refresh a Image resource + Returns: - The HubContent resource. - + The Image resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -15988,43 +15260,41 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HubName": self.hub_name, - "HubContentType": self.hub_content_type, - "HubContentName": self.hub_content_name, - "HubContentVersion": self.hub_content_version, + 'ImageName': self.image_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_hub_content(**operation_input_args) - + response = client.describe_image(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeHubContentResponse", self) + transform(response, 'DescribeImageResponse', self) return self - + + @populate_inputs_decorator @Base.add_validate_call def update( self, - hub_content_type: StrPipeVar, - hub_content_version: StrPipeVar, - hub_content_display_name: Optional[StrPipeVar] = Unassigned(), - hub_content_description: Optional[StrPipeVar] = Unassigned(), - hub_content_markdown: Optional[StrPipeVar] = Unassigned(), - hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), - support_status: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["HubContent"]: + delete_properties: Optional[List[StrPipeVar]] = Unassigned(), + description: Optional[StrPipeVar] = Unassigned(), + display_name: Optional[StrPipeVar] = Unassigned(), + role_arn: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["Image"]: """ - Update a HubContent resource - + Update a Image resource + + Parameters: + delete_properties: A list of properties to delete. Only the Description and DisplayName properties can be deleted. + Returns: - The HubContent resource. - + The Image resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16036,42 +15306,39 @@ def update( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating hub_content resource.") + + logger.info("Updating image resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "HubName": self.hub_name, - "HubContentName": self.hub_content_name, - "HubContentType": hub_content_type, - "HubContentVersion": hub_content_version, - "HubContentDisplayName": hub_content_display_name, - "HubContentDescription": hub_content_description, - "HubContentMarkdown": hub_content_markdown, - "HubContentSearchKeywords": hub_content_search_keywords, - "SupportStatus": support_status, + 'DeleteProperties': delete_properties, + 'Description': description, + 'DisplayName': display_name, + 'ImageName': self.image_name, + 'RoleArn': role_arn, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_hub_content(**operation_input_args) + response = client.update_image(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a HubContent resource - + Delete a Image resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16083,117 +15350,168 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "HubName": self.hub_name, - "HubContentType": self.hub_content_type, - "HubContentName": self.hub_content_name, - "HubContentVersion": self.hub_content_version, + 'ImageName': self.image_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_hub_content(**operation_input_args) - + + client.delete_image(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Supported", "Deprecated", "Restricted"], + target_status: Literal['CREATING', 'CREATED', 'CREATE_FAILED', 'UPDATING', 'UPDATE_FAILED', 'DELETING', 'DELETE_FAILED'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a HubContent resource to reach certain status. - + Wait for a Image resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for HubContent to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for Image to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.support_status + current_status = self.image_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="Image", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="HubContent", status=current_status) + raise TimeoutExceededError(resource_type="Image", status=current_status) time.sleep(poll) - + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a Image resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for Image to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.image_status + status.update(f"Current status: [bold]{current_status}") + + if "delete_failed" in current_status.lower() or "deletefailed" in current_status.lower(): + raise DeleteFailedStatusError(resource_type="Image", reason=self.failure_reason) + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Image", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call - def load( + def get_all( cls, - hub_content_name: StrPipeVar, - hub_content_type: StrPipeVar, - document_schema_version: StrPipeVar, - hub_name: StrPipeVar, - hub_content_document: StrPipeVar, - hub_content_version: Optional[StrPipeVar] = Unassigned(), - hub_content_display_name: Optional[StrPipeVar] = Unassigned(), - hub_content_description: Optional[StrPipeVar] = Unassigned(), - hub_content_markdown: Optional[StrPipeVar] = Unassigned(), - support_status: Optional[StrPipeVar] = Unassigned(), - hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HubContent"]: + ) -> ResourceIterator["Image"]: """ - Import a HubContent resource - + Get all Image resources + Parameters: - hub_content_name: The name of the hub content to import. - hub_content_type: The type of hub content to import. - document_schema_version: The version of the hub content schema to import. - hub_name: The name of the hub to import content into. - hub_content_document: The hub content document that describes information about the hub content such as type, associated containers, scripts, and more. - hub_content_version: The version of the hub content to import. - hub_content_display_name: The display name of the hub content to import. - hub_content_description: A description of the hub content to import. - hub_content_markdown: A string that provides a description of the hub content. This string can include links, tables, and standard markdown formating. - support_status: The status of the hub content resource. - hub_content_search_keywords: The searchable keywords of the hub content. - tags: Any tags associated with the hub content. + creation_time_after: A filter that returns only images created on or after the specified time. + creation_time_before: A filter that returns only images created on or before the specified time. + last_modified_time_after: A filter that returns only images modified on or after the specified time. + last_modified_time_before: A filter that returns only images modified on or before the specified time. + max_results: The maximum number of images to return in the response. The default value is 10. + name_contains: A filter that returns only images whose name contains the specified string. + next_token: If the previous call to ListImages didn't return the full set of images, the call returns a token for getting the next set of images. + sort_by: The property used to sort results. The default value is CREATION_TIME. + sort_order: The sort order. The default value is DESCENDING. session: Boto3 session. region: Region name. - + Returns: - The HubContent resource. - + Iterator for listed Image resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16202,80 +15520,57 @@ def load( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. """ - - logger.info(f"Importing hub_content resource.") - client = SageMakerClient( - session=session, region_name=region, service_name="sagemaker" - ).client - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "HubContentName": hub_content_name, - "HubContentVersion": hub_content_version, - "HubContentType": hub_content_type, - "DocumentSchemaVersion": document_schema_version, - "HubName": hub_name, - "HubContentDisplayName": hub_content_display_name, - "HubContentDescription": hub_content_description, - "HubContentMarkdown": hub_content_markdown, - "HubContentDocument": hub_content_document, - "SupportStatus": support_status, - "HubContentSearchKeywords": hub_content_search_keywords, - "Tags": tags, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - - logger.debug(f"Input request: {operation_input_args}") + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # import the resource - response = client.import_hub_content(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - hub_name=hub_name, - hub_content_type=hub_content_type, - hub_content_name=hub_content_name, - session=session, - region=region, + + return ResourceIterator( + client=client, + list_method='list_images', + summaries_key='Images', + summary_name='Image', + resource_cls=Image, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call - def get_all_versions( + def get_all_aliases( self, - min_version: Optional[StrPipeVar] = Unassigned(), - max_schema_version: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, + alias: Optional[StrPipeVar] = Unassigned(), + version: Optional[int] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, - ) -> ResourceIterator["HubContent"]: + ) -> ResourceIterator[str]: """ - List hub content versions. - + Lists the aliases of a specified image or image version. + Parameters: - min_version: The lower bound of the hub content versions to list. - max_schema_version: The upper bound of the hub content schema version. - creation_time_before: Only list hub content versions that were created before the time specified. - creation_time_after: Only list hub content versions that were created after the time specified. - sort_by: Sort hub content versions by either name or creation time. - sort_order: Sort hub content versions by ascending or descending order. - max_results: The maximum number of hub content versions to list. - next_token: If the response to a previous ListHubContentVersions request was truncated, the response includes a NextToken. To retrieve the next set of hub content versions, use the token in the next request. + alias: The alias of the image version. + version: The version of the image. If image version is not specified, the aliases of all versions of the image are listed. + max_results: The maximum number of aliases to return. + next_token: If the previous call to ListAliases didn't return the full set of aliases, the call returns a token for retrieving the next set of aliases. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed HubContent. - + Iterator for listed str. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16286,110 +15581,128 @@ def get_all_versions( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "HubName": self.hub_name, - "HubContentType": self.hub_content_type, - "HubContentName": self.hub_content_name, - "MinVersion": min_version, - "MaxSchemaVersion": max_schema_version, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "SortBy": sort_by, - "SortOrder": sort_order, + 'ImageName': self.image_name, + 'Alias': alias, + 'Version': version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_hub_content_versions", - summaries_key="HubContentSummaries", - summary_name="HubContentInfo", - resource_cls=HubContent, - list_method_kwargs=operation_input_args, + list_method='list_aliases', + summaries_key='SageMakerImageVersionAliases', + summary_name='SageMakerImageVersionAlias', + resource_cls=str, + list_method_kwargs=operation_input_args ) -class HubContentPresignedUrls(Base): +class ImageVersion(Base): """ - Class representing resource HubContentPresignedUrls - + Class representing resource ImageVersion + Attributes: - hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub. - hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference. - 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. - 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. - hub_content_version: The version of the hub content. If not specified, the latest version is used. - access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation. - 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. - 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. - + base_image: The registry path of the container image on which this image version is based. + container_image: The registry path of the container image that contains this image version. + creation_time: When the version was created. + failure_reason: When a create or delete operation fails, the reason for the failure. + image_arn: The ARN of the image the version is based on. + image_version_arn: The ARN of the version. + image_version_status: The status of the version. + last_modified_time: When the version was last modified. + version: The version number. + vendor_guidance: The stability of the image version specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported. + job_type: Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels. + ml_framework: The machine learning framework vended in the image version. + programming_lang: The supported programming language and its version. + processor: Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. + horovod: Indicates Horovod compatibility. + release_notes: The maintainer description of the image version. + """ - - hub_name: Union[StrPipeVar, object] - hub_content_type: StrPipeVar - hub_content_name: Union[StrPipeVar, object] - authorized_url_configs: List[AuthorizedUrl] - hub_content_version: Optional[StrPipeVar] = Unassigned() - access_config: Optional[PresignedUrlAccessConfig] = Unassigned() - max_results: Optional[int] = Unassigned() - next_token: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "hub_content_presigned_urls_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object hub_content_presigned_urls") - return None - - @classmethod + image_name: StrPipeVar + base_image: Optional[StrPipeVar] = Unassigned() + container_image: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + image_arn: Optional[StrPipeVar] = Unassigned() + image_version_arn: Optional[StrPipeVar] = Unassigned() + image_version_status: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + version: Optional[int] = Unassigned() + vendor_guidance: Optional[StrPipeVar] = Unassigned() + job_type: Optional[StrPipeVar] = Unassigned() + ml_framework: Optional[StrPipeVar] = Unassigned() + programming_lang: Optional[StrPipeVar] = Unassigned() + processor: Optional[StrPipeVar] = Unassigned() + horovod: Optional[bool] = Unassigned() + release_notes: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'image_version_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object image_version") + return None + + @classmethod @Base.add_validate_call def create( cls, - hub_name: Union[StrPipeVar, object], - hub_content_type: StrPipeVar, - hub_content_name: Union[StrPipeVar, object], - hub_content_version: Optional[StrPipeVar] = Unassigned(), - access_config: Optional[PresignedUrlAccessConfig] = Unassigned(), - max_results: Optional[int] = Unassigned(), - next_token: Optional[StrPipeVar] = Unassigned(), + base_image: StrPipeVar, + client_token: StrPipeVar, + image_name: Union[StrPipeVar, object], + aliases: Optional[List[StrPipeVar]] = Unassigned(), + vendor_guidance: Optional[StrPipeVar] = Unassigned(), + job_type: Optional[StrPipeVar] = Unassigned(), + ml_framework: Optional[StrPipeVar] = Unassigned(), + programming_lang: Optional[StrPipeVar] = Unassigned(), + processor: Optional[StrPipeVar] = Unassigned(), + horovod: Optional[bool] = Unassigned(), + release_notes: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["HubContentPresignedUrls"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["ImageVersion"]: """ - Create a HubContentPresignedUrls resource - + Create a ImageVersion resource + Parameters: - hub_name: The name or Amazon Resource Name (ARN) of the hub that contains the content. For public content, use SageMakerPublicHub. - hub_content_type: The type of hub content to access. Valid values include Model, Notebook, and ModelReference. - 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. - hub_content_version: The version of the hub content. If not specified, the latest version is used. - access_config: Configuration settings for accessing the hub content, including end-user license agreement acceptance for gated models and expected S3 URL validation. - 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. - next_token: A token for pagination. Use this token to retrieve the next set of presigned URLs when the response is truncated. + base_image: The registry path of the container image to use as the starting point for this version. The path is an Amazon ECR URI in the following format: <acct-id>.dkr.ecr.<region>.amazonaws.com/<repo-name[:tag] or [@digest]> + client_token: A unique ID. If not specified, the Amazon Web Services CLI and Amazon Web Services SDKs, such as the SDK for Python (Boto3), add a unique value to the call. + image_name: The ImageName of the Image to create a version of. + aliases: A list of aliases created with the image version. + vendor_guidance: The stability of the image version, specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported. + job_type: Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels. + ml_framework: The machine learning framework vended in the image version. + programming_lang: The supported programming language and its version. + processor: Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. + horovod: Indicates Horovod compatibility. + release_notes: The maintainer description of the image version. session: Boto3 session. region: Region name. - + Returns: - The HubContentPresignedUrls resource. - + The ImageVersion resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16398,104 +15711,69 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "HubName": hub_name, - "HubContentType": hub_content_type, - "HubContentName": hub_content_name, - "HubContentVersion": hub_content_version, - "AccessConfig": access_config, - "MaxResults": max_results, - "NextToken": next_token, - } + + logger.info("Creating image_version resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'BaseImage': base_image, + 'ClientToken': client_token, + 'ImageName': image_name, + 'Aliases': aliases, + 'VendorGuidance': vendor_guidance, + 'JobType': job_type, + 'MLFramework': ml_framework, + 'ProgrammingLang': programming_lang, + 'Processor': processor, + 'Horovod': horovod, + 'ReleaseNotes': release_notes, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ImageVersion', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_hub_content_presigned_urls API") - response = client.create_hub_content_presigned_urls(**operation_input_args) + + # create the resource + response = client.create_image_version(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateHubContentPresignedUrlsResponse") - return cls(**operation_input_args, **transformed_response) - - -class HubContentReference(Base): - """ - Class representing resource HubContentReference - - Attributes: - hub_name: The name of the hub to add the hub content reference to. - sage_maker_public_hub_content_arn: The ARN of the public hub content to reference. - hub_arn: The ARN of the hub that the hub content reference was added to. - hub_content_arn: The ARN of the hub content. - hub_content_name: The name of the hub content to reference. - min_version: The minimum version of the hub content to reference. - tags: Any tags associated with the hub content to reference. - - """ - - hub_name: Union[StrPipeVar, object] - sage_maker_public_hub_content_arn: StrPipeVar - hub_arn: StrPipeVar - hub_content_arn: StrPipeVar - hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned() - min_version: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "hub_content_reference_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object hub_content_reference") - return None - + + return cls.get(image_name=image_name, session=session, region=region) + @classmethod @Base.add_validate_call - def create( + def get( cls, - hub_name: Union[StrPipeVar, object], - sage_maker_public_hub_content_arn: StrPipeVar, - hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - min_version: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + image_name: StrPipeVar, + version: Optional[int] = Unassigned(), + alias: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["HubContentReference"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["ImageVersion"]: """ - Create a HubContentReference resource - + Get a ImageVersion resource + Parameters: - hub_name: The name of the hub to add the hub content reference to. - sage_maker_public_hub_content_arn: The ARN of the public hub content to reference. - hub_content_name: The name of the hub content to reference. - min_version: The minimum version of the hub content to reference. - tags: Any tags associated with the hub content to reference. + image_name: The name of the image. + version: The version of the image. If not specified, the latest version is described. + alias: The alias of the image version. session: Boto3 session. region: Region name. - + Returns: - The HubContentReference resource. - + The ImageVersion resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16504,53 +15782,96 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + operation_input_args = { - "HubName": hub_name, - "SageMakerPublicHubContentArn": sage_maker_public_hub_content_arn, - "HubContentName": hub_content_name, - "MinVersion": min_version, - "Tags": tags, + 'ImageName': image_name, + 'Version': version, + 'Alias': alias, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_hub_content_reference API") - response = client.create_hub_content_reference(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateHubContentReferenceResponse") - return cls(**operation_input_args, **transformed_response) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_image_version(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeImageVersionResponse') + image_version = cls(**transformed_response) + return image_version + + @Base.add_validate_call + def refresh( + self, + alias: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["ImageVersion"]: + """ + Refresh a ImageVersion resource + + Returns: + The ImageVersion resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'ImageName': self.image_name, + 'Version': self.version, + 'Alias': alias, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_image_version(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeImageVersionResponse', self) + return self + @Base.add_validate_call def update( self, - hub_content_type: StrPipeVar, - min_version: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["HubContentReference"]: + alias: Optional[StrPipeVar] = Unassigned(), + version: Optional[int] = Unassigned(), + aliases_to_add: Optional[List[StrPipeVar]] = Unassigned(), + aliases_to_delete: Optional[List[StrPipeVar]] = Unassigned(), + vendor_guidance: Optional[StrPipeVar] = Unassigned(), + job_type: Optional[StrPipeVar] = Unassigned(), + ml_framework: Optional[StrPipeVar] = Unassigned(), + programming_lang: Optional[StrPipeVar] = Unassigned(), + processor: Optional[StrPipeVar] = Unassigned(), + horovod: Optional[bool] = Unassigned(), + release_notes: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["ImageVersion"]: """ - Update a HubContentReference resource - + Update a ImageVersion resource + Parameters: - hub_content_type: The content type of the resource that you want to update. Only specify a ModelReference resource for this API. To update a Model or Notebook resource, use the UpdateHubContent API instead. - + alias: The alias of the image version. + aliases_to_add: A list of aliases to add. + aliases_to_delete: A list of aliases to delete. + Returns: - The HubContentReference resource. - + The ImageVersion resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16562,38 +15883,46 @@ def update( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating hub_content_reference resource.") + + logger.info("Updating image_version resource.") client = Base.get_sagemaker_client() - - operation_input_args = { - "HubName": self.hub_name, - "HubContentName": self.hub_content_name, - "HubContentType": hub_content_type, - "MinVersion": min_version, + + operation_input_args = { + 'ImageName': self.image_name, + 'Alias': alias, + 'Version': version, + 'AliasesToAdd': aliases_to_add, + 'AliasesToDelete': aliases_to_delete, + 'VendorGuidance': vendor_guidance, + 'JobType': job_type, + 'MLFramework': ml_framework, + 'ProgrammingLang': programming_lang, + 'Processor': processor, + 'Horovod': horovod, + 'ReleaseNotes': release_notes, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_hub_content_reference(**operation_input_args) + response = client.update_image_version(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - hub_content_type: StrPipeVar, - ) -> None: + alias: Optional[StrPipeVar] = Unassigned(), + ) -> None: """ - Delete a HubContentReference resource - + Delete a ImageVersion resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16602,89 +15931,218 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "HubName": self.hub_name, - "HubContentType": hub_content_type, - "HubContentName": self.hub_content_name, + 'ImageName': self.image_name, + 'Version': self.version, + 'Alias': alias, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_hub_content_reference(**operation_input_args) - + + client.delete_image_version(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['CREATING', 'CREATED', 'CREATE_FAILED', 'DELETING', 'DELETE_FAILED'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a ImageVersion resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task(f"Waiting for ImageVersion to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.image_version_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="ImageVersion", status=current_status, reason=self.failure_reason) + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ImageVersion", status=current_status) + time.sleep(poll) + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a ImageVersion resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for ImageVersion to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.image_version_status + status.update(f"Current status: [bold]{current_status}") + + if "delete_failed" in current_status.lower() or "deletefailed" in current_status.lower(): + raise DeleteFailedStatusError(resource_type="ImageVersion", reason=self.failure_reason) + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ImageVersion", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) -class HumanTaskUi(Base): - """ - Class representing resource HumanTaskUi - - Attributes: - human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface (worker task template). - human_task_ui_name: The name of the human task user interface (worker task template). - creation_time: The timestamp when the human task user interface was created. - ui_template: - human_task_ui_status: The status of the human task user interface (worker task template). Valid values are listed below. - kms_key_id: - +class InferenceComponent(Base): """ - - human_task_ui_name: StrPipeVar - human_task_ui_arn: Optional[StrPipeVar] = Unassigned() - human_task_ui_status: Optional[StrPipeVar] = Unassigned() + Class representing resource InferenceComponent + + Attributes: + inference_component_name: The name of the inference component. + inference_component_arn: The Amazon Resource Name (ARN) of the inference component. + endpoint_name: The name of the endpoint that hosts the inference component. + endpoint_arn: The Amazon Resource Name (ARN) of the endpoint that hosts the inference component. + creation_time: The time when the inference component was created. + last_modified_time: The time when the inference component was last updated. + variant_name: The name of the production variant that hosts the inference component. + failure_reason: If the inference component status is Failed, the reason for the failure. + specification: Details about the resources that are deployed with this inference component. + runtime_config: Details about the runtime settings for the model that is deployed with the inference component. + inference_component_status: The status of the inference component. + last_deployment_config: The deployment and rollback settings that you assigned to the inference component. + + """ + inference_component_name: StrPipeVar + inference_component_arn: Optional[StrPipeVar] = Unassigned() + endpoint_name: Optional[StrPipeVar] = Unassigned() + endpoint_arn: Optional[StrPipeVar] = Unassigned() + variant_name: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + specification: Optional[InferenceComponentSpecificationSummary] = Unassigned() + runtime_config: Optional[InferenceComponentRuntimeConfigSummary] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - ui_template: Optional[UiTemplateInfo] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - + last_modified_time: Optional[datetime.datetime] = Unassigned() + inference_component_status: Optional[StrPipeVar] = Unassigned() + last_deployment_config: Optional[InferenceComponentDeploymentConfig] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "human_task_ui_name" - resource_name_split = resource_name.split("_") + resource_name = 'inference_component_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object human_task_ui") + logger.error("Name attribute not found for object inference_component") return None - + @classmethod @Base.add_validate_call def create( cls, - human_task_ui_name: StrPipeVar, - ui_template: UiTemplate, - kms_key_id: Optional[StrPipeVar] = Unassigned(), + inference_component_name: StrPipeVar, + endpoint_name: Union[StrPipeVar, object], + variant_name: Optional[StrPipeVar] = Unassigned(), + specification: Optional[InferenceComponentSpecification] = Unassigned(), + runtime_config: Optional[InferenceComponentRuntimeConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HumanTaskUi"]: + ) -> Optional["InferenceComponent"]: """ - Create a HumanTaskUi resource - + Create a InferenceComponent resource + Parameters: - human_task_ui_name: The name of the user interface you are creating. - ui_template: - kms_key_id: - tags: An array of key-value pairs that contain metadata to help you categorize and organize a human review workflow user interface. Each tag consists of a key and a value, both of which you define. + inference_component_name: A unique name to assign to the inference component. + endpoint_name: The name of an existing endpoint where you host the inference component. + variant_name: The name of an existing production variant where you host the inference component. + specification: Details about the resources to deploy with this inference component, including the model, container, and compute resources. + runtime_config: Runtime settings for a model that is deployed with an inference component. + tags: A list of key-value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference. session: Boto3 session. region: Region name. - + Returns: - The HumanTaskUi resource. - + The InferenceComponent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16693,61 +16151,58 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating human_task_ui resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "HumanTaskUiName": human_task_ui_name, - "UiTemplate": ui_template, - "KmsKeyId": kms_key_id, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="HumanTaskUi", operation_input_args=operation_input_args - ) - + + logger.info("Creating inference_component resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'InferenceComponentName': inference_component_name, + 'EndpointName': endpoint_name, + 'VariantName': variant_name, + 'Specification': specification, + 'RuntimeConfig': runtime_config, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='InferenceComponent', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_human_task_ui(**operation_input_args) + response = client.create_inference_component(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(human_task_ui_name=human_task_ui_name, session=session, region=region) - + + return cls.get(inference_component_name=inference_component_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - human_task_ui_name: StrPipeVar, + inference_component_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HumanTaskUi"]: + ) -> Optional["InferenceComponent"]: """ - Get a HumanTaskUi resource - + Get a InferenceComponent resource + Parameters: - human_task_ui_name: The name of the human task user interface (worker task template) you want information about. + inference_component_name: The name of the inference component. session: Boto3 session. region: Region name. - + Returns: - The HumanTaskUi resource. - + The InferenceComponent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16756,40 +16211,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HumanTaskUiName": human_task_ui_name, + 'InferenceComponentName': inference_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_human_task_ui(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_inference_component(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeHumanTaskUiResponse") - human_task_ui = cls(**transformed_response) - return human_task_ui - + transformed_response = transform(response, 'DescribeInferenceComponentOutput') + inference_component = cls(**transformed_response) + return inference_component + @Base.add_validate_call def refresh( self, - ) -> Optional["HumanTaskUi"]: + + ) -> Optional["InferenceComponent"]: """ - Refresh a HumanTaskUi resource - + Refresh a InferenceComponent resource + Returns: - The HumanTaskUi resource. - + The InferenceComponent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16798,36 +16251,40 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HumanTaskUiName": self.human_task_ui_name, + 'InferenceComponentName': self.inference_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_human_task_ui(**operation_input_args) - + response = client.describe_inference_component(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeHumanTaskUiResponse", self) + transform(response, 'DescribeInferenceComponentOutput', self) return self - + @Base.add_validate_call def update( self, - ui_template: UiTemplate, - ) -> Optional["HumanTaskUi"]: + specification: Optional[InferenceComponentSpecification] = Unassigned(), + runtime_config: Optional[InferenceComponentRuntimeConfig] = Unassigned(), + deployment_config: Optional[InferenceComponentDeploymentConfig] = Unassigned(), + ) -> Optional["InferenceComponent"]: """ - Update a HumanTaskUi resource - + Update a InferenceComponent resource + + Parameters: + deployment_config: The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings. + Returns: - The HumanTaskUi resource. - + The InferenceComponent resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16836,38 +16293,40 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - - logger.info("Updating human_task_ui resource.") + + logger.info("Updating inference_component resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "HumanTaskUiName": self.human_task_ui_name, - "UiTemplate": ui_template, + 'InferenceComponentName': self.inference_component_name, + 'Specification': specification, + 'RuntimeConfig': runtime_config, + 'DeploymentConfig': deployment_config, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_human_task_ui(**operation_input_args) + response = client.update_inference_component(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a HumanTaskUi resource - + Delete a InferenceComponent resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16876,73 +16335,75 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "HumanTaskUiName": self.human_task_ui_name, + 'InferenceComponentName': self.inference_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_human_task_ui(**operation_input_args) - + + client.delete_inference_component(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Active", "Deleting"], + target_status: Literal['InService', 'Creating', 'Updating', 'Failed', 'Deleting'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a HumanTaskUi resource to reach certain status. - + Wait for a InferenceComponent resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for HumanTaskUi to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for InferenceComponent to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.human_task_ui_status + current_status = self.inference_component_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="InferenceComponent", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="HumanTaskUi", status=current_status) + raise TimeoutExceededError(resource_type="InferenceComponent", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -16950,14 +16411,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a HumanTaskUi resource to be deleted. - + Wait for a InferenceComponent resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -16971,68 +16432,75 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for HumanTaskUi to be deleted...") + progress.add_task("Waiting for InferenceComponent to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.human_task_ui_status + current_status = self.inference_component_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="HumanTaskUi", status=current_status - ) + raise TimeoutExceededError(resource_type="InferenceComponent", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + endpoint_name_equals: Optional[StrPipeVar] = Unassigned(), + variant_name_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["HumanTaskUi"]: + ) -> ResourceIterator["InferenceComponent"]: """ - Get all HumanTaskUi resources - + Get all InferenceComponent resources + Parameters: - creation_time_after: A filter that returns only human task user interfaces with a creation time greater than or equal to the specified timestamp. - creation_time_before: A filter that returns only human task user interfaces that were created before the specified timestamp. - sort_order: An optional value that specifies whether you want the results sorted in Ascending or Descending order. - next_token: A token to resume pagination. - max_results: The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken will be provided in the output that you can use to resume pagination. + sort_by: The field by which to sort the inference components in the response. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. + next_token: A token that you use to get the next set of results following a truncated response. If the response to the previous request was truncated, that response provides the value for this token. + max_results: The maximum number of inference components to return in the response. This value defaults to 10. + name_contains: Filters the results to only those inference components with a name that contains the specified string. + creation_time_before: Filters the results to only those inference components that were created before the specified time. + creation_time_after: Filters the results to only those inference components that were created after the specified time. + last_modified_time_before: Filters the results to only those inference components that were updated before the specified time. + last_modified_time_after: Filters the results to only those inference components that were updated after the specified time. + status_equals: Filters the results to only those inference components with the specified status. + endpoint_name_equals: An endpoint name to filter the listed inference components. The response includes only those inference components that are hosted at the specified endpoint. + variant_name_equals: A production variant name to filter the listed inference components. The response includes only those inference components that are hosted at the specified variant. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed HumanTaskUi resources. - + Iterator for listed InferenceComponent resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17042,160 +16510,200 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "SortOrder": sort_order, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'StatusEquals': status_equals, + 'EndpointNameEquals': endpoint_name_equals, + 'VariantNameEquals': variant_name_equals, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_human_task_uis", - summaries_key="HumanTaskUiSummaries", - summary_name="HumanTaskUiSummary", - resource_cls=HumanTaskUi, - list_method_kwargs=operation_input_args, + list_method='list_inference_components', + summaries_key='InferenceComponents', + summary_name='InferenceComponentSummary', + resource_cls=InferenceComponent, + list_method_kwargs=operation_input_args ) + + + @Base.add_validate_call + def update_runtime_configs( + self, + desired_runtime_config: InferenceComponentRuntimeConfig, + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Runtime settings for a model that is deployed with an inference component. + + Parameters: + desired_runtime_config: Runtime settings for a model that is deployed with an inference component. + session: Boto3 session. + region: Region name. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + """ + + + operation_input_args = { + 'InferenceComponentName': self.inference_component_name, + 'DesiredRuntimeConfig': desired_runtime_config, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling update_inference_component_runtime_config API") + response = client.update_inference_component_runtime_config(**operation_input_args) + logger.debug(f"Response: {response}") + -class HyperParameterTuningJob(Base): +class InferenceExperiment(Base): """ - Class representing resource HyperParameterTuningJob - + Class representing resource InferenceExperiment + Attributes: - hyper_parameter_tuning_job_name: The name of the hyperparameter tuning job. - hyper_parameter_tuning_job_arn: The Amazon Resource Name (ARN) of the tuning job. - hyper_parameter_tuning_job_config: The HyperParameterTuningJobConfig object that specifies the configuration of the tuning job. - hyper_parameter_tuning_job_status: The status of the tuning job. - creation_time: The date and time that the tuning job started. - training_job_status_counters: The TrainingJobStatusCounters object that specifies the number of training jobs, categorized by status, that this tuning job launched. - objective_status_counters: The ObjectiveStatusCounters object that specifies the number of training jobs, categorized by the status of their final objective metric, that this tuning job launched. - training_job_definition: The HyperParameterTrainingJobDefinition object that specifies the definition of the training jobs that this tuning job launches. - training_job_definitions: A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job. - hyper_parameter_tuning_end_time: The date and time that the tuning job ended. - last_modified_time: The date and time that the status of the tuning job was modified. - best_training_job: A TrainingJobSummary object that describes the training job that completed with the best current HyperParameterTuningJobObjective. - overall_best_training_job: If the hyperparameter tuning job is an warm start tuning job with a WarmStartType of IDENTICAL_DATA_AND_ALGORITHM, this is the TrainingJobSummary for the training job with the best objective metric value of all training jobs launched by this tuning job and all parent jobs specified for the warm start tuning job. - warm_start_config: The configuration for starting the hyperparameter parameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job. - autotune: A flag to indicate if autotune is enabled for the hyperparameter tuning job. - failure_reason: If the tuning job failed, the reason it failed. - tuning_job_completion_reason: - tuning_job_completion_details: Tuning job completion information returned as the response from a hyperparameter tuning job. This information tells if your tuning job has or has not converged. It also includes the number of training jobs that have not improved model performance as evaluated against the objective function. - consumed_resources: - + arn: The ARN of the inference experiment being described. + name: The name of the inference experiment. + type: The type of the inference experiment. + status: The status of the inference experiment. The following are the possible statuses for an inference experiment: Creating - Amazon SageMaker is creating your experiment. Created - Amazon SageMaker has finished the creation of your experiment and will begin the experiment at the scheduled time. Updating - When you make changes to your experiment, your experiment shows as updating. Starting - Amazon SageMaker is beginning your experiment. Running - Your experiment is in progress. Stopping - Amazon SageMaker is stopping your experiment. Completed - Your experiment has completed. Cancelled - When you conclude your experiment early using the StopInferenceExperiment API, or if any operation fails with an unexpected error, it shows as cancelled. + endpoint_metadata: The metadata of the endpoint on which the inference experiment ran. + model_variants: An array of ModelVariantConfigSummary objects. There is one for each variant in the inference experiment. Each ModelVariantConfigSummary object in the array describes the infrastructure configuration for deploying the corresponding variant. + schedule: The duration for which the inference experiment ran or will run. + status_reason: The error message or client-specified Reason from the StopInferenceExperiment API, that explains the status of the inference experiment. + description: The description of the inference experiment. + creation_time: The timestamp at which you created the inference experiment. + completion_time: The timestamp at which the inference experiment was completed. + last_modified_time: The timestamp at which you last modified the inference experiment. + role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. + data_storage_config: The Amazon S3 location and configuration for storing inference request and response data. + shadow_mode_config: The configuration of ShadowMode inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates. + kms_key: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. For more information, see CreateInferenceExperiment. + """ - - hyper_parameter_tuning_job_name: StrPipeVar - hyper_parameter_tuning_job_arn: Optional[StrPipeVar] = Unassigned() - hyper_parameter_tuning_job_config: Optional[HyperParameterTuningJobConfig] = Unassigned() - training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned() - training_job_definitions: Optional[List[HyperParameterTrainingJobDefinition]] = Unassigned() - hyper_parameter_tuning_job_status: Optional[StrPipeVar] = Unassigned() + name: StrPipeVar + arn: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() + schedule: Optional[InferenceExperimentSchedule] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + status_reason: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - hyper_parameter_tuning_end_time: Optional[datetime.datetime] = Unassigned() + completion_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - training_job_status_counters: Optional[TrainingJobStatusCounters] = Unassigned() - objective_status_counters: Optional[ObjectiveStatusCounters] = Unassigned() - best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() - overall_best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() - warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned() - autotune: Optional[Autotune] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - tuning_job_completion_reason: Optional[StrPipeVar] = Unassigned() - tuning_job_completion_details: Optional[HyperParameterTuningJobCompletionDetails] = Unassigned() - consumed_resources: Optional[HyperParameterTuningJobConsumedResources] = Unassigned() - + role_arn: Optional[StrPipeVar] = Unassigned() + endpoint_metadata: Optional[EndpointMetadata] = Unassigned() + model_variants: Optional[List[ModelVariantConfigSummary]] = Unassigned() + data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned() + shadow_mode_config: Optional[ShadowModeConfig] = Unassigned() + kms_key: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "hyper_parameter_tuning_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'inference_experiment_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object hyper_parameter_tuning_job") + logger.error("Name attribute not found for object inference_experiment") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "training_job_definition": { - "role_arn": {"type": "string"}, - "output_data_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - "resource_config": {"volume_kms_key_id": {"type": "string"}}, - "hyper_parameter_tuning_resource_config": { - "volume_kms_key_id": {"type": "string"} - }, - "checkpoint_config": {"s3_uri": {"type": "string"}}, - } + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + }, + "data_storage_config": { + "kms_key": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "HyperParameterTuningJob", **kwargs - ), - ) - + }, + "kms_key": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "InferenceExperiment", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - hyper_parameter_tuning_job_name: StrPipeVar, - hyper_parameter_tuning_job_config: HyperParameterTuningJobConfig, - training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned(), - training_job_definitions: Optional[ - List[HyperParameterTrainingJobDefinition] - ] = Unassigned(), - warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned(), + name: StrPipeVar, + type: StrPipeVar, + role_arn: StrPipeVar, + endpoint_name: Union[StrPipeVar, object], + model_variants: List[ModelVariantConfig], + shadow_mode_config: ShadowModeConfig, + schedule: Optional[InferenceExperimentSchedule] = Unassigned(), + description: Optional[StrPipeVar] = Unassigned(), + data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned(), + kms_key: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - autotune: Optional[Autotune] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HyperParameterTuningJob"]: + ) -> Optional["InferenceExperiment"]: """ - Create a HyperParameterTuningJob resource - + Create a InferenceExperiment resource + Parameters: - hyper_parameter_tuning_job_name: The name of the tuning job. This name is the prefix for the names of all training jobs that this tuning job launches. The name must be unique within the same Amazon Web Services account and Amazon Web Services Region. The name must have 1 to 32 characters. Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name is not case sensitive. - hyper_parameter_tuning_job_config: The HyperParameterTuningJobConfig object that describes the tuning job, including the search strategy, the objective metric used to evaluate training jobs, ranges of parameters to search, and resource limits for the tuning job. For more information, see How Hyperparameter Tuning Works. - training_job_definition: The HyperParameterTrainingJobDefinition object that describes the training jobs that this tuning job launches, including static hyperparameters, input data configuration, output data configuration, resource configuration, and stopping condition. - training_job_definitions: A list of the HyperParameterTrainingJobDefinition objects launched for this tuning job. - warm_start_config: Specifies the configuration for starting the hyperparameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job. All training jobs launched by the new hyperparameter tuning job are evaluated by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM as the WarmStartType value for the warm start configuration, the training job that performs the best in the new tuning job is compared to the best training jobs from the parent tuning jobs. From these, the training job that performs the best as measured by the objective metric is returned as the overall best training job. All training jobs launched by parent hyperparameter tuning jobs and the new hyperparameter tuning jobs count against the limit of training jobs for the tuning job. - 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 that you specify for the tuning job are also added to all training jobs that the tuning job launches. - autotune: Configures SageMaker Automatic model tuning (AMT) to automatically find optimal parameters for the following fields: ParameterRanges: The names and ranges of parameters that a hyperparameter tuning job can optimize. ResourceLimits: The maximum resources that can be used for a training job. These resources include the maximum number of training jobs, the maximum runtime of a tuning job, and the maximum number of training jobs to run at the same time. TrainingJobEarlyStoppingType: A flag that specifies whether or not to use early stopping for training jobs launched by a hyperparameter tuning job. RetryStrategy: The number of times to retry a training job. Strategy: Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training jobs that it launches. ConvergenceDetected: A flag to indicate that Automatic model tuning (AMT) has detected model convergence. + name: The name for the inference experiment. + type: The type of the inference experiment that you want to run. The following types of experiments are possible: ShadowMode: You can use this type to validate a shadow variant. For more information, see Shadow tests. + role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. + endpoint_name: The name of the Amazon SageMaker endpoint on which you want to run the inference experiment. + model_variants: An array of ModelVariantConfig objects. There is one for each variant in the inference experiment. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant. + shadow_mode_config: The configuration of ShadowMode inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates. + schedule: The duration for which you want the inference experiment to run. If you don't specify this field, the experiment automatically starts immediately upon creation and concludes after 7 days. + description: A description for the inference experiment. + data_storage_config: The Amazon S3 location and configuration for storing inference request and response data. This is an optional parameter that you can use for data capture. For more information, see Capture data. + kms_key: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKey can be any of the following formats: KMS key ID "1234abcd-12ab-34cd-56ef-1234567890ab" Amazon Resource Name (ARN) of a KMS key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" KMS key Alias "alias/ExampleAlias" Amazon Resource Name (ARN) of a KMS key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" If you use a KMS key ID or an alias of your KMS key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint and UpdateEndpoint requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. + tags: 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 your Amazon Web Services Resources. session: Boto3 session. region: Region name. - + Returns: - The HyperParameterTuningJob resource. - + The InferenceExperiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17210,62 +16718,58 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating hyper_parameter_tuning_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "HyperParameterTuningJobName": hyper_parameter_tuning_job_name, - "HyperParameterTuningJobConfig": hyper_parameter_tuning_job_config, - "TrainingJobDefinition": training_job_definition, - "TrainingJobDefinitions": training_job_definitions, - "WarmStartConfig": warm_start_config, - "Tags": tags, - "Autotune": autotune, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="HyperParameterTuningJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating inference_experiment resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Name': name, + 'Type': type, + 'Schedule': schedule, + 'Description': description, + 'RoleArn': role_arn, + 'EndpointName': endpoint_name, + 'ModelVariants': model_variants, + 'DataStorageConfig': data_storage_config, + 'ShadowModeConfig': shadow_mode_config, + 'KmsKey': kms_key, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='InferenceExperiment', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_hyper_parameter_tuning_job(**operation_input_args) + response = client.create_inference_experiment(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - hyper_parameter_tuning_job_name=hyper_parameter_tuning_job_name, - session=session, - region=region, - ) - + + return cls.get(name=name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - hyper_parameter_tuning_job_name: StrPipeVar, + name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["HyperParameterTuningJob"]: + ) -> Optional["InferenceExperiment"]: """ - Get a HyperParameterTuningJob resource - + Get a InferenceExperiment resource + Parameters: - hyper_parameter_tuning_job_name: The name of the tuning job. + name: The name of the inference experiment to describe. session: Boto3 session. region: Region name. - + Returns: - The HyperParameterTuningJob resource. - + The InferenceExperiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17276,38 +16780,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HyperParameterTuningJobName": hyper_parameter_tuning_job_name, + 'Name': name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_hyper_parameter_tuning_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_inference_experiment(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeHyperParameterTuningJobResponse") - hyper_parameter_tuning_job = cls(**transformed_response) - return hyper_parameter_tuning_job - + transformed_response = transform(response, 'DescribeInferenceExperimentResponse') + inference_experiment = cls(**transformed_response) + return inference_experiment + @Base.add_validate_call def refresh( self, - ) -> Optional["HyperParameterTuningJob"]: + + ) -> Optional["InferenceExperiment"]: """ - Refresh a HyperParameterTuningJob resource - + Refresh a InferenceExperiment resource + Returns: - The HyperParameterTuningJob resource. - + The InferenceExperiment resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17318,30 +16821,84 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, + 'Name': self.name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_hyper_parameter_tuning_job(**operation_input_args) - + response = client.describe_inference_experiment(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeHyperParameterTuningJobResponse", self) + transform(response, 'DescribeInferenceExperimentResponse', self) return self - + + @populate_inputs_decorator + @Base.add_validate_call + def update( + self, + schedule: Optional[InferenceExperimentSchedule] = Unassigned(), + description: Optional[StrPipeVar] = Unassigned(), + model_variants: Optional[List[ModelVariantConfig]] = Unassigned(), + data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned(), + shadow_mode_config: Optional[ShadowModeConfig] = Unassigned(), + ) -> Optional["InferenceExperiment"]: + """ + Update a InferenceExperiment resource + + Returns: + The InferenceExperiment resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. + """ + + logger.info("Updating inference_experiment resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'Name': self.name, + 'Schedule': schedule, + 'Description': description, + 'ModelVariants': model_variants, + 'DataStorageConfig': data_storage_config, + 'ShadowModeConfig': shadow_mode_config, + } + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.update_inference_experiment(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a HyperParameterTuningJob resource - + Delete a InferenceExperiment resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17350,28 +16907,74 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, + 'Name': self.name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_hyper_parameter_tuning_job(**operation_input_args) - + + client.delete_inference_experiment(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + + @Base.add_validate_call + def start( + self, + + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Start a InferenceExperiment resource + + Parameters: + session: Boto3 session. + region: Region name. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. + """ + + + operation_input_args = { + 'Name': self.name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling start_inference_experiment API") + response = client.start_inference_experiment(**operation_input_args) + logger.debug(f"Response: {response}") + + @Base.add_validate_call def stop(self) -> None: """ - Stop a HyperParameterTuningJob resource - + Stop a InferenceExperiment resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17380,183 +16983,117 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, + 'Name': self.name, + 'ModelVariantActions': self.model_variant_actions, + 'DesiredModelVariants': self.desired_model_variants, + 'DesiredState': self.desired_state, + 'Reason': self.reason, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_hyper_parameter_tuning_job(**operation_input_args) - + + client.stop_inference_experiment(**operation_input_args) + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call - def wait( + def wait_for_status( self, + target_status: Literal['Creating', 'Created', 'Updating', 'Running', 'Starting', 'Stopping', 'Completed', 'Cancelled'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a HyperParameterTuningJob resource. - + Wait for a InferenceExperiment resource to reach certain status. + Parameters: + target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - """ - terminal_states = ["Completed", "Failed", "Stopped", "DeleteFailed"] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for HyperParameterTuningJob...") + progress.add_task(f"Waiting for InferenceExperiment to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.hyper_parameter_tuning_job_status + current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: + + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="HyperParameterTuningJob", - status=current_status, - reason=self.failure_reason, - ) - return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="HyperParameterTuningJob", status=current_status - ) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a HyperParameterTuningJob resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for HyperParameterTuningJob to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.hyper_parameter_tuning_job_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="HyperParameterTuningJob", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e + raise TimeoutExceededError(resource_type="InferenceExperiment", status=current_status) time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), name_contains: Optional[StrPipeVar] = Unassigned(), + type: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), creation_time_after: Optional[datetime.datetime] = Unassigned(), creation_time_before: Optional[datetime.datetime] = Unassigned(), last_modified_time_after: Optional[datetime.datetime] = Unassigned(), last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["HyperParameterTuningJob"]: + ) -> ResourceIterator["InferenceExperiment"]: """ - Get all HyperParameterTuningJob resources - + Get all InferenceExperiment resources + Parameters: - next_token: If the result of the previous ListHyperParameterTuningJobs request was truncated, the response includes a NextToken. To retrieve the next set of tuning jobs, use the token in the next request. - max_results: The maximum number of tuning jobs to return. The default value is 10. - sort_by: The field to sort results by. The default is Name. - sort_order: The sort order for results. The default is Ascending. - name_contains: A string in the tuning job name. This filter returns only tuning jobs whose name contains the specified string. - creation_time_after: A filter that returns only tuning jobs that were created after the specified time. - creation_time_before: A filter that returns only tuning jobs that were created before the specified time. - last_modified_time_after: A filter that returns only tuning jobs that were modified after the specified time. - last_modified_time_before: A filter that returns only tuning jobs that were modified before the specified time. - status_equals: A filter that returns only tuning jobs with the specified status. + name_contains: Selects inference experiments whose names contain this name. + type: Selects inference experiments of this type. For the possible types of inference experiments, see CreateInferenceExperiment. + status_equals: Selects inference experiments which are in this status. For the possible statuses, see DescribeInferenceExperiment. + creation_time_after: Selects inference experiments which were created after this timestamp. + creation_time_before: Selects inference experiments which were created before this timestamp. + last_modified_time_after: Selects inference experiments which were last modified after this timestamp. + last_modified_time_before: Selects inference experiments which were last modified before this timestamp. + sort_by: The column by which to sort the listed inference experiments. + sort_order: The direction of sorting (ascending or descending). + next_token: The response from the last list when returning a list large enough to need tokening. + max_results: The maximum number of results to select. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed HyperParameterTuningJob resources. - + Iterator for listed InferenceExperiment resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17566,360 +17103,155 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "StatusEquals": status_equals, + 'NameContains': name_contains, + 'Type': type, + 'StatusEquals': status_equals, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_hyper_parameter_tuning_jobs", - summaries_key="HyperParameterTuningJobSummaries", - summary_name="HyperParameterTuningJobSummary", - resource_cls=HyperParameterTuningJob, - list_method_kwargs=operation_input_args, + list_method='list_inference_experiments', + summaries_key='InferenceExperiments', + summary_name='InferenceExperimentSummary', + resource_cls=InferenceExperiment, + list_method_kwargs=operation_input_args ) - @Base.add_validate_call - def get_all_training_jobs( - self, - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[HyperParameterTrainingJobSummary]: - """ - Gets a list of TrainingJobSummary objects that describe the training jobs that a hyperparameter tuning job launched. - - Parameters: - next_token: If the result of the previous ListTrainingJobsForHyperParameterTuningJob request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request. - max_results: The maximum number of training jobs to return. The default value is 10. - status_equals: A filter that returns only training jobs with the specified status. - sort_by: The field to sort results by. The default is Name. If the value of this field is FinalObjectiveMetricValue, any training jobs that did not return an objective metric are not listed. - sort_order: The sort order for results. The default is Ascending. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed HyperParameterTrainingJobSummary. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - operation_input_args = { - "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - return ResourceIterator( - client=client, - list_method="list_training_jobs_for_hyper_parameter_tuning_job", - summaries_key="TrainingJobSummaries", - summary_name="HyperParameterTrainingJobSummary", - resource_cls=HyperParameterTrainingJobSummary, - list_method_kwargs=operation_input_args, - ) - - -class HyperParameterTuningJobInternal(Base): - """ - Class representing resource HyperParameterTuningJobInternal - - Attributes: - hyper_parameter_tuning_job_name: - hyper_parameter_tuning_job_config: - customer_details: - hyper_parameter_tuning_job_arn: - training_job_definition: - training_job_definitions: - warm_start_config: - tags: - autotune: - fas_credentials: - auto_ml_job_arn: - billing_mode: - source_identity: - identity_center_user_token: - - """ - - hyper_parameter_tuning_job_name: Union[StrPipeVar, object] - hyper_parameter_tuning_job_config: HyperParameterTuningJobConfig - customer_details: CustomerDetails - hyper_parameter_tuning_job_arn: StrPipeVar - training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned() - training_job_definitions: Optional[List[HyperParameterTrainingJobDefinition]] = Unassigned() - warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - autotune: Optional[Autotune] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - billing_mode: Optional[StrPipeVar] = Unassigned() - source_identity: Optional[StrPipeVar] = Unassigned() - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "hyper_parameter_tuning_job_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object hyper_parameter_tuning_job_internal") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - hyper_parameter_tuning_job_name: Union[StrPipeVar, object], - hyper_parameter_tuning_job_config: HyperParameterTuningJobConfig, - customer_details: CustomerDetails, - training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned(), - training_job_definitions: Optional[ - List[HyperParameterTrainingJobDefinition] - ] = Unassigned(), - warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - autotune: Optional[Autotune] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - billing_mode: Optional[StrPipeVar] = Unassigned(), - source_identity: Optional[StrPipeVar] = Unassigned(), - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["HyperParameterTuningJobInternal"]: - """ - Create a HyperParameterTuningJobInternal resource - - Parameters: - hyper_parameter_tuning_job_name: - hyper_parameter_tuning_job_config: - customer_details: - training_job_definition: - training_job_definitions: - warm_start_config: - tags: - autotune: - fas_credentials: - auto_ml_job_arn: - billing_mode: - source_identity: - identity_center_user_token: - session: Boto3 session. - region: Region name. - - Returns: - The HyperParameterTuningJobInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "HyperParameterTuningJobName": hyper_parameter_tuning_job_name, - "HyperParameterTuningJobConfig": hyper_parameter_tuning_job_config, - "TrainingJobDefinition": training_job_definition, - "TrainingJobDefinitions": training_job_definitions, - "WarmStartConfig": warm_start_config, - "Tags": tags, - "Autotune": autotune, - "FasCredentials": fas_credentials, - "CustomerDetails": customer_details, - "AutoMLJobArn": auto_ml_job_arn, - "BillingMode": billing_mode, - "SourceIdentity": source_identity, - "IdentityCenterUserToken": identity_center_user_token, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_hyper_parameter_tuning_job_internal API") - response = client.create_hyper_parameter_tuning_job_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateHyperParameterTuningJobInternalResponse") - return cls(**operation_input_args, **transformed_response) - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a HyperParameterTuningJobInternal resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "HyperParameterTuningJobName": self.hyper_parameter_tuning_job_name, - "CustomerDetails": self.customer_details, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_hyper_parameter_tuning_job_internal(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - -class Image(Base): +class InferenceRecommendationsJob(Base): """ - Class representing resource Image - + Class representing resource InferenceRecommendationsJob + Attributes: - creation_time: When the image was created. - description: The description of the image. - display_name: The name of the image as displayed. - failure_reason: When a create, update, or delete operation fails, the reason for the failure. - image_arn: The ARN of the image. - image_name: The name of the image. - image_status: The status of the image. - last_modified_time: When the image was last modified. - role_arn: The ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. - + job_name: The name of the job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + job_type: The job type that you provided when you initiated the job. + job_arn: The Amazon Resource Name (ARN) of the job. + role_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role you provided when you initiated the job. + status: The status of the job. + creation_time: A timestamp that shows when the job was created. + last_modified_time: A timestamp that shows when the job was last modified. + input_config: Returns information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations you provided when you initiated the job. + job_description: The job description that you provided when you initiated the job. + completion_time: A timestamp that shows when the job completed. + failure_reason: If the job fails, provides information why the job failed. + stopping_conditions: The stopping conditions that you provided when you initiated the job. + inference_recommendations: The recommendations made by Inference Recommender. + endpoint_performances: The performance results from running an Inference Recommender job on an existing endpoint. + """ - - image_name: StrPipeVar + job_name: StrPipeVar + job_description: Optional[StrPipeVar] = Unassigned() + job_type: Optional[StrPipeVar] = Unassigned() + job_arn: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - display_name: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - image_arn: Optional[StrPipeVar] = Unassigned() - image_status: Optional[StrPipeVar] = Unassigned() + completion_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - + failure_reason: Optional[StrPipeVar] = Unassigned() + input_config: Optional[RecommendationJobInputConfig] = Unassigned() + stopping_conditions: Optional[RecommendationJobStoppingConditions] = Unassigned() + inference_recommendations: Optional[List[InferenceRecommendation]] = Unassigned() + endpoint_performances: Optional[List[EndpointPerformance]] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "image_name" - resource_name_split = resource_name.split("_") + resource_name = 'inference_recommendations_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object image") + logger.error("Name attribute not found for object inference_recommendations_job") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = {"role_arn": {"type": "string"}} - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Image", **kwargs - ), - ) - + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + }, + "input_config": { + "volume_kms_key_id": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "InferenceRecommendationsJob", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - image_name: StrPipeVar, + job_name: StrPipeVar, + job_type: StrPipeVar, role_arn: StrPipeVar, - description: Optional[StrPipeVar] = Unassigned(), - display_name: Optional[StrPipeVar] = Unassigned(), + input_config: RecommendationJobInputConfig, + job_description: Optional[StrPipeVar] = Unassigned(), + stopping_conditions: Optional[RecommendationJobStoppingConditions] = Unassigned(), + output_config: Optional[RecommendationJobOutputConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Image"]: + ) -> Optional["InferenceRecommendationsJob"]: """ - Create a Image resource - + Create a InferenceRecommendationsJob resource + Parameters: - image_name: The name of the image. Must be unique to your account. - role_arn: The ARN of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. - description: The description of the image. - display_name: The display name of the image. If not provided, ImageName is displayed. - tags: A list of tags to apply to the image. + job_name: A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with the job name are truncated at 40 characters. + job_type: Defines the type of recommendation job. Specify Default to initiate an instance recommendation and Advanced to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will run an instance recommendation (DEFAULT) job. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf. + input_config: Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations. + job_description: Description of the recommendation job. + stopping_conditions: A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically stopped. + output_config: Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption. + tags: The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. session: Boto3 session. region: Region name. - + Returns: - The Image resource. - + The InferenceRecommendationsJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17934,56 +17266,55 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating image resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "Description": description, - "DisplayName": display_name, - "ImageName": image_name, - "RoleArn": role_arn, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Image", operation_input_args=operation_input_args - ) - + + logger.info("Creating inference_recommendations_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'JobName': job_name, + 'JobType': job_type, + 'RoleArn': role_arn, + 'InputConfig': input_config, + 'JobDescription': job_description, + 'StoppingConditions': stopping_conditions, + 'OutputConfig': output_config, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='InferenceRecommendationsJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_image(**operation_input_args) + response = client.create_inference_recommendations_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(image_name=image_name, session=session, region=region) - + + return cls.get(job_name=job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - image_name: StrPipeVar, + job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Image"]: + ) -> Optional["InferenceRecommendationsJob"]: """ - Get a Image resource - + Get a InferenceRecommendationsJob resource + Parameters: - image_name: The name of the image to describe. + job_name: The name of the job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. session: Boto3 session. region: Region name. - + Returns: - The Image resource. - + The InferenceRecommendationsJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -17994,38 +17325,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ImageName": image_name, + 'JobName': job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_image(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_inference_recommendations_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeImageResponse") - image = cls(**transformed_response) - return image - + transformed_response = transform(response, 'DescribeInferenceRecommendationsJobResponse') + inference_recommendations_job = cls(**transformed_response) + return inference_recommendations_job + @Base.add_validate_call def refresh( self, - ) -> Optional["Image"]: + + ) -> Optional["InferenceRecommendationsJob"]: """ - Refresh a Image resource - + Refresh a InferenceRecommendationsJob resource + Returns: - The Image resource. - + The InferenceRecommendationsJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18036,84 +17366,28 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ImageName": self.image_name, + 'JobName': self.job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_image(**operation_input_args) - + response = client.describe_inference_recommendations_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeImageResponse", self) + transform(response, 'DescribeInferenceRecommendationsJobResponse', self) return self - - @populate_inputs_decorator - @Base.add_validate_call - def update( - self, - delete_properties: Optional[List[StrPipeVar]] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - display_name: Optional[StrPipeVar] = Unassigned(), - role_arn: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["Image"]: - """ - Update a Image resource - - Parameters: - delete_properties: A list of properties to delete. Only the Description and DisplayName properties can be deleted. - - Returns: - The Image resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating image resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "DeleteProperties": delete_properties, - "Description": description, - "DisplayName": display_name, - "ImageName": self.image_name, - "RoleArn": role_arn, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_image(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a Image resource - + Stop a InferenceRecommendationsJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18122,87 +17396,79 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "ImageName": self.image_name, + 'JobName': self.job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_image(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_inference_recommendations_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal[ - "CREATING", - "CREATED", - "CREATE_FAILED", - "UPDATING", - "UPDATE_FAILED", - "DELETING", - "DELETE_FAILED", - ], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a Image resource to reach certain status. - + Wait for a InferenceRecommendationsJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['COMPLETED', 'FAILED', 'STOPPED', 'DELETED'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for Image to reach [bold]{target_status} status...") + progress.add_task("Waiting for InferenceRecommendationsJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.image_status + current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="InferenceRecommendationsJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Image", status=current_status, reason=self.failure_reason - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Image", status=current_status) + raise TimeoutExceededError(resource_type="InferenceRecommendationsJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -18210,14 +17476,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a Image resource to be deleted. - + Wait for a InferenceRecommendationsJob resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18231,47 +17497,38 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for Image to be deleted...") + progress.add_task("Waiting for InferenceRecommendationsJob to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.image_status + current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if ( - "delete_failed" in current_status.lower() - or "deletefailed" in current_status.lower() - ): - raise DeleteFailedStatusError( - resource_type="Image", reason=self.failure_reason - ) - + + + if current_status.lower() == "deleted": + logger.info("Resource was deleted.") + return + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Image", status=current_status) + raise TimeoutExceededError(resource_type="InferenceRecommendationsJob", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -18281,32 +17538,38 @@ def get_all( last_modified_time_after: Optional[datetime.datetime] = Unassigned(), last_modified_time_before: Optional[datetime.datetime] = Unassigned(), name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), + model_name_equals: Optional[StrPipeVar] = Unassigned(), + model_package_version_arn_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Image"]: + ) -> ResourceIterator["InferenceRecommendationsJob"]: """ - Get all Image resources - + Get all InferenceRecommendationsJob resources + Parameters: - creation_time_after: A filter that returns only images created on or after the specified time. - creation_time_before: A filter that returns only images created on or before the specified time. - last_modified_time_after: A filter that returns only images modified on or after the specified time. - last_modified_time_before: A filter that returns only images modified on or before the specified time. - max_results: The maximum number of images to return in the response. The default value is 10. - name_contains: A filter that returns only images whose name contains the specified string. - next_token: If the previous call to ListImages didn't return the full set of images, the call returns a token for getting the next set of images. - sort_by: The property used to sort results. The default value is CREATION_TIME. - sort_order: The sort order. The default value is DESCENDING. + creation_time_after: A filter that returns only jobs created after the specified time (timestamp). + creation_time_before: A filter that returns only jobs created before the specified time (timestamp). + last_modified_time_after: A filter that returns only jobs that were last modified after the specified time (timestamp). + last_modified_time_before: A filter that returns only jobs that were last modified before the specified time (timestamp). + name_contains: A string in the job name. This filter returns only recommendations whose name contains the specified string. + status_equals: A filter that retrieves only inference recommendations jobs with a specific status. + sort_by: The parameter by which to sort the results. + sort_order: The sort order for the results. + next_token: If the response to a previous ListInferenceRecommendationsJobsRequest request was truncated, the response includes a NextToken. To retrieve the next set of recommendations, use the token in the next request. + max_results: The maximum number of recommendations to return in the response. + model_name_equals: A filter that returns only jobs that were created for this model. + model_package_version_arn_equals: A filter that returns only jobs that were created for this versioned model package. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Image resources. - + Iterator for listed InferenceRecommendationsJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18316,58 +17579,57 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'ModelNameEquals': model_name_equals, + 'ModelPackageVersionArnEquals': model_package_version_arn_equals, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_images", - summaries_key="Images", - summary_name="Image", - resource_cls=Image, - list_method_kwargs=operation_input_args, + list_method='list_inference_recommendations_jobs', + summaries_key='InferenceRecommendationsJobs', + summary_name='InferenceRecommendationsJob', + resource_cls=InferenceRecommendationsJob, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call - def get_all_aliases( + def get_all_steps( self, - alias: Optional[StrPipeVar] = Unassigned(), - version: Optional[int] = Unassigned(), - session: Optional[Session] = None, + step_type: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, - ) -> ResourceIterator[str]: + ) -> ResourceIterator[InferenceRecommendationsJobStep]: """ - Lists the aliases of a specified image or image version. - + Returns a list of the subtasks for an Inference Recommender job. + Parameters: - alias: The alias of the image version. - version: The version of the image. If image version is not specified, the aliases of all versions of the image are listed. - max_results: The maximum number of aliases to return. - next_token: If the previous call to ListAliases didn't return the full set of aliases, the call returns a token for retrieving the next set of aliases. + step_type: A filter to return details about the specified type of subtask. BENCHMARK: Evaluate the performance of your model on different instance types. + max_results: The maximum number of results to return. + next_token: A token that you can specify to return more results from the list. Specify this field if you have a token that was returned from a previous request. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed str. - + Iterator for listed InferenceRecommendationsJobStep. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18378,135 +17640,196 @@ def get_all_aliases( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "ImageName": self.image_name, - "Alias": alias, - "Version": version, + 'JobName': self.job_name, + 'Status': self.status, + 'StepType': step_type, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_aliases", - summaries_key="SageMakerImageVersionAliases", - summary_name="SageMakerImageVersionAlias", - resource_cls=str, - list_method_kwargs=operation_input_args, + list_method='list_inference_recommendations_job_steps', + summaries_key='Steps', + summary_name='InferenceRecommendationsJobStep', + resource_cls=InferenceRecommendationsJobStep, + list_method_kwargs=operation_input_args ) -class ImageVersion(Base): +class LabelingJob(Base): """ - Class representing resource ImageVersion - + Class representing resource LabelingJob + Attributes: - base_image: The registry path of the container image on which this image version is based. - container_image: The registry path of the container image that contains this image version. - creation_time: When the version was created. - failure_reason: When a create or delete operation fails, the reason for the failure. - image_arn: The ARN of the image the version is based on. - image_version_arn: The ARN of the version. - image_version_status: The status of the version. - last_modified_time: When the version was last modified. - version: The version number. - vendor_guidance: The stability of the image version specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported. - job_type: Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels. - ml_framework: The machine learning framework vended in the image version. - programming_lang: The supported programming language and its version. - processor: Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. - horovod: Indicates Horovod compatibility. - override_alias_image_version: - soci_image: - release_notes: The maintainer description of the image version. - + labeling_job_status: The processing status of the labeling job. + label_counters: Provides a breakdown of the number of data objects labeled by humans, the number of objects labeled by machine, the number of objects than couldn't be labeled, and the total number of objects labeled. + creation_time: The date and time that the labeling job was created. + last_modified_time: The date and time that the labeling job was last updated. + job_reference_code: A unique identifier for work done as part of a labeling job. + labeling_job_name: The name assigned to the labeling job when it was created. + labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job. + input_config: Input configuration information 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. + output_config: The location of the job's output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any. + role_arn: The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during data labeling. + human_task_config: Configuration information required for human workers to complete a labeling task. + failure_reason: If the job failed, the reason that it failed. + label_attribute_name: The attribute used as the label in the output manifest file. + label_category_config_s3_uri: The S3 location of the JSON file that defines the categories used to label data objects. Please note the following label-category limits: Semantic segmentation labeling jobs using automated labeling: 20 labels Box bounding labeling jobs (all): 10 labels The file is a JSON structure in the following format: { "document-version": "2018-11-28" "labels": [ { "label": "label 1" }, { "label": "label 2" }, ... { "label": "label n" } ] } + stopping_conditions: A set of conditions for stopping a labeling job. If any of the conditions are met, the job is automatically stopped. + labeling_job_algorithms_config: Configuration information for automated data labeling. + 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. + labeling_job_output: The location of the output produced by the labeling job. + """ - - image_name: StrPipeVar - base_image: Optional[StrPipeVar] = Unassigned() - container_image: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() + labeling_job_name: StrPipeVar + labeling_job_status: Optional[StrPipeVar] = Unassigned() + label_counters: Optional[LabelCounters] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() - image_arn: Optional[StrPipeVar] = Unassigned() - image_version_arn: Optional[StrPipeVar] = Unassigned() - image_version_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - version: Optional[int] = Unassigned() - vendor_guidance: Optional[StrPipeVar] = Unassigned() - job_type: Optional[StrPipeVar] = Unassigned() - ml_framework: Optional[StrPipeVar] = Unassigned() - programming_lang: Optional[StrPipeVar] = Unassigned() - processor: Optional[StrPipeVar] = Unassigned() - horovod: Optional[bool] = Unassigned() - override_alias_image_version: Optional[bool] = Unassigned() - soci_image: Optional[bool] = Unassigned() - release_notes: Optional[StrPipeVar] = Unassigned() - + job_reference_code: Optional[StrPipeVar] = Unassigned() + labeling_job_arn: Optional[StrPipeVar] = Unassigned() + label_attribute_name: Optional[StrPipeVar] = Unassigned() + input_config: Optional[LabelingJobInputConfig] = Unassigned() + output_config: Optional[LabelingJobOutputConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + label_category_config_s3_uri: Optional[StrPipeVar] = Unassigned() + stopping_conditions: Optional[LabelingJobStoppingConditions] = Unassigned() + labeling_job_algorithms_config: Optional[LabelingJobAlgorithmsConfig] = Unassigned() + human_task_config: Optional[HumanTaskConfig] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + labeling_job_output: Optional[LabelingJobOutput] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "image_version_name" - resource_name_split = resource_name.split("_") + resource_name = 'labeling_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object image_version") + logger.error("Name attribute not found for object labeling_job") return None - @classmethod - @Base.add_validate_call + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "input_config": { + "data_source": { + "s3_data_source": { + "manifest_s3_uri": { + "type": "string" + } + } + } + }, + "output_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "human_task_config": { + "ui_config": { + "ui_template_s3_uri": { + "type": "string" + } + } + }, + "label_category_config_s3_uri": { + "type": "string" + }, + "labeling_job_algorithms_config": { + "labeling_job_resource_config": { + "volume_kms_key_id": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "labeling_job_output": { + "output_dataset_s3_uri": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "LabelingJob", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator + @Base.add_validate_call def create( cls, - base_image: StrPipeVar, - client_token: StrPipeVar, - image_name: Union[StrPipeVar, object], - aliases: Optional[List[StrPipeVar]] = Unassigned(), - vendor_guidance: Optional[StrPipeVar] = Unassigned(), - job_type: Optional[StrPipeVar] = Unassigned(), - ml_framework: Optional[StrPipeVar] = Unassigned(), - programming_lang: Optional[StrPipeVar] = Unassigned(), - processor: Optional[StrPipeVar] = Unassigned(), - horovod: Optional[bool] = Unassigned(), - override_alias_image_version: Optional[bool] = Unassigned(), - release_notes: Optional[StrPipeVar] = Unassigned(), + labeling_job_name: StrPipeVar, + label_attribute_name: StrPipeVar, + input_config: LabelingJobInputConfig, + output_config: LabelingJobOutputConfig, + role_arn: StrPipeVar, + human_task_config: HumanTaskConfig, + label_category_config_s3_uri: Optional[StrPipeVar] = Unassigned(), + stopping_conditions: Optional[LabelingJobStoppingConditions] = Unassigned(), + labeling_job_algorithms_config: Optional[LabelingJobAlgorithmsConfig] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["ImageVersion"]: + ) -> Optional["LabelingJob"]: """ - Create a ImageVersion resource - + Create a LabelingJob resource + Parameters: - base_image: The registry path of the container image to use as the starting point for this version. The path is an Amazon ECR URI in the following format: <acct-id>.dkr.ecr.<region>.amazonaws.com/<repo-name[:tag] or [@digest]> - client_token: A unique ID. If not specified, the Amazon Web Services CLI and Amazon Web Services SDKs, such as the SDK for Python (Boto3), add a unique value to the call. - image_name: The ImageName of the Image to create a version of. - aliases: A list of aliases created with the image version. - vendor_guidance: The stability of the image version, specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported. - job_type: Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels. - ml_framework: The machine learning framework vended in the image version. - programming_lang: The supported programming language and its version. - processor: Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. - horovod: Indicates Horovod compatibility. - override_alias_image_version: - release_notes: The maintainer description of the image version. + 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. + 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. + 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. + 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. + 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. + human_task_config: Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count). + label_category_config_s3_uri: The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects. For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. For named entity recognition jobs, in addition to "labels", you must provide worker instructions in the label category configuration file using the "instructions" parameter: "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}. For details and an example, see Create a Named Entity Recognition Labeling Job (API) . For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1, label_2,...,label_n with your label categories. { "document-version": "2018-11-28", "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] } Note the following about the label category configuration file: For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one. Each label category must be unique, you cannot specify duplicate label categories. If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include auditLabelAttributeName in the label category configuration. Use this parameter to enter the LabelAttributeName of the labeling job you want to adjust or verify annotations of. + stopping_conditions: A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling. + labeling_job_algorithms_config: Configures the information required to perform automated data labeling. + tags: 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. session: Boto3 session. region: Region name. - + Returns: - The ImageVersion resource. - + The LabelingJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18517,72 +17840,61 @@ def create( ``` ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating image_version resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "BaseImage": base_image, - "ClientToken": client_token, - "ImageName": image_name, - "Aliases": aliases, - "VendorGuidance": vendor_guidance, - "JobType": job_type, - "MLFramework": ml_framework, - "ProgrammingLang": programming_lang, - "Processor": processor, - "Horovod": horovod, - "OverrideAliasImageVersion": override_alias_image_version, - "ReleaseNotes": release_notes, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ImageVersion", operation_input_args=operation_input_args - ) - + + logger.info("Creating labeling_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'LabelingJobName': labeling_job_name, + 'LabelAttributeName': label_attribute_name, + 'InputConfig': input_config, + 'OutputConfig': output_config, + 'RoleArn': role_arn, + 'LabelCategoryConfigS3Uri': label_category_config_s3_uri, + 'StoppingConditions': stopping_conditions, + 'LabelingJobAlgorithmsConfig': labeling_job_algorithms_config, + 'HumanTaskConfig': human_task_config, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='LabelingJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_image_version(**operation_input_args) + response = client.create_labeling_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(image_name=image_name, session=session, region=region) - + + return cls.get(labeling_job_name=labeling_job_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - image_name: StrPipeVar, - version: Optional[int] = Unassigned(), - alias: Optional[StrPipeVar] = Unassigned(), + labeling_job_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["ImageVersion"]: + ) -> Optional["LabelingJob"]: """ - Get a ImageVersion resource - + Get a LabelingJob resource + Parameters: - image_name: The name of the image. - version: The version of the image. If not specified, the latest version is described. - alias: The alias of the image version. + labeling_job_name: The name of the labeling job to return information for. session: Boto3 session. region: Region name. - + Returns: - The ImageVersion resource. - + The LabelingJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18593,41 +17905,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ImageName": image_name, - "Version": version, - "Alias": alias, + 'LabelingJobName': labeling_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_image_version(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_labeling_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeImageVersionResponse") - image_version = cls(**transformed_response) - return image_version - + transformed_response = transform(response, 'DescribeLabelingJobResponse') + labeling_job = cls(**transformed_response) + return labeling_job + @Base.add_validate_call def refresh( self, - alias: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["ImageVersion"]: + + ) -> Optional["LabelingJob"]: """ - Refresh a ImageVersion resource - + Refresh a LabelingJob resource + Returns: - The ImageVersion resource. - + The LabelingJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18638,102 +17946,28 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ImageName": self.image_name, - "Version": self.version, - "Alias": alias, + 'LabelingJobName': self.labeling_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_image_version(**operation_input_args) - + response = client.describe_labeling_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeImageVersionResponse", self) - return self - - @Base.add_validate_call - def update( - self, - alias: Optional[StrPipeVar] = Unassigned(), - version: Optional[int] = Unassigned(), - aliases_to_add: Optional[List[StrPipeVar]] = Unassigned(), - aliases_to_delete: Optional[List[StrPipeVar]] = Unassigned(), - vendor_guidance: Optional[StrPipeVar] = Unassigned(), - job_type: Optional[StrPipeVar] = Unassigned(), - ml_framework: Optional[StrPipeVar] = Unassigned(), - programming_lang: Optional[StrPipeVar] = Unassigned(), - processor: Optional[StrPipeVar] = Unassigned(), - horovod: Optional[bool] = Unassigned(), - release_notes: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["ImageVersion"]: - """ - Update a ImageVersion resource - - Parameters: - alias: The alias of the image version. - aliases_to_add: A list of aliases to add. - aliases_to_delete: A list of aliases to delete. - - Returns: - The ImageVersion resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating image_version resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "ImageName": self.image_name, - "Alias": alias, - "Version": version, - "AliasesToAdd": aliases_to_add, - "AliasesToDelete": aliases_to_delete, - "VendorGuidance": vendor_guidance, - "JobType": job_type, - "MLFramework": ml_framework, - "ProgrammingLang": programming_lang, - "Processor": processor, - "Horovod": horovod, - "ReleaseNotes": release_notes, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_image_version(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - + transform(response, 'DescribeLabelingJobResponse', self) return self - + @Base.add_validate_call - def delete( - self, - alias: Optional[StrPipeVar] = Unassigned(), - ) -> None: + def stop(self) -> None: """ - Delete a ImageVersion resource - + Stop a LabelingJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18742,235 +17976,214 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "ImageName": self.image_name, - "Version": self.version, - "Alias": alias, + 'LabelingJobName': self.labeling_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_image_version(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_labeling_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal["CREATING", "CREATED", "CREATE_FAILED", "DELETING", "DELETE_FAILED"], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a ImageVersion resource to reach certain status. - + Wait for a LabelingJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for ImageVersion to reach [bold]{target_status} status...") + progress.add_task("Waiting for LabelingJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.image_version_status + current_status = self.labeling_job_status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="LabelingJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ImageVersion", - status=current_status, - reason=self.failure_reason, - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="ImageVersion", status=current_status) + raise TimeoutExceededError(resource_type="LabelingJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + + @classmethod @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["LabelingJob"]: """ - Wait for a ImageVersion resource to be deleted. - + Get all LabelingJob resources + Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for ImageVersion to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: + creation_time_after: A filter that returns only labeling jobs created after the specified time (timestamp). + creation_time_before: A filter that returns only labeling jobs created before the specified time (timestamp). + last_modified_time_after: A filter that returns only labeling jobs modified after the specified time (timestamp). + last_modified_time_before: A filter that returns only labeling jobs modified before the specified time (timestamp). + max_results: The maximum number of labeling jobs to return in each page of the response. + next_token: If the result of the previous ListLabelingJobs request was truncated, the response includes a NextToken. To retrieve the next set of labeling jobs, use the token in the next request. + name_contains: A string in the labeling job name. This filter returns only labeling jobs whose name contains the specified string. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Ascending. + status_equals: A filter that retrieves only labeling jobs with a specific status. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed LabelingJob resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` try: - self.refresh() - current_status = self.image_version_status - status.update(f"Current status: [bold]{current_status}") - - if ( - "delete_failed" in current_status.lower() - or "deletefailed" in current_status.lower() - ): - raise DeleteFailedStatusError( - resource_type="ImageVersion", reason=self.failure_reason - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ImageVersion", status=current_status - ) + # AWS service call here except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'StatusEquals': status_equals, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_labeling_jobs', + summaries_key='LabelingJobSummaryList', + summary_name='LabelingJobSummary', + resource_cls=LabelingJob, + list_method_kwargs=operation_input_args + ) -class InferenceComponent(Base): +class LineageGroup(Base): """ - Class representing resource InferenceComponent - + Class representing resource LineageGroup + Attributes: - inference_component_name: The name of the inference component. - inference_component_arn: The Amazon Resource Name (ARN) of the inference component. - endpoint_name: The name of the endpoint that hosts the inference component. - endpoint_arn: The Amazon Resource Name (ARN) of the endpoint that hosts the inference component. - creation_time: The time when the inference component was created. - last_modified_time: The time when the inference component was last updated. - variant_name: The name of the production variant that hosts the inference component. - failure_reason: If the inference component status is Failed, the reason for the failure. - specification: Details about the resources that are deployed with this inference component. - runtime_config: Details about the runtime settings for the model that is deployed with the inference component. - inference_component_status: The status of the inference component. - last_deployment_config: The deployment and rollback settings that you assigned to the inference component. - + lineage_group_name: The name of the lineage group. + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. + display_name: The display name of the lineage group. + description: The description of the lineage group. + creation_time: The creation time of lineage group. + created_by: + last_modified_time: The last modified time of the lineage group. + last_modified_by: + """ - - inference_component_name: StrPipeVar - inference_component_arn: Optional[StrPipeVar] = Unassigned() - endpoint_name: Optional[StrPipeVar] = Unassigned() - endpoint_arn: Optional[StrPipeVar] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - specification: Optional[InferenceComponentSpecificationSummary] = Unassigned() - runtime_config: Optional[InferenceComponentRuntimeConfigSummary] = Unassigned() + lineage_group_name: StrPipeVar + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - inference_component_status: Optional[StrPipeVar] = Unassigned() - last_deployment_config: Optional[InferenceComponentDeploymentConfig] = Unassigned() - + last_modified_by: Optional[UserContext] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "inference_component_name" - resource_name_split = resource_name.split("_") + resource_name = 'lineage_group_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object inference_component") + logger.error("Name attribute not found for object lineage_group") return None - + @classmethod @Base.add_validate_call - def create( + def get( cls, - inference_component_name: StrPipeVar, - endpoint_name: Union[StrPipeVar, object], - specification: InferenceComponentSpecification, - variant_name: Optional[StrPipeVar] = Unassigned(), - runtime_config: Optional[InferenceComponentRuntimeConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + lineage_group_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceComponent"]: + ) -> Optional["LineageGroup"]: """ - Create a InferenceComponent resource - + Get a LineageGroup resource + Parameters: - inference_component_name: A unique name to assign to the inference component. - endpoint_name: The name of an existing endpoint where you host the inference component. - specification: Details about the resources to deploy with this inference component, including the model, container, and compute resources. - variant_name: The name of an existing production variant where you host the inference component. - runtime_config: Runtime settings for a model that is deployed with an inference component. - tags: A list of key-value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference. + lineage_group_name: The name of the lineage group. session: Boto3 session. region: Region name. - + Returns: - The InferenceComponent resource. - + The LineageGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -18979,64 +18192,39 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating inference_component resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + operation_input_args = { - "InferenceComponentName": inference_component_name, - "EndpointName": endpoint_name, - "VariantName": variant_name, - "Specification": specification, - "RuntimeConfig": runtime_config, - "Tags": tags, + 'LineageGroupName': lineage_group_name, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="InferenceComponent", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_inference_component(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - inference_component_name=inference_component_name, session=session, region=region - ) - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_lineage_group(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeLineageGroupResponse') + lineage_group = cls(**transformed_response) + return lineage_group + @Base.add_validate_call - def get( - cls, - inference_component_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceComponent"]: + def refresh( + self, + + ) -> Optional["LineageGroup"]: """ - Get a InferenceComponent resource - - Parameters: - inference_component_name: The name of the inference component. - session: Boto3 session. - region: Region name. - + Refresh a LineageGroup resource + Returns: - The InferenceComponent resource. - + The LineageGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19045,39 +18233,52 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "InferenceComponentName": inference_component_name, + 'LineageGroupName': self.lineage_group_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_inference_component(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeInferenceComponentOutput") - inference_component = cls(**transformed_response) - return inference_component - + + client = Base.get_sagemaker_client() + response = client.describe_lineage_group(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeLineageGroupResponse', self) + return self + + @classmethod @Base.add_validate_call - def refresh( - self, - ) -> Optional["InferenceComponent"]: + def get_all( + cls, + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["LineageGroup"]: """ - Refresh a InferenceComponent resource - + Get all LineageGroup resources + + Parameters: + created_after: A timestamp to filter against lineage groups created after a certain point in time. + created_before: A timestamp to filter against lineage groups created before a certain point in time. + sort_by: The parameter by which to sort the results. The default is CreationTime. + sort_order: The sort order for the results. The default is Ascending. + next_token: If the response is truncated, SageMaker returns this token. To retrieve the next set of algorithms, use it in the subsequent request. + max_results: The maximum number of endpoints to return in the response. This value defaults to 10. + session: Boto3 session. + region: Region name. + Returns: - The InferenceComponent resource. - + Iterator for listed LineageGroup resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19087,39 +18288,49 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "InferenceComponentName": self.inference_component_name, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_inference_component(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeInferenceComponentOutput", self) - return self - + + return ResourceIterator( + client=client, + list_method='list_lineage_groups', + summaries_key='LineageGroupSummaries', + summary_name='LineageGroupSummary', + resource_cls=LineageGroup, + list_method_kwargs=operation_input_args + ) + + @Base.add_validate_call - def update( + def get_policy( self, - specification: Optional[InferenceComponentSpecification] = Unassigned(), - runtime_config: Optional[InferenceComponentRuntimeConfig] = Unassigned(), - deployment_config: Optional[InferenceComponentDeploymentConfig] = Unassigned(), - ) -> Optional["InferenceComponent"]: + + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[GetLineageGroupPolicyResponse]: """ - Update a InferenceComponent resource - + The resource policy for the lineage group. + Parameters: - deployment_config: The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings. - + session: Boto3 session. + region: Region name. + Returns: - The InferenceComponent resource. - + GetLineageGroupPolicyResponse + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19128,39 +18339,323 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. """ + + + operation_input_args = { + 'LineageGroupName': self.lineage_group_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling get_lineage_group_policy API") + response = client.get_lineage_group_policy(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'GetLineageGroupPolicyResponse') + return GetLineageGroupPolicyResponse(**transformed_response) - logger.info("Updating inference_component resource.") - client = Base.get_sagemaker_client() +class MlflowApp(Base): + """ + Class representing resource MlflowApp + + Attributes: + arn: The ARN of the MLflow App. + name: The name of the MLflow App. + artifact_store_uri: The S3 URI of the general purpose bucket used as the MLflow App artifact store. + mlflow_version: The MLflow version used. + role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3. + status: The current creation status of the described MLflow App. + model_registration_mode: Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled. + account_default_status: Indicates whether this MLflow app is the default for the entire account. + default_domain_id_list: List of SageMaker Domain IDs for which this MLflow App is the default. + creation_time: The timestamp when the MLflow App was created. + created_by: + last_modified_time: The timestamp when the MLflow App was last modified. + last_modified_by: + weekly_maintenance_window_start: The day and time of the week when weekly maintenance occurs. + maintenance_status: Current maintenance status of the MLflow App. + + """ + arn: StrPipeVar + name: Optional[StrPipeVar] = Unassigned() + artifact_store_uri: Optional[StrPipeVar] = Unassigned() + mlflow_version: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + model_registration_mode: Optional[StrPipeVar] = Unassigned() + account_default_status: Optional[StrPipeVar] = Unassigned() + default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned() + maintenance_status: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'mlflow_app_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object mlflow_app") + return None + + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "MlflowApp", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator + @Base.add_validate_call + def create( + cls, + name: StrPipeVar, + artifact_store_uri: StrPipeVar, + role_arn: StrPipeVar, + model_registration_mode: Optional[StrPipeVar] = Unassigned(), + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), + account_default_status: Optional[StrPipeVar] = Unassigned(), + default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["MlflowApp"]: + """ + Create a MlflowApp resource + + Parameters: + name: A string identifying the MLflow app name. This string is not part of the tracking server ARN. + artifact_store_uri: The S3 URI for a general purpose bucket to use as the MLflow App artifact store. + role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow App uses to access the artifact store in Amazon S3. The role should have the AmazonS3FullAccess permission. + model_registration_mode: Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to AutoModelRegistrationEnabled. To disable automatic model registration, set this value to AutoModelRegistrationDisabled. If not specified, AutomaticModelRegistration defaults to AutoModelRegistrationDisabled. + weekly_maintenance_window_start: The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30. + account_default_status: Indicates whether this MLflow app is the default for the entire account. + default_domain_id_list: List of SageMaker domain IDs for which this MLflow App is used as the default. + tags: Tags consisting of key-value pairs used to manage metadata for the MLflow App. + session: Boto3 session. + region: Region name. + + Returns: + The MlflowApp resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + """ + + logger.info("Creating mlflow_app resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Name': name, + 'ArtifactStoreUri': artifact_store_uri, + 'RoleArn': role_arn, + 'ModelRegistrationMode': model_registration_mode, + 'WeeklyMaintenanceWindowStart': weekly_maintenance_window_start, + 'AccountDefaultStatus': account_default_status, + 'DefaultDomainIdList': default_domain_id_list, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='MlflowApp', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.create_mlflow_app(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(arn=response['Arn'], session=session, region=region) + + @classmethod + @Base.add_validate_call + def get( + cls, + arn: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["MlflowApp"]: + """ + Get a MlflowApp resource + + Parameters: + arn: The ARN of the MLflow App for which to get information. + session: Boto3 session. + region: Region name. + + Returns: + The MlflowApp resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'Arn': arn, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_mlflow_app(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeMlflowAppResponse') + mlflow_app = cls(**transformed_response) + return mlflow_app + + @Base.add_validate_call + def refresh( + self, + + ) -> Optional["MlflowApp"]: + """ + Refresh a MlflowApp resource + + Returns: + The MlflowApp resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { + 'Arn': self.arn, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_mlflow_app(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeMlflowAppResponse', self) + return self + + @populate_inputs_decorator + @Base.add_validate_call + def update( + self, + name: Optional[StrPipeVar] = Unassigned(), + artifact_store_uri: Optional[StrPipeVar] = Unassigned(), + model_registration_mode: Optional[StrPipeVar] = Unassigned(), + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), + default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned(), + account_default_status: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["MlflowApp"]: + """ + Update a MlflowApp resource + + Returns: + The MlflowApp resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. + """ + + logger.info("Updating mlflow_app resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "InferenceComponentName": self.inference_component_name, - "Specification": specification, - "RuntimeConfig": runtime_config, - "DeploymentConfig": deployment_config, + 'Arn': self.arn, + 'Name': name, + 'ArtifactStoreUri': artifact_store_uri, + 'ModelRegistrationMode': model_registration_mode, + 'WeeklyMaintenanceWindowStart': weekly_maintenance_window_start, + 'DefaultDomainIdList': default_domain_id_list, + 'AccountDefaultStatus': account_default_status, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_inference_component(**operation_input_args) + response = client.update_mlflow_app(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a InferenceComponent resource - + Delete a MlflowApp resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19169,83 +18664,76 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "InferenceComponentName": self.inference_component_name, + 'Arn': self.arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_inference_component(**operation_input_args) - + + client.delete_mlflow_app(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["InService", "Creating", "Updating", "Failed", "Deleting"], + target_status: Literal['Creating', 'Created', 'CreateFailed', 'Updating', 'Updated', 'UpdateFailed', 'Deleting', 'DeleteFailed', 'Deleted'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a InferenceComponent resource to reach certain status. - + Wait for a MlflowApp resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task( - f"Waiting for InferenceComponent to reach [bold]{target_status} status..." - ) + progress.add_task(f"Waiting for MlflowApp to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.inference_component_status + current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="InferenceComponent", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="MlflowApp", status=current_status, reason='(Unknown)') + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="InferenceComponent", status=current_status - ) + raise TimeoutExceededError(resource_type="MlflowApp", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -19253,14 +18741,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a InferenceComponent resource to be deleted. - + Wait for a MlflowApp resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19274,82 +18762,75 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for InferenceComponent to be deleted...") + progress.add_task("Waiting for MlflowApp to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.inference_component_status + current_status = self.status status.update(f"Current status: [bold]{current_status}") - + + + if current_status.lower() == "deleted": + logger.info("Resource was deleted.") + return + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="InferenceComponent", status=current_status - ) + raise TimeoutExceededError(resource_type="MlflowApp", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + status: Optional[StrPipeVar] = Unassigned(), + mlflow_version: Optional[StrPipeVar] = Unassigned(), + default_for_domain_id: Optional[StrPipeVar] = Unassigned(), + account_default_status: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - endpoint_name_equals: Optional[StrPipeVar] = Unassigned(), - variant_name_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["InferenceComponent"]: + ) -> ResourceIterator["MlflowApp"]: """ - Get all InferenceComponent resources - + Get all MlflowApp resources + Parameters: - sort_by: The field by which to sort the inference components in the response. The default is CreationTime. - sort_order: The sort order for results. The default is Descending. - next_token: A token that you use to get the next set of results following a truncated response. If the response to the previous request was truncated, that response provides the value for this token. - max_results: The maximum number of inference components to return in the response. This value defaults to 10. - name_contains: Filters the results to only those inference components with a name that contains the specified string. - creation_time_before: Filters the results to only those inference components that were created before the specified time. - creation_time_after: Filters the results to only those inference components that were created after the specified time. - last_modified_time_before: Filters the results to only those inference components that were updated before the specified time. - last_modified_time_after: Filters the results to only those inference components that were updated after the specified time. - status_equals: Filters the results to only those inference components with the specified status. - endpoint_name_equals: An endpoint name to filter the listed inference components. The response includes only those inference components that are hosted at the specified endpoint. - variant_name_equals: A production variant name to filter the listed inference components. The response includes only those inference components that are hosted at the specified variant. + created_after: Use the CreatedAfter filter to only list MLflow Apps created after a specific date and time. Listed MLflow Apps are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedAfter parameter takes in a Unix timestamp. + created_before: Use the CreatedBefore filter to only list MLflow Apps created before a specific date and time. Listed MLflow Apps are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedAfter parameter takes in a Unix timestamp. + status: Filter for Mlflow apps with a specific creation status. + mlflow_version: Filter for Mlflow Apps with the specified version. + default_for_domain_id: Filter for MLflow Apps with the specified default SageMaker Domain ID. + account_default_status: Filter for MLflow Apps with the specified AccountDefaultStatus. + sort_by: Filter for MLflow Apps sorting by name, creation time, or creation status. + sort_order: Change the order of the listed MLflow Apps. By default, MLflow Apps are listed in Descending order by creation time. To change the list order, specify SortOrder to be Ascending. + next_token: If the previous response was truncated, use this token in your next request to receive the next set of results. + max_results: The maximum number of MLflow Apps to list. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed InferenceComponent resources. - + Iterator for listed MlflowApp resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19359,198 +18840,153 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "StatusEquals": status_equals, - "EndpointNameEquals": endpoint_name_equals, - "VariantNameEquals": variant_name_equals, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'Status': status, + 'MlflowVersion': mlflow_version, + 'DefaultForDomainId': default_for_domain_id, + 'AccountDefaultStatus': account_default_status, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_inference_components", - summaries_key="InferenceComponents", - summary_name="InferenceComponentSummary", - resource_cls=InferenceComponent, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def update_runtime_configs( - self, - desired_runtime_config: InferenceComponentRuntimeConfig, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Runtime settings for a model that is deployed with an inference component. - - Parameters: - desired_runtime_config: Runtime settings for a model that is deployed with an inference component. - session: Boto3 session. - region: Region name. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - """ - - operation_input_args = { - "InferenceComponentName": self.inference_component_name, - "DesiredRuntimeConfig": desired_runtime_config, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + list_method='list_mlflow_apps', + summaries_key='Summaries', + summary_name='MlflowAppSummary', + resource_cls=MlflowApp, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling update_inference_component_runtime_config API") - response = client.update_inference_component_runtime_config(**operation_input_args) - logger.debug(f"Response: {response}") - -class InferenceExperiment(Base): +class MlflowTrackingServer(Base): """ - Class representing resource InferenceExperiment - + Class representing resource MlflowTrackingServer + Attributes: - arn: The ARN of the inference experiment being described. - name: The name of the inference experiment. - type: The type of the inference experiment. - status: The status of the inference experiment. The following are the possible statuses for an inference experiment: Creating - Amazon SageMaker is creating your experiment. Created - Amazon SageMaker has finished the creation of your experiment and will begin the experiment at the scheduled time. Updating - When you make changes to your experiment, your experiment shows as updating. Starting - Amazon SageMaker is beginning your experiment. Running - Your experiment is in progress. Stopping - Amazon SageMaker is stopping your experiment. Completed - Your experiment has completed. Cancelled - When you conclude your experiment early using the StopInferenceExperiment API, or if any operation fails with an unexpected error, it shows as cancelled. - endpoint_metadata: The metadata of the endpoint on which the inference experiment ran. - model_variants: An array of ModelVariantConfigSummary objects. There is one for each variant in the inference experiment. Each ModelVariantConfigSummary object in the array describes the infrastructure configuration for deploying the corresponding variant. - schedule: The duration for which the inference experiment ran or will run. - status_reason: The error message or client-specified Reason from the StopInferenceExperiment API, that explains the status of the inference experiment. - description: The description of the inference experiment. - creation_time: The timestamp at which you created the inference experiment. - completion_time: The timestamp at which the inference experiment was completed. - last_modified_time: The timestamp at which you last modified the inference experiment. - role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. - data_storage_config: The Amazon S3 location and configuration for storing inference request and response data. - shadow_mode_config: The configuration of ShadowMode inference experiment type, which shows the production variant that takes all the inference requests, and the shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also shows the percentage of requests that Amazon SageMaker replicates. - kms_key: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. For more information, see CreateInferenceExperiment. - + tracking_server_arn: The ARN of the described tracking server. + tracking_server_name: The name of the described tracking server. + artifact_store_uri: The S3 URI of the general purpose bucket used as the MLflow Tracking Server artifact store. + tracking_server_size: The size of the described tracking server. + mlflow_version: The MLflow version used for the described tracking server. + role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the described MLflow Tracking Server uses to access the artifact store in Amazon S3. + tracking_server_status: The current creation status of the described MLflow Tracking Server. + tracking_server_maintenance_status: The current maintenance status of the described MLflow Tracking Server. + is_active: Whether the described MLflow Tracking Server is currently active. + tracking_server_url: The URL to connect to the MLflow user interface for the described tracking server. + weekly_maintenance_window_start: The day and time of the week when weekly maintenance occurs on the described tracking server. + automatic_model_registration: Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled. + creation_time: The timestamp of when the described MLflow Tracking Server was created. + created_by: + last_modified_time: The timestamp of when the described MLflow Tracking Server was last modified. + last_modified_by: + s3_bucket_owner_account_id: Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. + s3_bucket_owner_verification: Whether Amazon S3 Bucket Ownership checks are enabled whenever the tracking server interacts with Amazon Amazon S3. + """ - - name: StrPipeVar - arn: Optional[StrPipeVar] = Unassigned() - type: Optional[StrPipeVar] = Unassigned() - schedule: Optional[InferenceExperimentSchedule] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - status_reason: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() + tracking_server_name: StrPipeVar + tracking_server_arn: Optional[StrPipeVar] = Unassigned() + artifact_store_uri: Optional[StrPipeVar] = Unassigned() + tracking_server_size: Optional[StrPipeVar] = Unassigned() + mlflow_version: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + tracking_server_status: Optional[StrPipeVar] = Unassigned() + tracking_server_maintenance_status: Optional[StrPipeVar] = Unassigned() + is_active: Optional[StrPipeVar] = Unassigned() + tracking_server_url: Optional[StrPipeVar] = Unassigned() + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned() + automatic_model_registration: Optional[bool] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - completion_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - endpoint_metadata: Optional[EndpointMetadata] = Unassigned() - model_variants: Optional[List[ModelVariantConfigSummary]] = Unassigned() - data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned() - shadow_mode_config: Optional[ShadowModeConfig] = Unassigned() - kms_key: Optional[StrPipeVar] = Unassigned() - + last_modified_by: Optional[UserContext] = Unassigned() + s3_bucket_owner_account_id: Optional[StrPipeVar] = Unassigned() + s3_bucket_owner_verification: Optional[bool] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "inference_experiment_name" - resource_name_split = resource_name.split("_") + resource_name = 'mlflow_tracking_server_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object inference_experiment") + logger.error("Name attribute not found for object mlflow_tracking_server") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "role_arn": {"type": "string"}, - "data_storage_config": {"kms_key": {"type": "string"}}, - "kms_key": {"type": "string"}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "InferenceExperiment", **kwargs - ), - ) - + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + }, + "s3_bucket_owner_account_id": { + "type": "string" + }, + "s3_bucket_owner_verification": { + "type": "boolean" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "MlflowTrackingServer", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - name: StrPipeVar, - type: StrPipeVar, + tracking_server_name: StrPipeVar, + artifact_store_uri: StrPipeVar, role_arn: StrPipeVar, - endpoint_name: Union[StrPipeVar, object], - model_variants: List[ModelVariantConfig], - shadow_mode_config: ShadowModeConfig, - schedule: Optional[InferenceExperimentSchedule] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned(), - kms_key: Optional[StrPipeVar] = Unassigned(), + tracking_server_size: Optional[StrPipeVar] = Unassigned(), + mlflow_version: Optional[StrPipeVar] = Unassigned(), + automatic_model_registration: Optional[bool] = Unassigned(), + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), + s3_bucket_owner_account_id: Optional[StrPipeVar] = Unassigned(), + s3_bucket_owner_verification: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceExperiment"]: + ) -> Optional["MlflowTrackingServer"]: """ - Create a InferenceExperiment resource - + Create a MlflowTrackingServer resource + Parameters: - name: The name for the inference experiment. - type: The type of the inference experiment that you want to run. The following types of experiments are possible: ShadowMode: You can use this type to validate a shadow variant. For more information, see Shadow tests. - role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. - endpoint_name: The name of the Amazon SageMaker endpoint on which you want to run the inference experiment. - model_variants: An array of ModelVariantConfig objects. There is one for each variant in the inference experiment. Each ModelVariantConfig object in the array describes the infrastructure configuration for the corresponding variant. - shadow_mode_config: The configuration of ShadowMode inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates. - schedule: The duration for which you want the inference experiment to run. If you don't specify this field, the experiment automatically starts immediately upon creation and concludes after 7 days. - description: A description for the inference experiment. - data_storage_config: The Amazon S3 location and configuration for storing inference request and response data. This is an optional parameter that you can use for data capture. For more information, see Capture data. - kms_key: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKey can be any of the following formats: KMS key ID "1234abcd-12ab-34cd-56ef-1234567890ab" Amazon Resource Name (ARN) of a KMS key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" KMS key Alias "alias/ExampleAlias" Amazon Resource Name (ARN) of a KMS key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" If you use a KMS key ID or an alias of your KMS key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint and UpdateEndpoint requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. - tags: 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 your Amazon Web Services Resources. + tracking_server_name: A unique string identifying the tracking server name. This string is part of the tracking server ARN. + artifact_store_uri: The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store. + role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have AmazonS3FullAccess permissions. For more information on IAM permissions for tracking server creation, see Set up IAM permissions for MLflow. + tracking_server_size: The size of the tracking server you want to create. You can choose between "Small", "Medium", and "Large". The default MLflow Tracking Server configuration size is "Small". You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use. We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users. + mlflow_version: The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see How it works. + automatic_model_registration: Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False. + weekly_maintenance_window_start: The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30. + tags: Tags consisting of key-value pairs used to manage metadata for the tracking server. + s3_bucket_owner_account_id: Expected Amazon Web Services account ID that owns the Amazon S3 bucket for artifact storage. Defaults to caller's account ID if not provided. + s3_bucket_owner_verification: Enable Amazon S3 Ownership checks when interacting with Amazon S3 buckets from a SageMaker Managed MLflow Tracking Server. Defaults to True if not provided. session: Boto3 session. region: Region name. - + Returns: - The InferenceExperiment resource. - + The MlflowTrackingServer resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19559,68 +18995,62 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating inference_experiment resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "Name": name, - "Type": type, - "Schedule": schedule, - "Description": description, - "RoleArn": role_arn, - "EndpointName": endpoint_name, - "ModelVariants": model_variants, - "DataStorageConfig": data_storage_config, - "ShadowModeConfig": shadow_mode_config, - "KmsKey": kms_key, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="InferenceExperiment", operation_input_args=operation_input_args - ) - + + logger.info("Creating mlflow_tracking_server resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'TrackingServerName': tracking_server_name, + 'ArtifactStoreUri': artifact_store_uri, + 'TrackingServerSize': tracking_server_size, + 'MlflowVersion': mlflow_version, + 'RoleArn': role_arn, + 'AutomaticModelRegistration': automatic_model_registration, + 'WeeklyMaintenanceWindowStart': weekly_maintenance_window_start, + 'Tags': tags, + 'S3BucketOwnerAccountId': s3_bucket_owner_account_id, + 'S3BucketOwnerVerification': s3_bucket_owner_verification, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='MlflowTrackingServer', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_inference_experiment(**operation_input_args) + response = client.create_mlflow_tracking_server(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(name=name, session=session, region=region) - + + return cls.get(tracking_server_name=tracking_server_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - name: StrPipeVar, + tracking_server_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceExperiment"]: + ) -> Optional["MlflowTrackingServer"]: """ - Get a InferenceExperiment resource - + Get a MlflowTrackingServer resource + Parameters: - name: The name of the inference experiment to describe. + tracking_server_name: The name of the MLflow Tracking Server to describe. session: Boto3 session. region: Region name. - + Returns: - The InferenceExperiment resource. - + The MlflowTrackingServer resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19631,38 +19061,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Name": name, + 'TrackingServerName': tracking_server_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_inference_experiment(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_mlflow_tracking_server(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeInferenceExperimentResponse") - inference_experiment = cls(**transformed_response) - return inference_experiment - + transformed_response = transform(response, 'DescribeMlflowTrackingServerResponse') + mlflow_tracking_server = cls(**transformed_response) + return mlflow_tracking_server + @Base.add_validate_call def refresh( self, - ) -> Optional["InferenceExperiment"]: + + ) -> Optional["MlflowTrackingServer"]: """ - Refresh a InferenceExperiment resource - + Refresh a MlflowTrackingServer resource + Returns: - The InferenceExperiment resource. - + The MlflowTrackingServer resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19673,39 +19102,40 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Name": self.name, + 'TrackingServerName': self.tracking_server_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_inference_experiment(**operation_input_args) - + response = client.describe_mlflow_tracking_server(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeInferenceExperimentResponse", self) + transform(response, 'DescribeMlflowTrackingServerResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( self, - schedule: Optional[InferenceExperimentSchedule] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - model_variants: Optional[List[ModelVariantConfig]] = Unassigned(), - data_storage_config: Optional[InferenceExperimentDataStorageConfig] = Unassigned(), - shadow_mode_config: Optional[ShadowModeConfig] = Unassigned(), - ) -> Optional["InferenceExperiment"]: + artifact_store_uri: Optional[StrPipeVar] = Unassigned(), + tracking_server_size: Optional[StrPipeVar] = Unassigned(), + automatic_model_registration: Optional[bool] = Unassigned(), + weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), + s3_bucket_owner_account_id: Optional[StrPipeVar] = Unassigned(), + s3_bucket_owner_verification: Optional[bool] = Unassigned(), + ) -> Optional["MlflowTrackingServer"]: """ - Update a InferenceExperiment resource - + Update a MlflowTrackingServer resource + Returns: - The InferenceExperiment resource. - + The MlflowTrackingServer resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19715,41 +19145,44 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating inference_experiment resource.") + + logger.info("Updating mlflow_tracking_server resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "Name": self.name, - "Schedule": schedule, - "Description": description, - "ModelVariants": model_variants, - "DataStorageConfig": data_storage_config, - "ShadowModeConfig": shadow_mode_config, + 'TrackingServerName': self.tracking_server_name, + 'ArtifactStoreUri': artifact_store_uri, + 'TrackingServerSize': tracking_server_size, + 'AutomaticModelRegistration': automatic_model_registration, + 'WeeklyMaintenanceWindowStart': weekly_maintenance_window_start, + 'S3BucketOwnerAccountId': s3_bucket_owner_account_id, + 'S3BucketOwnerVerification': s3_bucket_owner_verification, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_inference_experiment(**operation_input_args) + response = client.update_mlflow_tracking_server(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a InferenceExperiment resource - + Delete a MlflowTrackingServer resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19758,38 +19191,39 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "Name": self.name, + 'TrackingServerName': self.tracking_server_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_inference_experiment(**operation_input_args) - + + client.delete_mlflow_tracking_server(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + @Base.add_validate_call def start( self, + session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ - Start a InferenceExperiment resource - + Start a MlflowTrackingServer resource + Parameters: session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19801,29 +19235,29 @@ def start( ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "Name": self.name, + 'TrackingServerName': self.tracking_server_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling start_inference_experiment API") - response = client.start_inference_experiment(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling start_mlflow_tracking_server API") + response = client.start_mlflow_tracking_server(**operation_input_args) logger.debug(f"Response: {response}") - + + @Base.add_validate_call def stop(self) -> None: """ - Stop a InferenceExperiment resource - + Stop a MlflowTrackingServer resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19835,127 +19269,163 @@ def stop(self) -> None: ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "Name": self.name, - "ModelVariantActions": self.model_variant_actions, - "DesiredModelVariants": self.desired_model_variants, - "DesiredState": self.desired_state, - "Reason": self.reason, + 'TrackingServerName': self.tracking_server_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_inference_experiment(**operation_input_args) - + + client.stop_mlflow_tracking_server(**operation_input_args) + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Creating", - "Created", - "Updating", - "Running", - "Starting", - "Stopping", - "Completed", - "Cancelled", - ], + target_status: Literal['Creating', 'Created', 'CreateFailed', 'Updating', 'Updated', 'UpdateFailed', 'Deleting', 'DeleteFailed', 'Stopping', 'Stopped', 'StopFailed', 'Starting', 'Started', 'StartFailed', 'MaintenanceInProgress', 'MaintenanceComplete', 'MaintenanceFailed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a InferenceExperiment resource to reach certain status. - + Wait for a MlflowTrackingServer resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task( - f"Waiting for InferenceExperiment to reach [bold]{target_status} status..." - ) + progress.add_task(f"Waiting for MlflowTrackingServer to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.status + current_status = self.tracking_server_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="MlflowTrackingServer", status=current_status, reason='(Unknown)') + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="InferenceExperiment", status=current_status - ) + raise TimeoutExceededError(resource_type="MlflowTrackingServer", status=current_status) time.sleep(poll) - + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: + """ + Wait for a MlflowTrackingServer resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for MlflowTrackingServer to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.tracking_server_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="MlflowTrackingServer", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, - name_contains: Optional[StrPipeVar] = Unassigned(), - type: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + tracking_server_status: Optional[StrPipeVar] = Unassigned(), + mlflow_version: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["InferenceExperiment"]: + ) -> ResourceIterator["MlflowTrackingServer"]: """ - Get all InferenceExperiment resources - + Get all MlflowTrackingServer resources + Parameters: - name_contains: Selects inference experiments whose names contain this name. - type: Selects inference experiments of this type. For the possible types of inference experiments, see CreateInferenceExperiment. - status_equals: Selects inference experiments which are in this status. For the possible statuses, see DescribeInferenceExperiment. - creation_time_after: Selects inference experiments which were created after this timestamp. - creation_time_before: Selects inference experiments which were created before this timestamp. - last_modified_time_after: Selects inference experiments which were last modified after this timestamp. - last_modified_time_before: Selects inference experiments which were last modified before this timestamp. - sort_by: The column by which to sort the listed inference experiments. - sort_order: The direction of sorting (ascending or descending). - next_token: The response from the last list when returning a list large enough to need tokening. - max_results: The maximum number of results to select. + created_after: Use the CreatedAfter filter to only list tracking servers created after a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedAfter parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. + created_before: Use the CreatedBefore filter to only list tracking servers created before a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedBefore parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. + tracking_server_status: Filter for tracking servers with a specified creation status. + mlflow_version: Filter for tracking servers using the specified MLflow version. + sort_by: Filter for trackings servers sorting by name, creation time, or creation status. + sort_order: Change the order of the listed tracking servers. By default, tracking servers are listed in Descending order by creation time. To change the list order, you can specify SortOrder to be Ascending. + next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. + max_results: The maximum number of tracking servers to list. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed InferenceExperiment resources. - + Iterator for listed MlflowTrackingServer resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -19965,158 +19435,154 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NameContains": name_contains, - "Type": type, - "StatusEquals": status_equals, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'TrackingServerStatus': tracking_server_status, + 'MlflowVersion': mlflow_version, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_inference_experiments", - summaries_key="InferenceExperiments", - summary_name="InferenceExperimentSummary", - resource_cls=InferenceExperiment, - list_method_kwargs=operation_input_args, + list_method='list_mlflow_tracking_servers', + summaries_key='TrackingServerSummaries', + summary_name='TrackingServerSummary', + resource_cls=MlflowTrackingServer, + list_method_kwargs=operation_input_args ) -class InferenceRecommendationsJob(Base): +class Model(Base): """ - Class representing resource InferenceRecommendationsJob - + Class representing resource Model + Attributes: - job_name: The name of the job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - job_type: The job type that you provided when you initiated the job. - job_arn: The Amazon Resource Name (ARN) of the job. - role_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role you provided when you initiated the job. - status: The status of the job. - creation_time: A timestamp that shows when the job was created. - last_modified_time: A timestamp that shows when the job was last modified. - input_config: Returns information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations you provided when you initiated the job. - job_description: The job description that you provided when you initiated the job. - completion_time: A timestamp that shows when the job completed. - failure_reason: If the job fails, provides information why the job failed. - stopping_conditions: The stopping conditions that you provided when you initiated the job. - endpoint_configuration_tuning: - inference_recommendations: The recommendations made by Inference Recommender. - endpoint_performances: The performance results from running an Inference Recommender job on an existing endpoint. - output_config: - + model_name: Name of the SageMaker model. + creation_time: A timestamp that shows when the model was created. + model_arn: The Amazon Resource Name (ARN) of the model. + primary_container: The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production. + containers: The containers in the inference pipeline. + inference_execution_config: Specifies details of how containers in a multi-container endpoint are called. + execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that you specified for the model. + vpc_config: A VpcConfig object that specifies the VPC that this model has access to. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud + enable_network_isolation: If True, no inbound or outbound network calls can be made to or from the model container. + deployment_recommendation: A set of recommended deployment configurations for the model. + """ - - job_name: StrPipeVar - job_description: Optional[StrPipeVar] = Unassigned() - job_type: Optional[StrPipeVar] = Unassigned() - job_arn: Optional[StrPipeVar] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() + model_name: StrPipeVar + primary_container: Optional[ContainerDefinition] = Unassigned() + containers: Optional[List[ContainerDefinition]] = Unassigned() + inference_execution_config: Optional[InferenceExecutionConfig] = Unassigned() + execution_role_arn: Optional[StrPipeVar] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - completion_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - input_config: Optional[RecommendationJobInputConfig] = Unassigned() - stopping_conditions: Optional[RecommendationJobStoppingConditions] = Unassigned() - endpoint_configuration_tuning: Optional[RecommendationJobEndpointConfigurationTuning] = ( - Unassigned() - ) - inference_recommendations: Optional[List[InferenceRecommendation]] = Unassigned() - endpoint_performances: Optional[List[EndpointPerformance]] = Unassigned() - output_config: Optional[RecommendationJobOutputConfig] = Unassigned() - + model_arn: Optional[StrPipeVar] = Unassigned() + enable_network_isolation: Optional[bool] = Unassigned() + deployment_recommendation: Optional[DeploymentRecommendation] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "inference_recommendations_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object inference_recommendations_job") + logger.error("Name attribute not found for object model") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "role_arn": {"type": "string"}, - "input_config": { - "volume_kms_key_id": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, + config_schema_for_resource = \ + { + "primary_container": { + "model_data_source": { + "s3_data_source": { + "s3_uri": { + "type": "string" }, + "s3_data_type": { + "type": "string" + }, + "manifest_s3_uri": { + "type": "string" + } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "InferenceRecommendationsJob", **kwargs - ), - ) - + }, + "execution_role_arn": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Model", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - job_name: StrPipeVar, - job_type: StrPipeVar, - role_arn: StrPipeVar, - input_config: RecommendationJobInputConfig, - job_description: Optional[StrPipeVar] = Unassigned(), - stopping_conditions: Optional[RecommendationJobStoppingConditions] = Unassigned(), - endpoint_configuration_tuning: Optional[ - RecommendationJobEndpointConfigurationTuning - ] = Unassigned(), - output_config: Optional[RecommendationJobOutputConfig] = Unassigned(), + model_name: StrPipeVar, + primary_container: Optional[ContainerDefinition] = Unassigned(), + containers: Optional[List[ContainerDefinition]] = Unassigned(), + inference_execution_config: Optional[InferenceExecutionConfig] = Unassigned(), + execution_role_arn: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), + vpc_config: Optional[VpcConfig] = Unassigned(), + enable_network_isolation: Optional[bool] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceRecommendationsJob"]: + ) -> Optional["Model"]: """ - Create a InferenceRecommendationsJob resource - + Create a Model resource + Parameters: - job_name: A name for the recommendation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account. The job name is passed down to the resources created by the recommendation job. The names of resources (such as the model, endpoint configuration, endpoint, and compilation) that are prefixed with the job name are truncated at 40 characters. - job_type: Defines the type of recommendation job. Specify Default to initiate an instance recommendation and Advanced to initiate a load test. If left unspecified, Amazon SageMaker Inference Recommender will run an instance recommendation (DEFAULT) job. - role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf. - input_config: Provides information about the versioned model package Amazon Resource Name (ARN), the traffic pattern, and endpoint configurations. - job_description: Description of the recommendation job. - stopping_conditions: A set of conditions for stopping a recommendation job. If any of the conditions are met, the job is automatically stopped. - endpoint_configuration_tuning: - output_config: Provides information about the output artifacts and the KMS key to use for Amazon S3 server-side encryption. - tags: The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. + model_name: The name of the new model. + primary_container: The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions. + containers: Specifies the containers in the inference pipeline. + inference_execution_config: Specifies details of how containers in a multi-container endpoint are called. + execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles. To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission. + 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. + vpc_config: A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud. + enable_network_isolation: Isolates the model container. No inbound or outbound network calls can be made to or from the model container. session: Boto3 session. region: Region name. - + Returns: - The InferenceRecommendationsJob resource. - + The Model resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20125,66 +19591,60 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating inference_recommendations_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobName": job_name, - "JobType": job_type, - "RoleArn": role_arn, - "InputConfig": input_config, - "JobDescription": job_description, - "StoppingConditions": stopping_conditions, - "EndpointConfigurationTuning": endpoint_configuration_tuning, - "OutputConfig": output_config, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="InferenceRecommendationsJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating model resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ModelName': model_name, + 'PrimaryContainer': primary_container, + 'Containers': containers, + 'InferenceExecutionConfig': inference_execution_config, + 'ExecutionRoleArn': execution_role_arn, + 'Tags': tags, + 'VpcConfig': vpc_config, + 'EnableNetworkIsolation': enable_network_isolation, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Model', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_inference_recommendations_job(**operation_input_args) + response = client.create_model(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(job_name=job_name, session=session, region=region) - + + return cls.get(model_name=model_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - job_name: StrPipeVar, + model_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["InferenceRecommendationsJob"]: + ) -> Optional["Model"]: """ - Get a InferenceRecommendationsJob resource - + Get a Model resource + Parameters: - job_name: The name of the job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + model_name: The name of the model. session: Boto3 session. region: Region name. - + Returns: - The InferenceRecommendationsJob resource. - + The Model resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20193,40 +19653,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobName": job_name, + 'ModelName': model_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_inference_recommendations_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeInferenceRecommendationsJobResponse") - inference_recommendations_job = cls(**transformed_response) - return inference_recommendations_job - + transformed_response = transform(response, 'DescribeModelOutput') + model = cls(**transformed_response) + return model + @Base.add_validate_call def refresh( self, - ) -> Optional["InferenceRecommendationsJob"]: + + ) -> Optional["Model"]: """ - Refresh a InferenceRecommendationsJob resource - + Refresh a Model resource + Returns: - The InferenceRecommendationsJob resource. - + The Model resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20235,32 +19693,32 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "JobName": self.job_name, + 'ModelName': self.model_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_inference_recommendations_job(**operation_input_args) - + response = client.describe_model(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeInferenceRecommendationsJobResponse", self) + transform(response, 'DescribeModelOutput', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a InferenceRecommendationsJob resource - + Delete a Model resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20269,222 +19727,52 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "JobName": self.job_name, + 'ModelName': self.model_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_inference_recommendations_job(**operation_input_args) - + + client.delete_model(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a InferenceRecommendationsJob resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "JobName": self.job_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_inference_recommendations_job(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a InferenceRecommendationsJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["COMPLETED", "FAILED", "STOPPED", "DELETED"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for InferenceRecommendationsJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="InferenceRecommendationsJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="InferenceRecommendationsJob", status=current_status - ) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a InferenceRecommendationsJob resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for InferenceRecommendationsJob to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status.lower() == "deleted": - logger.info("Resource was deleted.") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="InferenceRecommendationsJob", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - model_name_equals: Optional[StrPipeVar] = Unassigned(), - model_package_version_arn_equals: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["InferenceRecommendationsJob"]: + ) -> ResourceIterator["Model"]: """ - Get all InferenceRecommendationsJob resources - + Get all Model resources + Parameters: - creation_time_after: A filter that returns only jobs created after the specified time (timestamp). - creation_time_before: A filter that returns only jobs created before the specified time (timestamp). - last_modified_time_after: A filter that returns only jobs that were last modified after the specified time (timestamp). - last_modified_time_before: A filter that returns only jobs that were last modified before the specified time (timestamp). - name_contains: A string in the job name. This filter returns only recommendations whose name contains the specified string. - status_equals: A filter that retrieves only inference recommendations jobs with a specific status. - sort_by: The parameter by which to sort the results. - sort_order: The sort order for the results. - next_token: If the response to a previous ListInferenceRecommendationsJobsRequest request was truncated, the response includes a NextToken. To retrieve the next set of recommendations, use the token in the next request. - max_results: The maximum number of recommendations to return in the response. - model_name_equals: A filter that returns only jobs that were created for this model. - model_package_version_arn_equals: A filter that returns only jobs that were created for this versioned model package. + sort_by: Sorts the list of results. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. + next_token: If the response to a previous ListModels request was truncated, the response includes a NextToken. To retrieve the next set of models, use the token in the next request. + max_results: The maximum number of models to return in the response. + name_contains: A string in the model name. This filter returns only models whose name contains the specified string. + creation_time_before: A filter that returns only models created before the specified time (timestamp). + creation_time_after: A filter that returns only models with a creation time greater than or equal to the specified time (timestamp). session: Boto3 session. region: Region name. - + Returns: - Iterator for listed InferenceRecommendationsJob resources. - + Iterator for listed Model resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20494,59 +19782,52 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - "ModelNameEquals": model_name_equals, - "ModelPackageVersionArnEquals": model_package_version_arn_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_inference_recommendations_jobs", - summaries_key="InferenceRecommendationsJobs", - summary_name="InferenceRecommendationsJob", - resource_cls=InferenceRecommendationsJob, - list_method_kwargs=operation_input_args, + list_method='list_models', + summaries_key='Models', + summary_name='ModelSummary', + resource_cls=Model, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call - def get_all_steps( + def get_all_metadata( self, - step_type: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, + search_expression: Optional[ModelMetadataSearchExpression] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, - ) -> ResourceIterator[InferenceRecommendationsJobStep]: + ) -> ResourceIterator[ModelMetadataSummary]: """ - Returns a list of the subtasks for an Inference Recommender job. - + Lists the domain, framework, task, and model name of standard machine learning models found in common model zoos. + Parameters: - step_type: A filter to return details about the specified type of subtask. BENCHMARK: Evaluate the performance of your model on different instance types. - max_results: The maximum number of results to return. - next_token: A token that you can specify to return more results from the list. Specify this field if you have a token that was returned from a previous request. + search_expression: One or more filters that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. Specify the Framework, FrameworkVersion, Domain or Task to filter supported. Filter names and values are case-sensitive. + next_token: If the response to a previous ListModelMetadataResponse request was truncated, the response includes a NextToken. To retrieve the next set of model metadata, use the token in the next request. + max_results: The maximum number of models to return in the response. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed InferenceRecommendationsJobStep. - + Iterator for listed ModelMetadataSummary. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20555,171 +19836,189 @@ def get_all_steps( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "JobName": self.job_name, - "Status": self.status, - "StepType": step_type, + 'SearchExpression': search_expression, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_inference_recommendations_job_steps", - summaries_key="Steps", - summary_name="InferenceRecommendationsJobStep", - resource_cls=InferenceRecommendationsJobStep, - list_method_kwargs=operation_input_args, + list_method='list_model_metadata', + summaries_key='ModelMetadataSummaries', + summary_name='ModelMetadataSummary', + resource_cls=ModelMetadataSummary, + list_method_kwargs=operation_input_args ) -class LabelingJob(Base): +class ModelBiasJobDefinition(Base): """ - Class representing resource LabelingJob - + Class representing resource ModelBiasJobDefinition + Attributes: - labeling_job_status: The processing status of the labeling job. - label_counters: Provides a breakdown of the number of data objects labeled by humans, the number of objects labeled by machine, the number of objects than couldn't be labeled, and the total number of objects labeled. - creation_time: The date and time that the labeling job was created. - last_modified_time: The date and time that the labeling job was last updated. - job_reference_code: A unique identifier for work done as part of a labeling job. - labeling_job_name: The name assigned to the labeling job when it was created. - labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job. - input_config: Input configuration information 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. - output_config: The location of the job's output data and the Amazon Web Services Key Management Service key ID for the key used to encrypt the output data, if any. - role_arn: The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during data labeling. - human_task_config: Configuration information required for human workers to complete a labeling task. - failure_reason: If the job failed, the reason that it failed. - label_attribute_name: The attribute used as the label in the output manifest file. - task_rendering_role_arn: - label_category_config_s3_uri: The S3 location of the JSON file that defines the categories used to label data objects. Please note the following label-category limits: Semantic segmentation labeling jobs using automated labeling: 20 labels Box bounding labeling jobs (all): 10 labels The file is a JSON structure in the following format: { "document-version": "2018-11-28" "labels": [ { "label": "label 1" }, { "label": "label 2" }, ... { "label": "label n" } ] } - stopping_conditions: A set of conditions for stopping a labeling job. If any of the conditions are met, the job is automatically stopped. - labeling_job_algorithms_config: Configuration information for automated data labeling. - 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. - labeling_job_output: The location of the output produced by the labeling job. - + job_definition_arn: The Amazon Resource Name (ARN) of the model bias job. + job_definition_name: The name of the bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + creation_time: The time at which the model bias job was created. + model_bias_app_specification: Configures the model bias job to run a specified Docker container image. + model_bias_job_input: Inputs for the model bias job. + model_bias_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. + model_bias_baseline_config: The baseline configuration for a model bias job. + network_config: Networking options for a model bias job. + stopping_condition: + """ - - labeling_job_name: StrPipeVar - labeling_job_status: Optional[StrPipeVar] = Unassigned() - label_counters: Optional[LabelCounters] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() + job_definition_name: StrPipeVar + job_definition_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - job_reference_code: Optional[StrPipeVar] = Unassigned() - labeling_job_arn: Optional[StrPipeVar] = Unassigned() - label_attribute_name: Optional[StrPipeVar] = Unassigned() - input_config: Optional[LabelingJobInputConfig] = Unassigned() - output_config: Optional[LabelingJobOutputConfig] = Unassigned() + model_bias_baseline_config: Optional[ModelBiasBaselineConfig] = Unassigned() + model_bias_app_specification: Optional[ModelBiasAppSpecification] = Unassigned() + model_bias_job_input: Optional[ModelBiasJobInput] = Unassigned() + model_bias_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() + job_resources: Optional[MonitoringResources] = Unassigned() + network_config: Optional[MonitoringNetworkConfig] = Unassigned() role_arn: Optional[StrPipeVar] = Unassigned() - task_rendering_role_arn: Optional[StrPipeVar] = Unassigned() - label_category_config_s3_uri: Optional[StrPipeVar] = Unassigned() - stopping_conditions: Optional[LabelingJobStoppingConditions] = Unassigned() - labeling_job_algorithms_config: Optional[LabelingJobAlgorithmsConfig] = Unassigned() - human_task_config: Optional[HumanTaskConfig] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - labeling_job_output: Optional[LabelingJobOutput] = Unassigned() - + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "labeling_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_bias_job_definition_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object labeling_job") + logger.error("Name attribute not found for object model_bias_job_definition") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "input_config": { - "data_source": {"s3_data_source": {"manifest_s3_uri": {"type": "string"}}} - }, - "output_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "human_task_config": {"ui_config": {"ui_template_s3_uri": {"type": "string"}}}, - "label_category_config_s3_uri": {"type": "string"}, - "labeling_job_algorithms_config": { - "labeling_job_resource_config": { - "volume_kms_key_id": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - } - }, - "labeling_job_output": {"output_dataset_s3_uri": {"type": "string"}}, + config_schema_for_resource = \ + { + "model_bias_job_input": { + "ground_truth_s3_input": { + "s3_uri": { + "type": "string" + } + }, + "endpoint_input": { + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + }, + "batch_transform_input": { + "data_captured_destination_s3_uri": { + "type": "string" + }, + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "LabelingJob", **kwargs - ), - ) - + }, + "model_bias_job_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "job_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + }, + "model_bias_baseline_config": { + "constraints_resource": { + "s3_uri": { + "type": "string" + } + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelBiasJobDefinition", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - labeling_job_name: StrPipeVar, - label_attribute_name: StrPipeVar, - input_config: LabelingJobInputConfig, - output_config: LabelingJobOutputConfig, + job_definition_name: StrPipeVar, + model_bias_app_specification: ModelBiasAppSpecification, + model_bias_job_input: ModelBiasJobInput, + model_bias_job_output_config: MonitoringOutputConfig, + job_resources: MonitoringResources, role_arn: StrPipeVar, - human_task_config: HumanTaskConfig, - task_rendering_role_arn: Optional[StrPipeVar] = Unassigned(), - label_category_config_s3_uri: Optional[StrPipeVar] = Unassigned(), - stopping_conditions: Optional[LabelingJobStoppingConditions] = Unassigned(), - labeling_job_algorithms_config: Optional[LabelingJobAlgorithmsConfig] = Unassigned(), + model_bias_baseline_config: Optional[ModelBiasBaselineConfig] = Unassigned(), + network_config: Optional[MonitoringNetworkConfig] = Unassigned(), + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["LabelingJob"]: + ) -> Optional["ModelBiasJobDefinition"]: """ - Create a LabelingJob resource - + Create a ModelBiasJobDefinition resource + Parameters: - 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. - 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. - 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. - 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. - 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. - human_task_config: Configures the labeling task and how it is presented to workers; including, but not limited to price, keywords, and batch size (task count). - task_rendering_role_arn: - label_category_config_s3_uri: The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects. For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs. For named entity recognition jobs, in addition to "labels", you must provide worker instructions in the label category configuration file using the "instructions" parameter: "instructions": {"shortInstruction":"<h1>Add header</h1><p>Add Instructions</p>", "fullInstruction":"<p>Add additional instructions.</p>"}. For details and an example, see Create a Named Entity Recognition Labeling Job (API) . For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1, label_2,...,label_n with your label categories. { "document-version": "2018-11-28", "labels": [{"label": "label_1"},{"label": "label_2"},...{"label": "label_n"}] } Note the following about the label category configuration file: For image classification and text classification (single and multi-label) you must specify at least two label categories. For all other task types, the minimum number of label categories required is one. Each label category must be unique, you cannot specify duplicate label categories. If you create a 3D point cloud or video frame adjustment or verification labeling job, you must include auditLabelAttributeName in the label category configuration. Use this parameter to enter the LabelAttributeName of the labeling job you want to adjust or verify annotations of. - stopping_conditions: A set of conditions for stopping the labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling. - labeling_job_algorithms_config: Configures the information required to perform automated data labeling. - tags: 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. + job_definition_name: The name of the bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + model_bias_app_specification: Configures the model bias job to run a specified Docker container image. + model_bias_job_input: Inputs for the model bias job. + model_bias_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + model_bias_baseline_config: The baseline configuration for a model bias job. + network_config: Networking options for a model bias job. + stopping_condition: + 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. session: Boto3 session. region: Region name. - + Returns: - The LabelingJob resource. - + The ModelBiasJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20734,62 +20033,57 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating labeling_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "LabelingJobName": labeling_job_name, - "LabelAttributeName": label_attribute_name, - "InputConfig": input_config, - "OutputConfig": output_config, - "RoleArn": role_arn, - "TaskRenderingRoleArn": task_rendering_role_arn, - "LabelCategoryConfigS3Uri": label_category_config_s3_uri, - "StoppingConditions": stopping_conditions, - "LabelingJobAlgorithmsConfig": labeling_job_algorithms_config, - "HumanTaskConfig": human_task_config, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="LabelingJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating model_bias_job_definition resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'JobDefinitionName': job_definition_name, + 'ModelBiasBaselineConfig': model_bias_baseline_config, + 'ModelBiasAppSpecification': model_bias_app_specification, + 'ModelBiasJobInput': model_bias_job_input, + 'ModelBiasJobOutputConfig': model_bias_job_output_config, + 'JobResources': job_resources, + 'NetworkConfig': network_config, + 'RoleArn': role_arn, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelBiasJobDefinition', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_labeling_job(**operation_input_args) + response = client.create_model_bias_job_definition(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(labeling_job_name=labeling_job_name, session=session, region=region) - + + return cls.get(job_definition_name=job_definition_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - labeling_job_name: StrPipeVar, + job_definition_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["LabelingJob"]: + ) -> Optional["ModelBiasJobDefinition"]: """ - Get a LabelingJob resource - + Get a ModelBiasJobDefinition resource + Parameters: - labeling_job_name: The name of the labeling job to return information for. + job_definition_name: The name of the model bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. session: Boto3 session. region: Region name. - + Returns: - The LabelingJob resource. - + The ModelBiasJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20800,38 +20094,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "LabelingJobName": labeling_job_name, + 'JobDefinitionName': job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_labeling_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_bias_job_definition(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeLabelingJobResponse") - labeling_job = cls(**transformed_response) - return labeling_job - + transformed_response = transform(response, 'DescribeModelBiasJobDefinitionResponse') + model_bias_job_definition = cls(**transformed_response) + return model_bias_job_definition + @Base.add_validate_call def refresh( self, - ) -> Optional["LabelingJob"]: + + ) -> Optional["ModelBiasJobDefinition"]: """ - Refresh a LabelingJob resource - + Refresh a ModelBiasJobDefinition resource + Returns: - The LabelingJob resource. - + The ModelBiasJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20842,31 +20135,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "LabelingJobName": self.labeling_job_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_labeling_job(**operation_input_args) - + response = client.describe_model_bias_job_definition(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeLabelingJobResponse", self) + transform(response, 'DescribeModelBiasJobDefinitionResponse', self) return self - + @Base.add_validate_call def delete( self, - name_reuse_enabled: Optional[bool] = Unassigned(), - ) -> None: + + ) -> None: """ - Delete a LabelingJob resource - + Delete a ModelBiasJobDefinition resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20877,28 +20170,53 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "LabelingJobName": self.labeling_job_name, - "NameReuseEnabled": name_reuse_enabled, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_labeling_job(**operation_input_args) - + + client.delete_model_bias_job_definition(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + @classmethod @Base.add_validate_call - def stop(self) -> None: + def get_all( + cls, + endpoint_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ModelBiasJobDefinition"]: """ - Stop a LabelingJob resource - + Get all ModelBiasJobDefinition resources + + Parameters: + endpoint_name: Name of the endpoint to monitor for model bias. + sort_by: Whether to sort results by the Name or CreationTime field. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. + max_results: The maximum number of model bias jobs to return in the response. The default value is 10. + name_contains: Filter for model bias jobs whose name contains a specified string. + creation_time_before: A filter that returns only model bias jobs created before a specified time. + creation_time_after: A filter that returns only model bias jobs created after a specified time. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed ModelBiasJobDefinition resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -20907,225 +20225,125 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "LabelingJobName": self.labeling_job_name, + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, } + custom_key_mapping = {"monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn"} # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_model_bias_job_definitions', + summaries_key='JobDefinitionSummaries', + summary_name='MonitoringJobDefinitionSummary', + resource_cls=ModelBiasJobDefinition, + custom_key_mapping=custom_key_mapping, + list_method_kwargs=operation_input_args + ) - client.stop_labeling_job(**operation_input_args) - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") +class ModelCard(Base): + """ + Class representing resource ModelCard + + Attributes: + model_card_arn: The Amazon Resource Name (ARN) of the model card. + model_card_name: The name of the model card. + model_card_version: The version of the model card. + content: The content of the model card. + model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. + creation_time: The date and time the model card was created. + created_by: + security_config: The security configuration used to protect model card content. + last_modified_time: The date and time the model card was last modified. + last_modified_by: + model_card_processing_status: The processing status of model card deletion. The ModelCardProcessingStatus updates throughout the different deletion steps. DeletePending: Model card deletion request received. DeleteInProgress: Model card deletion is in progress. ContentDeleted: Deleted model card content. ExportJobsDeleted: Deleted all export jobs associated with the model card. DeleteCompleted: Successfully deleted the model card. DeleteFailed: The model card failed to delete. + + """ + model_card_name: StrPipeVar + model_card_arn: Optional[StrPipeVar] = Unassigned() + model_card_version: Optional[int] = Unassigned() + content: Optional[StrPipeVar] = Unassigned() + model_card_status: Optional[StrPipeVar] = Unassigned() + security_config: Optional[ModelCardSecurityConfig] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + model_card_processing_status: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'model_card_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object model_card") + return None - @Base.add_validate_call - def wait( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a LabelingJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["Completed", "Failed", "Stopped"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for LabelingJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.labeling_job_status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="LabelingJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="LabelingJob", status=current_status) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["LabelingJob"]: - """ - Get all LabelingJob resources - - Parameters: - creation_time_after: A filter that returns only labeling jobs created after the specified time (timestamp). - creation_time_before: A filter that returns only labeling jobs created before the specified time (timestamp). - last_modified_time_after: A filter that returns only labeling jobs modified after the specified time (timestamp). - last_modified_time_before: A filter that returns only labeling jobs modified before the specified time (timestamp). - max_results: The maximum number of labeling jobs to return in each page of the response. - next_token: If the result of the previous ListLabelingJobs request was truncated, the response includes a NextToken. To retrieve the next set of labeling jobs, use the token in the next request. - name_contains: A string in the labeling job name. This filter returns only labeling jobs whose name contains the specified string. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: The sort order for results. The default is Ascending. - status_equals: A filter that retrieves only labeling jobs with a specific status. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed LabelingJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "StatusEquals": status_equals, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_labeling_jobs", - summaries_key="LabelingJobSummaryList", - summary_name="LabelingJobSummary", - resource_cls=LabelingJob, - list_method_kwargs=operation_input_args, - ) - - -class LineageGroup(Base): - """ - Class representing resource LineageGroup - - Attributes: - lineage_group_name: The name of the lineage group. - lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. - display_name: The display name of the lineage group. - description: The description of the lineage group. - creation_time: The creation time of lineage group. - created_by: - last_modified_time: The last modified time of the lineage group. - last_modified_by: - - """ - - lineage_group_name: StrPipeVar - lineage_group_arn: Optional[StrPipeVar] = Unassigned() - display_name: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "lineage_group_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object lineage_group") - return None - - @classmethod + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "security_config": { + "kms_key_id": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelCard", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - lineage_group_name: StrPipeVar, - display_name: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), + model_card_name: StrPipeVar, + content: StrPipeVar, + model_card_status: StrPipeVar, + security_config: Optional[ModelCardSecurityConfig] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["LineageGroup"]: + ) -> Optional["ModelCard"]: """ - Create a LineageGroup resource - + Create a ModelCard resource + Parameters: - lineage_group_name: - display_name: - description: - tags: + model_card_name: The unique name of the model card. + content: The content of the model card. Content must be in model card JSON schema and provided as a string. + model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. + security_config: An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated workloads with highly sensitive data. + tags: Key-value pairs used to manage metadata for model cards. session: Boto3 session. region: Region name. - + Returns: - The LineageGroup resource. - + The ModelCard resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21134,60 +20352,60 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating lineage_group resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "LineageGroupName": lineage_group_name, - "DisplayName": display_name, - "Description": description, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="LineageGroup", operation_input_args=operation_input_args - ) - + + logger.info("Creating model_card resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ModelCardName': model_card_name, + 'SecurityConfig': security_config, + 'Content': content, + 'ModelCardStatus': model_card_status, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelCard', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_lineage_group(**operation_input_args) + response = client.create_model_card(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(lineage_group_name=lineage_group_name, session=session, region=region) - + + return cls.get(model_card_name=model_card_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - lineage_group_name: StrPipeVar, + model_card_name: StrPipeVar, + model_card_version: Optional[int] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["LineageGroup"]: + ) -> Optional["ModelCard"]: """ - Get a LineageGroup resource - + Get a ModelCard resource + Parameters: - lineage_group_name: The name of the lineage group. + model_card_name: The name or Amazon Resource Name (ARN) of the model card to describe. + model_card_version: The version of the model card to describe. If a version is not provided, then the latest version of the model card is described. session: Boto3 session. region: Region name. - + Returns: - The LineageGroup resource. - + The ModelCard resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21198,38 +20416,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "LineageGroupName": lineage_group_name, + 'ModelCardName': model_card_name, + 'ModelCardVersion': model_card_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_lineage_group(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_card(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeLineageGroupResponse") - lineage_group = cls(**transformed_response) - return lineage_group - + transformed_response = transform(response, 'DescribeModelCardResponse') + model_card = cls(**transformed_response) + return model_card + @Base.add_validate_call def refresh( self, - ) -> Optional["LineageGroup"]: + + ) -> Optional["ModelCard"]: """ - Refresh a LineageGroup resource - + Refresh a ModelCard resource + Returns: - The LineageGroup resource. - + The ModelCard resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21240,30 +20458,37 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "LineageGroupName": self.lineage_group_name, + 'ModelCardName': self.model_card_name, + 'ModelCardVersion': self.model_card_version, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_lineage_group(**operation_input_args) - + response = client.describe_model_card(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeLineageGroupResponse", self) + transform(response, 'DescribeModelCardResponse', self) return self - + + @populate_inputs_decorator @Base.add_validate_call - def delete( + def update( self, - ) -> None: + content: Optional[StrPipeVar] = Unassigned(), + model_card_status: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["ModelCard"]: """ - Delete a LineageGroup resource - + Update a ModelCard resource + + Returns: + The ModelCard resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21272,51 +20497,41 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating model_card resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "LineageGroupName": self.lineage_group_name, + 'ModelCardName': self.model_card_name, + 'Content': content, + 'ModelCardStatus': model_card_status, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_lineage_group(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod + + # create the resource + response = client.update_model_card(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + @Base.add_validate_call - def get_all( - cls, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["LineageGroup"]: + def delete( + self, + + ) -> None: """ - Get all LineageGroup resources - - Parameters: - created_after: A timestamp to filter against lineage groups created after a certain point in time. - created_before: A timestamp to filter against lineage groups created before a certain point in time. - sort_by: The parameter by which to sort the results. The default is CreationTime. - sort_order: The sort order for the results. The default is Ascending. - next_token: If the response is truncated, SageMaker returns this token. To retrieve the next set of algorithms, use it in the subsequent request. - max_results: The maximum number of endpoints to return in the response. This value defaults to 10. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed LineageGroup resources. - + Delete a ModelCard resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21325,50 +20540,107 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client() + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'ModelCardName': self.model_card_name, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_lineage_groups", - summaries_key="LineageGroupSummaries", - summary_name="LineageGroupSummary", - resource_cls=LineageGroup, - list_method_kwargs=operation_input_args, - ) - + + client.delete_model_card(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def get_policy( + def wait_for_status( self, + target_status: Literal['Draft', 'PendingReview', 'Approved', 'Archived'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a ModelCard resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task(f"Waiting for ModelCard to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.model_card_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ModelCard", status=current_status) + time.sleep(poll) + + @classmethod + @Base.add_validate_call + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + model_card_status: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[GetLineageGroupPolicyResponse]: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ModelCard"]: """ - The resource policy for the lineage group. - + Get all ModelCard resources + Parameters: + creation_time_after: Only list model cards that were created after the time specified. + creation_time_before: Only list model cards that were created before the time specified. + max_results: The maximum number of model cards to list. + name_contains: Only list model cards with names that contain the specified string. + model_card_status: Only list model cards with the specified approval status. + next_token: If the response to a previous ListModelCards request was truncated, the response includes a NextToken. To retrieve the next set of model cards, use the token in the next request. + sort_by: Sort model cards by either name or creation time. Sorts by creation time by default. + sort_order: Sort model cards by ascending or descending order. session: Boto3 session. region: Region name. - + Returns: - GetLineageGroupPolicyResponse - + Iterator for listed ModelCard resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21377,98 +20649,60 @@ def get_policy( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "LineageGroupName": self.lineage_group_name, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'ModelCardStatus': model_card_status, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + return ResourceIterator( + client=client, + list_method='list_model_cards', + summaries_key='ModelCardSummaries', + summary_name='ModelCardSummary', + resource_cls=ModelCard, + list_method_kwargs=operation_input_args ) - - logger.debug(f"Calling get_lineage_group_policy API") - response = client.get_lineage_group_policy(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "GetLineageGroupPolicyResponse") - return GetLineageGroupPolicyResponse(**transformed_response) - - -class LineageGroupInternal(Base): - """ - Class representing resource LineageGroupInternal - - Attributes: - lineage_group_name: - customer_details: - display_name: - description: - creation_time: - tags: - lineage_group_arn: - - """ - - lineage_group_name: Union[StrPipeVar, object] - customer_details: CustomerDetails - display_name: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - lineage_group_arn: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "lineage_group_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object lineage_group_internal") - return None - - @classmethod + + @Base.add_validate_call - def create( - cls, - lineage_group_name: Union[StrPipeVar, object], - customer_details: CustomerDetails, - display_name: Optional[StrPipeVar] = Unassigned(), - description: Optional[StrPipeVar] = Unassigned(), - creation_time: Optional[datetime.datetime] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, + def get_all_versions( + self, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, - ) -> Optional["LineageGroupInternal"]: + ) -> ResourceIterator[ModelCardVersionSummary]: """ - Create a LineageGroupInternal resource - + List existing versions of an Amazon SageMaker Model Card. + Parameters: - lineage_group_name: - customer_details: - display_name: - description: - creation_time: - tags: + creation_time_after: Only list model card versions that were created after the time specified. + creation_time_before: Only list model card versions that were created before the time specified. + max_results: The maximum number of model card versions to list. + next_token: If the response to a previous ListModelCardVersions request was truncated, the response includes a NextToken. To retrieve the next set of model card versions, use the token in the next request. + sort_by: Sort listed model card versions by version. Sorts by version by default. + sort_order: Sort model card versions by ascending or descending order. session: Boto3 session. region: Region name. - + Returns: - The LineageGroupInternal resource. - + Iterator for listed ModelCardVersionSummary. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21477,128 +20711,127 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "LineageGroupName": lineage_group_name, - "DisplayName": display_name, - "Description": description, - "CreationTime": creation_time, - "Tags": tags, - "CustomerDetails": customer_details, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'ModelCardName': self.model_card_name, + 'ModelCardStatus': self.model_card_status, + 'SortBy': sort_by, + 'SortOrder': sort_order, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + + return ResourceIterator( + client=client, + list_method='list_model_card_versions', + summaries_key='ModelCardVersionSummaryList', + summary_name='ModelCardVersionSummary', + resource_cls=ModelCardVersionSummary, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling create_lineage_group_internal API") - response = client.create_lineage_group_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateLineageGroupInternalResponse") - return cls(**operation_input_args, **transformed_response) - -class MlflowApp(Base): +class ModelCardExportJob(Base): """ - Class representing resource MlflowApp - + Class representing resource ModelCardExportJob + Attributes: - arn: - name: - artifact_store_uri: - mlflow_version: - role_arn: - status: - url: - model_registration_mode: - account_default_status: - default_domain_id_list: - creation_time: - created_by: - last_modified_time: - last_modified_by: - weekly_maintenance_window_start: - maintenance_status: - + model_card_export_job_name: The name of the model card export job to describe. + model_card_export_job_arn: The Amazon Resource Name (ARN) of the model card export job. + status: The completion status of the model card export job. InProgress: The model card export job is in progress. Completed: The model card export job is complete. Failed: The model card export job failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeModelCardExportJob call. + model_card_name: The name or Amazon Resource Name (ARN) of the model card that the model export job exports. + model_card_version: The version of the model card that the model export job exports. + output_config: The export output details for the model card. + created_at: The date and time that the model export job was created. + last_modified_at: The date and time that the model export job was last modified. + failure_reason: The failure reason if the model export job fails. + export_artifacts: The exported model card artifacts. + """ - - arn: StrPipeVar - name: Optional[StrPipeVar] = Unassigned() - artifact_store_uri: Optional[StrPipeVar] = Unassigned() - mlflow_version: Optional[StrPipeVar] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() + model_card_export_job_arn: StrPipeVar + model_card_export_job_name: Optional[StrPipeVar] = Unassigned() status: Optional[StrPipeVar] = Unassigned() - url: Optional[StrPipeVar] = Unassigned() - model_registration_mode: Optional[StrPipeVar] = Unassigned() - account_default_status: Optional[StrPipeVar] = Unassigned() - default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned() - maintenance_status: Optional[StrPipeVar] = Unassigned() - + model_card_name: Optional[StrPipeVar] = Unassigned() + model_card_version: Optional[int] = Unassigned() + output_config: Optional[ModelCardExportOutputConfig] = Unassigned() + created_at: Optional[datetime.datetime] = Unassigned() + last_modified_at: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + export_artifacts: Optional[ModelCardExportArtifacts] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "mlflow_app_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_card_export_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object mlflow_app") + logger.error("Name attribute not found for object model_card_export_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "output_config": { + "s3_output_path": { + "type": "string" + } + }, + "export_artifacts": { + "s3_export_artifacts": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelCardExportJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - name: StrPipeVar, - artifact_store_uri: StrPipeVar, - role_arn: StrPipeVar, - model_registration_mode: Optional[StrPipeVar] = Unassigned(), - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), - account_default_status: Optional[StrPipeVar] = Unassigned(), - default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + model_card_name: Union[StrPipeVar, object], + model_card_export_job_name: StrPipeVar, + output_config: ModelCardExportOutputConfig, + model_card_version: Optional[int] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["MlflowApp"]: + ) -> Optional["ModelCardExportJob"]: """ - Create a MlflowApp resource - + Create a ModelCardExportJob resource + Parameters: - name: - artifact_store_uri: - role_arn: - model_registration_mode: - weekly_maintenance_window_start: - account_default_status: - default_domain_id_list: - tags: + model_card_name: The name or Amazon Resource Name (ARN) of the model card to export. + model_card_export_job_name: The name of the model card export job. + output_config: The model card output configuration that specifies the Amazon S3 path for exporting. + model_card_version: The version of the model card to export. If a version is not provided, then the latest version of the model card is exported. session: Boto3 session. region: Region name. - + Returns: - The MlflowApp resource. - + The ModelCardExportJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21607,64 +20840,58 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating mlflow_app resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating model_card_export_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "Name": name, - "ArtifactStoreUri": artifact_store_uri, - "RoleArn": role_arn, - "ModelRegistrationMode": model_registration_mode, - "WeeklyMaintenanceWindowStart": weekly_maintenance_window_start, - "AccountDefaultStatus": account_default_status, - "DefaultDomainIdList": default_domain_id_list, - "Tags": tags, + 'ModelCardName': model_card_name, + 'ModelCardVersion': model_card_version, + 'ModelCardExportJobName': model_card_export_job_name, + 'OutputConfig': output_config, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="MlflowApp", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelCardExportJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_mlflow_app(**operation_input_args) + response = client.create_model_card_export_job(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(arn=response["Arn"], session=session, region=region) - + + return cls.get(model_card_export_job_arn=response['ModelCardExportJobArn'], session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - arn: StrPipeVar, + model_card_export_job_arn: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["MlflowApp"]: + ) -> Optional["ModelCardExportJob"]: """ - Get a MlflowApp resource - + Get a ModelCardExportJob resource + Parameters: - arn: + model_card_export_job_arn: The Amazon Resource Name (ARN) of the model card export job to describe. session: Boto3 session. region: Region name. - + Returns: - The MlflowApp resource. - + The ModelCardExportJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21675,38 +20902,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Arn": arn, + 'ModelCardExportJobArn': model_card_export_job_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_mlflow_app(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_card_export_job(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeMlflowAppResponse") - mlflow_app = cls(**transformed_response) - return mlflow_app - + transformed_response = transform(response, 'DescribeModelCardExportJobResponse') + model_card_export_job = cls(**transformed_response) + return model_card_export_job + @Base.add_validate_call def refresh( self, - ) -> Optional["MlflowApp"]: + + ) -> Optional["ModelCardExportJob"]: """ - Refresh a MlflowApp resource - + Refresh a ModelCardExportJob resource + Returns: - The MlflowApp resource. - + The ModelCardExportJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21717,276 +20943,115 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Arn": self.arn, + 'ModelCardExportJobArn': self.model_card_export_job_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_mlflow_app(**operation_input_args) - + response = client.describe_model_card_export_job(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeMlflowAppResponse", self) - return self - - @Base.add_validate_call - def update( - self, - name: Optional[StrPipeVar] = Unassigned(), - artifact_store_uri: Optional[StrPipeVar] = Unassigned(), - model_registration_mode: Optional[StrPipeVar] = Unassigned(), - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), - default_domain_id_list: Optional[List[StrPipeVar]] = Unassigned(), - account_default_status: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["MlflowApp"]: - """ - Update a MlflowApp resource - - Returns: - The MlflowApp resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating mlflow_app resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "Arn": self.arn, - "Name": name, - "ArtifactStoreUri": artifact_store_uri, - "ModelRegistrationMode": model_registration_mode, - "WeeklyMaintenanceWindowStart": weekly_maintenance_window_start, - "DefaultDomainIdList": default_domain_id_list, - "AccountDefaultStatus": account_default_status, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_mlflow_app(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - + transform(response, 'DescribeModelCardExportJobResponse', self) return self - + @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a MlflowApp resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "Arn": self.arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_mlflow_app(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal[ - "Creating", - "Created", - "CreateFailed", - "Updating", - "Updated", - "UpdateFailed", - "Deleting", - "DeleteFailed", - "Deleted", - ], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a MlflowApp resource to reach certain status. - + Wait for a ModelCardExportJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['Completed', 'Failed'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for MlflowApp to reach [bold]{target_status} status...") + progress.add_task("Waiting for ModelCardExportJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="ModelCardExportJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="MlflowApp", status=current_status, reason="(Unknown)" - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="MlflowApp", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a MlflowApp resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for MlflowApp to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status.lower() == "deleted": - logger.info("Resource was deleted.") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="MlflowApp", status=current_status) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e + raise TimeoutExceededError(resource_type="ModelCardExportJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - status: Optional[StrPipeVar] = Unassigned(), - mlflow_version: Optional[StrPipeVar] = Unassigned(), - default_for_domain_id: Optional[StrPipeVar] = Unassigned(), - account_default_status: Optional[StrPipeVar] = Unassigned(), + model_card_name: StrPipeVar, + model_card_version: Optional[int] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + model_card_export_job_name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["MlflowApp"]: + ) -> ResourceIterator["ModelCardExportJob"]: """ - Get all MlflowApp resources - + Get all ModelCardExportJob resources + Parameters: - created_after: - created_before: - status: - mlflow_version: - default_for_domain_id: - account_default_status: - sort_by: - sort_order: - next_token: - max_results: + model_card_name: List export jobs for the model card with the specified name. + model_card_version: List export jobs for the model card with the specified version. + creation_time_after: Only list model card export jobs that were created after the time specified. + creation_time_before: Only list model card export jobs that were created before the time specified. + model_card_export_job_name_contains: Only list model card export jobs with names that contain the specified string. + status_equals: Only list model card export jobs with the specified status. + sort_by: Sort model card export jobs by either name or creation time. Sorts by creation time by default. + sort_order: Sort model card export jobs by ascending or descending order. + next_token: If the response to a previous ListModelCardExportJobs request was truncated, the response includes a NextToken. To retrieve the next set of model card export jobs, use the token in the next request. + max_results: The maximum number of model card export jobs to list. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed MlflowApp resources. - + Iterator for listed ModelCardExportJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -21996,144 +21061,189 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "Status": status, - "MlflowVersion": mlflow_version, - "DefaultForDomainId": default_for_domain_id, - "AccountDefaultStatus": account_default_status, - "SortBy": sort_by, - "SortOrder": sort_order, + 'ModelCardName': model_card_name, + 'ModelCardVersion': model_card_version, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'ModelCardExportJobNameContains': model_card_export_job_name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_mlflow_apps", - summaries_key="Summaries", - summary_name="MlflowAppSummary", - resource_cls=MlflowApp, - list_method_kwargs=operation_input_args, + list_method='list_model_card_export_jobs', + summaries_key='ModelCardExportJobSummaries', + summary_name='ModelCardExportJobSummary', + resource_cls=ModelCardExportJob, + list_method_kwargs=operation_input_args ) -class MlflowTrackingServer(Base): +class ModelExplainabilityJobDefinition(Base): """ - Class representing resource MlflowTrackingServer - + Class representing resource ModelExplainabilityJobDefinition + Attributes: - tracking_server_arn: The ARN of the described tracking server. - tracking_server_name: The name of the described tracking server. - artifact_store_uri: The S3 URI of the general purpose bucket used as the MLflow Tracking Server artifact store. - tracking_server_size: The size of the described tracking server. - mlflow_version: The MLflow version used for the described tracking server. - role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the described MLflow Tracking Server uses to access the artifact store in Amazon S3. - tracking_server_status: The current creation status of the described MLflow Tracking Server. - tracking_server_maintenance_status: The current maintenance status of the described MLflow Tracking Server. - is_active: Whether the described MLflow Tracking Server is currently active. - tracking_server_url: The URL to connect to the MLflow user interface for the described tracking server. - weekly_maintenance_window_start: The day and time of the week when weekly maintenance occurs on the described tracking server. - automatic_model_registration: Whether automatic registration of new MLflow models to the SageMaker Model Registry is enabled. - creation_time: The timestamp of when the described MLflow Tracking Server was created. - created_by: - last_modified_time: The timestamp of when the described MLflow Tracking Server was last modified. - last_modified_by: - upgrade_rollback_version_details: - + job_definition_arn: The Amazon Resource Name (ARN) of the model explainability job. + job_definition_name: The name of the explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + creation_time: The time at which the model explainability job was created. + model_explainability_app_specification: Configures the model explainability job to run a specified Docker container image. + model_explainability_job_input: Inputs for the model explainability job. + model_explainability_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. + model_explainability_baseline_config: The baseline configuration for a model explainability job. + network_config: Networking options for a model explainability job. + stopping_condition: + """ - - tracking_server_name: StrPipeVar - tracking_server_arn: Optional[StrPipeVar] = Unassigned() - artifact_store_uri: Optional[StrPipeVar] = Unassigned() - tracking_server_size: Optional[StrPipeVar] = Unassigned() - mlflow_version: Optional[StrPipeVar] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - tracking_server_status: Optional[StrPipeVar] = Unassigned() - tracking_server_maintenance_status: Optional[StrPipeVar] = Unassigned() - is_active: Optional[StrPipeVar] = Unassigned() - tracking_server_url: Optional[StrPipeVar] = Unassigned() - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned() - automatic_model_registration: Optional[bool] = Unassigned() + job_definition_name: StrPipeVar + job_definition_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - upgrade_rollback_version_details: Optional[UpgradeRollbackVersionDetails] = Unassigned() - + model_explainability_baseline_config: Optional[ModelExplainabilityBaselineConfig] = Unassigned() + model_explainability_app_specification: Optional[ModelExplainabilityAppSpecification] = Unassigned() + model_explainability_job_input: Optional[ModelExplainabilityJobInput] = Unassigned() + model_explainability_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() + job_resources: Optional[MonitoringResources] = Unassigned() + network_config: Optional[MonitoringNetworkConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "mlflow_tracking_server_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_explainability_job_definition_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object mlflow_tracking_server") + logger.error("Name attribute not found for object model_explainability_job_definition") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = {"role_arn": {"type": "string"}} - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "MlflowTrackingServer", **kwargs - ), - ) - + config_schema_for_resource = \ + { + "model_explainability_job_input": { + "endpoint_input": { + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + }, + "batch_transform_input": { + "data_captured_destination_s3_uri": { + "type": "string" + }, + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + } + }, + "model_explainability_job_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "job_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + }, + "model_explainability_baseline_config": { + "constraints_resource": { + "s3_uri": { + "type": "string" + } + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelExplainabilityJobDefinition", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - tracking_server_name: StrPipeVar, - artifact_store_uri: StrPipeVar, + job_definition_name: StrPipeVar, + model_explainability_app_specification: ModelExplainabilityAppSpecification, + model_explainability_job_input: ModelExplainabilityJobInput, + model_explainability_job_output_config: MonitoringOutputConfig, + job_resources: MonitoringResources, role_arn: StrPipeVar, - tracking_server_size: Optional[StrPipeVar] = Unassigned(), - mlflow_version: Optional[StrPipeVar] = Unassigned(), - automatic_model_registration: Optional[bool] = Unassigned(), - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), + model_explainability_baseline_config: Optional[ModelExplainabilityBaselineConfig] = Unassigned(), + network_config: Optional[MonitoringNetworkConfig] = Unassigned(), + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["MlflowTrackingServer"]: + ) -> Optional["ModelExplainabilityJobDefinition"]: """ - Create a MlflowTrackingServer resource - + Create a ModelExplainabilityJobDefinition resource + Parameters: - tracking_server_name: A unique string identifying the tracking server name. This string is part of the tracking server ARN. - artifact_store_uri: The S3 URI for a general purpose bucket to use as the MLflow Tracking Server artifact store. - role_arn: The Amazon Resource Name (ARN) for an IAM role in your account that the MLflow Tracking Server uses to access the artifact store in Amazon S3. The role should have AmazonS3FullAccess permissions. For more information on IAM permissions for tracking server creation, see Set up IAM permissions for MLflow. - tracking_server_size: The size of the tracking server you want to create. You can choose between "Small", "Medium", and "Large". The default MLflow Tracking Server configuration size is "Small". You can choose a size depending on the projected use of the tracking server such as the volume of data logged, number of users, and frequency of use. We recommend using a small tracking server for teams of up to 25 users, a medium tracking server for teams of up to 50 users, and a large tracking server for teams of up to 100 users. - mlflow_version: The version of MLflow that the tracking server uses. To see which MLflow versions are available to use, see How it works. - automatic_model_registration: Whether to enable or disable automatic registration of new MLflow models to the SageMaker Model Registry. To enable automatic model registration, set this value to True. To disable automatic model registration, set this value to False. If not specified, AutomaticModelRegistration defaults to False. - weekly_maintenance_window_start: The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. For example: TUE:03:30. - tags: Tags consisting of key-value pairs used to manage metadata for the tracking server. + job_definition_name: The name of the model explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + model_explainability_app_specification: Configures the model explainability job to run a specified Docker container image. + model_explainability_job_input: Inputs for the model explainability job. + model_explainability_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + model_explainability_baseline_config: The baseline configuration for a model explainability job. + network_config: Networking options for a model explainability job. + stopping_condition: + 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. session: Boto3 session. region: Region name. - + Returns: - The MlflowTrackingServer resource. - + The ModelExplainabilityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -22142,64 +21252,63 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating mlflow_tracking_server resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "TrackingServerName": tracking_server_name, - "ArtifactStoreUri": artifact_store_uri, - "TrackingServerSize": tracking_server_size, - "MlflowVersion": mlflow_version, - "RoleArn": role_arn, - "AutomaticModelRegistration": automatic_model_registration, - "WeeklyMaintenanceWindowStart": weekly_maintenance_window_start, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="MlflowTrackingServer", operation_input_args=operation_input_args - ) - + + logger.info("Creating model_explainability_job_definition resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'JobDefinitionName': job_definition_name, + 'ModelExplainabilityBaselineConfig': model_explainability_baseline_config, + 'ModelExplainabilityAppSpecification': model_explainability_app_specification, + 'ModelExplainabilityJobInput': model_explainability_job_input, + 'ModelExplainabilityJobOutputConfig': model_explainability_job_output_config, + 'JobResources': job_resources, + 'NetworkConfig': network_config, + 'RoleArn': role_arn, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelExplainabilityJobDefinition', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_mlflow_tracking_server(**operation_input_args) + response = client.create_model_explainability_job_definition(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(tracking_server_name=tracking_server_name, session=session, region=region) - + + return cls.get(job_definition_name=job_definition_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - tracking_server_name: StrPipeVar, + job_definition_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["MlflowTrackingServer"]: + ) -> Optional["ModelExplainabilityJobDefinition"]: """ - Get a MlflowTrackingServer resource - + Get a ModelExplainabilityJobDefinition resource + Parameters: - tracking_server_name: The name of the MLflow Tracking Server to describe. + job_definition_name: The name of the model explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. session: Boto3 session. region: Region name. - + Returns: - The MlflowTrackingServer resource. - + The ModelExplainabilityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -22210,38 +21319,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrackingServerName": tracking_server_name, + 'JobDefinitionName': job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_mlflow_tracking_server(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_explainability_job_definition(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeMlflowTrackingServerResponse") - mlflow_tracking_server = cls(**transformed_response) - return mlflow_tracking_server - + transformed_response = transform(response, 'DescribeModelExplainabilityJobDefinitionResponse') + model_explainability_job_definition = cls(**transformed_response) + return model_explainability_job_definition + @Base.add_validate_call def refresh( self, - ) -> Optional["MlflowTrackingServer"]: + + ) -> Optional["ModelExplainabilityJobDefinition"]: """ - Refresh a MlflowTrackingServer resource - + Refresh a ModelExplainabilityJobDefinition resource + Returns: - The MlflowTrackingServer resource. - + The ModelExplainabilityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -22252,82 +21360,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrackingServerName": self.tracking_server_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_mlflow_tracking_server(**operation_input_args) - + response = client.describe_model_explainability_job_definition(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeMlflowTrackingServerResponse", self) - return self - - @populate_inputs_decorator - @Base.add_validate_call - def update( - self, - artifact_store_uri: Optional[StrPipeVar] = Unassigned(), - tracking_server_size: Optional[StrPipeVar] = Unassigned(), - automatic_model_registration: Optional[bool] = Unassigned(), - weekly_maintenance_window_start: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["MlflowTrackingServer"]: - """ - Update a MlflowTrackingServer resource - - Returns: - The MlflowTrackingServer resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating mlflow_tracking_server resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "TrackingServerName": self.tracking_server_name, - "ArtifactStoreUri": artifact_store_uri, - "TrackingServerSize": tracking_server_size, - "AutomaticModelRegistration": automatic_model_registration, - "WeeklyMaintenanceWindowStart": weekly_maintenance_window_start, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_mlflow_tracking_server(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - + transform(response, 'DescribeModelExplainabilityJobDefinitionResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a MlflowTrackingServer resource - + Delete a ModelExplainabilityJobDefinition resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -22338,35 +21395,53 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "TrackingServerName": self.tracking_server_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_mlflow_tracking_server(**operation_input_args) - + + client.delete_model_explainability_job_definition(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + @classmethod @Base.add_validate_call - def start( - self, + def get_all( + cls, + endpoint_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ModelExplainabilityJobDefinition"]: """ - Start a MlflowTrackingServer resource - + Get all ModelExplainabilityJobDefinition resources + Parameters: + endpoint_name: Name of the endpoint to monitor for model explainability. + sort_by: Whether to sort results by the Name or CreationTime field. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. + max_results: The maximum number of jobs to return in the response. The default value is 10. + name_contains: Filter for model explainability jobs whose name contains a specified string. + creation_time_before: A filter that returns only model explainability jobs created before a specified time. + creation_time_after: A filter that returns only model explainability jobs created after a specified time. session: Boto3 session. region: Region name. - + + Returns: + Iterator for listed ModelExplainabilityJobDefinition resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -22375,5243 +21450,313 @@ def start( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "TrackingServerName": self.tracking_server_name, + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, } + custom_key_mapping = {"monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn"} # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + return ResourceIterator( + client=client, + list_method='list_model_explainability_job_definitions', + summaries_key='JobDefinitionSummaries', + summary_name='MonitoringJobDefinitionSummary', + resource_cls=ModelExplainabilityJobDefinition, + custom_key_mapping=custom_key_mapping, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling start_mlflow_tracking_server API") - response = client.start_mlflow_tracking_server(**operation_input_args) - logger.debug(f"Response: {response}") - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a MlflowTrackingServer resource - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "TrackingServerName": self.tracking_server_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_mlflow_tracking_server(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal[ - "Creating", - "Created", - "CreateFailed", - "Updating", - "Updated", - "UpdateFailed", - "Deleting", - "DeleteFailed", - "Stopping", - "Stopped", - "StopFailed", - "Starting", - "Started", - "StartFailed", - "MaintenanceInProgress", - "MaintenanceComplete", - "MaintenanceFailed", - "Upgrading", - "Upgraded", - "UpgradeFailed", - "RollingBack", - "RolledBack", - "RollbackFailed", - ], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a MlflowTrackingServer resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task( - f"Waiting for MlflowTrackingServer to reach [bold]{target_status} status..." - ) - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.tracking_server_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="MlflowTrackingServer", - status=current_status, - reason="(Unknown)", - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="MlflowTrackingServer", status=current_status - ) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a MlflowTrackingServer resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for MlflowTrackingServer to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.tracking_server_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="MlflowTrackingServer", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - tracking_server_status: Optional[StrPipeVar] = Unassigned(), - mlflow_version: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["MlflowTrackingServer"]: - """ - Get all MlflowTrackingServer resources - - Parameters: - created_after: Use the CreatedAfter filter to only list tracking servers created after a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedAfter parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. - created_before: Use the CreatedBefore filter to only list tracking servers created before a specific date and time. Listed tracking servers are shown with a date and time such as "2024-03-16T01:46:56+00:00". The CreatedBefore parameter takes in a Unix timestamp. To convert a date and time into a Unix timestamp, see EpochConverter. - tracking_server_status: Filter for tracking servers with a specified creation status. - mlflow_version: Filter for tracking servers using the specified MLflow version. - sort_by: Filter for trackings servers sorting by name, creation time, or creation status. - sort_order: Change the order of the listed tracking servers. By default, tracking servers are listed in Descending order by creation time. To change the list order, you can specify SortOrder to be Ascending. - next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. - max_results: The maximum number of tracking servers to list. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed MlflowTrackingServer resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "TrackingServerStatus": tracking_server_status, - "MlflowVersion": mlflow_version, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_mlflow_tracking_servers", - summaries_key="TrackingServerSummaries", - summary_name="TrackingServerSummary", - resource_cls=MlflowTrackingServer, - list_method_kwargs=operation_input_args, - ) - - -class Model(Base): - """ - Class representing resource Model - - Attributes: - model_name: Name of the SageMaker model. - creation_time: A timestamp that shows when the model was created. - model_arn: The Amazon Resource Name (ARN) of the model. - primary_container: The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production. - containers: The containers in the inference pipeline. - inference_execution_config: Specifies details of how containers in a multi-container endpoint are called. - execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that you specified for the model. - vpc_config: A VpcConfig object that specifies the VPC that this model has access to. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud - enable_network_isolation: If True, no inbound or outbound network calls can be made to or from the model container. - deployment_recommendation: A set of recommended deployment configurations for the model. - - """ - - model_name: StrPipeVar - primary_container: Optional[ContainerDefinition] = Unassigned() - containers: Optional[List[ContainerDefinition]] = Unassigned() - inference_execution_config: Optional[InferenceExecutionConfig] = Unassigned() - execution_role_arn: Optional[StrPipeVar] = Unassigned() - vpc_config: Optional[VpcConfig] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - model_arn: Optional[StrPipeVar] = Unassigned() - enable_network_isolation: Optional[bool] = Unassigned() - deployment_recommendation: Optional[DeploymentRecommendation] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "primary_container": { - "model_data_source": { - "s3_data_source": { - "s3_uri": {"type": "string"}, - "s3_data_type": {"type": "string"}, - "manifest_s3_uri": {"type": "string"}, - } - } - }, - "execution_role_arn": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Model", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - model_name: StrPipeVar, - primary_container: Optional[ContainerDefinition] = Unassigned(), - containers: Optional[List[ContainerDefinition]] = Unassigned(), - inference_execution_config: Optional[InferenceExecutionConfig] = Unassigned(), - execution_role_arn: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - vpc_config: Optional[VpcConfig] = Unassigned(), - enable_network_isolation: Optional[bool] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Model"]: - """ - Create a Model resource - - Parameters: - model_name: The name of the new model. - primary_container: The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions. - containers: Specifies the containers in the inference pipeline. - inference_execution_config: Specifies details of how containers in a multi-container endpoint are called. - execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles. To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission. - 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. - vpc_config: A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud. - enable_network_isolation: Isolates the model container. No inbound or outbound network calls can be made to or from the model container. - session: Boto3 session. - region: Region name. - - Returns: - The Model resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelName": model_name, - "PrimaryContainer": primary_container, - "Containers": containers, - "InferenceExecutionConfig": inference_execution_config, - "ExecutionRoleArn": execution_role_arn, - "Tags": tags, - "VpcConfig": vpc_config, - "EnableNetworkIsolation": enable_network_isolation, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Model", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(model_name=model_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - model_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Model"]: - """ - Get a Model resource - - Parameters: - model_name: The name of the model. - session: Boto3 session. - region: Region name. - - Returns: - The Model resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelName": model_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelOutput") - model = cls(**transformed_response) - return model - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["Model"]: - """ - Refresh a Model resource - - Returns: - The Model resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelName": self.model_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelOutput", self) - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a Model resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelName": self.model_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod - @Base.add_validate_call - def get_all( - cls, - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Model"]: - """ - Get all Model resources - - Parameters: - sort_by: Sorts the list of results. The default is CreationTime. - sort_order: The sort order for results. The default is Descending. - next_token: If the response to a previous ListModels request was truncated, the response includes a NextToken. To retrieve the next set of models, use the token in the next request. - max_results: The maximum number of models to return in the response. - name_contains: A string in the model name. This filter returns only models whose name contains the specified string. - creation_time_before: A filter that returns only models created before the specified time (timestamp). - creation_time_after: A filter that returns only models with a creation time greater than or equal to the specified time (timestamp). - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed Model resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_models", - summaries_key="Models", - summary_name="ModelSummary", - resource_cls=Model, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def get_all_metadata( - self, - search_expression: Optional[ModelMetadataSearchExpression] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[ModelMetadataSummary]: - """ - Lists the domain, framework, task, and model name of standard machine learning models found in common model zoos. - - Parameters: - search_expression: One or more filters that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. Specify the Framework, FrameworkVersion, Domain or Task to filter supported. Filter names and values are case-sensitive. - next_token: If the response to a previous ListModelMetadataResponse request was truncated, the response includes a NextToken. To retrieve the next set of model metadata, use the token in the next request. - max_results: The maximum number of models to return in the response. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelMetadataSummary. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "SearchExpression": search_expression, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - return ResourceIterator( - client=client, - list_method="list_model_metadata", - summaries_key="ModelMetadataSummaries", - summary_name="ModelMetadataSummary", - resource_cls=ModelMetadataSummary, - list_method_kwargs=operation_input_args, - ) - - -class ModelBiasJobDefinition(Base): - """ - Class representing resource ModelBiasJobDefinition - - Attributes: - job_definition_arn: The Amazon Resource Name (ARN) of the model bias job. - job_definition_name: The name of the bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - creation_time: The time at which the model bias job was created. - model_bias_app_specification: Configures the model bias job to run a specified Docker container image. - model_bias_job_input: Inputs for the model bias job. - model_bias_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. - model_bias_baseline_config: The baseline configuration for a model bias job. - network_config: Networking options for a model bias job. - stopping_condition: - - """ - - job_definition_name: StrPipeVar - job_definition_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - model_bias_baseline_config: Optional[ModelBiasBaselineConfig] = Unassigned() - model_bias_app_specification: Optional[ModelBiasAppSpecification] = Unassigned() - model_bias_job_input: Optional[ModelBiasJobInput] = Unassigned() - model_bias_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() - job_resources: Optional[MonitoringResources] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_bias_job_definition_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_bias_job_definition") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_bias_job_input": { - "ground_truth_s3_input": {"s3_uri": {"type": "string"}}, - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": {"type": "string"}, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_bias_job_output_config": {"kms_key_id": {"type": "string"}}, - "job_resources": {"cluster_config": {"volume_kms_key_id": {"type": "string"}}}, - "role_arn": {"type": "string"}, - "model_bias_baseline_config": { - "constraints_resource": {"s3_uri": {"type": "string"}} - }, - "network_config": { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelBiasJobDefinition", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - job_definition_name: StrPipeVar, - model_bias_app_specification: ModelBiasAppSpecification, - model_bias_job_input: ModelBiasJobInput, - model_bias_job_output_config: MonitoringOutputConfig, - job_resources: MonitoringResources, - role_arn: StrPipeVar, - model_bias_baseline_config: Optional[ModelBiasBaselineConfig] = Unassigned(), - network_config: Optional[MonitoringNetworkConfig] = Unassigned(), - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelBiasJobDefinition"]: - """ - Create a ModelBiasJobDefinition resource - - Parameters: - job_definition_name: The name of the bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - model_bias_app_specification: Configures the model bias job to run a specified Docker container image. - model_bias_job_input: Inputs for the model bias job. - model_bias_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - model_bias_baseline_config: The baseline configuration for a model bias job. - network_config: Networking options for a model bias job. - stopping_condition: - 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. - session: Boto3 session. - region: Region name. - - Returns: - The ModelBiasJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_bias_job_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobDefinitionName": job_definition_name, - "ModelBiasBaselineConfig": model_bias_baseline_config, - "ModelBiasAppSpecification": model_bias_app_specification, - "ModelBiasJobInput": model_bias_job_input, - "ModelBiasJobOutputConfig": model_bias_job_output_config, - "JobResources": job_resources, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelBiasJobDefinition", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_bias_job_definition(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(job_definition_name=job_definition_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - job_definition_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelBiasJobDefinition"]: - """ - Get a ModelBiasJobDefinition resource - - Parameters: - job_definition_name: The name of the model bias job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - session: Boto3 session. - region: Region name. - - Returns: - The ModelBiasJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_bias_job_definition(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelBiasJobDefinitionResponse") - model_bias_job_definition = cls(**transformed_response) - return model_bias_job_definition - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelBiasJobDefinition"]: - """ - Refresh a ModelBiasJobDefinition resource - - Returns: - The ModelBiasJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_bias_job_definition(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelBiasJobDefinitionResponse", self) - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelBiasJobDefinition resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_bias_job_definition(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod - @Base.add_validate_call - def get_all( - cls, - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelBiasJobDefinition"]: - """ - Get all ModelBiasJobDefinition resources - - Parameters: - endpoint_name: Name of the endpoint to monitor for model bias. - sort_by: Whether to sort results by the Name or CreationTime field. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. - max_results: The maximum number of model bias jobs to return in the response. The default value is 10. - name_contains: Filter for model bias jobs whose name contains a specified string. - creation_time_before: A filter that returns only model bias jobs created before a specified time. - creation_time_after: A filter that returns only model bias jobs created after a specified time. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelBiasJobDefinition resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - } - custom_key_mapping = { - "monitoring_job_definition_name": "job_definition_name", - "monitoring_job_definition_arn": "job_definition_arn", - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_bias_job_definitions", - summaries_key="JobDefinitionSummaries", - summary_name="MonitoringJobDefinitionSummary", - resource_cls=ModelBiasJobDefinition, - custom_key_mapping=custom_key_mapping, - list_method_kwargs=operation_input_args, - ) - - -class ModelCard(Base): - """ - Class representing resource ModelCard - - Attributes: - model_card_arn: The Amazon Resource Name (ARN) of the model card. - model_card_name: The name of the model card. - model_card_version: The version of the model card. - content: The content of the model card. - model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. - creation_time: The date and time the model card was created. - created_by: - security_config: The security configuration used to protect model card content. - last_modified_time: The date and time the model card was last modified. - last_modified_by: - model_card_processing_status: The processing status of model card deletion. The ModelCardProcessingStatus updates throughout the different deletion steps. DeletePending: Model card deletion request received. DeleteInProgress: Model card deletion is in progress. ContentDeleted: Deleted model card content. ExportJobsDeleted: Deleted all export jobs associated with the model card. DeleteCompleted: Successfully deleted the model card. DeleteFailed: The model card failed to delete. - - """ - - model_card_name: StrPipeVar - model_card_arn: Optional[StrPipeVar] = Unassigned() - model_card_version: Optional[int] = Unassigned() - content: Optional[StrPipeVar] = Unassigned() - model_card_status: Optional[StrPipeVar] = Unassigned() - security_config: Optional[ModelCardSecurityConfig] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - model_card_processing_status: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_card_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_card") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = {"security_config": {"kms_key_id": {"type": "string"}}} - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelCard", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - model_card_name: StrPipeVar, - content: StrPipeVar, - model_card_status: StrPipeVar, - security_config: Optional[ModelCardSecurityConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelCard"]: - """ - Create a ModelCard resource - - Parameters: - model_card_name: The unique name of the model card. - content: The content of the model card. Content must be in model card JSON schema and provided as a string. - model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. - security_config: An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated workloads with highly sensitive data. - tags: Key-value pairs used to manage metadata for model cards. - session: Boto3 session. - region: Region name. - - Returns: - The ModelCard resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_card resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelCardName": model_card_name, - "SecurityConfig": security_config, - "Content": content, - "ModelCardStatus": model_card_status, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelCard", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_card(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(model_card_name=model_card_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - model_card_name: StrPipeVar, - model_card_version: Optional[int] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelCard"]: - """ - Get a ModelCard resource - - Parameters: - model_card_name: The name or Amazon Resource Name (ARN) of the model card to describe. - model_card_version: The version of the model card to describe. If a version is not provided, then the latest version of the model card is described. - session: Boto3 session. - region: Region name. - - Returns: - The ModelCard resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ModelCardName": model_card_name, - "ModelCardVersion": model_card_version, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_card(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelCardResponse") - model_card = cls(**transformed_response) - return model_card - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelCard"]: - """ - Refresh a ModelCard resource - - Returns: - The ModelCard resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ModelCardName": self.model_card_name, - "ModelCardVersion": self.model_card_version, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_card(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelCardResponse", self) - return self - - @populate_inputs_decorator - @Base.add_validate_call - def update( - self, - content: Optional[StrPipeVar] = Unassigned(), - model_card_status: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["ModelCard"]: - """ - Update a ModelCard resource - - Returns: - The ModelCard resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating model_card resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelCardName": self.model_card_name, - "Content": content, - "ModelCardStatus": model_card_status, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_model_card(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelCard resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelCardName": self.model_card_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_card(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Draft", "PendingReview", "Approved", "Archived"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelCard resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for ModelCard to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.model_card_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="ModelCard", status=current_status) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - model_card_status: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelCard"]: - """ - Get all ModelCard resources - - Parameters: - creation_time_after: Only list model cards that were created after the time specified. - creation_time_before: Only list model cards that were created before the time specified. - max_results: The maximum number of model cards to list. - name_contains: Only list model cards with names that contain the specified string. - model_card_status: Only list model cards with the specified approval status. - next_token: If the response to a previous ListModelCards request was truncated, the response includes a NextToken. To retrieve the next set of model cards, use the token in the next request. - sort_by: Sort model cards by either name or creation time. Sorts by creation time by default. - sort_order: Sort model cards by ascending or descending order. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelCard resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "ModelCardStatus": model_card_status, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_cards", - summaries_key="ModelCardSummaries", - summary_name="ModelCardSummary", - resource_cls=ModelCard, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def get_all_versions( - self, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[ModelCardVersionSummary]: - """ - List existing versions of an Amazon SageMaker Model Card. - - Parameters: - creation_time_after: Only list model card versions that were created after the time specified. - creation_time_before: Only list model card versions that were created before the time specified. - max_results: The maximum number of model card versions to list. - next_token: If the response to a previous ListModelCardVersions request was truncated, the response includes a NextToken. To retrieve the next set of model card versions, use the token in the next request. - sort_by: Sort listed model card versions by version. Sorts by version by default. - sort_order: Sort model card versions by ascending or descending order. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelCardVersionSummary. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "ModelCardName": self.model_card_name, - "ModelCardStatus": self.model_card_status, - "SortBy": sort_by, - "SortOrder": sort_order, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - return ResourceIterator( - client=client, - list_method="list_model_card_versions", - summaries_key="ModelCardVersionSummaryList", - summary_name="ModelCardVersionSummary", - resource_cls=ModelCardVersionSummary, - list_method_kwargs=operation_input_args, - ) - - -class ModelCardExportJob(Base): - """ - Class representing resource ModelCardExportJob - - Attributes: - model_card_export_job_name: The name of the model card export job to describe. - model_card_export_job_arn: The Amazon Resource Name (ARN) of the model card export job. - status: The completion status of the model card export job. InProgress: The model card export job is in progress. Completed: The model card export job is complete. Failed: The model card export job failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeModelCardExportJob call. - model_card_name: The name or Amazon Resource Name (ARN) of the model card that the model export job exports. - model_card_version: The version of the model card that the model export job exports. - output_config: The export output details for the model card. - created_at: The date and time that the model export job was created. - last_modified_at: The date and time that the model export job was last modified. - failure_reason: The failure reason if the model export job fails. - export_artifacts: The exported model card artifacts. - - """ - - model_card_export_job_arn: StrPipeVar - model_card_export_job_name: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - model_card_name: Optional[StrPipeVar] = Unassigned() - model_card_version: Optional[int] = Unassigned() - output_config: Optional[ModelCardExportOutputConfig] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - last_modified_at: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - export_artifacts: Optional[ModelCardExportArtifacts] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_card_export_job_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_card_export_job") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "output_config": {"s3_output_path": {"type": "string"}}, - "export_artifacts": {"s3_export_artifacts": {"type": "string"}}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelCardExportJob", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - model_card_name: Union[StrPipeVar, object], - model_card_export_job_name: StrPipeVar, - output_config: ModelCardExportOutputConfig, - model_card_version: Optional[int] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelCardExportJob"]: - """ - Create a ModelCardExportJob resource - - Parameters: - model_card_name: The name or Amazon Resource Name (ARN) of the model card to export. - model_card_export_job_name: The name of the model card export job. - output_config: The model card output configuration that specifies the Amazon S3 path for exporting. - model_card_version: The version of the model card to export. If a version is not provided, then the latest version of the model card is exported. - session: Boto3 session. - region: Region name. - - Returns: - The ModelCardExportJob resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_card_export_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelCardName": model_card_name, - "ModelCardVersion": model_card_version, - "ModelCardExportJobName": model_card_export_job_name, - "OutputConfig": output_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelCardExportJob", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_card_export_job(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - model_card_export_job_arn=response["ModelCardExportJobArn"], - session=session, - region=region, - ) - - @classmethod - @Base.add_validate_call - def get( - cls, - model_card_export_job_arn: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelCardExportJob"]: - """ - Get a ModelCardExportJob resource - - Parameters: - model_card_export_job_arn: The Amazon Resource Name (ARN) of the model card export job to describe. - session: Boto3 session. - region: Region name. - - Returns: - The ModelCardExportJob resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ModelCardExportJobArn": model_card_export_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_card_export_job(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelCardExportJobResponse") - model_card_export_job = cls(**transformed_response) - return model_card_export_job - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelCardExportJob"]: - """ - Refresh a ModelCardExportJob resource - - Returns: - The ModelCardExportJob resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "ModelCardExportJobArn": self.model_card_export_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_card_export_job(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelCardExportJobResponse", self) - return self - - @Base.add_validate_call - def wait( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelCardExportJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["Completed", "Failed"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for ModelCardExportJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ModelCardExportJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ModelCardExportJob", status=current_status - ) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - model_card_name: StrPipeVar, - model_card_version: Optional[int] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - model_card_export_job_name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelCardExportJob"]: - """ - Get all ModelCardExportJob resources - - Parameters: - model_card_name: List export jobs for the model card with the specified name. - model_card_version: List export jobs for the model card with the specified version. - creation_time_after: Only list model card export jobs that were created after the time specified. - creation_time_before: Only list model card export jobs that were created before the time specified. - model_card_export_job_name_contains: Only list model card export jobs with names that contain the specified string. - status_equals: Only list model card export jobs with the specified status. - sort_by: Sort model card export jobs by either name or creation time. Sorts by creation time by default. - sort_order: Sort model card export jobs by ascending or descending order. - next_token: If the response to a previous ListModelCardExportJobs request was truncated, the response includes a NextToken. To retrieve the next set of model card export jobs, use the token in the next request. - max_results: The maximum number of model card export jobs to list. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelCardExportJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelCardName": model_card_name, - "ModelCardVersion": model_card_version, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "ModelCardExportJobNameContains": model_card_export_job_name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_card_export_jobs", - summaries_key="ModelCardExportJobSummaries", - summary_name="ModelCardExportJobSummary", - resource_cls=ModelCardExportJob, - list_method_kwargs=operation_input_args, - ) - - -class ModelExplainabilityJobDefinition(Base): - """ - Class representing resource ModelExplainabilityJobDefinition - - Attributes: - job_definition_arn: The Amazon Resource Name (ARN) of the model explainability job. - job_definition_name: The name of the explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - creation_time: The time at which the model explainability job was created. - model_explainability_app_specification: Configures the model explainability job to run a specified Docker container image. - model_explainability_job_input: Inputs for the model explainability job. - model_explainability_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3. - model_explainability_baseline_config: The baseline configuration for a model explainability job. - network_config: Networking options for a model explainability job. - stopping_condition: - - """ - - job_definition_name: StrPipeVar - job_definition_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - model_explainability_baseline_config: Optional[ModelExplainabilityBaselineConfig] = Unassigned() - model_explainability_app_specification: Optional[ModelExplainabilityAppSpecification] = ( - Unassigned() - ) - model_explainability_job_input: Optional[ModelExplainabilityJobInput] = Unassigned() - model_explainability_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() - job_resources: Optional[MonitoringResources] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_explainability_job_definition_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_explainability_job_definition") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_explainability_job_input": { - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": {"type": "string"}, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_explainability_job_output_config": {"kms_key_id": {"type": "string"}}, - "job_resources": {"cluster_config": {"volume_kms_key_id": {"type": "string"}}}, - "role_arn": {"type": "string"}, - "model_explainability_baseline_config": { - "constraints_resource": {"s3_uri": {"type": "string"}} - }, - "network_config": { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelExplainabilityJobDefinition", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - job_definition_name: StrPipeVar, - model_explainability_app_specification: ModelExplainabilityAppSpecification, - model_explainability_job_input: ModelExplainabilityJobInput, - model_explainability_job_output_config: MonitoringOutputConfig, - job_resources: MonitoringResources, - role_arn: StrPipeVar, - model_explainability_baseline_config: Optional[ - ModelExplainabilityBaselineConfig - ] = Unassigned(), - network_config: Optional[MonitoringNetworkConfig] = Unassigned(), - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelExplainabilityJobDefinition"]: - """ - Create a ModelExplainabilityJobDefinition resource - - Parameters: - job_definition_name: The name of the model explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - model_explainability_app_specification: Configures the model explainability job to run a specified Docker container image. - model_explainability_job_input: Inputs for the model explainability job. - model_explainability_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - model_explainability_baseline_config: The baseline configuration for a model explainability job. - network_config: Networking options for a model explainability job. - stopping_condition: - 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. - session: Boto3 session. - region: Region name. - - Returns: - The ModelExplainabilityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_explainability_job_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobDefinitionName": job_definition_name, - "ModelExplainabilityBaselineConfig": model_explainability_baseline_config, - "ModelExplainabilityAppSpecification": model_explainability_app_specification, - "ModelExplainabilityJobInput": model_explainability_job_input, - "ModelExplainabilityJobOutputConfig": model_explainability_job_output_config, - "JobResources": job_resources, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelExplainabilityJobDefinition", - operation_input_args=operation_input_args, - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_explainability_job_definition(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(job_definition_name=job_definition_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - job_definition_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelExplainabilityJobDefinition"]: - """ - Get a ModelExplainabilityJobDefinition resource - - Parameters: - job_definition_name: The name of the model explainability job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - session: Boto3 session. - region: Region name. - - Returns: - The ModelExplainabilityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_explainability_job_definition(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform( - response, "DescribeModelExplainabilityJobDefinitionResponse" - ) - model_explainability_job_definition = cls(**transformed_response) - return model_explainability_job_definition - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelExplainabilityJobDefinition"]: - """ - Refresh a ModelExplainabilityJobDefinition resource - - Returns: - The ModelExplainabilityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_explainability_job_definition(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelExplainabilityJobDefinitionResponse", self) - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelExplainabilityJobDefinition resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_explainability_job_definition(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod - @Base.add_validate_call - def get_all( - cls, - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelExplainabilityJobDefinition"]: - """ - Get all ModelExplainabilityJobDefinition resources - - Parameters: - endpoint_name: Name of the endpoint to monitor for model explainability. - sort_by: Whether to sort results by the Name or CreationTime field. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. - max_results: The maximum number of jobs to return in the response. The default value is 10. - name_contains: Filter for model explainability jobs whose name contains a specified string. - creation_time_before: A filter that returns only model explainability jobs created before a specified time. - creation_time_after: A filter that returns only model explainability jobs created after a specified time. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelExplainabilityJobDefinition resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - } - custom_key_mapping = { - "monitoring_job_definition_name": "job_definition_name", - "monitoring_job_definition_arn": "job_definition_arn", - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_explainability_job_definitions", - summaries_key="JobDefinitionSummaries", - summary_name="MonitoringJobDefinitionSummary", - resource_cls=ModelExplainabilityJobDefinition, - custom_key_mapping=custom_key_mapping, - list_method_kwargs=operation_input_args, - ) - -''' -class ModelInternal(Base): - """ - Class representing resource ModelInternal - - Attributes: - model_input: - account_id: - auto_ml_job_arn: - model_output: - - """ - - model_input: CreateModelInput - account_id: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - model_output: Optional[CreateModelOutput] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_internal") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - model_input: CreateModelInput, - account_id: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ModelInternal"]: - """ - Create a ModelInternal resource - - Parameters: - model_input: - account_id: - auto_ml_job_arn: - session: Boto3 session. - region: Region name. - - Returns: - The ModelInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "ModelInput": model_input, - "AccountId": account_id, - "AutoMLJobArn": auto_ml_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_model_internal API") - response = client.create_model_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateModelInternalOutput") - return cls(**operation_input_args, **transformed_response) - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelInternal resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelInput": self.model_input, - "AccountId": self.account_id, - "AutoMLJobArn": self.auto_ml_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_internal(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - -''' -class ModelPackage(Base): - """ - Class representing resource ModelPackage - - Attributes: - model_package_name: The name of the model package being described. - model_package_arn: The Amazon Resource Name (ARN) of the model package. - creation_time: A timestamp specifying when the model package was created. - model_package_status: The current status of the model package. - model_package_status_details: Details about the current status of the model package. - model_package_group_name: If the model is a versioned model, the name of the model group that the versioned model belongs to. - model_package_version: The version of the model package. - model_package_registration_type: - model_package_description: A brief summary of the model package. - inference_specification: Details about inference jobs that you can run with models based on this model package. - source_algorithm_specification: Details about the algorithm that was used to create the model package. - validation_specification: Configurations for one or more transform jobs that SageMaker runs to test the model package. - certify_for_marketplace: Whether the model package is certified for listing on Amazon Web Services Marketplace. - model_approval_status: The approval status of the model package. - created_by: - metadata_properties: - model_metrics: Metrics for the model. - deployment_specification: - last_modified_time: The last time that the model package was modified. - last_modified_by: - approval_description: A description provided for the model approval. - domain: The machine learning domain of the model package you specified. Common machine learning domains include computer vision and natural language processing. - task: The machine learning task you specified that your model package accomplishes. Common machine learning tasks include object detection and image classification. - sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload are stored. This path points to a single gzip compressed tar archive (.tar.gz suffix). - sample_payload_content_type: - customer_metadata_properties: The metadata properties associated with the model package versions. - drift_check_baselines: Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on Drift Detection against Previous Baselines in SageMaker Pipelines in the Amazon SageMaker Developer Guide. - additional_inference_specifications: An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. - skip_model_validation: Indicates if you want to skip model validation. - source_uri: The URI of the source for the model package. - security_config: The KMS Key ID (KMSKeyId) used for encryption of model package information. - model_card: The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version. - model_life_cycle: A structure describing the current state of the model in its life cycle. - - """ - - model_package_name: Optional[str] = Unassigned() - model_package_group_name: Optional[StrPipeVar] = Unassigned() - model_package_version: Optional[int] = Unassigned() - model_package_registration_type: Optional[StrPipeVar] = Unassigned() - model_package_arn: Optional[StrPipeVar] = Unassigned() - model_package_description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - inference_specification: Optional[InferenceSpecification] = Unassigned() - source_algorithm_specification: Optional[SourceAlgorithmSpecification] = Unassigned() - validation_specification: Optional[ModelPackageValidationSpecification] = Unassigned() - model_package_status: Optional[StrPipeVar] = Unassigned() - model_package_status_details: Optional[ModelPackageStatusDetails] = Unassigned() - certify_for_marketplace: Optional[bool] = Unassigned() - model_approval_status: Optional[StrPipeVar] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - model_metrics: Optional[ModelMetrics] = Unassigned() - deployment_specification: Optional[DeploymentSpecification] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - approval_description: Optional[StrPipeVar] = Unassigned() - domain: Optional[StrPipeVar] = Unassigned() - task: Optional[StrPipeVar] = Unassigned() - sample_payload_url: Optional[StrPipeVar] = Unassigned() - sample_payload_content_type: Optional[StrPipeVar] = Unassigned() - customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - drift_check_baselines: Optional[DriftCheckBaselines] = Unassigned() - additional_inference_specifications: Optional[ - List[AdditionalInferenceSpecificationDefinition] - ] = Unassigned() - skip_model_validation: Optional[StrPipeVar] = Unassigned() - source_uri: Optional[StrPipeVar] = Unassigned() - security_config: Optional[ModelPackageSecurityConfig] = Unassigned() - model_card: Optional[ModelPackageModelCard] = Unassigned() - model_life_cycle: Optional[ModelLifeCycle] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_package_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_package") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "validation_specification": {"validation_role": {"type": "string"}}, - "model_metrics": { - "model_quality": { - "statistics": {"s3_uri": {"type": "string"}}, - "constraints": {"s3_uri": {"type": "string"}}, - }, - "model_data_quality": { - "statistics": {"s3_uri": {"type": "string"}}, - "constraints": {"s3_uri": {"type": "string"}}, - }, - "bias": { - "report": {"s3_uri": {"type": "string"}}, - "pre_training_report": {"s3_uri": {"type": "string"}}, - "post_training_report": {"s3_uri": {"type": "string"}}, - }, - "explainability": {"report": {"s3_uri": {"type": "string"}}}, - }, - "drift_check_baselines": { - "bias": { - "config_file": {"s3_uri": {"type": "string"}}, - "pre_training_constraints": {"s3_uri": {"type": "string"}}, - "post_training_constraints": {"s3_uri": {"type": "string"}}, - }, - "explainability": { - "constraints": {"s3_uri": {"type": "string"}}, - "config_file": {"s3_uri": {"type": "string"}}, - }, - "model_quality": { - "statistics": {"s3_uri": {"type": "string"}}, - "constraints": {"s3_uri": {"type": "string"}}, - }, - "model_data_quality": { - "statistics": {"s3_uri": {"type": "string"}}, - "constraints": {"s3_uri": {"type": "string"}}, - }, - }, - "security_config": {"kms_key_id": {"type": "string"}}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelPackage", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - model_package_name: Optional[StrPipeVar] = Unassigned(), - model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - model_package_description: Optional[StrPipeVar] = Unassigned(), - model_package_registration_type: Optional[StrPipeVar] = Unassigned(), - inference_specification: Optional[InferenceSpecification] = Unassigned(), - validation_specification: Optional[ModelPackageValidationSpecification] = Unassigned(), - source_algorithm_specification: Optional[SourceAlgorithmSpecification] = Unassigned(), - certify_for_marketplace: Optional[bool] = Unassigned(), - require_image_scan: Optional[bool] = Unassigned(), - workflow_disabled: Optional[bool] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - model_approval_status: Optional[StrPipeVar] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), - model_metrics: Optional[ModelMetrics] = Unassigned(), - deployment_specification: Optional[DeploymentSpecification] = Unassigned(), - client_token: Optional[StrPipeVar] = Unassigned(), - domain: Optional[StrPipeVar] = Unassigned(), - task: Optional[StrPipeVar] = Unassigned(), - sample_payload_url: Optional[StrPipeVar] = Unassigned(), - sample_payload_content_type: Optional[StrPipeVar] = Unassigned(), - customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - drift_check_baselines: Optional[DriftCheckBaselines] = Unassigned(), - additional_inference_specifications: Optional[ - List[AdditionalInferenceSpecificationDefinition] - ] = Unassigned(), - skip_model_validation: Optional[StrPipeVar] = Unassigned(), - source_uri: Optional[StrPipeVar] = Unassigned(), - security_config: Optional[ModelPackageSecurityConfig] = Unassigned(), - model_card: Optional[ModelPackageModelCard] = Unassigned(), - model_life_cycle: Optional[ModelLifeCycle] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelPackage"]: - """ - Create a ModelPackage resource - - Parameters: - model_package_name: The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). This parameter is required for unversioned models. It is not applicable to versioned models. - model_package_group_name: The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to. This parameter is required for versioned models, and does not apply to unversioned models. - model_package_description: A description of the model package. - model_package_registration_type: - inference_specification: Specifies details about inference jobs that you can run with models based on this model package, including the following information: The Amazon ECR paths of containers that contain the inference code and model artifacts. The instance types that the model package supports for transform jobs and real-time endpoints used for inference. The input and output content formats that the model package supports for inference. - validation_specification: Specifies configurations for one or more transform jobs that SageMaker runs to test the model package. - source_algorithm_specification: Details about the algorithm that was used to create the model package. - certify_for_marketplace: Whether to certify the model package for listing on Amazon Web Services Marketplace. This parameter is optional for unversioned models, and does not apply to versioned models. - require_image_scan: - workflow_disabled: - tags: A list of key value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. If you supply ModelPackageGroupName, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a tag argument. - model_approval_status: Whether the model is approved for deployment. This parameter is optional for versioned models, and does not apply to unversioned models. For versioned models, the value of this parameter must be set to Approved to deploy the model. - metadata_properties: - model_metrics: A structure that contains model metrics reports. - deployment_specification: - client_token: A unique token that guarantees that the call to this API is idempotent. - domain: The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing. - task: The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: "IMAGE_CLASSIFICATION" \| "OBJECT_DETECTION" \| "TEXT_GENERATION" \|"IMAGE_SEGMENTATION" \| "FILL_MASK" \| "CLASSIFICATION" \| "REGRESSION" \| "OTHER". Specify "OTHER" if none of the tasks listed fit your use case. - sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the InvokeEndpoint call. - sample_payload_content_type: - customer_metadata_properties: The metadata properties associated with the model package versions. - drift_check_baselines: Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on Drift Detection against Previous Baselines in SageMaker Pipelines in the Amazon SageMaker Developer Guide. - additional_inference_specifications: An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. - skip_model_validation: Indicates if you want to skip model validation. - source_uri: The URI of the source for the model package. If you want to clone a model package, set it to the model package Amazon Resource Name (ARN). If you want to register a model, set it to the model ARN. - security_config: The KMS Key ID (KMSKeyId) used for encryption of model package information. - model_card: The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version. - model_life_cycle: A structure describing the current state of the model in its life cycle. - session: Boto3 session. - region: Region name. - - Returns: - The ModelPackage resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_package resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelPackageName": model_package_name, - "ModelPackageGroupName": model_package_group_name, - "ModelPackageDescription": model_package_description, - "ModelPackageRegistrationType": model_package_registration_type, - "InferenceSpecification": inference_specification, - "ValidationSpecification": validation_specification, - "SourceAlgorithmSpecification": source_algorithm_specification, - "CertifyForMarketplace": certify_for_marketplace, - "RequireImageScan": require_image_scan, - "WorkflowDisabled": workflow_disabled, - "Tags": tags, - "ModelApprovalStatus": model_approval_status, - "MetadataProperties": metadata_properties, - "ModelMetrics": model_metrics, - "DeploymentSpecification": deployment_specification, - "ClientToken": client_token, - "Domain": domain, - "Task": task, - "SamplePayloadUrl": sample_payload_url, - "SamplePayloadContentType": sample_payload_content_type, - "CustomerMetadataProperties": customer_metadata_properties, - "DriftCheckBaselines": drift_check_baselines, - "AdditionalInferenceSpecifications": additional_inference_specifications, - "SkipModelValidation": skip_model_validation, - "SourceUri": source_uri, - "SecurityConfig": security_config, - "ModelCard": model_card, - "ModelLifeCycle": model_life_cycle, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelPackage", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_package(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - model_package_name=response["ModelPackageName"], session=session, region=region - ) - - @classmethod - @Base.add_validate_call - def get( - cls, - model_package_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelPackage"]: - """ - Get a ModelPackage resource - - Parameters: - model_package_name: The name or Amazon Resource Name (ARN) of the model package to describe. When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). - session: Boto3 session. - region: Region name. - - Returns: - The ModelPackage resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageName": model_package_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_package(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelPackageOutput") - model_package = cls(**transformed_response) - return model_package - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelPackage"]: - """ - Refresh a ModelPackage resource - - Returns: - The ModelPackage resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageName": self.model_package_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_package(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelPackageOutput", self) - return self - - @populate_inputs_decorator - @Base.add_validate_call - def update( - self, - model_approval_status: Optional[StrPipeVar] = Unassigned(), - model_package_registration_type: Optional[StrPipeVar] = Unassigned(), - approval_description: Optional[StrPipeVar] = Unassigned(), - customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - customer_metadata_properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - additional_inference_specifications_to_add: Optional[ - List[AdditionalInferenceSpecificationDefinition] - ] = Unassigned(), - inference_specification: Optional[InferenceSpecification] = Unassigned(), - source_uri: Optional[StrPipeVar] = Unassigned(), - model_card: Optional[ModelPackageModelCard] = Unassigned(), - model_life_cycle: Optional[ModelLifeCycle] = Unassigned(), - client_token: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["ModelPackage"]: - """ - Update a ModelPackage resource - - Parameters: - customer_metadata_properties_to_remove: The metadata properties associated with the model package versions to remove. - additional_inference_specifications_to_add: An array of additional Inference Specification objects to be added to the existing array additional Inference Specification. Total number of additional Inference Specifications can not exceed 15. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. - client_token: A unique token that guarantees that the call to this API is idempotent. - - Returns: - The ModelPackage resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - """ - - logger.info("Updating model_package resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelPackageArn": self.model_package_arn, - "ModelApprovalStatus": model_approval_status, - "ModelPackageRegistrationType": model_package_registration_type, - "ApprovalDescription": approval_description, - "CustomerMetadataProperties": customer_metadata_properties, - "CustomerMetadataPropertiesToRemove": customer_metadata_properties_to_remove, - "AdditionalInferenceSpecificationsToAdd": additional_inference_specifications_to_add, - "InferenceSpecification": inference_specification, - "SourceUri": source_uri, - "ModelCard": model_card, - "ModelLifeCycle": model_life_cycle, - "ClientToken": client_token, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_model_package(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelPackage resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelPackageName": self.model_package_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_package(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Pending", "InProgress", "Completed", "Failed", "Deleting"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelPackage resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for ModelPackage to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.model_package_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ModelPackage", status=current_status, reason="(Unknown)" - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="ModelPackage", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelPackage resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for ModelPackage to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.model_package_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ModelPackage", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - model_approval_status: Optional[StrPipeVar] = Unassigned(), - model_package_group_name: Optional[StrPipeVar] = Unassigned(), - model_package_type: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelPackage"]: - """ - Get all ModelPackage resources - - Parameters: - creation_time_after: A filter that returns only model packages created after the specified time (timestamp). - creation_time_before: A filter that returns only model packages created before the specified time (timestamp). - max_results: The maximum number of model packages to return in the response. - name_contains: A string in the model package name. This filter returns only model packages whose name contains the specified string. - model_approval_status: A filter that returns only the model packages with the specified approval status. - model_package_group_name: A filter that returns only model versions that belong to the specified model group. - model_package_type: A filter that returns only the model packages of the specified type. This can be one of the following values. UNVERSIONED - List only unversioined models. This is the default value if no ModelPackageType is specified. VERSIONED - List only versioned models. BOTH - List both versioned and unversioned models. - next_token: If the response to a previous ListModelPackages request was truncated, the response includes a NextToken. To retrieve the next set of model packages, use the token in the next request. - sort_by: The parameter by which to sort the results. The default is CreationTime. - sort_order: The sort order for the results. The default is Ascending. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelPackage resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "ModelApprovalStatus": model_approval_status, - "ModelPackageGroupName": model_package_group_name, - "ModelPackageType": model_package_type, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_packages", - summaries_key="ModelPackageSummaryList", - summary_name="ModelPackageSummary", - resource_cls=ModelPackage, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def batch_get( - self, - model_package_arn_list: List[StrPipeVar], - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[BatchDescribeModelPackageOutput]: - """ - This action batch describes a list of versioned model packages. - - Parameters: - model_package_arn_list: The list of Amazon Resource Name (ARN) of the model package groups. - session: Boto3 session. - region: Region name. - - Returns: - BatchDescribeModelPackageOutput - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageArnList": model_package_arn_list, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling batch_describe_model_package API") - response = client.batch_describe_model_package(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "BatchDescribeModelPackageOutput") - return BatchDescribeModelPackageOutput(**transformed_response) - - -class ModelPackageGroup(Base): - """ - Class representing resource ModelPackageGroup - - Attributes: - model_package_group_name: The name of the model group. - model_package_group_arn: The Amazon Resource Name (ARN) of the model group. - creation_time: The time that the model group was created. - created_by: - model_package_group_status: The status of the model group. - model_package_group_description: A description of the model group. - - """ - - model_package_group_name: StrPipeVar - model_package_group_arn: Optional[StrPipeVar] = Unassigned() - model_package_group_description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - model_package_group_status: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_package_group_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_package_group") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - model_package_group_name: StrPipeVar, - model_package_group_description: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelPackageGroup"]: - """ - Create a ModelPackageGroup resource - - Parameters: - model_package_group_name: The name of the model group. - model_package_group_description: A description for the model group. - tags: A list of key value pairs associated with the model group. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. - session: Boto3 session. - region: Region name. - - Returns: - The ModelPackageGroup resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_package_group resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ModelPackageGroupName": model_package_group_name, - "ModelPackageGroupDescription": model_package_group_description, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelPackageGroup", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_package_group(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - model_package_group_name=model_package_group_name, session=session, region=region - ) - - @classmethod - @Base.add_validate_call - def get( - cls, - model_package_group_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelPackageGroup"]: - """ - Get a ModelPackageGroup resource - - Parameters: - model_package_group_name: The name of the model group to describe. - session: Boto3 session. - region: Region name. - - Returns: - The ModelPackageGroup resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageGroupName": model_package_group_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_package_group(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelPackageGroupOutput") - model_package_group = cls(**transformed_response) - return model_package_group - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelPackageGroup"]: - """ - Refresh a ModelPackageGroup resource - - Returns: - The ModelPackageGroup resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageGroupName": self.model_package_group_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_package_group(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelPackageGroupOutput", self) - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelPackageGroup resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ModelPackageGroupName": self.model_package_group_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_package_group(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal[ - "Pending", "InProgress", "Completed", "Failed", "Deleting", "DeleteFailed" - ], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelPackageGroup resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for ModelPackageGroup to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.model_package_group_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ModelPackageGroup", status=current_status, reason="(Unknown)" - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ModelPackageGroup", status=current_status - ) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a ModelPackageGroup resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for ModelPackageGroup to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.model_package_group_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="ModelPackageGroup", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - cross_account_filter_option: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelPackageGroup"]: - """ - Get all ModelPackageGroup resources - - Parameters: - creation_time_after: A filter that returns only model groups created after the specified time. - creation_time_before: A filter that returns only model groups created before the specified time. - max_results: The maximum number of results to return in the response. - name_contains: A string in the model group name. This filter returns only model groups whose name contains the specified string. - next_token: If the result of the previous ListModelPackageGroups request was truncated, the response includes a NextToken. To retrieve the next set of model groups, use the token in the next request. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: The sort order for results. The default is Ascending. - cross_account_filter_option: A filter that returns either model groups shared with you or model groups in your own account. When the value is CrossAccount, the results show the resources made discoverable to you from other accounts. When the value is SameAccount or null, the results show resources from your account. The default is SameAccount. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelPackageGroup resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "CrossAccountFilterOption": cross_account_filter_option, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_package_groups", - summaries_key="ModelPackageGroupSummaryList", - summary_name="ModelPackageGroupSummary", - resource_cls=ModelPackageGroup, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def get_policy( - self, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[str]: - """ - Gets a resource policy that manages access for a model group. - - Parameters: - session: Boto3 session. - region: Region name. - - Returns: - str - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageGroupName": self.model_package_group_name, - "ModelPackageGroupArn": self.model_package_group_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling get_model_package_group_policy API") - response = client.get_model_package_group_policy(**operation_input_args) - logger.debug(f"Response: {response}") - - return list(response.values())[0] - - @Base.add_validate_call - def delete_policy( - self, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Deletes a model group resource policy. - - Parameters: - session: Boto3 session. - region: Region name. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - operation_input_args = { - "ModelPackageGroupName": self.model_package_group_name, - "ModelPackageGroupArn": self.model_package_group_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling delete_model_package_group_policy API") - response = client.delete_model_package_group_policy(**operation_input_args) - logger.debug(f"Response: {response}") - - @Base.add_validate_call - def put_policy( - self, - resource_policy: StrPipeVar, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Adds a resouce policy to control access to a model group. - - Parameters: - resource_policy: The resource policy for the model group. - session: Boto3 session. - region: Region name. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - """ - - operation_input_args = { - "ModelPackageGroupName": self.model_package_group_name, - "ResourcePolicy": resource_policy, - "ModelPackageGroupArn": self.model_package_group_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling put_model_package_group_policy API") - response = client.put_model_package_group_policy(**operation_input_args) - logger.debug(f"Response: {response}") - - -class ModelQualityJobDefinition(Base): - """ - Class representing resource ModelQualityJobDefinition - - Attributes: - job_definition_arn: The Amazon Resource Name (ARN) of the model quality job. - job_definition_name: The name of the quality job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - creation_time: The time at which the model quality job was created. - model_quality_app_specification: Configures the model quality job to run a specified Docker container image. - model_quality_job_input: Inputs for the model quality job. - model_quality_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - model_quality_baseline_config: The baseline configuration for a model quality job. - network_config: Networking options for a model quality job. - stopping_condition: - - """ - - job_definition_name: StrPipeVar - job_definition_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - model_quality_baseline_config: Optional[ModelQualityBaselineConfig] = Unassigned() - model_quality_app_specification: Optional[ModelQualityAppSpecification] = Unassigned() - model_quality_job_input: Optional[ModelQualityJobInput] = Unassigned() - model_quality_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() - job_resources: Optional[MonitoringResources] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "model_quality_job_definition_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object model_quality_job_definition") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_quality_job_input": { - "ground_truth_s3_input": {"s3_uri": {"type": "string"}}, - "endpoint_input": { - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - "batch_transform_input": { - "data_captured_destination_s3_uri": {"type": "string"}, - "s3_input_mode": {"type": "string"}, - "s3_data_distribution_type": {"type": "string"}, - }, - }, - "model_quality_job_output_config": {"kms_key_id": {"type": "string"}}, - "job_resources": {"cluster_config": {"volume_kms_key_id": {"type": "string"}}}, - "role_arn": {"type": "string"}, - "model_quality_baseline_config": { - "constraints_resource": {"s3_uri": {"type": "string"}} - }, - "network_config": { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ModelQualityJobDefinition", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - job_definition_name: StrPipeVar, - model_quality_app_specification: ModelQualityAppSpecification, - model_quality_job_input: ModelQualityJobInput, - model_quality_job_output_config: MonitoringOutputConfig, - job_resources: MonitoringResources, - role_arn: StrPipeVar, - model_quality_baseline_config: Optional[ModelQualityBaselineConfig] = Unassigned(), - network_config: Optional[MonitoringNetworkConfig] = Unassigned(), - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelQualityJobDefinition"]: - """ - Create a ModelQualityJobDefinition resource - - Parameters: - job_definition_name: The name of the monitoring job definition. - model_quality_app_specification: The container that runs the monitoring job. - model_quality_job_input: A list of the inputs that are monitored. Currently endpoints are supported. - model_quality_job_output_config: - job_resources: - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. - model_quality_baseline_config: Specifies the constraints and baselines for the monitoring job. - network_config: Specifies the network configuration for the monitoring job. - stopping_condition: - 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. - session: Boto3 session. - region: Region name. - - Returns: - The ModelQualityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating model_quality_job_definition resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "JobDefinitionName": job_definition_name, - "ModelQualityBaselineConfig": model_quality_baseline_config, - "ModelQualityAppSpecification": model_quality_app_specification, - "ModelQualityJobInput": model_quality_job_input, - "ModelQualityJobOutputConfig": model_quality_job_output_config, - "JobResources": job_resources, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "StoppingCondition": stopping_condition, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ModelQualityJobDefinition", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_model_quality_job_definition(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(job_definition_name=job_definition_name, session=session, region=region) - - @classmethod - @Base.add_validate_call - def get( - cls, - job_definition_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["ModelQualityJobDefinition"]: - """ - Get a ModelQualityJobDefinition resource - - Parameters: - job_definition_name: The name of the model quality job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - session: Boto3 session. - region: Region name. - - Returns: - The ModelQualityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_model_quality_job_definition(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeModelQualityJobDefinitionResponse") - model_quality_job_definition = cls(**transformed_response) - return model_quality_job_definition - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["ModelQualityJobDefinition"]: - """ - Refresh a ModelQualityJobDefinition resource - - Returns: - The ModelQualityJobDefinition resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_model_quality_job_definition(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeModelQualityJobDefinitionResponse", self) - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a ModelQualityJobDefinition resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "JobDefinitionName": self.job_definition_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_model_quality_job_definition(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod - @Base.add_validate_call - def get_all( - cls, - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - variant_name: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ModelQualityJobDefinition"]: - """ - Get all ModelQualityJobDefinition resources - - Parameters: - endpoint_name: A filter that returns only model quality monitoring job definitions that are associated with the specified endpoint. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: If the result of the previous ListModelQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of model quality monitoring job definitions, use the token in the next request. - max_results: The maximum number of results to return in a call to ListModelQualityJobDefinitions. - name_contains: A string in the transform job name. This filter returns only model quality monitoring job definitions whose name contains the specified string. - creation_time_before: A filter that returns only model quality monitoring job definitions created before the specified time. - creation_time_after: A filter that returns only model quality monitoring job definitions created after the specified time. - variant_name: - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ModelQualityJobDefinition resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "VariantName": variant_name, - } - custom_key_mapping = { - "monitoring_job_definition_name": "job_definition_name", - "monitoring_job_definition_arn": "job_definition_arn", - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_model_quality_job_definitions", - summaries_key="JobDefinitionSummaries", - summary_name="MonitoringJobDefinitionSummary", - resource_cls=ModelQualityJobDefinition, - custom_key_mapping=custom_key_mapping, - list_method_kwargs=operation_input_args, - ) - - -class MonitoringAlert(Base): - """ - Class representing resource MonitoringAlert - - Attributes: - monitoring_alert_name: The name of a monitoring alert. - creation_time: A timestamp that indicates when a monitor alert was created. - last_modified_time: A timestamp that indicates when a monitor alert was last updated. - alert_status: The current status of an alert. - datapoints_to_alert: Within EvaluationPeriod, how many execution failures will raise an alert. - evaluation_period: The number of most recent monitoring executions to consider when evaluating alert status. - actions: A list of alert actions taken in response to an alert going into InAlert status. - - """ - - monitoring_alert_name: StrPipeVar - creation_time: datetime.datetime - last_modified_time: datetime.datetime - alert_status: StrPipeVar - datapoints_to_alert: int - evaluation_period: int - actions: MonitoringAlertActions - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "monitoring_alert_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object monitoring_alert") - return None - - @Base.add_validate_call - def update( - self, - monitoring_schedule_name: StrPipeVar, - datapoints_to_alert: int, - evaluation_period: int, - ) -> Optional["MonitoringAlert"]: - """ - Update a MonitoringAlert resource - - Parameters: - monitoring_schedule_name: The name of a monitoring schedule. - - Returns: - The MonitoringAlert resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating monitoring_alert resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - "MonitoringAlertName": self.monitoring_alert_name, - "DatapointsToAlert": datapoints_to_alert, - "EvaluationPeriod": evaluation_period, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_monitoring_alert(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @classmethod - @Base.add_validate_call - def get_all( - cls, - monitoring_schedule_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["MonitoringAlert"]: - """ - Get all MonitoringAlert resources - - Parameters: - monitoring_schedule_name: The name of a monitoring schedule. - next_token: If the result of the previous ListMonitoringAlerts request was truncated, the response includes a NextToken. To retrieve the next set of alerts in the history, use the token in the next request. - max_results: The maximum number of results to display. The default is 100. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed MonitoringAlert resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_monitoring_alerts", - summaries_key="MonitoringAlertSummaries", - summary_name="MonitoringAlertSummary", - resource_cls=MonitoringAlert, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def list_history( - self, - monitoring_schedule_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - next_token: Optional[StrPipeVar] = Unassigned(), - max_results: Optional[int] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[MonitoringAlertHistorySummary]: - """ - Gets a list of past alerts in a model monitoring schedule. - - Parameters: - monitoring_schedule_name: The name of a monitoring schedule. - sort_by: The field used to sort results. The default is CreationTime. - sort_order: The sort order, whether Ascending or Descending, of the alert history. The default is Descending. - next_token: If the result of the previous ListMonitoringAlertHistory request was truncated, the response includes a NextToken. To retrieve the next set of alerts in the history, use the token in the next request. - max_results: The maximum number of results to display. The default is 100. - creation_time_before: A filter that returns only alerts created on or before the specified time. - creation_time_after: A filter that returns only alerts created on or after the specified time. - status_equals: A filter that retrieves only alerts with a specific status. - session: Boto3 session. - region: Region name. - - Returns: - MonitoringAlertHistorySummary - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - "MonitoringAlertName": self.monitoring_alert_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NextToken": next_token, - "MaxResults": max_results, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "StatusEquals": status_equals, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling list_monitoring_alert_history API") - response = client.list_monitoring_alert_history(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "ListMonitoringAlertHistoryResponse") - return MonitoringAlertHistorySummary(**transformed_response) - - -class MonitoringExecution(Base): - """ - Class representing resource MonitoringExecution - - Attributes: - monitoring_execution_id: - monitoring_schedule_name: - scheduled_time: - creation_time: - last_modified_time: - monitoring_execution_status: - processing_job_arn: - endpoint_name: - monitoring_job_definition_name: - monitoring_type: - failure_reason: - - """ - - monitoring_execution_id: StrPipeVar - monitoring_schedule_name: Optional[StrPipeVar] = Unassigned() - scheduled_time: Optional[datetime.datetime] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - monitoring_execution_status: Optional[StrPipeVar] = Unassigned() - processing_job_arn: Optional[StrPipeVar] = Unassigned() - endpoint_name: Optional[StrPipeVar] = Unassigned() - monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() - monitoring_type: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "monitoring_execution_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object monitoring_execution") - return None - - @classmethod - @Base.add_validate_call - def get( - cls, - monitoring_execution_id: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["MonitoringExecution"]: - """ - Get a MonitoringExecution resource - - Parameters: - monitoring_execution_id: - session: Boto3 session. - region: Region name. - - Returns: - The MonitoringExecution resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringExecutionId": monitoring_execution_id, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_monitoring_execution(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeMonitoringExecutionResponse") - monitoring_execution = cls(**transformed_response) - return monitoring_execution - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["MonitoringExecution"]: - """ - Refresh a MonitoringExecution resource - - Returns: - The MonitoringExecution resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringExecutionId": self.monitoring_execution_id, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_monitoring_execution(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeMonitoringExecutionResponse", self) - return self - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal[ - "Pending", - "Completed", - "CompletedWithViolations", - "InProgress", - "Failed", - "Stopping", - "Stopped", - ], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a MonitoringExecution resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task( - f"Waiting for MonitoringExecution to reach [bold]{target_status} status..." - ) - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.monitoring_execution_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="MonitoringExecution", - status=current_status, - reason=self.failure_reason, - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="MonitoringExecution", status=current_status - ) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - monitoring_schedule_name: Optional[StrPipeVar] = Unassigned(), - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - scheduled_time_before: Optional[datetime.datetime] = Unassigned(), - scheduled_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned(), - monitoring_type_equals: Optional[StrPipeVar] = Unassigned(), - variant_name: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["MonitoringExecution"]: - """ - Get all MonitoringExecution resources - - Parameters: - monitoring_schedule_name: Name of a specific schedule to fetch jobs for. - endpoint_name: Name of a specific endpoint to fetch jobs for. - sort_by: Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. - max_results: The maximum number of jobs to return in the response. The default value is 10. - scheduled_time_before: Filter for jobs scheduled before a specified time. - scheduled_time_after: Filter for jobs scheduled after a specified time. - creation_time_before: A filter that returns only jobs created before a specified time. - creation_time_after: A filter that returns only jobs created after a specified time. - last_modified_time_before: A filter that returns only jobs modified after a specified time. - last_modified_time_after: A filter that returns only jobs modified before a specified time. - status_equals: A filter that retrieves only jobs with a specific status. - monitoring_job_definition_name: Gets a list of the monitoring job runs of the specified monitoring job definitions. - monitoring_type_equals: A filter that returns only the monitoring job runs of the specified monitoring type. - variant_name: - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed MonitoringExecution resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "ScheduledTimeBefore": scheduled_time_before, - "ScheduledTimeAfter": scheduled_time_after, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "StatusEquals": status_equals, - "MonitoringJobDefinitionName": monitoring_job_definition_name, - "MonitoringTypeEquals": monitoring_type_equals, - "VariantName": variant_name, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_monitoring_executions", - summaries_key="MonitoringExecutionSummaries", - summary_name="MonitoringExecutionSummary", - resource_cls=MonitoringExecution, - list_method_kwargs=operation_input_args, - ) - - -class MonitoringSchedule(Base): - """ - Class representing resource MonitoringSchedule - - Attributes: - monitoring_schedule_arn: The Amazon Resource Name (ARN) of the monitoring schedule. - monitoring_schedule_name: Name of the monitoring schedule. - monitoring_schedule_status: The status of an monitoring job. - creation_time: The time at which the monitoring job was created. - last_modified_time: The time at which the monitoring job was last modified. - monitoring_schedule_config: The configuration object that specifies the monitoring schedule and defines the monitoring job. - monitoring_type: The type of the monitoring job that this schedule runs. This is one of the following values. DATA_QUALITY - The schedule is for a data quality monitoring job. MODEL_QUALITY - The schedule is for a model quality monitoring job. MODEL_BIAS - The schedule is for a bias monitoring job. MODEL_EXPLAINABILITY - The schedule is for an explainability monitoring job. - failure_reason: A string, up to one KB in size, that contains the reason a monitoring job failed, if it failed. - endpoint_name: The name of the endpoint for the monitoring job. - last_monitoring_execution_summary: Describes metadata on the last execution to run, if there was one. - custom_monitoring_job_definition: - data_quality_job_definition: - model_quality_job_definition: - model_bias_job_definition: - model_explainability_job_definition: - variant_name: - - """ - - monitoring_schedule_name: StrPipeVar - monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() - monitoring_schedule_status: Optional[StrPipeVar] = Unassigned() - monitoring_type: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - monitoring_schedule_config: Optional[MonitoringScheduleConfig] = Unassigned() - endpoint_name: Optional[StrPipeVar] = Unassigned() - last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() - custom_monitoring_job_definition: Optional[CustomMonitoringJobDefinition] = Unassigned() - data_quality_job_definition: Optional[DataQualityJobDefinition] = Unassigned() - model_quality_job_definition: Optional[ModelQualityJobDefinition] = Unassigned() - model_bias_job_definition: Optional[ModelBiasJobDefinition] = Unassigned() - model_explainability_job_definition: Optional[ModelExplainabilityJobDefinition] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "monitoring_schedule_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object monitoring_schedule") - return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = { - "monitoring_schedule_config": { - "monitoring_job_definition": { - "monitoring_output_config": {"kms_key_id": {"type": "string"}}, - "monitoring_resources": { - "cluster_config": {"volume_kms_key_id": {"type": "string"}} - }, - "role_arn": {"type": "string"}, - "baseline_config": { - "constraints_resource": {"s3_uri": {"type": "string"}}, - "statistics_resource": {"s3_uri": {"type": "string"}}, - }, - "network_config": { - "vpc_config": { - "security_group_ids": { - "type": "array", - "items": {"type": "string"}, - }, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - } - } - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "MonitoringSchedule", **kwargs - ), - ) - - return wrapper - - @classmethod - @populate_inputs_decorator - @Base.add_validate_call - def create( - cls, - monitoring_schedule_name: StrPipeVar, - monitoring_schedule_config: MonitoringScheduleConfig, - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["MonitoringSchedule"]: - """ - Create a MonitoringSchedule resource - - Parameters: - monitoring_schedule_name: The name of the monitoring schedule. The name must be unique within an Amazon Web Services Region within an Amazon Web Services account. - monitoring_schedule_config: The configuration object that specifies the monitoring schedule and defines the monitoring job. - 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. - session: Boto3 session. - region: Region name. - - Returns: - The MonitoringSchedule resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - logger.info("Creating monitoring_schedule resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - "MonitoringScheduleConfig": monitoring_schedule_config, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="MonitoringSchedule", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_monitoring_schedule(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - monitoring_schedule_name=monitoring_schedule_name, session=session, region=region - ) - - @classmethod - @Base.add_validate_call - def get( - cls, - monitoring_schedule_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["MonitoringSchedule"]: - """ - Get a MonitoringSchedule resource - - Parameters: - monitoring_schedule_name: Name of a previously created monitoring schedule. - session: Boto3 session. - region: Region name. - - Returns: - The MonitoringSchedule resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringScheduleName": monitoring_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_monitoring_schedule(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeMonitoringScheduleResponse") - monitoring_schedule = cls(**transformed_response) - return monitoring_schedule - - @Base.add_validate_call - def refresh( - self, - ) -> Optional["MonitoringSchedule"]: - """ - Refresh a MonitoringSchedule resource - - Returns: - The MonitoringSchedule resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringScheduleName": self.monitoring_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_monitoring_schedule(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeMonitoringScheduleResponse", self) - return self - - @populate_inputs_decorator - @Base.add_validate_call - def update( - self, - monitoring_schedule_config: MonitoringScheduleConfig, - ) -> Optional["MonitoringSchedule"]: - """ - Update a MonitoringSchedule resource - - Returns: - The MonitoringSchedule resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating monitoring_schedule resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "MonitoringScheduleName": self.monitoring_schedule_name, - "MonitoringScheduleConfig": monitoring_schedule_config, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_monitoring_schedule(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a MonitoringSchedule resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "MonitoringScheduleName": self.monitoring_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_monitoring_schedule(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def start( - self, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Start a MonitoringSchedule resource - - Parameters: - session: Boto3 session. - region: Region name. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "MonitoringScheduleName": self.monitoring_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling start_monitoring_schedule API") - response = client.start_monitoring_schedule(**operation_input_args) - logger.debug(f"Response: {response}") - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a MonitoringSchedule resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "MonitoringScheduleName": self.monitoring_schedule_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_monitoring_schedule(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Pending", "Failed", "Scheduled", "Stopped"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a MonitoringSchedule resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task( - f"Waiting for MonitoringSchedule to reach [bold]{target_status} status..." - ) - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.monitoring_schedule_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="MonitoringSchedule", - status=current_status, - reason=self.failure_reason, - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="MonitoringSchedule", status=current_status - ) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - endpoint_name: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned(), - monitoring_type_equals: Optional[StrPipeVar] = Unassigned(), - variant_name: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["MonitoringSchedule"]: - """ - Get all MonitoringSchedule resources - - Parameters: - endpoint_name: Name of a specific endpoint to fetch schedules for. - sort_by: Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime. - sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. - next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. - max_results: The maximum number of jobs to return in the response. The default value is 10. - name_contains: Filter for monitoring schedules whose name contains a specified string. - creation_time_before: A filter that returns only monitoring schedules created before a specified time. - creation_time_after: A filter that returns only monitoring schedules created after a specified time. - last_modified_time_before: A filter that returns only monitoring schedules modified before a specified time. - last_modified_time_after: A filter that returns only monitoring schedules modified after a specified time. - status_equals: A filter that returns only monitoring schedules modified before a specified time. - monitoring_job_definition_name: Gets a list of the monitoring schedules for the specified monitoring job definition. - monitoring_type_equals: A filter that returns only the monitoring schedules for the specified monitoring type. - variant_name: - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed MonitoringSchedule resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "EndpointName": endpoint_name, - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "StatusEquals": status_equals, - "MonitoringJobDefinitionName": monitoring_job_definition_name, - "MonitoringTypeEquals": monitoring_type_equals, - "VariantName": variant_name, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_monitoring_schedules", - summaries_key="MonitoringScheduleSummaries", - summary_name="MonitoringScheduleSummary", - resource_cls=MonitoringSchedule, - list_method_kwargs=operation_input_args, - ) - - -class NotebookInstance(Base): +class ModelPackage(Base): """ - Class representing resource NotebookInstance - + Class representing resource ModelPackage + Attributes: - notebook_instance_arn: The Amazon Resource Name (ARN) of the notebook instance. - notebook_instance_name: The name of the SageMaker AI notebook instance. - notebook_instance_status: The status of the notebook instance. - failure_reason: If status is Failed, the reason it failed. - url: The URL that you use to connect to the Jupyter notebook that is running in your notebook instance. - instance_type: The type of ML compute instance running on the notebook instance. - 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. - subnet_id: The ID of the VPC subnet. - security_groups: The IDs of the VPC security groups. - role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the instance. - kms_key_id: The Amazon Web Services KMS key ID SageMaker AI uses to encrypt data when storing it on the ML storage volume attached to the instance. - network_interface_id: The network interface IDs that SageMaker AI created at the time of creating the instance. - last_modified_time: A timestamp. Use this parameter to retrieve the time when the notebook instance was last modified. - creation_time: A timestamp. Use this parameter to return the time when the notebook instance was created - notebook_instance_lifecycle_config_name: Returns the name of a notebook instance lifecycle configuration. For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance - direct_internet_access: Describes whether SageMaker AI provides internet access to the notebook instance. If this value is set to Disabled, the notebook instance does not have internet access, and cannot connect to SageMaker AI training and endpoint services. For more information, see Notebook Instances Are Internet-Enabled by Default. - volume_size_in_gb: The size, in GB, of the ML storage volume attached to the notebook instance. - accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of the EI instance types associated with this notebook instance. - default_code_repository: The Git repository associated 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. - additional_code_repositories: An array of up to three Git repositories associated 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. - root_access: Whether root access is enabled or disabled for users of the notebook instance. 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. - platform_identifier: The platform identifier of the notebook instance runtime environment. - instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance - + model_package_name: The name of the model package being described. + model_package_arn: The Amazon Resource Name (ARN) of the model package. + creation_time: A timestamp specifying when the model package was created. + model_package_status: The current status of the model package. + model_package_status_details: Details about the current status of the model package. + model_package_group_name: If the model is a versioned model, the name of the model group that the versioned model belongs to. + model_package_version: The version of the model package. + model_package_registration_type: The package registration type of the model package output. + model_package_description: A brief summary of the model package. + inference_specification: Details about inference jobs that you can run with models based on this model package. + source_algorithm_specification: Details about the algorithm that was used to create the model package. + validation_specification: Configurations for one or more transform jobs that SageMaker runs to test the model package. + certify_for_marketplace: Whether the model package is certified for listing on Amazon Web Services Marketplace. + model_approval_status: The approval status of the model package. + created_by: + metadata_properties: + model_metrics: Metrics for the model. + last_modified_time: The last time that the model package was modified. + last_modified_by: + approval_description: A description provided for the model approval. + domain: The machine learning domain of the model package you specified. Common machine learning domains include computer vision and natural language processing. + task: The machine learning task you specified that your model package accomplishes. Common machine learning tasks include object detection and image classification. + sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload are stored. This path points to a single gzip compressed tar archive (.tar.gz suffix). + customer_metadata_properties: The metadata properties associated with the model package versions. + drift_check_baselines: Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on Drift Detection against Previous Baselines in SageMaker Pipelines in the Amazon SageMaker Developer Guide. + additional_inference_specifications: An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. + skip_model_validation: Indicates if you want to skip model validation. + source_uri: The URI of the source for the model package. + security_config: The KMS Key ID (KMSKeyId) used for encryption of model package information. + model_card: The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version. + model_life_cycle: A structure describing the current state of the model in its life cycle. + """ - - notebook_instance_name: StrPipeVar - notebook_instance_arn: Optional[StrPipeVar] = Unassigned() - notebook_instance_status: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - url: Optional[StrPipeVar] = Unassigned() - instance_type: Optional[StrPipeVar] = Unassigned() - ip_address_type: Optional[StrPipeVar] = Unassigned() - subnet_id: Optional[StrPipeVar] = Unassigned() - security_groups: Optional[List[StrPipeVar]] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - network_interface_id: Optional[StrPipeVar] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() + model_package_name: Optional[StrPipeVar] = Unassigned() + model_package_group_name: Optional[StrPipeVar] = Unassigned() + model_package_version: Optional[int] = Unassigned() + model_package_registration_type: Optional[StrPipeVar] = Unassigned() + model_package_arn: Optional[StrPipeVar] = Unassigned() + model_package_description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - notebook_instance_lifecycle_config_name: Optional[StrPipeVar] = Unassigned() - direct_internet_access: Optional[StrPipeVar] = Unassigned() - volume_size_in_gb: Optional[int] = Unassigned() - accelerator_types: Optional[List[StrPipeVar]] = Unassigned() - default_code_repository: Optional[StrPipeVar] = Unassigned() - additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned() - root_access: Optional[StrPipeVar] = Unassigned() - platform_identifier: Optional[StrPipeVar] = Unassigned() - instance_metadata_service_configuration: Optional[InstanceMetadataServiceConfiguration] = ( - Unassigned() - ) - + inference_specification: Optional[InferenceSpecification] = Unassigned() + source_algorithm_specification: Optional[SourceAlgorithmSpecification] = Unassigned() + validation_specification: Optional[ModelPackageValidationSpecification] = Unassigned() + model_package_status: Optional[StrPipeVar] = Unassigned() + model_package_status_details: Optional[ModelPackageStatusDetails] = Unassigned() + certify_for_marketplace: Optional[bool] = Unassigned() + model_approval_status: Optional[StrPipeVar] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + model_metrics: Optional[ModelMetrics] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + approval_description: Optional[StrPipeVar] = Unassigned() + domain: Optional[StrPipeVar] = Unassigned() + task: Optional[StrPipeVar] = Unassigned() + sample_payload_url: Optional[StrPipeVar] = Unassigned() + customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + drift_check_baselines: Optional[DriftCheckBaselines] = Unassigned() + additional_inference_specifications: Optional[List[AdditionalInferenceSpecificationDefinition]] = Unassigned() + skip_model_validation: Optional[StrPipeVar] = Unassigned() + source_uri: Optional[StrPipeVar] = Unassigned() + security_config: Optional[ModelPackageSecurityConfig] = Unassigned() + model_card: Optional[ModelPackageModelCard] = Unassigned() + model_life_cycle: Optional[ModelLifeCycle] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "notebook_instance_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_package_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object notebook_instance") + logger.error("Name attribute not found for object model_package") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "subnet_id": {"type": "string"}, - "security_groups": {"type": "array", "items": {"type": "string"}}, - "role_arn": {"type": "string"}, - "kms_key_id": {"type": "string"}, + config_schema_for_resource = \ + { + "validation_specification": { + "validation_role": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "NotebookInstance", **kwargs - ), - ) - + }, + "model_metrics": { + "model_quality": { + "statistics": { + "s3_uri": { + "type": "string" + } + }, + "constraints": { + "s3_uri": { + "type": "string" + } + } + }, + "model_data_quality": { + "statistics": { + "s3_uri": { + "type": "string" + } + }, + "constraints": { + "s3_uri": { + "type": "string" + } + } + }, + "bias": { + "report": { + "s3_uri": { + "type": "string" + } + }, + "pre_training_report": { + "s3_uri": { + "type": "string" + } + }, + "post_training_report": { + "s3_uri": { + "type": "string" + } + } + }, + "explainability": { + "report": { + "s3_uri": { + "type": "string" + } + } + } + }, + "drift_check_baselines": { + "bias": { + "config_file": { + "s3_uri": { + "type": "string" + } + }, + "pre_training_constraints": { + "s3_uri": { + "type": "string" + } + }, + "post_training_constraints": { + "s3_uri": { + "type": "string" + } + } + }, + "explainability": { + "constraints": { + "s3_uri": { + "type": "string" + } + }, + "config_file": { + "s3_uri": { + "type": "string" + } + } + }, + "model_quality": { + "statistics": { + "s3_uri": { + "type": "string" + } + }, + "constraints": { + "s3_uri": { + "type": "string" + } + } + }, + "model_data_quality": { + "statistics": { + "s3_uri": { + "type": "string" + } + }, + "constraints": { + "s3_uri": { + "type": "string" + } + } + } + }, + "security_config": { + "kms_key_id": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelPackage", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - notebook_instance_name: StrPipeVar, - instance_type: StrPipeVar, - role_arn: StrPipeVar, - subnet_id: Optional[StrPipeVar] = Unassigned(), - security_group_ids: Optional[List[StrPipeVar]] = Unassigned(), - ip_address_type: Optional[StrPipeVar] = Unassigned(), - kms_key_id: Optional[StrPipeVar] = Unassigned(), + model_package_name: Optional[StrPipeVar] = Unassigned(), + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned(), + model_package_description: Optional[StrPipeVar] = Unassigned(), + model_package_registration_type: Optional[StrPipeVar] = Unassigned(), + inference_specification: Optional[InferenceSpecification] = Unassigned(), + validation_specification: Optional[ModelPackageValidationSpecification] = Unassigned(), + source_algorithm_specification: Optional[SourceAlgorithmSpecification] = Unassigned(), + certify_for_marketplace: Optional[bool] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - lifecycle_config_name: Optional[StrPipeVar] = Unassigned(), - direct_internet_access: Optional[StrPipeVar] = Unassigned(), - volume_size_in_gb: Optional[int] = Unassigned(), - accelerator_types: Optional[List[StrPipeVar]] = Unassigned(), - default_code_repository: Optional[StrPipeVar] = Unassigned(), - additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned(), - root_access: Optional[StrPipeVar] = Unassigned(), - platform_identifier: Optional[StrPipeVar] = Unassigned(), - instance_metadata_service_configuration: Optional[ - InstanceMetadataServiceConfiguration - ] = Unassigned(), + model_approval_status: Optional[StrPipeVar] = Unassigned(), + metadata_properties: Optional[MetadataProperties] = Unassigned(), + model_metrics: Optional[ModelMetrics] = Unassigned(), + client_token: Optional[StrPipeVar] = Unassigned(), + domain: Optional[StrPipeVar] = Unassigned(), + task: Optional[StrPipeVar] = Unassigned(), + sample_payload_url: Optional[StrPipeVar] = Unassigned(), + customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + drift_check_baselines: Optional[DriftCheckBaselines] = Unassigned(), + additional_inference_specifications: Optional[List[AdditionalInferenceSpecificationDefinition]] = Unassigned(), + skip_model_validation: Optional[StrPipeVar] = Unassigned(), + source_uri: Optional[StrPipeVar] = Unassigned(), + security_config: Optional[ModelPackageSecurityConfig] = Unassigned(), + model_card: Optional[ModelPackageModelCard] = Unassigned(), + model_life_cycle: Optional[ModelLifeCycle] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["NotebookInstance"]: + ) -> Optional["ModelPackage"]: """ - Create a NotebookInstance resource - + Create a ModelPackage resource + Parameters: - notebook_instance_name: The name of the new notebook instance. - instance_type: The type of ML compute instance to launch for the notebook instance. - 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. - subnet_id: The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance. - 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. - 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. - 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. - 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. - 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. - direct_internet_access: Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. For more information, see Notebook Instances Are Internet-Enabled by Default. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter. - volume_size_in_gb: The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. - accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of EI instance types to associate with this notebook instance. - 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. - 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. - 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. - platform_identifier: The platform identifier of the notebook instance runtime environment. The default value is notebook-al2-v2. - instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance + model_package_name: The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). This parameter is required for unversioned models. It is not applicable to versioned models. + model_package_group_name: The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to. This parameter is required for versioned models, and does not apply to unversioned models. + model_package_description: A description of the model package. + model_package_registration_type: The package registration type of the model package input. + inference_specification: Specifies details about inference jobs that you can run with models based on this model package, including the following information: The Amazon ECR paths of containers that contain the inference code and model artifacts. The instance types that the model package supports for transform jobs and real-time endpoints used for inference. The input and output content formats that the model package supports for inference. + validation_specification: Specifies configurations for one or more transform jobs that SageMaker runs to test the model package. + source_algorithm_specification: Details about the algorithm that was used to create the model package. + certify_for_marketplace: Whether to certify the model package for listing on Amazon Web Services Marketplace. This parameter is optional for unversioned models, and does not apply to versioned models. + tags: A list of key value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. If you supply ModelPackageGroupName, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a tag argument. + model_approval_status: Whether the model is approved for deployment. This parameter is optional for versioned models, and does not apply to unversioned models. For versioned models, the value of this parameter must be set to Approved to deploy the model. + metadata_properties: + model_metrics: A structure that contains model metrics reports. + client_token: A unique token that guarantees that the call to this API is idempotent. + domain: The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing. + task: The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: "IMAGE_CLASSIFICATION" \| "OBJECT_DETECTION" \| "TEXT_GENERATION" \|"IMAGE_SEGMENTATION" \| "FILL_MASK" \| "CLASSIFICATION" \| "REGRESSION" \| "OTHER". Specify "OTHER" if none of the tasks listed fit your use case. + sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the InvokeEndpoint call. + customer_metadata_properties: The metadata properties associated with the model package versions. + drift_check_baselines: Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on Drift Detection against Previous Baselines in SageMaker Pipelines in the Amazon SageMaker Developer Guide. + additional_inference_specifications: An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. + skip_model_validation: Indicates if you want to skip model validation. + source_uri: The URI of the source for the model package. If you want to clone a model package, set it to the model package Amazon Resource Name (ARN). If you want to register a model, set it to the model ARN. + security_config: The KMS Key ID (KMSKeyId) used for encryption of model package information. + model_card: The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version. + model_life_cycle: A structure describing the current state of the model in its life cycle. session: Boto3 session. region: Region name. - + Returns: - The NotebookInstance resource. - + The ModelPackage resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -27620,75 +21765,77 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating notebook_instance resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "NotebookInstanceName": notebook_instance_name, - "InstanceType": instance_type, - "SubnetId": subnet_id, - "SecurityGroupIds": security_group_ids, - "IpAddressType": ip_address_type, - "RoleArn": role_arn, - "KmsKeyId": kms_key_id, - "Tags": tags, - "LifecycleConfigName": lifecycle_config_name, - "DirectInternetAccess": direct_internet_access, - "VolumeSizeInGB": volume_size_in_gb, - "AcceleratorTypes": accelerator_types, - "DefaultCodeRepository": default_code_repository, - "AdditionalCodeRepositories": additional_code_repositories, - "RootAccess": root_access, - "PlatformIdentifier": platform_identifier, - "InstanceMetadataServiceConfiguration": instance_metadata_service_configuration, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="NotebookInstance", operation_input_args=operation_input_args - ) - + + logger.info("Creating model_package resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ModelPackageName': model_package_name, + 'ModelPackageGroupName': model_package_group_name, + 'ModelPackageDescription': model_package_description, + 'ModelPackageRegistrationType': model_package_registration_type, + 'InferenceSpecification': inference_specification, + 'ValidationSpecification': validation_specification, + 'SourceAlgorithmSpecification': source_algorithm_specification, + 'CertifyForMarketplace': certify_for_marketplace, + 'Tags': tags, + 'ModelApprovalStatus': model_approval_status, + 'MetadataProperties': metadata_properties, + 'ModelMetrics': model_metrics, + 'ClientToken': client_token, + 'Domain': domain, + 'Task': task, + 'SamplePayloadUrl': sample_payload_url, + 'CustomerMetadataProperties': customer_metadata_properties, + 'DriftCheckBaselines': drift_check_baselines, + 'AdditionalInferenceSpecifications': additional_inference_specifications, + 'SkipModelValidation': skip_model_validation, + 'SourceUri': source_uri, + 'SecurityConfig': security_config, + 'ModelCard': model_card, + 'ModelLifeCycle': model_life_cycle, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelPackage', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_notebook_instance(**operation_input_args) + response = client.create_model_package(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - notebook_instance_name=notebook_instance_name, session=session, region=region - ) - + + return cls.get(model_package_name=response['ModelPackageName'], session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - notebook_instance_name: StrPipeVar, + model_package_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["NotebookInstance"]: + ) -> Optional["ModelPackage"]: """ - Get a NotebookInstance resource - + Get a ModelPackage resource + Parameters: - notebook_instance_name: The name of the notebook instance that you want information about. + model_package_name: The name or Amazon Resource Name (ARN) of the model package to describe. When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). session: Boto3 session. region: Region name. - + Returns: - The NotebookInstance resource. - + The ModelPackage resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -27698,38 +21845,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "NotebookInstanceName": notebook_instance_name, + 'ModelPackageName': model_package_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_notebook_instance(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_package(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeNotebookInstanceOutput") - notebook_instance = cls(**transformed_response) - return notebook_instance - + transformed_response = transform(response, 'DescribeModelPackageOutput') + model_package = cls(**transformed_response) + return model_package + @Base.add_validate_call def refresh( self, - ) -> Optional["NotebookInstance"]: + + ) -> Optional["ModelPackage"]: """ - Refresh a NotebookInstance resource - + Refresh a ModelPackage resource + Returns: - The NotebookInstance resource. - + The ModelPackage resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -27739,58 +21885,50 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "NotebookInstanceName": self.notebook_instance_name, + 'ModelPackageName': self.model_package_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_notebook_instance(**operation_input_args) - + response = client.describe_model_package(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeNotebookInstanceOutput", self) + transform(response, 'DescribeModelPackageOutput', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( self, - instance_type: Optional[StrPipeVar] = Unassigned(), - ip_address_type: Optional[StrPipeVar] = Unassigned(), - platform_identifier: Optional[StrPipeVar] = Unassigned(), - role_arn: Optional[StrPipeVar] = Unassigned(), - lifecycle_config_name: Optional[StrPipeVar] = Unassigned(), - disassociate_lifecycle_config: Optional[bool] = Unassigned(), - volume_size_in_gb: Optional[int] = Unassigned(), - default_code_repository: Optional[StrPipeVar] = Unassigned(), - additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned(), - accelerator_types: Optional[List[StrPipeVar]] = Unassigned(), - disassociate_accelerator_types: Optional[bool] = Unassigned(), - disassociate_default_code_repository: Optional[bool] = Unassigned(), - disassociate_additional_code_repositories: Optional[bool] = Unassigned(), - root_access: Optional[StrPipeVar] = Unassigned(), - instance_metadata_service_configuration: Optional[ - InstanceMetadataServiceConfiguration - ] = Unassigned(), - ) -> Optional["NotebookInstance"]: + model_approval_status: Optional[StrPipeVar] = Unassigned(), + model_package_registration_type: Optional[StrPipeVar] = Unassigned(), + approval_description: Optional[StrPipeVar] = Unassigned(), + customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + customer_metadata_properties_to_remove: Optional[List[StrPipeVar]] = Unassigned(), + additional_inference_specifications_to_add: Optional[List[AdditionalInferenceSpecificationDefinition]] = Unassigned(), + inference_specification: Optional[InferenceSpecification] = Unassigned(), + source_uri: Optional[StrPipeVar] = Unassigned(), + model_card: Optional[ModelPackageModelCard] = Unassigned(), + model_life_cycle: Optional[ModelLifeCycle] = Unassigned(), + client_token: Optional[StrPipeVar] = Unassigned(), + ) -> Optional["ModelPackage"]: """ - Update a NotebookInstance resource - + Update a ModelPackage resource + Parameters: - 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. - disassociate_lifecycle_config: Set to true to remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error. - disassociate_accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of the EI instance types to remove from this notebook instance. - disassociate_default_code_repository: The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error. - disassociate_additional_code_repositories: A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error. - + customer_metadata_properties_to_remove: The metadata properties associated with the model package versions to remove. + additional_inference_specifications_to_add: An array of additional Inference Specification objects to be added to the existing array additional Inference Specification. Total number of additional Inference Specifications can not exceed 15. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts. + client_token: A unique token that guarantees that the call to this API is idempotent. + Returns: - The NotebookInstance resource. - + The ModelPackage resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -27799,51 +21937,48 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - - logger.info("Updating notebook_instance resource.") + + logger.info("Updating model_package resource.") client = Base.get_sagemaker_client() - - operation_input_args = { - "NotebookInstanceName": self.notebook_instance_name, - "InstanceType": instance_type, - "IpAddressType": ip_address_type, - "PlatformIdentifier": platform_identifier, - "RoleArn": role_arn, - "LifecycleConfigName": lifecycle_config_name, - "DisassociateLifecycleConfig": disassociate_lifecycle_config, - "VolumeSizeInGB": volume_size_in_gb, - "DefaultCodeRepository": default_code_repository, - "AdditionalCodeRepositories": additional_code_repositories, - "AcceleratorTypes": accelerator_types, - "DisassociateAcceleratorTypes": disassociate_accelerator_types, - "DisassociateDefaultCodeRepository": disassociate_default_code_repository, - "DisassociateAdditionalCodeRepositories": disassociate_additional_code_repositories, - "RootAccess": root_access, - "InstanceMetadataServiceConfiguration": instance_metadata_service_configuration, + + operation_input_args = { + 'ModelPackageArn': self.model_package_arn, + 'ModelApprovalStatus': model_approval_status, + 'ModelPackageRegistrationType': model_package_registration_type, + 'ApprovalDescription': approval_description, + 'CustomerMetadataProperties': customer_metadata_properties, + 'CustomerMetadataPropertiesToRemove': customer_metadata_properties_to_remove, + 'AdditionalInferenceSpecificationsToAdd': additional_inference_specifications_to_add, + 'InferenceSpecification': inference_specification, + 'SourceUri': source_uri, + 'ModelCard': model_card, + 'ModelLifeCycle': model_life_cycle, + 'ClientToken': client_token, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_notebook_instance(**operation_input_args) + response = client.update_model_package(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a NotebookInstance resource - + Delete a ModelPackage resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -27852,154 +21987,76 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "NotebookInstanceName": self.notebook_instance_name, + 'ModelPackageName': self.model_package_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_notebook_instance(**operation_input_args) - + + client.delete_model_package(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def start( - self, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Start a NotebookInstance resource - - Parameters: - session: Boto3 session. - region: Region name. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - """ - - operation_input_args = { - "NotebookInstanceName": self.notebook_instance_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling start_notebook_instance API") - response = client.start_notebook_instance(**operation_input_args) - logger.debug(f"Response: {response}") - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a NotebookInstance resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = SageMakerClient().client - - operation_input_args = { - "NotebookInstanceName": self.notebook_instance_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_notebook_instance(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Pending", "InService", "Stopping", "Stopped", "Failed", "Deleting", "Updating" - ], + target_status: Literal['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a NotebookInstance resource to reach certain status. - + Wait for a ModelPackage resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for NotebookInstance to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for ModelPackage to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.notebook_instance_status + current_status = self.model_package_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="NotebookInstance", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="ModelPackage", status=current_status, reason='(Unknown)') + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="NotebookInstance", status=current_status - ) + raise TimeoutExceededError(resource_type="ModelPackage", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -28007,14 +22064,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a NotebookInstance resource to be deleted. - + Wait for a ModelPackage resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28028,84 +22085,71 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for NotebookInstance to be deleted...") + progress.add_task("Waiting for ModelPackage to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.notebook_instance_status + current_status = self.model_package_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="NotebookInstance", status=current_status - ) + raise TimeoutExceededError(resource_type="ModelPackage", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + model_approval_status: Optional[StrPipeVar] = Unassigned(), + model_package_group_name: Optional[StrPipeVar] = Unassigned(), + model_package_type: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - notebook_instance_lifecycle_config_name_contains: Optional[StrPipeVar] = Unassigned(), - default_code_repository_contains: Optional[StrPipeVar] = Unassigned(), - additional_code_repository_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["NotebookInstance"]: + ) -> ResourceIterator["ModelPackage"]: """ - Get all NotebookInstance resources - + Get all ModelPackage resources + Parameters: - next_token: If the previous call to the ListNotebookInstances is truncated, the response includes a NextToken. You can use this token in your subsequent ListNotebookInstances request to fetch the next set of notebook instances. You might specify a filter or a sort order in your request. When response is truncated, you must use the same values for the filer and sort order in the next request. - max_results: The maximum number of notebook instances to return. - sort_by: The field to sort results by. The default is Name. - sort_order: The sort order for results. - name_contains: A string in the notebook instances' name. This filter returns only notebook instances whose name contains the specified string. - creation_time_before: A filter that returns only notebook instances that were created before the specified time (timestamp). - creation_time_after: A filter that returns only notebook instances that were created after the specified time (timestamp). - last_modified_time_before: A filter that returns only notebook instances that were modified before the specified time (timestamp). - last_modified_time_after: A filter that returns only notebook instances that were modified after the specified time (timestamp). - status_equals: A filter that returns only notebook instances with the specified status. - notebook_instance_lifecycle_config_name_contains: A string in the name of a notebook instances lifecycle configuration associated with this notebook instance. This filter returns only notebook instances associated with a lifecycle configuration with a name that contains the specified string. - default_code_repository_contains: A string in the name or URL of a Git repository associated with this notebook instance. This filter returns only notebook instances associated with a git repository with a name that contains the specified string. - additional_code_repository_equals: A filter that returns only notebook instances with associated with the specified git repository. + creation_time_after: A filter that returns only model packages created after the specified time (timestamp). + creation_time_before: A filter that returns only model packages created before the specified time (timestamp). + max_results: The maximum number of model packages to return in the response. + name_contains: A string in the model package name. This filter returns only model packages whose name contains the specified string. + model_approval_status: A filter that returns only the model packages with the specified approval status. + model_package_group_name: A filter that returns only model versions that belong to the specified model group. + model_package_type: A filter that returns only the model packages of the specified type. This can be one of the following values. UNVERSIONED - List only unversioined models. This is the default value if no ModelPackageType is specified. VERSIONED - List only versioned models. BOTH - List both versioned and unversioned models. + next_token: If the response to a previous ListModelPackages request was truncated, the response includes a NextToken. To retrieve the next set of model packages, use the token in the next request. + sort_by: The parameter by which to sort the results. The default is CreationTime. + sort_order: The sort order for the results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed NotebookInstance resources. - + Iterator for listed ModelPackage resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28115,103 +22159,143 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "StatusEquals": status_equals, - "NotebookInstanceLifecycleConfigNameContains": notebook_instance_lifecycle_config_name_contains, - "DefaultCodeRepositoryContains": default_code_repository_contains, - "AdditionalCodeRepositoryEquals": additional_code_repository_equals, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'ModelApprovalStatus': model_approval_status, + 'ModelPackageGroupName': model_package_group_name, + 'ModelPackageType': model_package_type, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_notebook_instances", - summaries_key="NotebookInstances", - summary_name="NotebookInstanceSummary", - resource_cls=NotebookInstance, - list_method_kwargs=operation_input_args, + list_method='list_model_packages', + summaries_key='ModelPackageSummaryList', + summary_name='ModelPackageSummary', + resource_cls=ModelPackage, + list_method_kwargs=operation_input_args ) + + + @Base.add_validate_call + def batch_get( + self, + model_package_arn_list: List[StrPipeVar], + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[BatchDescribeModelPackageOutput]: + """ + This action batch describes a list of versioned model packages. + + Parameters: + model_package_arn_list: The list of Amazon Resource Name (ARN) of the model package groups. + session: Boto3 session. + region: Region name. + + Returns: + BatchDescribeModelPackageOutput + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + + operation_input_args = { + 'ModelPackageArnList': model_package_arn_list, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling batch_describe_model_package API") + response = client.batch_describe_model_package(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'BatchDescribeModelPackageOutput') + return BatchDescribeModelPackageOutput(**transformed_response) -class NotebookInstanceLifecycleConfig(Base): +class ModelPackageGroup(Base): """ - Class representing resource NotebookInstanceLifecycleConfig - + Class representing resource ModelPackageGroup + Attributes: - notebook_instance_lifecycle_config_arn: The Amazon Resource Name (ARN) of the lifecycle configuration. - notebook_instance_lifecycle_config_name: The name of the lifecycle configuration. - on_create: The shell script that runs only once, when you create a notebook instance. - on_start: The shell script that runs every time you start a notebook instance, including when you create the notebook instance. - last_modified_time: A timestamp that tells when the lifecycle configuration was last modified. - creation_time: A timestamp that tells when the lifecycle configuration was created. - + model_package_group_name: The name of the model group. + model_package_group_arn: The Amazon Resource Name (ARN) of the model group. + creation_time: The time that the model group was created. + created_by: + model_package_group_status: The status of the model group. + model_package_group_description: A description of the model group. + """ - - notebook_instance_lifecycle_config_name: StrPipeVar - notebook_instance_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() - on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned() - on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() + model_package_group_name: StrPipeVar + model_package_group_arn: Optional[StrPipeVar] = Unassigned() + model_package_group_description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - + created_by: Optional[UserContext] = Unassigned() + model_package_group_status: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "notebook_instance_lifecycle_config_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_package_group_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object notebook_instance_lifecycle_config") + logger.error("Name attribute not found for object model_package_group") return None - + @classmethod @Base.add_validate_call def create( cls, - notebook_instance_lifecycle_config_name: StrPipeVar, - on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), - on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), + model_package_group_name: StrPipeVar, + model_package_group_description: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["NotebookInstanceLifecycleConfig"]: + ) -> Optional["ModelPackageGroup"]: """ - Create a NotebookInstanceLifecycleConfig resource - + Create a ModelPackageGroup resource + Parameters: - notebook_instance_lifecycle_config_name: The name of the lifecycle configuration. - on_create: A shell script that runs only once, when you create a notebook instance. The shell script must be a base64-encoded string. - on_start: A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string. - 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. + model_package_group_name: The name of the model group. + model_package_group_description: A description for the model group. + tags: A list of key value pairs associated with the model group. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. session: Boto3 session. region: Region name. - + Returns: - The NotebookInstanceLifecycleConfig resource. - + The ModelPackageGroup resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28225,60 +22309,217 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating notebook_instance_lifecycle_config resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating model_package_group resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "NotebookInstanceLifecycleConfigName": notebook_instance_lifecycle_config_name, - "OnCreate": on_create, - "OnStart": on_start, - "Tags": tags, + 'ModelPackageGroupName': model_package_group_name, + 'ModelPackageGroupDescription': model_package_group_description, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="NotebookInstanceLifecycleConfig", - operation_input_args=operation_input_args, - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelPackageGroup', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_notebook_instance_lifecycle_config(**operation_input_args) + response = client.create_model_package_group(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - notebook_instance_lifecycle_config_name=notebook_instance_lifecycle_config_name, - session=session, - region=region, - ) - + + return cls.get(model_package_group_name=model_package_group_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - notebook_instance_lifecycle_config_name: StrPipeVar, + model_package_group_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["NotebookInstanceLifecycleConfig"]: + ) -> Optional["ModelPackageGroup"]: + """ + Get a ModelPackageGroup resource + + Parameters: + model_package_group_name: The name of the model group to describe. + session: Boto3 session. + region: Region name. + + Returns: + The ModelPackageGroup resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + operation_input_args = { + 'ModelPackageGroupName': model_package_group_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_package_group(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeModelPackageGroupOutput') + model_package_group = cls(**transformed_response) + return model_package_group + + @Base.add_validate_call + def refresh( + self, + + ) -> Optional["ModelPackageGroup"]: + """ + Refresh a ModelPackageGroup resource + + Returns: + The ModelPackageGroup resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + operation_input_args = { + 'ModelPackageGroupName': self.model_package_group_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_model_package_group(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeModelPackageGroupOutput', self) + return self + + @Base.add_validate_call + def delete( + self, + + ) -> None: + """ + Delete a ModelPackageGroup resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + """ + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'ModelPackageGroupName': self.model_package_group_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_model_package_group(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['Pending', 'InProgress', 'Completed', 'Failed', 'Deleting', 'DeleteFailed'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a ModelPackageGroup resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task(f"Waiting for ModelPackageGroup to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.model_package_group_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="ModelPackageGroup", status=current_status, reason='(Unknown)') + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ModelPackageGroup", status=current_status) + time.sleep(poll) + + @Base.add_validate_call + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: """ - Get a NotebookInstanceLifecycleConfig resource - + Wait for a ModelPackageGroup resource to be deleted. + Parameters: - notebook_instance_lifecycle_config_name: The name of the lifecycle configuration to describe. - session: Boto3 session. - region: Region name. - - Returns: - The NotebookInstanceLifecycleConfig resource. - + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28287,39 +22528,72 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - operation_input_args = { - "NotebookInstanceLifecycleConfigName": notebook_instance_lifecycle_config_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - response = client.describe_notebook_instance_lifecycle_config(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeNotebookInstanceLifecycleConfigOutput") - notebook_instance_lifecycle_config = cls(**transformed_response) - return notebook_instance_lifecycle_config - + progress.add_task("Waiting for ModelPackageGroup to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.model_package_group_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ModelPackageGroup", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + + @classmethod @Base.add_validate_call - def refresh( - self, - ) -> Optional["NotebookInstanceLifecycleConfig"]: + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + cross_account_filter_option: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ModelPackageGroup"]: """ - Refresh a NotebookInstanceLifecycleConfig resource - + Get all ModelPackageGroup resources + + Parameters: + creation_time_after: A filter that returns only model groups created after the specified time. + creation_time_before: A filter that returns only model groups created before the specified time. + max_results: The maximum number of results to return in the response. + name_contains: A string in the model group name. This filter returns only model groups whose name contains the specified string. + next_token: If the result of the previous ListModelPackageGroups request was truncated, the response includes a NextToken. To retrieve the next set of model groups, use the token in the next request. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Ascending. + cross_account_filter_option: A filter that returns either model groups shared with you or model groups in your own account. When the value is CrossAccount, the results show the resources made discoverable to you from other accounts. When the value is SameAccount or null, the results show resources from your account. The default is SameAccount. + session: Boto3 session. + region: Region name. + Returns: - The NotebookInstanceLifecycleConfig resource. - + Iterator for listed ModelPackageGroup resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28329,35 +22603,51 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NotebookInstanceLifecycleConfigName": self.notebook_instance_lifecycle_config_name, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'CrossAccountFilterOption': cross_account_filter_option, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_notebook_instance_lifecycle_config(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeNotebookInstanceLifecycleConfigOutput", self) - return self - + + return ResourceIterator( + client=client, + list_method='list_model_package_groups', + summaries_key='ModelPackageGroupSummaryList', + summary_name='ModelPackageGroupSummary', + resource_cls=ModelPackageGroup, + list_method_kwargs=operation_input_args + ) + + @Base.add_validate_call - def update( + def get_policy( self, - on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), - on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), - ) -> Optional["NotebookInstanceLifecycleConfig"]: + + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[str]: """ - Update a NotebookInstanceLifecycleConfig resource - + Gets a resource policy that manages access for a model group. + + Parameters: + session: Boto3 session. + region: Region name. + Returns: - The NotebookInstanceLifecycleConfig resource. - + str + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28366,38 +22656,41 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - - logger.info("Updating notebook_instance_lifecycle_config resource.") - client = Base.get_sagemaker_client() - + + operation_input_args = { - "NotebookInstanceLifecycleConfigName": self.notebook_instance_lifecycle_config_name, - "OnCreate": on_create, - "OnStart": on_start, + 'ModelPackageGroupName': self.model_package_group_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_notebook_instance_lifecycle_config(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling get_model_package_group_policy API") + response = client.get_model_package_group_policy(**operation_input_args) logger.debug(f"Response: {response}") - self.refresh() - - return self - + + return list(response.values())[0] + + @Base.add_validate_call - def delete( + def delete_policy( self, + + session: Optional[Session] = None, + region: Optional[str] = None, ) -> None: """ - Delete a NotebookInstanceLifecycleConfig resource - + Deletes a model group resource policy. + + Parameters: + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28407,55 +22700,40 @@ def delete( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client() - + + operation_input_args = { - "NotebookInstanceLifecycleConfigName": self.notebook_instance_lifecycle_config_name, + 'ModelPackageGroupName': self.model_package_group_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_notebook_instance_lifecycle_config(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling delete_model_package_group_policy API") + response = client.delete_model_package_group_policy(**operation_input_args) + logger.debug(f"Response: {response}") + + + @Base.add_validate_call - def get_all( - cls, - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + def put_policy( + self, + resource_policy: StrPipeVar, session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["NotebookInstanceLifecycleConfig"]: + region: Optional[str] = None, + ) -> None: """ - Get all NotebookInstanceLifecycleConfig resources - + Adds a resouce policy to control access to a model group. + Parameters: - next_token: If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, the response includes a NextToken. To get the next set of lifecycle configurations, use the token in the next request. - max_results: The maximum number of lifecycle configurations to return in the response. - sort_by: Sorts the list of results. The default is CreationTime. - sort_order: The sort order for results. - name_contains: A string in the lifecycle configuration name. This filter returns only lifecycle configurations whose name contains the specified string. - creation_time_before: A filter that returns only lifecycle configurations that were created before the specified time (timestamp). - creation_time_after: A filter that returns only lifecycle configurations that were created after the specified time (timestamp). - last_modified_time_before: A filter that returns only lifecycle configurations that were modified before the specified time (timestamp). - last_modified_time_after: A filter that returns only lifecycle configurations that were modified after the specified time (timestamp). + resource_policy: The resource policy for the model group. session: Boto3 session. region: Region name. - - Returns: - Iterator for listed NotebookInstanceLifecycleConfig resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28464,163 +22742,186 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "LastModifiedTimeAfter": last_modified_time_after, + 'ModelPackageGroupName': self.model_package_group_name, + 'ResourcePolicy': resource_policy, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_notebook_instance_lifecycle_configs", - summaries_key="NotebookInstanceLifecycleConfigs", - summary_name="NotebookInstanceLifecycleConfigSummary", - resource_cls=NotebookInstanceLifecycleConfig, - list_method_kwargs=operation_input_args, - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling put_model_package_group_policy API") + response = client.put_model_package_group_policy(**operation_input_args) + logger.debug(f"Response: {response}") + -class OptimizationJob(Base): +class ModelQualityJobDefinition(Base): """ - Class representing resource OptimizationJob - + Class representing resource ModelQualityJobDefinition + Attributes: - optimization_job_arn: The Amazon Resource Name (ARN) of the optimization job. - optimization_job_status: The current status of the optimization job. - creation_time: The time when you created the optimization job. - last_modified_time: The time when the optimization job was last updated. - optimization_job_name: The name that you assigned to the optimization job. - model_source: The location of the source model to optimize with an optimization job. - deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. - optimization_configs: Settings for each of the optimization techniques that the job applies. - output_config: Details for where to store the optimized model that you create with the optimization job. - role_arn: The ARN of the IAM role that you assigned to the optimization job. - stopping_condition: - optimization_start_time: The time when the optimization job started. - optimization_end_time: The time when the optimization job finished processing. - failure_reason: If the optimization job status is FAILED, the reason for the failure. - optimization_environment: The environment variables to set in the model container. - max_instance_count: - optimization_output: Output values produced by an optimization job. - vpc_config: A VPC in Amazon VPC that your optimized model has access to. - + job_definition_arn: The Amazon Resource Name (ARN) of the model quality job. + job_definition_name: The name of the quality job definition. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + creation_time: The time at which the model quality job was created. + model_quality_app_specification: Configures the model quality job to run a specified Docker container image. + model_quality_job_input: Inputs for the model quality job. + model_quality_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + model_quality_baseline_config: The baseline configuration for a model quality job. + network_config: Networking options for a model quality job. + stopping_condition: + """ - - optimization_job_name: StrPipeVar - optimization_job_arn: Optional[StrPipeVar] = Unassigned() - optimization_job_status: Optional[StrPipeVar] = Unassigned() - optimization_start_time: Optional[datetime.datetime] = Unassigned() - optimization_end_time: Optional[datetime.datetime] = Unassigned() + job_definition_name: StrPipeVar + job_definition_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - model_source: Optional[OptimizationJobModelSource] = Unassigned() - optimization_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - deployment_instance_type: Optional[StrPipeVar] = Unassigned() - max_instance_count: Optional[int] = Unassigned() - optimization_configs: Optional[List[OptimizationConfig]] = Unassigned() - output_config: Optional[OptimizationJobOutputConfig] = Unassigned() - optimization_output: Optional[OptimizationOutput] = Unassigned() + model_quality_baseline_config: Optional[ModelQualityBaselineConfig] = Unassigned() + model_quality_app_specification: Optional[ModelQualityAppSpecification] = Unassigned() + model_quality_job_input: Optional[ModelQualityJobInput] = Unassigned() + model_quality_job_output_config: Optional[MonitoringOutputConfig] = Unassigned() + job_resources: Optional[MonitoringResources] = Unassigned() + network_config: Optional[MonitoringNetworkConfig] = Unassigned() role_arn: Optional[StrPipeVar] = Unassigned() - stopping_condition: Optional[StoppingCondition] = Unassigned() - vpc_config: Optional[OptimizationVpcConfig] = Unassigned() - + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "optimization_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'model_quality_job_definition_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object optimization_job") + logger.error("Name attribute not found for object model_quality_job_definition") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_source": {"s3": {"s3_uri": {"type": "string"}}}, - "output_config": { - "s3_output_location": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "role_arn": {"type": "string"}, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, + config_schema_for_resource = \ + { + "model_quality_job_input": { + "ground_truth_s3_input": { + "s3_uri": { + "type": "string" + } + }, + "endpoint_input": { + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } + }, + "batch_transform_input": { + "data_captured_destination_s3_uri": { + "type": "string" + }, + "s3_input_mode": { + "type": "string" + }, + "s3_data_distribution_type": { + "type": "string" + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "OptimizationJob", **kwargs - ), - ) - + }, + "model_quality_job_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "job_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + }, + "model_quality_baseline_config": { + "constraints_resource": { + "s3_uri": { + "type": "string" + } + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ModelQualityJobDefinition", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - optimization_job_name: StrPipeVar, + job_definition_name: StrPipeVar, + model_quality_app_specification: ModelQualityAppSpecification, + model_quality_job_input: ModelQualityJobInput, + model_quality_job_output_config: MonitoringOutputConfig, + job_resources: MonitoringResources, role_arn: StrPipeVar, - model_source: OptimizationJobModelSource, - deployment_instance_type: StrPipeVar, - optimization_configs: List[OptimizationConfig], - output_config: OptimizationJobOutputConfig, - stopping_condition: StoppingCondition, - max_instance_count: Optional[int] = Unassigned(), - optimization_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + model_quality_baseline_config: Optional[ModelQualityBaselineConfig] = Unassigned(), + network_config: Optional[MonitoringNetworkConfig] = Unassigned(), + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - vpc_config: Optional[OptimizationVpcConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["OptimizationJob"]: + ) -> Optional["ModelQualityJobDefinition"]: """ - Create a OptimizationJob resource - + Create a ModelQualityJobDefinition resource + Parameters: - optimization_job_name: A custom name for the new optimization job. - role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. During model optimization, Amazon SageMaker AI needs your permission to: Read input data from an S3 bucket Write model artifacts to an S3 bucket Write logs to Amazon CloudWatch Logs Publish metrics to Amazon CloudWatch You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles. - model_source: The location of the source model to optimize with an optimization job. - deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. - optimization_configs: Settings for each of the optimization techniques that the job applies. - output_config: Details for where to store the optimized model that you create with the optimization job. - stopping_condition: - max_instance_count: - optimization_environment: The environment variables to set in the model container. - tags: A list of key-value pairs associated with the optimization job. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. - vpc_config: A VPC in Amazon VPC that your optimized model has access to. + job_definition_name: The name of the monitoring job definition. + model_quality_app_specification: The container that runs the monitoring job. + model_quality_job_input: A list of the inputs that are monitored. Currently endpoints are supported. + model_quality_job_output_config: + job_resources: + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + model_quality_baseline_config: Specifies the constraints and baselines for the monitoring job. + network_config: Specifies the network configuration for the monitoring job. + stopping_condition: + 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. session: Boto3 session. region: Region name. - + Returns: - The OptimizationJob resource. - + The ModelQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28635,62 +22936,57 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating optimization_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "OptimizationJobName": optimization_job_name, - "RoleArn": role_arn, - "ModelSource": model_source, - "DeploymentInstanceType": deployment_instance_type, - "MaxInstanceCount": max_instance_count, - "OptimizationEnvironment": optimization_environment, - "OptimizationConfigs": optimization_configs, - "OutputConfig": output_config, - "StoppingCondition": stopping_condition, - "Tags": tags, - "VpcConfig": vpc_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="OptimizationJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating model_quality_job_definition resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'JobDefinitionName': job_definition_name, + 'ModelQualityBaselineConfig': model_quality_baseline_config, + 'ModelQualityAppSpecification': model_quality_app_specification, + 'ModelQualityJobInput': model_quality_job_input, + 'ModelQualityJobOutputConfig': model_quality_job_output_config, + 'JobResources': job_resources, + 'NetworkConfig': network_config, + 'RoleArn': role_arn, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ModelQualityJobDefinition', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_optimization_job(**operation_input_args) + response = client.create_model_quality_job_definition(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(optimization_job_name=optimization_job_name, session=session, region=region) - + + return cls.get(job_definition_name=job_definition_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - optimization_job_name: StrPipeVar, + job_definition_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["OptimizationJob"]: + ) -> Optional["ModelQualityJobDefinition"]: """ - Get a OptimizationJob resource - + Get a ModelQualityJobDefinition resource + Parameters: - optimization_job_name: The name that you assigned to the optimization job. + job_definition_name: The name of the model quality job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. session: Boto3 session. region: Region name. - + Returns: - The OptimizationJob resource. - + The ModelQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28701,38 +22997,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "OptimizationJobName": optimization_job_name, + 'JobDefinitionName': job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_optimization_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_model_quality_job_definition(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeOptimizationJobResponse") - optimization_job = cls(**transformed_response) - return optimization_job - + transformed_response = transform(response, 'DescribeModelQualityJobDefinitionResponse') + model_quality_job_definition = cls(**transformed_response) + return model_quality_job_definition + @Base.add_validate_call def refresh( self, - ) -> Optional["OptimizationJob"]: + + ) -> Optional["ModelQualityJobDefinition"]: """ - Refresh a OptimizationJob resource - + Refresh a ModelQualityJobDefinition resource + Returns: - The OptimizationJob resource. - + The ModelQualityJobDefinition resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28743,30 +23038,236 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "OptimizationJobName": self.optimization_job_name, + 'JobDefinitionName': self.job_definition_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_optimization_job(**operation_input_args) - + response = client.describe_model_quality_job_definition(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeOptimizationJobResponse", self) + transform(response, 'DescribeModelQualityJobDefinitionResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: + """ + Delete a ModelQualityJobDefinition resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'JobDefinitionName': self.job_definition_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_model_quality_job_definition(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @classmethod + @Base.add_validate_call + def get_all( + cls, + endpoint_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ModelQualityJobDefinition"]: + """ + Get all ModelQualityJobDefinition resources + + Parameters: + endpoint_name: A filter that returns only model quality monitoring job definitions that are associated with the specified endpoint. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: If the result of the previous ListModelQualityJobDefinitions request was truncated, the response includes a NextToken. To retrieve the next set of model quality monitoring job definitions, use the token in the next request. + max_results: The maximum number of results to return in a call to ListModelQualityJobDefinitions. + name_contains: A string in the transform job name. This filter returns only model quality monitoring job definitions whose name contains the specified string. + creation_time_before: A filter that returns only model quality monitoring job definitions created before the specified time. + creation_time_after: A filter that returns only model quality monitoring job definitions created after the specified time. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed ModelQualityJobDefinition resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + } + custom_key_mapping = {"monitoring_job_definition_name": "job_definition_name", "monitoring_job_definition_arn": "job_definition_arn"} + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_model_quality_job_definitions', + summaries_key='JobDefinitionSummaries', + summary_name='MonitoringJobDefinitionSummary', + resource_cls=ModelQualityJobDefinition, + custom_key_mapping=custom_key_mapping, + list_method_kwargs=operation_input_args + ) + + +class MonitoringAlert(Base): + """ + Class representing resource MonitoringAlert + + Attributes: + monitoring_alert_name: The name of a monitoring alert. + creation_time: A timestamp that indicates when a monitor alert was created. + last_modified_time: A timestamp that indicates when a monitor alert was last updated. + alert_status: The current status of an alert. + datapoints_to_alert: Within EvaluationPeriod, how many execution failures will raise an alert. + evaluation_period: The number of most recent monitoring executions to consider when evaluating alert status. + actions: A list of alert actions taken in response to an alert going into InAlert status. + + """ + monitoring_alert_name: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + alert_status: StrPipeVar + datapoints_to_alert: int + evaluation_period: int + actions: MonitoringAlertActions + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'monitoring_alert_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object monitoring_alert") + return None + + @Base.add_validate_call + def update( + self, + monitoring_schedule_name: StrPipeVar, + datapoints_to_alert: int, + evaluation_period: int, + ) -> Optional["MonitoringAlert"]: + """ + Update a MonitoringAlert resource + + Parameters: + monitoring_schedule_name: The name of a monitoring schedule. + + Returns: + The MonitoringAlert resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. + """ + + logger.info("Updating monitoring_alert resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'MonitoringScheduleName': monitoring_schedule_name, + 'MonitoringAlertName': self.monitoring_alert_name, + 'DatapointsToAlert': datapoints_to_alert, + 'EvaluationPeriod': evaluation_period, + } + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.update_monitoring_alert(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + + @classmethod + @Base.add_validate_call + def get_all( + cls, + monitoring_schedule_name: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["MonitoringAlert"]: """ - Delete a OptimizationJob resource - + Get all MonitoringAlert resources + + Parameters: + monitoring_schedule_name: The name of a monitoring schedule. + next_token: If the result of the previous ListMonitoringAlerts request was truncated, the response includes a NextToken. To retrieve the next set of alerts in the history, use the token in the next request. + max_results: The maximum number of results to display. The default is 100. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed MonitoringAlert resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28777,27 +23278,61 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "OptimizationJobName": self.optimization_job_name, + 'MonitoringScheduleName': monitoring_schedule_name, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_optimization_job(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + return ResourceIterator( + client=client, + list_method='list_monitoring_alerts', + summaries_key='MonitoringAlertSummaries', + summary_name='MonitoringAlertSummary', + resource_cls=MonitoringAlert, + list_method_kwargs=operation_input_args + ) + + @Base.add_validate_call - def stop(self) -> None: + def list_history( + self, + monitoring_schedule_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + next_token: Optional[StrPipeVar] = Unassigned(), + max_results: Optional[int] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[MonitoringAlertHistorySummary]: """ - Stop a OptimizationJob resource - + Gets a list of past alerts in a model monitoring schedule. + + Parameters: + monitoring_schedule_name: The name of a monitoring schedule. + sort_by: The field used to sort results. The default is CreationTime. + sort_order: The sort order, whether Ascending or Descending, of the alert history. The default is Descending. + next_token: If the result of the previous ListMonitoringAlertHistory request was truncated, the response includes a NextToken. To retrieve the next set of alerts in the history, use the token in the next request. + max_results: The maximum number of results to display. The default is 100. + creation_time_before: A filter that returns only alerts created on or before the specified time. + creation_time_after: A filter that returns only alerts created on or after the specified time. + status_equals: A filter that retrieves only alerts with a specific status. + session: Boto3 session. + region: Region name. + + Returns: + MonitoringAlertHistorySummary + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28808,120 +23343,124 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + operation_input_args = { - "OptimizationJobName": self.optimization_job_name, + 'MonitoringScheduleName': monitoring_schedule_name, + 'MonitoringAlertName': self.monitoring_alert_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NextToken': next_token, + 'MaxResults': max_results, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'StatusEquals': status_equals, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling list_monitoring_alert_history API") + response = client.list_monitoring_alert_history(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'ListMonitoringAlertHistoryResponse') + return MonitoringAlertHistorySummary(**transformed_response) - client.stop_optimization_job(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a OptimizationJob resource. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - - """ - terminal_states = ["COMPLETED", "FAILED", "STOPPED"] - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for OptimizationJob...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.optimization_job_status - status.update(f"Current status: [bold]{current_status}") - - if current_status in terminal_states: - logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="OptimizationJob", - status=current_status, - reason=self.failure_reason, - ) - - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="OptimizationJob", status=current_status - ) - time.sleep(poll) +class MonitoringExecution(Base): + """ + Class representing resource MonitoringExecution + + Attributes: + monitoring_schedule_name: The name of the monitoring schedule. + scheduled_time: The time the monitoring job was scheduled. + creation_time: The time at which the monitoring job was created. + last_modified_time: A timestamp that indicates the last time the monitoring job was modified. + monitoring_execution_status: The status of the monitoring job. + processing_job_arn: The Amazon Resource Name (ARN) of the monitoring job. + endpoint_name: The name of the endpoint used to run the monitoring job. + failure_reason: Contains the reason a monitoring job failed, if it failed. + monitoring_job_definition_name: The name of the monitoring job. + monitoring_type: The type of the monitoring job. + + """ + monitoring_schedule_name: StrPipeVar + scheduled_time: datetime.datetime + creation_time: datetime.datetime + last_modified_time: datetime.datetime + monitoring_execution_status: StrPipeVar + processing_job_arn: Optional[StrPipeVar] = Unassigned() + endpoint_name: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'monitoring_execution_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object monitoring_execution") + return None + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), + monitoring_schedule_name: Optional[StrPipeVar] = Unassigned(), + endpoint_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + scheduled_time_before: Optional[datetime.datetime] = Unassigned(), + scheduled_time_after: Optional[datetime.datetime] = Unassigned(), creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - optimization_contains: Optional[StrPipeVar] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned(), + monitoring_type_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["OptimizationJob"]: + ) -> ResourceIterator["MonitoringExecution"]: """ - Get all OptimizationJob resources - + Get all MonitoringExecution resources + Parameters: - next_token: A token that you use to get the next set of results following a truncated response. If the response to the previous request was truncated, that response provides the value for this token. - max_results: The maximum number of optimization jobs to return in the response. The default is 50. - creation_time_after: Filters the results to only those optimization jobs that were created after the specified time. - creation_time_before: Filters the results to only those optimization jobs that were created before the specified time. - last_modified_time_after: Filters the results to only those optimization jobs that were updated after the specified time. - last_modified_time_before: Filters the results to only those optimization jobs that were updated before the specified time. - optimization_contains: Filters the results to only those optimization jobs that apply the specified optimization techniques. You can specify either Quantization or Compilation. - name_contains: Filters the results to only those optimization jobs with a name that contains the specified string. - status_equals: Filters the results to only those optimization jobs with the specified status. - sort_by: The field by which to sort the optimization jobs in the response. The default is CreationTime - sort_order: The sort order for results. The default is Ascending + monitoring_schedule_name: Name of a specific schedule to fetch jobs for. + endpoint_name: Name of a specific endpoint to fetch jobs for. + sort_by: Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. + max_results: The maximum number of jobs to return in the response. The default value is 10. + scheduled_time_before: Filter for jobs scheduled before a specified time. + scheduled_time_after: Filter for jobs scheduled after a specified time. + creation_time_before: A filter that returns only jobs created before a specified time. + creation_time_after: A filter that returns only jobs created after a specified time. + last_modified_time_before: A filter that returns only jobs modified after a specified time. + last_modified_time_after: A filter that returns only jobs modified before a specified time. + status_equals: A filter that retrieves only jobs with a specific status. + monitoring_job_definition_name: Gets a list of the monitoring job runs of the specified monitoring job definitions. + monitoring_type_equals: A filter that returns only the monitoring job runs of the specified monitoring type. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed OptimizationJob resources. - + Iterator for listed MonitoringExecution resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -28931,161 +23470,166 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "OptimizationContains": optimization_contains, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, + 'MonitoringScheduleName': monitoring_schedule_name, + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'ScheduledTimeBefore': scheduled_time_before, + 'ScheduledTimeAfter': scheduled_time_after, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'StatusEquals': status_equals, + 'MonitoringJobDefinitionName': monitoring_job_definition_name, + 'MonitoringTypeEquals': monitoring_type_equals, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_optimization_jobs", - summaries_key="OptimizationJobSummaries", - summary_name="OptimizationJobSummary", - resource_cls=OptimizationJob, - list_method_kwargs=operation_input_args, + list_method='list_monitoring_executions', + summaries_key='MonitoringExecutionSummaries', + summary_name='MonitoringExecutionSummary', + resource_cls=MonitoringExecution, + list_method_kwargs=operation_input_args ) -class PartnerApp(Base): +class MonitoringSchedule(Base): """ - Class representing resource PartnerApp - + Class representing resource MonitoringSchedule + Attributes: - arn: The ARN of the SageMaker Partner AI App that was described. - name: The name of the SageMaker Partner AI App. - type: The type of SageMaker Partner AI App. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler. - 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. - creation_time: The time that the SageMaker Partner AI App was created. - last_modified_time: The time that the SageMaker Partner AI App was last modified. - execution_role_arn: The ARN of the IAM role associated with the SageMaker Partner AI App. - kms_key_id: The Amazon Web Services KMS customer managed key used to encrypt the data at rest associated with SageMaker Partner AI Apps. - sdk_url: - base_url: The URL of the SageMaker Partner AI App that the Application SDK uses to support in-app calls for the user. - maintenance_config: Maintenance configuration settings for the SageMaker Partner AI App. - tier: The instance type and size of the cluster attached to the SageMaker Partner AI App. - version: The version of the SageMaker Partner AI App. - application_config: Configuration settings for the SageMaker Partner AI App. - auth_type: The authorization type that users use to access the SageMaker Partner AI App. - enable_iam_session_based_identity: When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user. - error: This is an error field object that contains the error code and the reason for an operation failure. - enable_auto_minor_version_upgrade: Indicates whether the SageMaker Partner AI App is configured for automatic minor version upgrades during scheduled maintenance windows. - current_version_eol_date: The end-of-life date for the current version of the SageMaker Partner AI App. - available_upgrade: A map of available minor version upgrades for the SageMaker Partner AI App. The key is the semantic version number, and the value is a list of release notes for that version. A null value indicates no upgrades are available. - + monitoring_schedule_arn: The Amazon Resource Name (ARN) of the monitoring schedule. + monitoring_schedule_name: Name of the monitoring schedule. + monitoring_schedule_status: The status of an monitoring job. + creation_time: The time at which the monitoring job was created. + last_modified_time: The time at which the monitoring job was last modified. + monitoring_schedule_config: The configuration object that specifies the monitoring schedule and defines the monitoring job. + monitoring_type: The type of the monitoring job that this schedule runs. This is one of the following values. DATA_QUALITY - The schedule is for a data quality monitoring job. MODEL_QUALITY - The schedule is for a model quality monitoring job. MODEL_BIAS - The schedule is for a bias monitoring job. MODEL_EXPLAINABILITY - The schedule is for an explainability monitoring job. + failure_reason: A string, up to one KB in size, that contains the reason a monitoring job failed, if it failed. + endpoint_name: The name of the endpoint for the monitoring job. + last_monitoring_execution_summary: Describes metadata on the last execution to run, if there was one. + """ - - arn: StrPipeVar - name: Optional[StrPipeVar] = Unassigned() - type: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() + monitoring_schedule_name: StrPipeVar + monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() + monitoring_schedule_status: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - execution_role_arn: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - sdk_url: Optional[StrPipeVar] = Unassigned() - base_url: Optional[StrPipeVar] = Unassigned() - maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned() - tier: Optional[StrPipeVar] = Unassigned() - version: Optional[StrPipeVar] = Unassigned() - application_config: Optional[PartnerAppConfig] = Unassigned() - auth_type: Optional[StrPipeVar] = Unassigned() - enable_iam_session_based_identity: Optional[bool] = Unassigned() - error: Optional[ErrorInfo] = Unassigned() - enable_auto_minor_version_upgrade: Optional[bool] = Unassigned() - current_version_eol_date: Optional[datetime.datetime] = Unassigned() - available_upgrade: Optional[AvailableUpgrade] = Unassigned() - + monitoring_schedule_config: Optional[MonitoringScheduleConfig] = Unassigned() + endpoint_name: Optional[StrPipeVar] = Unassigned() + last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "partner_app_name" - resource_name_split = resource_name.split("_") + resource_name = 'monitoring_schedule_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object partner_app") + logger.error("Name attribute not found for object monitoring_schedule") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = {"execution_role_arn": {"type": "string"}} - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "PartnerApp", **kwargs - ), - ) - + config_schema_for_resource = \ + { + "monitoring_schedule_config": { + "monitoring_job_definition": { + "monitoring_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "monitoring_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "role_arn": { + "type": "string" + }, + "baseline_config": { + "constraints_resource": { + "s3_uri": { + "type": "string" + } + }, + "statistics_resource": { + "s3_uri": { + "type": "string" + } + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "MonitoringSchedule", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - name: StrPipeVar, - type: StrPipeVar, - execution_role_arn: StrPipeVar, - tier: StrPipeVar, - auth_type: StrPipeVar, - kms_key_id: Optional[StrPipeVar] = Unassigned(), - maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned(), - version: Optional[StrPipeVar] = Unassigned(), - application_config: Optional[PartnerAppConfig] = Unassigned(), - enable_iam_session_based_identity: Optional[bool] = Unassigned(), - enable_auto_minor_version_upgrade: Optional[bool] = Unassigned(), - client_token: Optional[StrPipeVar] = Unassigned(), + monitoring_schedule_name: StrPipeVar, + monitoring_schedule_config: MonitoringScheduleConfig, tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["PartnerApp"]: + ) -> Optional["MonitoringSchedule"]: """ - Create a PartnerApp resource - + Create a MonitoringSchedule resource + Parameters: - name: The name to give the SageMaker Partner AI App. - type: The type of SageMaker Partner AI App to create. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler. - execution_role_arn: The ARN of the IAM role that the partner application uses. - tier: Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App. - auth_type: The authorization type that users use to access the SageMaker Partner AI App. - kms_key_id: SageMaker Partner AI Apps uses Amazon Web Services KMS to encrypt data at rest using an Amazon Web Services managed key by default. For more control, specify a customer managed key. - maintenance_config: Maintenance configuration settings for the SageMaker Partner AI App. - version: - application_config: Configuration settings for the SageMaker Partner AI App. - enable_iam_session_based_identity: When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user. - enable_auto_minor_version_upgrade: When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available. Default is FALSE. - client_token: A unique token that guarantees that the call to this API is idempotent. - tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. + monitoring_schedule_name: The name of the monitoring schedule. The name must be unique within an Amazon Web Services Region within an Amazon Web Services account. + monitoring_schedule_config: The configuration object that specifies the monitoring schedule and defines the monitoring job. + 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. session: Boto3 session. region: Region name. - + Returns: - The PartnerApp resource. - + The MonitoringSchedule resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29094,72 +23638,56 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating partner_app resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating monitoring_schedule resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "Name": name, - "Type": type, - "ExecutionRoleArn": execution_role_arn, - "KmsKeyId": kms_key_id, - "MaintenanceConfig": maintenance_config, - "Tier": tier, - "Version": version, - "ApplicationConfig": application_config, - "AuthType": auth_type, - "EnableIamSessionBasedIdentity": enable_iam_session_based_identity, - "EnableAutoMinorVersionUpgrade": enable_auto_minor_version_upgrade, - "ClientToken": client_token, - "Tags": tags, + 'MonitoringScheduleName': monitoring_schedule_name, + 'MonitoringScheduleConfig': monitoring_schedule_config, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="PartnerApp", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='MonitoringSchedule', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_partner_app(**operation_input_args) + response = client.create_monitoring_schedule(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(arn=response["Arn"], session=session, region=region) - + + return cls.get(monitoring_schedule_name=monitoring_schedule_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - arn: StrPipeVar, - include_available_upgrade: Optional[bool] = Unassigned(), + monitoring_schedule_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["PartnerApp"]: + ) -> Optional["MonitoringSchedule"]: """ - Get a PartnerApp resource - + Get a MonitoringSchedule resource + Parameters: - arn: The ARN of the SageMaker Partner AI App to describe. - include_available_upgrade: When set to TRUE, the response includes available upgrade information for the SageMaker Partner AI App. Default is FALSE. + monitoring_schedule_name: Name of a previously created monitoring schedule. session: Boto3 session. region: Region name. - + Returns: - The PartnerApp resource. - + The MonitoringSchedule resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29170,40 +23698,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Arn": arn, - "IncludeAvailableUpgrade": include_available_upgrade, + 'MonitoringScheduleName': monitoring_schedule_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_partner_app(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_monitoring_schedule(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribePartnerAppResponse") - partner_app = cls(**transformed_response) - return partner_app - + transformed_response = transform(response, 'DescribeMonitoringScheduleResponse') + monitoring_schedule = cls(**transformed_response) + return monitoring_schedule + @Base.add_validate_call def refresh( self, - include_available_upgrade: Optional[bool] = Unassigned(), - ) -> Optional["PartnerApp"]: + + ) -> Optional["MonitoringSchedule"]: """ - Refresh a PartnerApp resource - + Refresh a MonitoringSchedule resource + Returns: - The PartnerApp resource. - + The MonitoringSchedule resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29214,48 +23739,35 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "Arn": self.arn, - "IncludeAvailableUpgrade": include_available_upgrade, + 'MonitoringScheduleName': self.monitoring_schedule_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_partner_app(**operation_input_args) - + response = client.describe_monitoring_schedule(**operation_input_args) + # deserialize response and update self - transform(response, "DescribePartnerAppResponse", self) + transform(response, 'DescribeMonitoringScheduleResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( self, - maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned(), - tier: Optional[StrPipeVar] = Unassigned(), - application_config: Optional[PartnerAppConfig] = Unassigned(), - enable_iam_session_based_identity: Optional[bool] = Unassigned(), - enable_auto_minor_version_upgrade: Optional[bool] = Unassigned(), - app_version: Optional[StrPipeVar] = Unassigned(), - client_token: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - ) -> Optional["PartnerApp"]: + monitoring_schedule_config: MonitoringScheduleConfig, + ) -> Optional["MonitoringSchedule"]: """ - Update a PartnerApp resource - - Parameters: - app_version: The semantic version to upgrade the SageMaker Partner AI App to. Must be the same semantic version returned in the AvailableUpgrade field from DescribePartnerApp. Version skipping and downgrades are not supported. - client_token: A unique token that guarantees that the call to this API is idempotent. - tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. - + Update a MonitoringSchedule resource + Returns: - The PartnerApp resource. - + The MonitoringSchedule resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29264,46 +23776,39 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating partner_app resource.") + + logger.info("Updating monitoring_schedule resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "Arn": self.arn, - "MaintenanceConfig": maintenance_config, - "Tier": tier, - "ApplicationConfig": application_config, - "EnableIamSessionBasedIdentity": enable_iam_session_based_identity, - "EnableAutoMinorVersionUpgrade": enable_auto_minor_version_upgrade, - "AppVersion": app_version, - "ClientToken": client_token, - "Tags": tags, + 'MonitoringScheduleName': self.monitoring_schedule_name, + 'MonitoringScheduleConfig': monitoring_schedule_config, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_partner_app(**operation_input_args) + response = client.update_monitoring_schedule(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - client_token: Optional[StrPipeVar] = Unassigned(), - ) -> None: + + ) -> None: """ - Delete a PartnerApp resource - + Delete a MonitoringSchedule resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29312,40 +23817,39 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "Arn": self.arn, - "ClientToken": client_token, + 'MonitoringScheduleName': self.monitoring_schedule_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_partner_app(**operation_input_args) - + + client.delete_monitoring_schedule(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + @Base.add_validate_call def start( self, - partner_app_arn: StrPipeVar, + session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ - Start a PartnerApp resource - + Start a MonitoringSchedule resource + Parameters: session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29356,29 +23860,29 @@ def start( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "PartnerAppArn": partner_app_arn, + 'MonitoringScheduleName': self.monitoring_schedule_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling start_partner_app API") - response = client.start_partner_app(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling start_monitoring_schedule API") + response = client.start_monitoring_schedule(**operation_input_args) logger.debug(f"Response: {response}") - + + @Base.add_validate_call def stop(self) -> None: """ - Stop a PartnerApp resource - + Stop a MonitoringSchedule resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29389,232 +23893,306 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "PartnerAppArn": self.partner_app_arn, + 'MonitoringScheduleName': self.monitoring_schedule_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_partner_app(**operation_input_args) - + + client.stop_monitoring_schedule(**operation_input_args) + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Creating", "Updating", "Deleting", "Available", "Failed", "UpdateFailed", "Deleted" - ], + target_status: Literal['Pending', 'Failed', 'Scheduled', 'Stopped'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a PartnerApp resource to reach certain status. - + Wait for a MonitoringSchedule resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for PartnerApp to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for MonitoringSchedule to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.status + current_status = self.monitoring_schedule_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="PartnerApp", status=current_status, reason="(Unknown)" - ) - + raise FailedStatusError(resource_type="MonitoringSchedule", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="PartnerApp", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a PartnerApp resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for PartnerApp to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if current_status.lower() == "deleted": - logger.info("Resource was deleted.") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="PartnerApp", status=current_status) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e + raise TimeoutExceededError(resource_type="MonitoringSchedule", status=current_status) time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, + endpoint_name: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned(), + monitoring_type_equals: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["PartnerApp"]: + ) -> ResourceIterator["MonitoringSchedule"]: """ - Get all PartnerApp resources. - + Get all MonitoringSchedule resources + Parameters: + endpoint_name: Name of a specific endpoint to fetch schedules for. + sort_by: Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime. + sort_order: Whether to sort the results in Ascending or Descending order. The default is Descending. + next_token: The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request. + max_results: The maximum number of jobs to return in the response. The default value is 10. + name_contains: Filter for monitoring schedules whose name contains a specified string. + creation_time_before: A filter that returns only monitoring schedules created before a specified time. + creation_time_after: A filter that returns only monitoring schedules created after a specified time. + last_modified_time_before: A filter that returns only monitoring schedules modified before a specified time. + last_modified_time_after: A filter that returns only monitoring schedules modified after a specified time. + status_equals: A filter that returns only monitoring schedules modified before a specified time. + monitoring_job_definition_name: Gets a list of the monitoring schedules for the specified monitoring job definition. + monitoring_type_equals: A filter that returns only the monitoring schedules for the specified monitoring type. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed PartnerApp resources. - + Iterator for listed MonitoringSchedule resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` """ - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'EndpointName': endpoint_name, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'StatusEquals': status_equals, + 'MonitoringJobDefinitionName': monitoring_job_definition_name, + 'MonitoringTypeEquals': monitoring_type_equals, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + return ResourceIterator( client=client, - list_method="list_partner_apps", - summaries_key="Summaries", - summary_name="PartnerAppSummary", - resource_cls=PartnerApp, + list_method='list_monitoring_schedules', + summaries_key='MonitoringScheduleSummaries', + summary_name='MonitoringScheduleSummary', + resource_cls=MonitoringSchedule, + list_method_kwargs=operation_input_args ) -class PartnerAppPresignedUrl(Base): +class NotebookInstance(Base): """ - Class representing resource PartnerAppPresignedUrl - + Class representing resource NotebookInstance + Attributes: - arn: The ARN of the SageMaker Partner AI App to create the presigned URL for. - expires_in_seconds: The time that will pass before the presigned URL expires. - session_expiration_duration_in_seconds: Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in. - url: The presigned URL that you can use to access the SageMaker Partner AI App. - + notebook_instance_arn: The Amazon Resource Name (ARN) of the notebook instance. + notebook_instance_name: The name of the SageMaker AI notebook instance. + notebook_instance_status: The status of the notebook instance. + failure_reason: If status is Failed, the reason it failed. + url: The URL that you use to connect to the Jupyter notebook that is running in your notebook instance. + instance_type: The type of ML compute instance running on the notebook instance. + 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. + subnet_id: The ID of the VPC subnet. + security_groups: The IDs of the VPC security groups. + role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the instance. + kms_key_id: The Amazon Web Services KMS key ID SageMaker AI uses to encrypt data when storing it on the ML storage volume attached to the instance. + network_interface_id: The network interface IDs that SageMaker AI created at the time of creating the instance. + last_modified_time: A timestamp. Use this parameter to retrieve the time when the notebook instance was last modified. + creation_time: A timestamp. Use this parameter to return the time when the notebook instance was created + notebook_instance_lifecycle_config_name: Returns the name of a notebook instance lifecycle configuration. For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance + direct_internet_access: Describes whether SageMaker AI provides internet access to the notebook instance. If this value is set to Disabled, the notebook instance does not have internet access, and cannot connect to SageMaker AI training and endpoint services. For more information, see Notebook Instances Are Internet-Enabled by Default. + volume_size_in_gb: The size, in GB, of the ML storage volume attached to the notebook instance. + accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of the EI instance types associated with this notebook instance. + default_code_repository: The Git repository associated 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. + additional_code_repositories: An array of up to three Git repositories associated 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. + root_access: Whether root access is enabled or disabled for users of the notebook instance. 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. + platform_identifier: The platform identifier of the notebook instance runtime environment. + instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance + """ - - arn: StrPipeVar - expires_in_seconds: Optional[int] = Unassigned() - session_expiration_duration_in_seconds: Optional[int] = Unassigned() + notebook_instance_name: StrPipeVar + notebook_instance_arn: Optional[StrPipeVar] = Unassigned() + notebook_instance_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() url: Optional[StrPipeVar] = Unassigned() - + instance_type: Optional[StrPipeVar] = Unassigned() + ip_address_type: Optional[StrPipeVar] = Unassigned() + subnet_id: Optional[StrPipeVar] = Unassigned() + security_groups: Optional[List[StrPipeVar]] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + network_interface_id: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + notebook_instance_lifecycle_config_name: Optional[StrPipeVar] = Unassigned() + direct_internet_access: Optional[StrPipeVar] = Unassigned() + volume_size_in_gb: Optional[int] = Unassigned() + accelerator_types: Optional[List[StrPipeVar]] = Unassigned() + default_code_repository: Optional[StrPipeVar] = Unassigned() + additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned() + root_access: Optional[StrPipeVar] = Unassigned() + platform_identifier: Optional[StrPipeVar] = Unassigned() + instance_metadata_service_configuration: Optional[InstanceMetadataServiceConfiguration] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "partner_app_presigned_url_name" - resource_name_split = resource_name.split("_") + resource_name = 'notebook_instance_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object partner_app_presigned_url") + logger.error("Name attribute not found for object notebook_instance") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "subnet_id": { + "type": "string" + }, + "security_groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "NotebookInstance", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call def create( cls, - arn: StrPipeVar, - expires_in_seconds: Optional[int] = Unassigned(), - session_expiration_duration_in_seconds: Optional[int] = Unassigned(), + notebook_instance_name: StrPipeVar, + instance_type: StrPipeVar, + role_arn: StrPipeVar, + subnet_id: Optional[StrPipeVar] = Unassigned(), + security_group_ids: Optional[List[StrPipeVar]] = Unassigned(), + ip_address_type: Optional[StrPipeVar] = Unassigned(), + kms_key_id: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + lifecycle_config_name: Optional[StrPipeVar] = Unassigned(), + direct_internet_access: Optional[StrPipeVar] = Unassigned(), + volume_size_in_gb: Optional[int] = Unassigned(), + accelerator_types: Optional[List[StrPipeVar]] = Unassigned(), + default_code_repository: Optional[StrPipeVar] = Unassigned(), + additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned(), + root_access: Optional[StrPipeVar] = Unassigned(), + platform_identifier: Optional[StrPipeVar] = Unassigned(), + instance_metadata_service_configuration: Optional[InstanceMetadataServiceConfiguration] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["PartnerAppPresignedUrl"]: + region: Optional[StrPipeVar] = None, + ) -> Optional["NotebookInstance"]: """ - Create a PartnerAppPresignedUrl resource - + Create a NotebookInstance resource + Parameters: - arn: The ARN of the SageMaker Partner AI App to create the presigned URL for. - expires_in_seconds: The time that will pass before the presigned URL expires. - session_expiration_duration_in_seconds: Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in. + notebook_instance_name: The name of the new notebook instance. + instance_type: The type of ML compute instance to launch for the notebook instance. + 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. + subnet_id: The ID of the subnet in a VPC to which you would like to have a connectivity from your ML compute instance. + 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. + 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. + 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. + 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. + 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. + direct_internet_access: Sets whether SageMaker AI provides internet access to the notebook instance. If you set this to Disabled this notebook instance is able to access resources only in your VPC, and is not be able to connect to SageMaker AI training and endpoint services unless you configure a NAT Gateway in your VPC. For more information, see Notebook Instances Are Internet-Enabled by Default. You can set the value of this parameter to Disabled only if you set a value for the SubnetId parameter. + volume_size_in_gb: The size, in GB, of the ML storage volume to attach to the notebook instance. The default value is 5 GB. + accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of EI instance types to associate with this notebook instance. + 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. + 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. + 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. + platform_identifier: The platform identifier of the notebook instance runtime environment. The default value is notebook-al2-v2. + instance_metadata_service_configuration: Information on the IMDS configuration of the notebook instance session: Boto3 session. region: Region name. - + Returns: - The PartnerAppPresignedUrl resource. - + The NotebookInstance resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29623,106 +24201,168 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessDeniedException - ResourceNotFound: Resource being access is not found. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "Arn": arn, - "ExpiresInSeconds": expires_in_seconds, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, - } + + logger.info("Creating notebook_instance resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'NotebookInstanceName': notebook_instance_name, + 'InstanceType': instance_type, + 'SubnetId': subnet_id, + 'SecurityGroupIds': security_group_ids, + 'IpAddressType': ip_address_type, + 'RoleArn': role_arn, + 'KmsKeyId': kms_key_id, + 'Tags': tags, + 'LifecycleConfigName': lifecycle_config_name, + 'DirectInternetAccess': direct_internet_access, + 'VolumeSizeInGB': volume_size_in_gb, + 'AcceleratorTypes': accelerator_types, + 'DefaultCodeRepository': default_code_repository, + 'AdditionalCodeRepositories': additional_code_repositories, + 'RootAccess': root_access, + 'PlatformIdentifier': platform_identifier, + 'InstanceMetadataServiceConfiguration': instance_metadata_service_configuration, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='NotebookInstance', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_partner_app_presigned_url API") - response = client.create_partner_app_presigned_url(**operation_input_args) + + # create the resource + response = client.create_notebook_instance(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreatePartnerAppPresignedUrlResponse") - return cls(**operation_input_args, **transformed_response) - - -class PersistentVolume(Base): - """ - Class representing resource PersistentVolume - - Attributes: - persistent_volume_arn: - persistent_volume_name: - domain_id: - status: - persistent_volume_configuration: - owning_entity_arn: - creation_time: - last_modified_time: - failure_reason: - - """ - - persistent_volume_name: StrPipeVar - domain_id: StrPipeVar - persistent_volume_arn: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - persistent_volume_configuration: Optional[PersistentVolumeConfiguration] = Unassigned() - owning_entity_arn: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "persistent_volume_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object persistent_volume") - return None - + + return cls.get(notebook_instance_name=notebook_instance_name, session=session, region=region) + @classmethod @Base.add_validate_call - def create( + def get( cls, - persistent_volume_name: StrPipeVar, - domain_id: StrPipeVar, - persistent_volume_configuration: PersistentVolumeConfiguration, - tags: Optional[List[Tag]] = Unassigned(), - owning_entity_arn: Optional[StrPipeVar] = Unassigned(), + notebook_instance_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["PersistentVolume"]: + ) -> Optional["NotebookInstance"]: + """ + Get a NotebookInstance resource + + Parameters: + notebook_instance_name: The name of the notebook instance that you want information about. + session: Boto3 session. + region: Region name. + + Returns: + The NotebookInstance resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + operation_input_args = { + 'NotebookInstanceName': notebook_instance_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_notebook_instance(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeNotebookInstanceOutput') + notebook_instance = cls(**transformed_response) + return notebook_instance + + @Base.add_validate_call + def refresh( + self, + + ) -> Optional["NotebookInstance"]: + """ + Refresh a NotebookInstance resource + + Returns: + The NotebookInstance resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + operation_input_args = { + 'NotebookInstanceName': self.notebook_instance_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_notebook_instance(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeNotebookInstanceOutput', self) + return self + + @populate_inputs_decorator + @Base.add_validate_call + def update( + self, + instance_type: Optional[StrPipeVar] = Unassigned(), + ip_address_type: Optional[StrPipeVar] = Unassigned(), + platform_identifier: Optional[StrPipeVar] = Unassigned(), + role_arn: Optional[StrPipeVar] = Unassigned(), + lifecycle_config_name: Optional[StrPipeVar] = Unassigned(), + disassociate_lifecycle_config: Optional[bool] = Unassigned(), + volume_size_in_gb: Optional[int] = Unassigned(), + default_code_repository: Optional[StrPipeVar] = Unassigned(), + additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned(), + accelerator_types: Optional[List[StrPipeVar]] = Unassigned(), + disassociate_accelerator_types: Optional[bool] = Unassigned(), + disassociate_default_code_repository: Optional[bool] = Unassigned(), + disassociate_additional_code_repositories: Optional[bool] = Unassigned(), + root_access: Optional[StrPipeVar] = Unassigned(), + instance_metadata_service_configuration: Optional[InstanceMetadataServiceConfiguration] = Unassigned(), + ) -> Optional["NotebookInstance"]: """ - Create a PersistentVolume resource - + Update a NotebookInstance resource + Parameters: - persistent_volume_name: - domain_id: - persistent_volume_configuration: - tags: - owning_entity_arn: - session: Boto3 session. - region: Region name. - + 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. + disassociate_lifecycle_config: Set to true to remove the notebook instance lifecycle configuration currently associated with the notebook instance. This operation is idempotent. If you specify a lifecycle configuration that is not associated with the notebook instance when you call this method, it does not throw an error. + disassociate_accelerator_types: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify a list of the EI instance types to remove from this notebook instance. + disassociate_default_code_repository: The name or URL of the default Git repository to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error. + disassociate_additional_code_repositories: A list of names or URLs of the default Git repositories to remove from this notebook instance. This operation is idempotent. If you specify a Git repository that is not associated with the notebook instance when you call this method, it does not throw an error. + Returns: - The PersistentVolume resource. - + The NotebookInstance resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29731,69 +24371,52 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating persistent_volume resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "PersistentVolumeName": persistent_volume_name, - "DomainId": domain_id, - "PersistentVolumeConfiguration": persistent_volume_configuration, - "Tags": tags, - "OwningEntityArn": owning_entity_arn, + + logger.info("Updating notebook_instance resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'NotebookInstanceName': self.notebook_instance_name, + 'InstanceType': instance_type, + 'IpAddressType': ip_address_type, + 'PlatformIdentifier': platform_identifier, + 'RoleArn': role_arn, + 'LifecycleConfigName': lifecycle_config_name, + 'DisassociateLifecycleConfig': disassociate_lifecycle_config, + 'VolumeSizeInGB': volume_size_in_gb, + 'DefaultCodeRepository': default_code_repository, + 'AdditionalCodeRepositories': additional_code_repositories, + 'AcceleratorTypes': accelerator_types, + 'DisassociateAcceleratorTypes': disassociate_accelerator_types, + 'DisassociateDefaultCodeRepository': disassociate_default_code_repository, + 'DisassociateAdditionalCodeRepositories': disassociate_additional_code_repositories, + 'RootAccess': root_access, + 'InstanceMetadataServiceConfiguration': instance_metadata_service_configuration, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="PersistentVolume", operation_input_args=operation_input_args - ) - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_persistent_volume(**operation_input_args) + response = client.update_notebook_instance(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - persistent_volume_name=persistent_volume_name, - domain_id=domain_id, - session=session, - region=region, - ) - - @classmethod + self.refresh() + + return self + @Base.add_validate_call - def get( - cls, - persistent_volume_name: StrPipeVar, - domain_id: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["PersistentVolume"]: + def delete( + self, + + ) -> None: """ - Get a PersistentVolume resource - - Parameters: - persistent_volume_name: - domain_id: - session: Boto3 session. - region: Region name. - - Returns: - The PersistentVolume resource. - + Delete a NotebookInstance resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29802,41 +24425,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "PersistentVolumeName": persistent_volume_name, - "DomainId": domain_id, + 'NotebookInstanceName': self.notebook_instance_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_persistent_volume(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribePersistentVolumeResponse") - persistent_volume = cls(**transformed_response) - return persistent_volume - + + client.delete_notebook_instance(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call - def refresh( + def start( self, - ) -> Optional["PersistentVolume"]: + + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: """ - Refresh a PersistentVolume resource - - Returns: - The PersistentVolume resource. - + Start a NotebookInstance resource + + Parameters: + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29845,33 +24465,31 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + + operation_input_args = { - "PersistentVolumeName": self.persistent_volume_name, - "DomainId": self.domain_id, + 'NotebookInstanceName': self.notebook_instance_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_persistent_volume(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribePersistentVolumeResponse", self) - return self - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling start_notebook_instance API") + response = client.start_notebook_instance(**operation_input_args) + logger.debug(f"Response: {response}") + + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a PersistentVolume resource - + Stop a NotebookInstance resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29880,84 +24498,75 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "PersistentVolumeName": self.persistent_volume_name, - "DomainId": self.domain_id, + 'NotebookInstanceName': self.notebook_instance_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_persistent_volume(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_notebook_instance(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Creating", "Available", "Attaching", "InUse", "Deleting", "Failed"], + target_status: Literal['Pending', 'InService', 'Stopping', 'Stopped', 'Failed', 'Deleting', 'Updating'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a PersistentVolume resource to reach certain status. - + Wait for a NotebookInstance resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for PersistentVolume to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for NotebookInstance to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.status + current_status = self.notebook_instance_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="PersistentVolume", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="NotebookInstance", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="PersistentVolume", status=current_status - ) + raise TimeoutExceededError(resource_type="NotebookInstance", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -29965,14 +24574,14 @@ def wait_for_delete( timeout: Optional[int] = None, ) -> None: """ - Wait for a PersistentVolume resource to be deleted. - + Wait for a NotebookInstance resource to be deleted. + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -29986,148 +24595,180 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for PersistentVolume to be deleted...") + progress.add_task("Waiting for NotebookInstance to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() - current_status = self.status + current_status = self.notebook_instance_status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="PersistentVolume", status=current_status - ) + raise TimeoutExceededError(resource_type="NotebookInstance", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) + + @classmethod + @Base.add_validate_call + def get_all( + cls, + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + notebook_instance_lifecycle_config_name_contains: Optional[StrPipeVar] = Unassigned(), + default_code_repository_contains: Optional[StrPipeVar] = Unassigned(), + additional_code_repository_equals: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["NotebookInstance"]: + """ + Get all NotebookInstance resources + + Parameters: + next_token: If the previous call to the ListNotebookInstances is truncated, the response includes a NextToken. You can use this token in your subsequent ListNotebookInstances request to fetch the next set of notebook instances. You might specify a filter or a sort order in your request. When response is truncated, you must use the same values for the filer and sort order in the next request. + max_results: The maximum number of notebook instances to return. + sort_by: The field to sort results by. The default is Name. + sort_order: The sort order for results. + name_contains: A string in the notebook instances' name. This filter returns only notebook instances whose name contains the specified string. + creation_time_before: A filter that returns only notebook instances that were created before the specified time (timestamp). + creation_time_after: A filter that returns only notebook instances that were created after the specified time (timestamp). + last_modified_time_before: A filter that returns only notebook instances that were modified before the specified time (timestamp). + last_modified_time_after: A filter that returns only notebook instances that were modified after the specified time (timestamp). + status_equals: A filter that returns only notebook instances with the specified status. + notebook_instance_lifecycle_config_name_contains: A string in the name of a notebook instances lifecycle configuration associated with this notebook instance. This filter returns only notebook instances associated with a lifecycle configuration with a name that contains the specified string. + default_code_repository_contains: A string in the name or URL of a Git repository associated with this notebook instance. This filter returns only notebook instances associated with a git repository with a name that contains the specified string. + additional_code_repository_equals: A filter that returns only notebook instances with associated with the specified git repository. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed NotebookInstance resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'StatusEquals': status_equals, + 'NotebookInstanceLifecycleConfigNameContains': notebook_instance_lifecycle_config_name_contains, + 'DefaultCodeRepositoryContains': default_code_repository_contains, + 'AdditionalCodeRepositoryEquals': additional_code_repository_equals, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_notebook_instances', + summaries_key='NotebookInstances', + summary_name='NotebookInstanceSummary', + resource_cls=NotebookInstance, + list_method_kwargs=operation_input_args + ) -class Pipeline(Base): +class NotebookInstanceLifecycleConfig(Base): """ - Class representing resource Pipeline - + Class representing resource NotebookInstanceLifecycleConfig + Attributes: - pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. - pipeline_name: The name of the pipeline. - pipeline_display_name: The display name of the pipeline. - pipeline_definition: The JSON pipeline definition. - pipeline_description: The description of the pipeline. - role_arn: The Amazon Resource Name (ARN) that the pipeline uses to execute. - pipeline_status: The status of the pipeline execution. - creation_time: The time when the pipeline was created. - last_modified_time: The time when the pipeline was last modified. - last_run_time: The time when the pipeline was last run. - created_by: - last_modified_by: - parallelism_configuration: Lists the parallelism configuration applied to the pipeline. - pipeline_version_display_name: The display name of the pipeline version. - pipeline_version_description: The description of the pipeline version. - + notebook_instance_lifecycle_config_arn: The Amazon Resource Name (ARN) of the lifecycle configuration. + notebook_instance_lifecycle_config_name: The name of the lifecycle configuration. + on_create: The shell script that runs only once, when you create a notebook instance. + on_start: The shell script that runs every time you start a notebook instance, including when you create the notebook instance. + last_modified_time: A timestamp that tells when the lifecycle configuration was last modified. + creation_time: A timestamp that tells when the lifecycle configuration was created. + """ - - pipeline_name: StrPipeVar - pipeline_arn: Optional[StrPipeVar] = Unassigned() - pipeline_display_name: Optional[StrPipeVar] = Unassigned() - pipeline_definition: Optional[StrPipeVar] = Unassigned() - pipeline_description: Optional[StrPipeVar] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - pipeline_status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() + notebook_instance_lifecycle_config_name: StrPipeVar + notebook_instance_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned() + on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - last_run_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() - pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() - pipeline_version_description: Optional[StrPipeVar] = Unassigned() - + creation_time: Optional[datetime.datetime] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "pipeline_name" - resource_name_split = resource_name.split("_") + resource_name = 'notebook_instance_lifecycle_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object pipeline") + logger.error("Name attribute not found for object notebook_instance_lifecycle_config") return None - - def populate_inputs_decorator(create_func): - @functools.wraps(create_func) - def wrapper(*args, **kwargs): - config_schema_for_resource = {"role_arn": {"type": "string"}} - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Pipeline", **kwargs - ), - ) - - return wrapper - + @classmethod - @populate_inputs_decorator @Base.add_validate_call def create( cls, - pipeline_name: StrPipeVar, - client_request_token: StrPipeVar, - role_arn: StrPipeVar, - pipeline_display_name: Optional[StrPipeVar] = Unassigned(), - pipeline_definition: Optional[StrPipeVar] = Unassigned(), - pipeline_definition_s3_location: Optional[PipelineDefinitionS3Location] = Unassigned(), - pipeline_description: Optional[StrPipeVar] = Unassigned(), + notebook_instance_lifecycle_config_name: StrPipeVar, + on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), + on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Pipeline"]: + ) -> Optional["NotebookInstanceLifecycleConfig"]: """ - Create a Pipeline resource - + Create a NotebookInstanceLifecycleConfig resource + Parameters: - pipeline_name: The name of the pipeline. - client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. - role_arn: The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources. - pipeline_display_name: The display name of the pipeline. - pipeline_definition: The JSON pipeline definition of the pipeline. - pipeline_definition_s3_location: The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location. - pipeline_description: A description of the pipeline. - tags: A list of tags to apply to the created pipeline. - parallelism_configuration: This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default. + notebook_instance_lifecycle_config_name: The name of the lifecycle configuration. + on_create: A shell script that runs only once, when you create a notebook instance. The shell script must be a base64-encoded string. + on_start: A shell script that runs every time you start a notebook instance, including when you create the notebook instance. The shell script must be a base64-encoded string. + 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. session: Boto3 session. region: Region name. - + Returns: - The Pipeline resource. - + The NotebookInstanceLifecycleConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30136,69 +24777,56 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating pipeline resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + logger.info("Creating notebook_instance_lifecycle_config resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "PipelineName": pipeline_name, - "PipelineDisplayName": pipeline_display_name, - "PipelineDefinition": pipeline_definition, - "PipelineDefinitionS3Location": pipeline_definition_s3_location, - "PipelineDescription": pipeline_description, - "ClientRequestToken": client_request_token, - "RoleArn": role_arn, - "Tags": tags, - "ParallelismConfiguration": parallelism_configuration, + 'NotebookInstanceLifecycleConfigName': notebook_instance_lifecycle_config_name, + 'OnCreate': on_create, + 'OnStart': on_start, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Pipeline", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='NotebookInstanceLifecycleConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_pipeline(**operation_input_args) + response = client.create_notebook_instance_lifecycle_config(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(pipeline_name=pipeline_name, session=session, region=region) - + + return cls.get(notebook_instance_lifecycle_config_name=notebook_instance_lifecycle_config_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - pipeline_name: StrPipeVar, - pipeline_version_id: Optional[int] = Unassigned(), + notebook_instance_lifecycle_config_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Pipeline"]: + ) -> Optional["NotebookInstanceLifecycleConfig"]: """ - Get a Pipeline resource - + Get a NotebookInstanceLifecycleConfig resource + Parameters: - pipeline_name: The name or Amazon Resource Name (ARN) of the pipeline to describe. - pipeline_version_id: The ID of the pipeline version to describe. + notebook_instance_lifecycle_config_name: The name of the lifecycle configuration to describe. session: Boto3 session. region: Region name. - + Returns: - The Pipeline resource. - + The NotebookInstanceLifecycleConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30207,42 +24835,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "PipelineName": pipeline_name, - "PipelineVersionId": pipeline_version_id, + 'NotebookInstanceLifecycleConfigName': notebook_instance_lifecycle_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_pipeline(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_notebook_instance_lifecycle_config(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribePipelineResponse") - pipeline = cls(**transformed_response) - return pipeline - + transformed_response = transform(response, 'DescribeNotebookInstanceLifecycleConfigOutput') + notebook_instance_lifecycle_config = cls(**transformed_response) + return notebook_instance_lifecycle_config + @Base.add_validate_call def refresh( self, - pipeline_version_id: Optional[int] = Unassigned(), - ) -> Optional["Pipeline"]: + + ) -> Optional["NotebookInstanceLifecycleConfig"]: """ - Refresh a Pipeline resource - + Refresh a NotebookInstanceLifecycleConfig resource + Returns: - The Pipeline resource. - + The NotebookInstanceLifecycleConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30251,46 +24875,36 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "PipelineName": self.pipeline_name, - "PipelineVersionId": pipeline_version_id, + 'NotebookInstanceLifecycleConfigName': self.notebook_instance_lifecycle_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_pipeline(**operation_input_args) - + response = client.describe_notebook_instance_lifecycle_config(**operation_input_args) + # deserialize response and update self - transform(response, "DescribePipelineResponse", self) + transform(response, 'DescribeNotebookInstanceLifecycleConfigOutput', self) return self - - @populate_inputs_decorator + @Base.add_validate_call def update( self, - pipeline_display_name: Optional[StrPipeVar] = Unassigned(), - pipeline_definition: Optional[StrPipeVar] = Unassigned(), - pipeline_definition_s3_location: Optional[PipelineDefinitionS3Location] = Unassigned(), - pipeline_description: Optional[StrPipeVar] = Unassigned(), - role_arn: Optional[StrPipeVar] = Unassigned(), - parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), - ) -> Optional["Pipeline"]: + on_create: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), + on_start: Optional[List[NotebookInstanceLifecycleHook]] = Unassigned(), + ) -> Optional["NotebookInstanceLifecycleConfig"]: """ - Update a Pipeline resource - - Parameters: - pipeline_definition_s3_location: The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location. - + Update a NotebookInstanceLifecycleConfig resource + Returns: - The Pipeline resource. - + The NotebookInstanceLifecycleConfig resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30299,213 +24913,97 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - - logger.info("Updating pipeline resource.") + + logger.info("Updating notebook_instance_lifecycle_config resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "PipelineName": self.pipeline_name, - "PipelineDisplayName": pipeline_display_name, - "PipelineDefinition": pipeline_definition, - "PipelineDefinitionS3Location": pipeline_definition_s3_location, - "PipelineDescription": pipeline_description, - "RoleArn": role_arn, - "ParallelismConfiguration": parallelism_configuration, + 'NotebookInstanceLifecycleConfigName': self.notebook_instance_lifecycle_config_name, + 'OnCreate': on_create, + 'OnStart': on_start, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_pipeline(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - @Base.add_validate_call - def delete( - self, - client_request_token: StrPipeVar, - ) -> None: - """ - Delete a Pipeline resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "PipelineName": self.pipeline_name, - "ClientRequestToken": client_request_token, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_pipeline(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal["Active", "Deleting"], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a Pipeline resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for Pipeline to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.pipeline_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Pipeline", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a Pipeline resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for Pipeline to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: + response = client.update_notebook_instance_lifecycle_config(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + + @Base.add_validate_call + def delete( + self, + + ) -> None: + """ + Delete a NotebookInstanceLifecycleConfig resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` try: - self.refresh() - current_status = self.pipeline_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Pipeline", status=current_status) + # AWS service call here except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) - + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'NotebookInstanceLifecycleConfigName': self.notebook_instance_lifecycle_config_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_notebook_instance_lifecycle_config(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @classmethod @Base.add_validate_call def get_all( cls, - pipeline_name_prefix: Optional[StrPipeVar] = Unassigned(), - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Pipeline"]: + ) -> ResourceIterator["NotebookInstanceLifecycleConfig"]: """ - Get all Pipeline resources - + Get all NotebookInstanceLifecycleConfig resources + Parameters: - pipeline_name_prefix: The prefix of the pipeline name. - created_after: A filter that returns the pipelines that were created after a specified time. - created_before: A filter that returns the pipelines that were created before a specified time. - sort_by: The field by which to sort results. The default is CreatedTime. + next_token: If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, the response includes a NextToken. To get the next set of lifecycle configurations, use the token in the next request. + max_results: The maximum number of lifecycle configurations to return in the response. + sort_by: Sorts the list of results. The default is CreationTime. sort_order: The sort order for results. - next_token: If the result of the previous ListPipelines request was truncated, the response includes a NextToken. To retrieve the next set of pipelines, use the token in the next request. - max_results: The maximum number of pipelines to return in the response. + name_contains: A string in the lifecycle configuration name. This filter returns only lifecycle configurations whose name contains the specified string. + creation_time_before: A filter that returns only lifecycle configurations that were created before the specified time (timestamp). + creation_time_after: A filter that returns only lifecycle configurations that were created after the specified time (timestamp). + last_modified_time_before: A filter that returns only lifecycle configurations that were modified before the specified time (timestamp). + last_modified_time_after: A filter that returns only lifecycle configurations that were modified after the specified time (timestamp). session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Pipeline resources. - + Iterator for listed NotebookInstanceLifecycleConfig resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30515,109 +25013,177 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "PipelineNamePrefix": pipeline_name_prefix, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_pipelines", - summaries_key="PipelineSummaries", - summary_name="PipelineSummary", - resource_cls=Pipeline, - list_method_kwargs=operation_input_args, + list_method='list_notebook_instance_lifecycle_configs', + summaries_key='NotebookInstanceLifecycleConfigs', + summary_name='NotebookInstanceLifecycleConfigSummary', + resource_cls=NotebookInstanceLifecycleConfig, + list_method_kwargs=operation_input_args ) -class PipelineExecution(Base): +class OptimizationJob(Base): """ - Class representing resource PipelineExecution - + Class representing resource OptimizationJob + Attributes: - pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. - pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. - pipeline_execution_display_name: The display name of the pipeline execution. - pipeline_execution_status: The status of the pipeline execution. - pipeline_execution_description: The description of the pipeline execution. - pipeline_experiment_config: - failure_reason: If the execution failed, a message describing why. - creation_time: The time when the pipeline execution was created. - last_modified_time: The time when the pipeline execution was modified last. - created_by: - last_modified_by: - parallelism_configuration: The parallelism configuration applied to the pipeline. - selective_execution_config: The selective execution configuration applied to the pipeline run. - pipeline_version_id: The ID of the pipeline version. - m_lflow_config: - + optimization_job_arn: The Amazon Resource Name (ARN) of the optimization job. + optimization_job_status: The current status of the optimization job. + creation_time: The time when you created the optimization job. + last_modified_time: The time when the optimization job was last updated. + optimization_job_name: The name that you assigned to the optimization job. + model_source: The location of the source model to optimize with an optimization job. + deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. + optimization_configs: Settings for each of the optimization techniques that the job applies. + output_config: Details for where to store the optimized model that you create with the optimization job. + role_arn: The ARN of the IAM role that you assigned to the optimization job. + stopping_condition: + optimization_start_time: The time when the optimization job started. + optimization_end_time: The time when the optimization job finished processing. + failure_reason: If the optimization job status is FAILED, the reason for the failure. + optimization_environment: The environment variables to set in the model container. + max_instance_count: The maximum number of instances to use for the optimization job. + optimization_output: Output values produced by an optimization job. + vpc_config: A VPC in Amazon VPC that your optimized model has access to. + """ - - pipeline_execution_arn: StrPipeVar - pipeline_arn: Optional[StrPipeVar] = Unassigned() - pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned() - pipeline_execution_status: Optional[StrPipeVar] = Unassigned() - pipeline_execution_description: Optional[StrPipeVar] = Unassigned() - pipeline_experiment_config: Optional[PipelineExperimentConfig] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() + optimization_job_name: StrPipeVar + optimization_job_arn: Optional[StrPipeVar] = Unassigned() + optimization_job_status: Optional[StrPipeVar] = Unassigned() + optimization_start_time: Optional[datetime.datetime] = Unassigned() + optimization_end_time: Optional[datetime.datetime] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() - selective_execution_config: Optional[SelectiveExecutionConfig] = Unassigned() - pipeline_version_id: Optional[int] = Unassigned() - m_lflow_config: Optional[MLflowConfiguration] = Unassigned() - + failure_reason: Optional[StrPipeVar] = Unassigned() + model_source: Optional[OptimizationJobModelSource] = Unassigned() + optimization_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + deployment_instance_type: Optional[StrPipeVar] = Unassigned() + max_instance_count: Optional[int] = Unassigned() + optimization_configs: Optional[List[OptimizationConfig]] = Unassigned() + output_config: Optional[OptimizationJobOutputConfig] = Unassigned() + optimization_output: Optional[OptimizationOutput] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + stopping_condition: Optional[StoppingCondition] = Unassigned() + vpc_config: Optional[OptimizationVpcConfig] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "pipeline_execution_name" - resource_name_split = resource_name.split("_") + resource_name = 'optimization_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object pipeline_execution") + logger.error("Name attribute not found for object optimization_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "model_source": { + "s3": { + "s3_uri": { + "type": "string" + } + } + }, + "output_config": { + "s3_output_location": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "role_arn": { + "type": "string" + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "OptimizationJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call - def get( + def create( cls, - pipeline_execution_arn: StrPipeVar, + optimization_job_name: StrPipeVar, + role_arn: StrPipeVar, + model_source: OptimizationJobModelSource, + deployment_instance_type: StrPipeVar, + optimization_configs: List[OptimizationConfig], + output_config: OptimizationJobOutputConfig, + stopping_condition: StoppingCondition, + max_instance_count: Optional[int] = Unassigned(), + optimization_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + vpc_config: Optional[OptimizationVpcConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["PipelineExecution"]: + ) -> Optional["OptimizationJob"]: """ - Get a PipelineExecution resource - + Create a OptimizationJob resource + Parameters: - pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. + optimization_job_name: A custom name for the new optimization job. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. During model optimization, Amazon SageMaker AI needs your permission to: Read input data from an S3 bucket Write model artifacts to an S3 bucket Write logs to Amazon CloudWatch Logs Publish metrics to Amazon CloudWatch You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker AI, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker AI Roles. + model_source: The location of the source model to optimize with an optimization job. + deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. + optimization_configs: Settings for each of the optimization techniques that the job applies. + output_config: Details for where to store the optimized model that you create with the optimization job. + stopping_condition: + max_instance_count: The maximum number of instances to use for the optimization job. + optimization_environment: The environment variables to set in the model container. + tags: A list of key-value pairs associated with the optimization job. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + vpc_config: A VPC in Amazon VPC that your optimized model has access to. session: Boto3 session. region: Region name. - + Returns: - The PipelineExecution resource. - + The OptimizationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30626,40 +25192,64 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "PipelineExecutionArn": pipeline_execution_arn, - } + + logger.info("Creating optimization_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'OptimizationJobName': optimization_job_name, + 'RoleArn': role_arn, + 'ModelSource': model_source, + 'DeploymentInstanceType': deployment_instance_type, + 'MaxInstanceCount': max_instance_count, + 'OptimizationEnvironment': optimization_environment, + 'OptimizationConfigs': optimization_configs, + 'OutputConfig': output_config, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + 'VpcConfig': vpc_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='OptimizationJob', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_pipeline_execution(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribePipelineExecutionResponse") - pipeline_execution = cls(**transformed_response) - return pipeline_execution - + + # create the resource + response = client.create_optimization_job(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(optimization_job_name=optimization_job_name, session=session, region=region) + + @classmethod @Base.add_validate_call - def refresh( - self, - ) -> Optional["PipelineExecution"]: + def get( + cls, + optimization_job_name: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["OptimizationJob"]: """ - Refresh a PipelineExecution resource - + Get a OptimizationJob resource + + Parameters: + optimization_job_name: The name that you assigned to the optimization job. + session: Boto3 session. + region: Region name. + Returns: - The PipelineExecution resource. - + The OptimizationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30670,36 +25260,37 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, + 'OptimizationJobName': optimization_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_pipeline_execution(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribePipelineExecutionResponse", self) - return self - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_optimization_job(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeOptimizationJobResponse') + optimization_job = cls(**transformed_response) + return optimization_job + @Base.add_validate_call - def update( + def refresh( self, - pipeline_execution_description: Optional[StrPipeVar] = Unassigned(), - pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned(), - parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), - ) -> Optional["PipelineExecution"]: + + ) -> Optional["OptimizationJob"]: """ - Update a PipelineExecution resource - + Refresh a OptimizationJob resource + Returns: - The PipelineExecution resource. - + The OptimizationJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30708,50 +25299,33 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating pipeline_execution resource.") - client = Base.get_sagemaker_client() - + operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - "PipelineExecutionDescription": pipeline_execution_description, - "PipelineExecutionDisplayName": pipeline_execution_display_name, - "ParallelismConfiguration": parallelism_configuration, + 'OptimizationJobName': self.optimization_job_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_pipeline_execution(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - + + client = Base.get_sagemaker_client() + response = client.describe_optimization_job(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeOptimizationJobResponse', self) return self - + @Base.add_validate_call - def start( + def delete( self, - pipeline_name: StrPipeVar, - client_request_token: StrPipeVar, - pipeline_parameters: Optional[List[Parameter]] = Unassigned(), - mlflow_experiment_name: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + + ) -> None: """ - Start a PipelineExecution resource - - Parameters: - session: Boto3 session. - region: Region name. - + Delete a OptimizationJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30760,41 +25334,29 @@ def start( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "PipelineName": pipeline_name, - "PipelineExecutionDisplayName": self.pipeline_execution_display_name, - "PipelineParameters": pipeline_parameters, - "PipelineExecutionDescription": self.pipeline_execution_description, - "ClientRequestToken": client_request_token, - "ParallelismConfiguration": self.parallelism_configuration, - "SelectiveExecutionConfig": self.selective_execution_config, - "PipelineVersionId": self.pipeline_version_id, - "MlflowExperimentName": mlflow_experiment_name, + 'OptimizationJobName': self.optimization_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling start_pipeline_execution API") - response = client.start_pipeline_execution(**operation_input_args) - logger.debug(f"Response: {response}") - + + client.delete_optimization_job(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call def stop(self) -> None: """ - Stop a PipelineExecution resource - + Stop a OptimizationJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30803,115 +25365,118 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - "ClientRequestToken": self.client_request_token, + 'OptimizationJobName': self.optimization_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_pipeline_execution(**operation_input_args) - + + client.stop_optimization_job(**operation_input_args) + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call - def wait_for_status( + def wait( self, - target_status: Literal["Executing", "Stopping", "Stopped", "Failed", "Succeeded"], poll: int = 5, timeout: Optional[int] = None, + ) -> None: """ - Wait for a PipelineExecution resource to reach certain status. - + Wait for a OptimizationJob resource. + Parameters: - target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. + """ + terminal_states = ['COMPLETED', 'FAILED', 'STOPPED'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for PipelineExecution to reach [bold]{target_status} status...") + progress.add_task("Waiting for OptimizationJob...") status = Status("Current status:") - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.pipeline_execution_status + current_status = self.optimization_job_status status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: + + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="OptimizationJob", status=current_status, reason=self.failure_reason) + return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="PipelineExecution", - status=current_status, - reason=self.failure_reason, - ) - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="PipelineExecution", status=current_status - ) + raise TimeoutExceededError(resource_type="OptimizationJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - pipeline_name: StrPipeVar, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + optimization_contains: Optional[StrPipeVar] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["PipelineExecution"]: + ) -> ResourceIterator["OptimizationJob"]: """ - Get all PipelineExecution resources - + Get all OptimizationJob resources + Parameters: - pipeline_name: The name or Amazon Resource Name (ARN) of the pipeline. - created_after: A filter that returns the pipeline executions that were created after a specified time. - created_before: A filter that returns the pipeline executions that were created before a specified time. - sort_by: The field by which to sort results. The default is CreatedTime. - sort_order: The sort order for results. - next_token: If the result of the previous ListPipelineExecutions request was truncated, the response includes a NextToken. To retrieve the next set of pipeline executions, use the token in the next request. - max_results: The maximum number of pipeline executions to return in the response. + next_token: A token that you use to get the next set of results following a truncated response. If the response to the previous request was truncated, that response provides the value for this token. + max_results: The maximum number of optimization jobs to return in the response. The default is 50. + creation_time_after: Filters the results to only those optimization jobs that were created after the specified time. + creation_time_before: Filters the results to only those optimization jobs that were created before the specified time. + last_modified_time_after: Filters the results to only those optimization jobs that were updated after the specified time. + last_modified_time_before: Filters the results to only those optimization jobs that were updated before the specified time. + optimization_contains: Filters the results to only those optimization jobs that apply the specified optimization techniques. You can specify either Quantization or Compilation. + name_contains: Filters the results to only those optimization jobs with a name that contains the specified string. + status_equals: Filters the results to only those optimization jobs with the specified status. + sort_by: The field by which to sort the optimization jobs in the response. The default is CreationTime + sort_order: The sort order for results. The default is Ascending session: Boto3 session. region: Region name. - + Returns: - Iterator for listed PipelineExecution resources. - + Iterator for listed OptimizationJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -30920,203 +25485,158 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "PipelineName": pipeline_name, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'OptimizationContains': optimization_contains, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_pipeline_executions", - summaries_key="PipelineExecutionSummaries", - summary_name="PipelineExecutionSummary", - resource_cls=PipelineExecution, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def get_pipeline_definition( - self, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[DescribePipelineDefinitionForExecutionResponse]: - """ - Describes the details of an execution's pipeline definition. - - Parameters: - session: Boto3 session. - region: Region name. - - Returns: - DescribePipelineDefinitionForExecutionResponse - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + list_method='list_optimization_jobs', + summaries_key='OptimizationJobSummaries', + summary_name='OptimizationJobSummary', + resource_cls=OptimizationJob, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling describe_pipeline_definition_for_execution API") - response = client.describe_pipeline_definition_for_execution(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "DescribePipelineDefinitionForExecutionResponse") - return DescribePipelineDefinitionForExecutionResponse(**transformed_response) - - @Base.add_validate_call - def get_all_steps( - self, - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[PipelineExecutionStep]: - """ - Gets a list of PipeLineExecutionStep objects. - - Parameters: - next_token: If the result of the previous ListPipelineExecutionSteps request was truncated, the response includes a NextToken. To retrieve the next set of pipeline execution steps, use the token in the next request. - max_results: The maximum number of pipeline execution steps to return in the response. - sort_order: The field by which to sort results. The default is CreatedTime. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed PipelineExecutionStep. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - "SortOrder": sort_order, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - return ResourceIterator( - client=client, - list_method="list_pipeline_execution_steps", - summaries_key="PipelineExecutionSteps", - summary_name="PipelineExecutionStep", - resource_cls=PipelineExecutionStep, - list_method_kwargs=operation_input_args, - ) +class PartnerApp(Base): + """ + Class representing resource PartnerApp + + Attributes: + arn: The ARN of the SageMaker Partner AI App that was described. + name: The name of the SageMaker Partner AI App. + type: The type of SageMaker Partner AI App. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler. + 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. + creation_time: The time that the SageMaker Partner AI App was created. + last_modified_time: The time that the SageMaker Partner AI App was last modified. + execution_role_arn: The ARN of the IAM role associated with the SageMaker Partner AI App. + kms_key_id: The Amazon Web Services KMS customer managed key used to encrypt the data at rest associated with SageMaker Partner AI Apps. + base_url: The URL of the SageMaker Partner AI App that the Application SDK uses to support in-app calls for the user. + maintenance_config: Maintenance configuration settings for the SageMaker Partner AI App. + tier: The instance type and size of the cluster attached to the SageMaker Partner AI App. + version: The version of the SageMaker Partner AI App. + application_config: Configuration settings for the SageMaker Partner AI App. + auth_type: The authorization type that users use to access the SageMaker Partner AI App. + enable_iam_session_based_identity: When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user. + error: This is an error field object that contains the error code and the reason for an operation failure. + enable_auto_minor_version_upgrade: Indicates whether the SageMaker Partner AI App is configured for automatic minor version upgrades during scheduled maintenance windows. + current_version_eol_date: The end-of-life date for the current version of the SageMaker Partner AI App. + available_upgrade: A map of available minor version upgrades for the SageMaker Partner AI App. The key is the semantic version number, and the value is a list of release notes for that version. A null value indicates no upgrades are available. + + """ + arn: StrPipeVar + name: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + execution_role_arn: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + base_url: Optional[StrPipeVar] = Unassigned() + maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned() + tier: Optional[StrPipeVar] = Unassigned() + version: Optional[StrPipeVar] = Unassigned() + application_config: Optional[PartnerAppConfig] = Unassigned() + auth_type: Optional[StrPipeVar] = Unassigned() + enable_iam_session_based_identity: Optional[bool] = Unassigned() + error: Optional[ErrorInfo] = Unassigned() + enable_auto_minor_version_upgrade: Optional[bool] = Unassigned() + current_version_eol_date: Optional[datetime.datetime] = Unassigned() + available_upgrade: Optional[AvailableUpgrade] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'partner_app_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object partner_app") + return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "execution_role_arn": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "PartnerApp", **kwargs)) + return wrapper + + @classmethod + @populate_inputs_decorator @Base.add_validate_call - def get_all_parameters( - self, + def create( + cls, + name: StrPipeVar, + type: StrPipeVar, + execution_role_arn: StrPipeVar, + tier: StrPipeVar, + auth_type: StrPipeVar, + kms_key_id: Optional[StrPipeVar] = Unassigned(), + maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned(), + application_config: Optional[PartnerAppConfig] = Unassigned(), + enable_iam_session_based_identity: Optional[bool] = Unassigned(), + enable_auto_minor_version_upgrade: Optional[bool] = Unassigned(), + client_token: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> ResourceIterator[Parameter]: + region: Optional[StrPipeVar] = None, + ) -> Optional["PartnerApp"]: """ - Gets a list of parameters for a pipeline execution. - + Create a PartnerApp resource + Parameters: - next_token: If the result of the previous ListPipelineParametersForExecution request was truncated, the response includes a NextToken. To retrieve the next set of parameters, use the token in the next request. - max_results: The maximum number of parameters to return in the response. + name: The name to give the SageMaker Partner AI App. + type: The type of SageMaker Partner AI App to create. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler. + execution_role_arn: The ARN of the IAM role that the partner application uses. + tier: Indicates the instance type and size of the cluster attached to the SageMaker Partner AI App. + auth_type: The authorization type that users use to access the SageMaker Partner AI App. + kms_key_id: SageMaker Partner AI Apps uses Amazon Web Services KMS to encrypt data at rest using an Amazon Web Services managed key by default. For more control, specify a customer managed key. + maintenance_config: Maintenance configuration settings for the SageMaker Partner AI App. + application_config: Configuration settings for the SageMaker Partner AI App. + enable_iam_session_based_identity: When set to TRUE, the SageMaker Partner AI App sets the Amazon Web Services IAM session name or the authenticated IAM user as the identity of the SageMaker Partner AI App user. + enable_auto_minor_version_upgrade: When set to TRUE, the SageMaker Partner AI App is automatically upgraded to the latest minor version during the next scheduled maintenance window, if one is available. Default is FALSE. + client_token: A unique token that guarantees that the call to this API is idempotent. + tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Parameter. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - return ResourceIterator( - client=client, - list_method="list_pipeline_parameters_for_execution", - summaries_key="PipelineParameters", - summary_name="Parameter", - resource_cls=Parameter, - list_method_kwargs=operation_input_args, - ) - - @Base.add_validate_call - def retry( - self, - client_request_token: StrPipeVar, - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: - """ - Retry the execution of the pipeline. - - Parameters: - client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. - session: Boto3 session. - region: Region name. - + The PartnerApp resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31127,45 +25647,65 @@ def retry( ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "PipelineExecutionArn": self.pipeline_execution_arn, - "ClientRequestToken": client_request_token, - "ParallelismConfiguration": self.parallelism_configuration, - } + + logger.info("Creating partner_app resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'Name': name, + 'Type': type, + 'ExecutionRoleArn': execution_role_arn, + 'KmsKeyId': kms_key_id, + 'MaintenanceConfig': maintenance_config, + 'Tier': tier, + 'ApplicationConfig': application_config, + 'AuthType': auth_type, + 'EnableIamSessionBasedIdentity': enable_iam_session_based_identity, + 'EnableAutoMinorVersionUpgrade': enable_auto_minor_version_upgrade, + 'ClientToken': client_token, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='PartnerApp', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling retry_pipeline_execution API") - response = client.retry_pipeline_execution(**operation_input_args) + + # create the resource + response = client.create_partner_app(**operation_input_args) logger.debug(f"Response: {response}") - + + return cls.get(arn=response['Arn'], session=session, region=region) + + @classmethod @Base.add_validate_call - def send_execution_step_failure( - self, - callback_token: StrPipeVar, - client_request_token: Optional[StrPipeVar] = Unassigned(), + def get( + cls, + arn: StrPipeVar, + include_available_upgrade: Optional[bool] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + region: Optional[StrPipeVar] = None, + ) -> Optional["PartnerApp"]: """ - Notifies the pipeline that the execution of a callback step failed, along with a message describing why. - + Get a PartnerApp resource + Parameters: - callback_token: The pipeline generated token from the Amazon SQS queue. - client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. + arn: The ARN of the SageMaker Partner AI App to describe. + include_available_upgrade: When set to TRUE, the response includes available upgrade information for the SageMaker Partner AI App. Default is FALSE. session: Boto3 session. region: Region name. - + + Returns: + The PartnerApp resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31174,49 +25714,40 @@ def send_execution_step_failure( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CallbackToken": callback_token, - "FailureReason": self.failure_reason, - "ClientRequestToken": client_request_token, + 'Arn': arn, + 'IncludeAvailableUpgrade': include_available_upgrade, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling send_pipeline_execution_step_failure API") - response = client.send_pipeline_execution_step_failure(**operation_input_args) - logger.debug(f"Response: {response}") - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_partner_app(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribePartnerAppResponse') + partner_app = cls(**transformed_response) + return partner_app + @Base.add_validate_call - def send_execution_step_success( + def refresh( self, - callback_token: StrPipeVar, - output_parameters: Optional[List[OutputParameter]] = Unassigned(), - client_request_token: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + include_available_upgrade: Optional[bool] = Unassigned(), + ) -> Optional["PartnerApp"]: """ - Notifies the pipeline that the execution of a callback step succeeded and provides a list of the step's output parameters. - - Parameters: - callback_token: The pipeline generated token from the Amazon SQS queue. - output_parameters: A list of the output parameters of the callback step. - client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. - session: Boto3 session. - region: Region name. - + Refresh a PartnerApp resource + + Returns: + The PartnerApp resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31225,111 +25756,50 @@ def send_execution_step_success( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "CallbackToken": callback_token, - "OutputParameters": output_parameters, - "ClientRequestToken": client_request_token, + 'Arn': self.arn, + 'IncludeAvailableUpgrade': include_available_upgrade, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling send_pipeline_execution_step_success API") - response = client.send_pipeline_execution_step_success(**operation_input_args) - logger.debug(f"Response: {response}") - - -class PresignedDomainUrl(Base): - """ - Class representing resource PresignedDomainUrl - - Attributes: - domain_id: The domain ID. - user_profile_name: The name of the UserProfile to sign-in as. - session_expiration_duration_in_seconds: The session expiration duration in seconds. This value defaults to 43200. - expires_in_seconds: The number of seconds until the pre-signed URL expires. This value defaults to 300. - app_type: - app_redirection_relative_path: - space_name: The name of the space. - landing_uri: The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are: studio::relative/path: Directs users to the relative path in Studio. app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application. app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application. app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application. app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application. app:Canvas:relative/path: Directs users to the relative path in the Canvas application. - is_dual_stack_endpoint: - authorized_url: The presigned URL. - - """ - - domain_id: StrPipeVar - user_profile_name: Union[StrPipeVar, object] - session_expiration_duration_in_seconds: Optional[int] = Unassigned() - expires_in_seconds: Optional[int] = Unassigned() - app_type: Optional[StrPipeVar] = Unassigned() - app_redirection_relative_path: Optional[StrPipeVar] = Unassigned() - space_name: Optional[Union[StrPipeVar, object]] = Unassigned() - landing_uri: Optional[StrPipeVar] = Unassigned() - is_dual_stack_endpoint: Optional[bool] = Unassigned() - authorized_url: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "presigned_domain_url_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object presigned_domain_url") - return None - - @classmethod + + client = Base.get_sagemaker_client() + response = client.describe_partner_app(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribePartnerAppResponse', self) + return self + + @populate_inputs_decorator @Base.add_validate_call - def create( - cls, - domain_id: StrPipeVar, - user_profile_name: Union[StrPipeVar, object], - session_expiration_duration_in_seconds: Optional[int] = Unassigned(), - expires_in_seconds: Optional[int] = Unassigned(), - app_type: Optional[StrPipeVar] = Unassigned(), - app_redirection_relative_path: Optional[StrPipeVar] = Unassigned(), - space_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - landing_uri: Optional[StrPipeVar] = Unassigned(), - is_dual_stack_endpoint: Optional[bool] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["PresignedDomainUrl"]: + def update( + self, + maintenance_config: Optional[PartnerAppMaintenanceConfig] = Unassigned(), + tier: Optional[StrPipeVar] = Unassigned(), + application_config: Optional[PartnerAppConfig] = Unassigned(), + enable_iam_session_based_identity: Optional[bool] = Unassigned(), + enable_auto_minor_version_upgrade: Optional[bool] = Unassigned(), + app_version: Optional[StrPipeVar] = Unassigned(), + client_token: Optional[StrPipeVar] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + ) -> Optional["PartnerApp"]: """ - Create a PresignedDomainUrl resource - + Update a PartnerApp resource + Parameters: - domain_id: The domain ID. - user_profile_name: The name of the UserProfile to sign-in as. - session_expiration_duration_in_seconds: The session expiration duration in seconds. This value defaults to 43200. - expires_in_seconds: The number of seconds until the pre-signed URL expires. This value defaults to 300. - app_type: - app_redirection_relative_path: - space_name: The name of the space. - landing_uri: The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are: studio::relative/path: Directs users to the relative path in Studio. app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application. app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application. app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application. app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application. app:Canvas:relative/path: Directs users to the relative path in the Canvas application. - is_dual_stack_endpoint: - session: Boto3 session. - region: Region name. - + app_version: The semantic version to upgrade the SageMaker Partner AI App to. Must be the same semantic version returned in the AvailableUpgrade field from DescribePartnerApp. Version skipping and downgrades are not supported. + client_token: A unique token that guarantees that the call to this API is idempotent. + tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. + Returns: - The PresignedDomainUrl resource. - + The PartnerApp resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31338,105 +25808,46 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - operation_input_args = { - "DomainId": domain_id, - "UserProfileName": user_profile_name, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, - "ExpiresInSeconds": expires_in_seconds, - "AppType": app_type, - "AppRedirectionRelativePath": app_redirection_relative_path, - "SpaceName": space_name, - "LandingUri": landing_uri, - "isDualStackEndpoint": is_dual_stack_endpoint, + + logger.info("Updating partner_app resource.") + client = Base.get_sagemaker_client() + + operation_input_args = { + 'Arn': self.arn, + 'MaintenanceConfig': maintenance_config, + 'Tier': tier, + 'ApplicationConfig': application_config, + 'EnableIamSessionBasedIdentity': enable_iam_session_based_identity, + 'EnableAutoMinorVersionUpgrade': enable_auto_minor_version_upgrade, + 'AppVersion': app_version, + 'ClientToken': client_token, + 'Tags': tags, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_presigned_domain_url API") - response = client.create_presigned_domain_url(**operation_input_args) + + # create the resource + response = client.update_partner_app(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreatePresignedDomainUrlResponse") - return cls(**operation_input_args, **transformed_response) - - -class PresignedDomainUrlWithPrincipalTag(Base): - """ - Class representing resource PresignedDomainUrlWithPrincipalTag - - Attributes: - domain_id: - session_expiration_duration_in_seconds: - expires_in_seconds: - landing_uri: - is_dual_stack_endpoint: - authorized_url: - - """ - - domain_id: Optional[StrPipeVar] = Unassigned() - session_expiration_duration_in_seconds: Optional[int] = Unassigned() - expires_in_seconds: Optional[int] = Unassigned() - landing_uri: Optional[StrPipeVar] = Unassigned() - is_dual_stack_endpoint: Optional[bool] = Unassigned() - authorized_url: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "presigned_domain_url_with_principal_tag_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object presigned_domain_url_with_principal_tag") - return None - - @classmethod + self.refresh() + + return self + @Base.add_validate_call - def create( - cls, - domain_id: Optional[StrPipeVar] = Unassigned(), - session_expiration_duration_in_seconds: Optional[int] = Unassigned(), - expires_in_seconds: Optional[int] = Unassigned(), - landing_uri: Optional[StrPipeVar] = Unassigned(), - is_dual_stack_endpoint: Optional[bool] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["PresignedDomainUrlWithPrincipalTag"]: + def delete( + self, + client_token: Optional[StrPipeVar] = Unassigned(), + ) -> None: """ - Create a PresignedDomainUrlWithPrincipalTag resource - - Parameters: - domain_id: - session_expiration_duration_in_seconds: - expires_in_seconds: - landing_uri: - is_dual_stack_endpoint: - session: Boto3 session. - region: Region name. - - Returns: - The PresignedDomainUrlWithPrincipalTag resource. - + Delete a PartnerApp resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31445,95 +25856,93 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + client = Base.get_sagemaker_client() + operation_input_args = { - "DomainId": domain_id, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, - "ExpiresInSeconds": expires_in_seconds, - "LandingUri": landing_uri, - "isDualStackEndpoint": is_dual_stack_endpoint, + 'Arn': self.arn, + 'ClientToken': client_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_presigned_domain_url_with_principal_tag API") - response = client.create_presigned_domain_url_with_principal_tag(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform( - response, "CreatePresignedDomainUrlWithPrincipalTagResponse" + + client.delete_partner_app(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['Creating', 'Updating', 'Deleting', 'Available', 'Failed', 'UpdateFailed', 'Deleted'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a PartnerApp resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - return cls(**operation_input_args, **transformed_response) - - -class PresignedMlflowAppUrl(Base): - """ - Class representing resource PresignedMlflowAppUrl - - Attributes: - arn: - expires_in_seconds: - session_expiration_duration_in_seconds: - authorized_url: - - """ - - arn: StrPipeVar - expires_in_seconds: Optional[int] = Unassigned() - session_expiration_duration_in_seconds: Optional[int] = Unassigned() - authorized_url: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "presigned_mlflow_app_url_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object presigned_mlflow_app_url") - return None - - @classmethod + progress.add_task(f"Waiting for PartnerApp to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="PartnerApp", status=current_status, reason='(Unknown)') + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="PartnerApp", status=current_status) + time.sleep(poll) + @Base.add_validate_call - def create( - cls, - arn: StrPipeVar, - expires_in_seconds: Optional[int] = Unassigned(), - session_expiration_duration_in_seconds: Optional[int] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["PresignedMlflowAppUrl"]: + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: """ - Create a PresignedMlflowAppUrl resource - + Wait for a PartnerApp resource to be deleted. + Parameters: - arn: - expires_in_seconds: - session_expiration_duration_in_seconds: - session: Boto3 session. - region: Region name. - - Returns: - The PresignedMlflowAppUrl resource. - + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31542,180 +25951,129 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - operation_input_args = { - "Arn": arn, - "ExpiresInSeconds": expires_in_seconds, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - - logger.debug(f"Calling create_presigned_mlflow_app_url API") - response = client.create_presigned_mlflow_app_url(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreatePresignedMlflowAppUrlResponse") - return cls(**operation_input_args, **transformed_response) - - -class PresignedMlflowTrackingServerUrl(Base): - """ - Class representing resource PresignedMlflowTrackingServerUrl - - Attributes: - tracking_server_name: The name of the tracking server to connect to your MLflow UI. - expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. - session_expiration_duration_in_seconds: The duration in seconds that your MLflow UI session is valid. - authorized_url: A presigned URL with an authorization token. - - """ - - tracking_server_name: StrPipeVar - expires_in_seconds: Optional[int] = Unassigned() - session_expiration_duration_in_seconds: Optional[int] = Unassigned() - authorized_url: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "presigned_mlflow_tracking_server_url_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object presigned_mlflow_tracking_server_url") - return None - + progress.add_task("Waiting for PartnerApp to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.status + status.update(f"Current status: [bold]{current_status}") + + + if current_status.lower() == "deleted": + logger.info("Resource was deleted.") + return + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="PartnerApp", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + @classmethod @Base.add_validate_call - def create( + def get_all( cls, - tracking_server_name: StrPipeVar, - expires_in_seconds: Optional[int] = Unassigned(), - session_expiration_duration_in_seconds: Optional[int] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["PresignedMlflowTrackingServerUrl"]: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["PartnerApp"]: """ - Create a PresignedMlflowTrackingServerUrl resource - + Get all PartnerApp resources. + Parameters: - tracking_server_name: The name of the tracking server to connect to your MLflow UI. - expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. - session_expiration_duration_in_seconds: The duration in seconds that your MLflow UI session is valid. session: Boto3 session. region: Region name. - + Returns: - The PresignedMlflowTrackingServerUrl resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + Iterator for listed PartnerApp resources. + """ - - operation_input_args = { - "TrackingServerName": tracking_server_name, - "ExpiresInSeconds": expires_in_seconds, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + return ResourceIterator( + client=client, + list_method='list_partner_apps', + summaries_key='Summaries', + summary_name='PartnerAppSummary', + resource_cls=PartnerApp ) - logger.debug(f"Calling create_presigned_mlflow_tracking_server_url API") - response = client.create_presigned_mlflow_tracking_server_url(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreatePresignedMlflowTrackingServerUrlResponse") - return cls(**operation_input_args, **transformed_response) - -class PresignedNotebookInstanceUrl(Base): +class PartnerAppPresignedUrl(Base): """ - Class representing resource PresignedNotebookInstanceUrl - + Class representing resource PartnerAppPresignedUrl + Attributes: - notebook_instance_name: The name of the notebook instance. - session_expiration_duration_in_seconds: The duration of the session, in seconds. The default is 12 hours. - authorized_url: A JSON object that contains the URL string. - + arn: The ARN of the SageMaker Partner AI App to create the presigned URL for. + expires_in_seconds: The time that will pass before the presigned URL expires. + session_expiration_duration_in_seconds: Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in. + url: The presigned URL that you can use to access the SageMaker Partner AI App. + """ - - notebook_instance_name: Union[StrPipeVar, object] + arn: StrPipeVar + expires_in_seconds: Optional[int] = Unassigned() session_expiration_duration_in_seconds: Optional[int] = Unassigned() - authorized_url: Optional[StrPipeVar] = Unassigned() - + url: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "presigned_notebook_instance_url_name" - resource_name_split = resource_name.split("_") + resource_name = 'partner_app_presigned_url_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object presigned_notebook_instance_url") + logger.error("Name attribute not found for object partner_app_presigned_url") return None - + @classmethod @Base.add_validate_call def create( cls, - notebook_instance_name: Union[StrPipeVar, object], + arn: StrPipeVar, + expires_in_seconds: Optional[int] = Unassigned(), session_expiration_duration_in_seconds: Optional[int] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, - ) -> Optional["PresignedNotebookInstanceUrl"]: + ) -> Optional["PartnerAppPresignedUrl"]: """ - Create a PresignedNotebookInstanceUrl resource - + Create a PartnerAppPresignedUrl resource + Parameters: - notebook_instance_name: The name of the notebook instance. - session_expiration_duration_in_seconds: The duration of the session, in seconds. The default is 12 hours. + arn: The ARN of the SageMaker Partner AI App to create the presigned URL for. + expires_in_seconds: The time that will pass before the presigned URL expires. + session_expiration_duration_in_seconds: Indicates how long the Amazon SageMaker Partner AI App session can be accessed for after logging in. session: Boto3 session. region: Region name. - + Returns: - The PresignedNotebookInstanceUrl resource. - + The PartnerAppPresignedUrl resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31724,171 +26082,137 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + operation_input_args = { - "NotebookInstanceName": notebook_instance_name, - "SessionExpirationDurationInSeconds": session_expiration_duration_in_seconds, + 'Arn': arn, + 'ExpiresInSeconds': expires_in_seconds, + 'SessionExpirationDurationInSeconds': session_expiration_duration_in_seconds, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_presigned_notebook_instance_url API") - response = client.create_presigned_notebook_instance_url(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_partner_app_presigned_url API") + response = client.create_partner_app_presigned_url(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreatePresignedNotebookInstanceUrlOutput") + + transformed_response = transform(response, 'CreatePartnerAppPresignedUrlResponse') return cls(**operation_input_args, **transformed_response) -class ProcessingJob(Base): +class Pipeline(Base): """ - Class representing resource ProcessingJob - + Class representing resource Pipeline + Attributes: - processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - processing_resources: Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance. - app_specification: Configures the processing job to run a specified container image. - processing_job_arn: The Amazon Resource Name (ARN) of the processing job. - processing_job_status: Provides the status of a processing job. - creation_time: The time at which the processing job was created. - processing_inputs: The inputs for a processing job. - 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 set in the Docker container. - network_config: Networking options for a processing job. - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf. - experiment_config: The configuration information used to create an experiment. - exit_message: An optional string, up to one KB in size, that contains metadata from the processing container when the processing job exits. - failure_reason: A string, up to one KB in size, that contains the reason a processing job failed, if it failed. - processing_end_time: The time at which the processing job completed. - processing_start_time: The time at which the processing job started. - last_modified_time: The time at which the processing job was last modified. - last_modified_by: - created_by: - monitoring_schedule_arn: The ARN of a monitoring schedule for an endpoint associated with this processing job. - auto_ml_job_arn: The ARN of an AutoML job associated with this processing job. - training_job_arn: The ARN of a training job associated with this processing job. - + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_name: The name of the pipeline. + pipeline_display_name: The display name of the pipeline. + pipeline_definition: The JSON pipeline definition. + pipeline_description: The description of the pipeline. + role_arn: The Amazon Resource Name (ARN) that the pipeline uses to execute. + pipeline_status: The status of the pipeline execution. + creation_time: The time when the pipeline was created. + last_modified_time: The time when the pipeline was last modified. + last_run_time: The time when the pipeline was last run. + created_by: + last_modified_by: + parallelism_configuration: Lists the parallelism configuration applied to the pipeline. + pipeline_version_display_name: The display name of the pipeline version. + pipeline_version_description: The description of the pipeline version. + """ - - processing_job_name: StrPipeVar - processing_inputs: Optional[List[ProcessingInput]] = Unassigned() - processing_output_config: Optional[ProcessingOutputConfig] = Unassigned() - processing_resources: Optional[ProcessingResources] = Unassigned() - stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned() - app_specification: Optional[AppSpecification] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - network_config: Optional[NetworkConfig] = Unassigned() + pipeline_name: StrPipeVar + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_definition: Optional[StrPipeVar] = Unassigned() + pipeline_description: Optional[StrPipeVar] = Unassigned() role_arn: Optional[StrPipeVar] = Unassigned() - experiment_config: Optional[ExperimentConfig] = Unassigned() - processing_job_arn: Optional[StrPipeVar] = Unassigned() - processing_job_status: Optional[StrPipeVar] = Unassigned() - exit_message: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - processing_end_time: Optional[datetime.datetime] = Unassigned() - processing_start_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() + pipeline_status: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_run_time: Optional[datetime.datetime] = Unassigned() created_by: Optional[UserContext] = Unassigned() - monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - training_job_arn: Optional[StrPipeVar] = Unassigned() - + last_modified_by: Optional[UserContext] = Unassigned() + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() + pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_version_description: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "processing_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'pipeline_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object processing_job") + logger.error("Name attribute not found for object pipeline") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "processing_resources": { - "cluster_config": {"volume_kms_key_id": {"type": "string"}} - }, - "processing_output_config": {"kms_key_id": {"type": "string"}}, - "network_config": { - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } - }, - "role_arn": {"type": "string"}, - } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "ProcessingJob", **kwargs - ), - ) - + config_schema_for_resource = \ + { + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Pipeline", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call def create( cls, - processing_job_name: StrPipeVar, - processing_resources: ProcessingResources, - app_specification: AppSpecification, + pipeline_name: StrPipeVar, + client_request_token: StrPipeVar, role_arn: StrPipeVar, - processing_inputs: Optional[List[ProcessingInput]] = Unassigned(), - processing_output_config: Optional[ProcessingOutputConfig] = Unassigned(), - stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned(), - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - network_config: Optional[NetworkConfig] = Unassigned(), + pipeline_display_name: Optional[StrPipeVar] = Unassigned(), + pipeline_definition: Optional[StrPipeVar] = Unassigned(), + pipeline_definition_s3_location: Optional[PipelineDefinitionS3Location] = Unassigned(), + pipeline_description: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - workflow_type: Optional[StrPipeVar] = Unassigned(), - experiment_config: Optional[ExperimentConfig] = Unassigned(), + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["ProcessingJob"]: + ) -> Optional["Pipeline"]: """ - Create a ProcessingJob resource - + Create a Pipeline resource + Parameters: - processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. - processing_resources: Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance. - app_specification: Configures the processing job to run a specified Docker container image. - role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf. - 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. 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. 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. - workflow_type: - experiment_config: + pipeline_name: The name of the pipeline. + client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. + role_arn: The Amazon Resource Name (ARN) of the role used by the pipeline to access and create resources. + pipeline_display_name: The display name of the pipeline. + pipeline_definition: The JSON pipeline definition of the pipeline. + pipeline_definition_s3_location: The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location. + pipeline_description: A description of the pipeline. + tags: A list of tags to apply to the created pipeline. + parallelism_configuration: This is the configuration that controls the parallelism of the pipeline. If specified, it applies to all runs of this pipeline by default. session: Boto3 session. region: Region name. - + Returns: - The ProcessingJob resource. - + The Pipeline resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31897,70 +26221,65 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating processing_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ProcessingInputs": processing_inputs, - "ProcessingOutputConfig": processing_output_config, - "ProcessingJobName": processing_job_name, - "ProcessingResources": processing_resources, - "StoppingCondition": stopping_condition, - "AppSpecification": app_specification, - "Environment": environment, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "Tags": tags, - "WorkflowType": workflow_type, - "ExperimentConfig": experiment_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="ProcessingJob", operation_input_args=operation_input_args - ) - + + logger.info("Creating pipeline resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'PipelineName': pipeline_name, + 'PipelineDisplayName': pipeline_display_name, + 'PipelineDefinition': pipeline_definition, + 'PipelineDefinitionS3Location': pipeline_definition_s3_location, + 'PipelineDescription': pipeline_description, + 'ClientRequestToken': client_request_token, + 'RoleArn': role_arn, + 'Tags': tags, + 'ParallelismConfiguration': parallelism_configuration, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Pipeline', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_processing_job(**operation_input_args) + response = client.create_pipeline(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get(processing_job_name=processing_job_name, session=session, region=region) - + + return cls.get(pipeline_name=pipeline_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - processing_job_name: StrPipeVar, + pipeline_name: StrPipeVar, + pipeline_version_id: Optional[int] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["ProcessingJob"]: + ) -> Optional["Pipeline"]: """ - Get a ProcessingJob resource - + Get a Pipeline resource + Parameters: - processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + pipeline_name: The name or Amazon Resource Name (ARN) of the pipeline to describe. + pipeline_version_id: The ID of the pipeline version to describe. session: Boto3 session. region: Region name. - + Returns: - The ProcessingJob resource. - + The Pipeline resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -31971,38 +26290,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ProcessingJobName": processing_job_name, + 'PipelineName': pipeline_name, + 'PipelineVersionId': pipeline_version_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_processing_job(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_pipeline(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeProcessingJobResponse") - processing_job = cls(**transformed_response) - return processing_job - + transformed_response = transform(response, 'DescribePipelineResponse') + pipeline = cls(**transformed_response) + return pipeline + @Base.add_validate_call def refresh( self, - ) -> Optional["ProcessingJob"]: + pipeline_version_id: Optional[int] = Unassigned(), + ) -> Optional["Pipeline"]: """ - Refresh a ProcessingJob resource - + Refresh a Pipeline resource + Returns: - The ProcessingJob resource. - + The Pipeline resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32013,30 +26332,44 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ProcessingJobName": self.processing_job_name, + 'PipelineName': self.pipeline_name, + 'PipelineVersionId': pipeline_version_id, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_processing_job(**operation_input_args) - + response = client.describe_pipeline(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeProcessingJobResponse", self) + transform(response, 'DescribePipelineResponse', self) return self - + + @populate_inputs_decorator @Base.add_validate_call - def delete( + def update( self, - ) -> None: + pipeline_display_name: Optional[StrPipeVar] = Unassigned(), + pipeline_definition: Optional[StrPipeVar] = Unassigned(), + pipeline_definition_s3_location: Optional[PipelineDefinitionS3Location] = Unassigned(), + pipeline_description: Optional[StrPipeVar] = Unassigned(), + role_arn: Optional[StrPipeVar] = Unassigned(), + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), + ) -> Optional["Pipeline"]: """ - Delete a ProcessingJob resource - + Update a Pipeline resource + + Parameters: + pipeline_definition_s3_location: The location of the pipeline definition stored in Amazon S3. If specified, SageMaker will retrieve the pipeline definition from this location. + + Returns: + The Pipeline resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32045,30 +26378,44 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating pipeline resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "ProcessingJobName": self.processing_job_name, + 'PipelineName': self.pipeline_name, + 'PipelineDisplayName': pipeline_display_name, + 'PipelineDefinition': pipeline_definition, + 'PipelineDefinitionS3Location': pipeline_definition_s3_location, + 'PipelineDescription': pipeline_description, + 'RoleArn': role_arn, + 'ParallelismConfiguration': parallelism_configuration, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_processing_job(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + # create the resource + response = client.update_pipeline(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + + return self + @Base.add_validate_call - def stop(self) -> None: + def delete( + self, + client_request_token: StrPipeVar, + ) -> None: """ - Stop a ProcessingJob resource - + Delete a Pipeline resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32077,338 +26424,90 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client() + operation_input_args = { - "ProcessingJobName": self.processing_job_name, + 'PipelineName': self.pipeline_name, + 'ClientRequestToken': client_request_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_processing_job(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + + client.delete_pipeline(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call - def wait( + def wait_for_status( self, + target_status: Literal['Active', 'Deleting'], poll: int = 5, - timeout: Optional[int] = None, - logs: Optional[bool] = False, + timeout: Optional[int] = None ) -> None: """ - Wait for a ProcessingJob resource. - + Wait for a Pipeline resource to reach certain status. + Parameters: + target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - logs: Whether to print logs while waiting. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - """ - terminal_states = ["Completed", "Failed", "Stopped"] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task("Waiting for ProcessingJob...") + progress.add_task(f"Waiting for Pipeline to reach [bold]{target_status} status...") status = Status("Current status:") - - instance_count = self.processing_resources.cluster_config.instance_count - if logs: - multi_stream_logger = MultiLogStreamHandler( - log_group_name=f"/aws/sagemaker/ProcessingJobs", - log_stream_name_prefix=self.get_name(), - expected_stream_count=instance_count, - ) - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.processing_job_status + current_status = self.pipeline_status status.update(f"Current status: [bold]{current_status}") - - if logs and multi_stream_logger.ready(): - stream_log_events = multi_stream_logger.get_latest_log_events() - for stream_id, event in stream_log_events: - logger.info(f"{stream_id}:\n{event['message']}") - - if current_status in terminal_states: + + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="ProcessingJob", - status=current_status, - reason=self.failure_reason, - ) - return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="ProcessingJob", status=current_status) + raise TimeoutExceededError(resource_type="Pipeline", status=current_status) time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ProcessingJob"]: - """ - Get all ProcessingJob resources - - Parameters: - creation_time_after: A filter that returns only processing jobs created after the specified time. - creation_time_before: A filter that returns only processing jobs created after the specified time. - last_modified_time_after: A filter that returns only processing jobs modified after the specified time. - last_modified_time_before: A filter that returns only processing jobs modified before the specified time. - name_contains: A string in the processing job name. This filter returns only processing jobs whose name contains the specified string. - status_equals: A filter that retrieves only processing jobs with a specific status. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: The sort order for results. The default is Ascending. - next_token: If the result of the previous ListProcessingJobs request was truncated, the response includes a NextToken. To retrieve the next set of processing jobs, use the token in the next request. - max_results: The maximum number of processing jobs to return in the response. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed ProcessingJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_processing_jobs", - summaries_key="ProcessingJobSummaries", - summary_name="ProcessingJobSummary", - resource_cls=ProcessingJob, - list_method_kwargs=operation_input_args, - ) - -''' -class ProcessingJobInternal(Base): - """ - Class representing resource ProcessingJobInternal - - Attributes: - processing_job_name: - processing_resources: - app_specification: - role_arn: - customer_details: - processing_inputs: - processing_output_config: - stopping_condition: - environment: - network_config: - tags: - billing_option: - billing_mode: - upstream_processing_output_config: - monitoring_schedule_arn: - auto_ml_job_arn: - training_job_arn: - state_machine_arn_provider_lambda_arn: - fas_credentials: - platform_credential_token: - customer_credential_token: - credential_provider_function: - credential_provider_encryption_key: - workflow_type: - session_tags: - source_identity: - fas_source_arn: - fas_source_account: - experiment_config: - identity_center_user_token: - processing_job_response: - - """ - - processing_job_name: Union[StrPipeVar, object] - processing_resources: ProcessingResources - app_specification: AppSpecification - role_arn: StrPipeVar - customer_details: CustomerDetails - processing_inputs: Optional[List[ProcessingInputInternal]] = Unassigned() - processing_output_config: Optional[ProcessingOutputConfig] = Unassigned() - stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - network_config: Optional[NetworkConfig] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - billing_option: Optional[StrPipeVar] = Unassigned() - billing_mode: Optional[StrPipeVar] = Unassigned() - upstream_processing_output_config: Optional[UpstreamProcessingOutputConfig] = Unassigned() - monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - training_job_arn: Optional[StrPipeVar] = Unassigned() - state_machine_arn_provider_lambda_arn: Optional[StrPipeVar] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - platform_credential_token: Optional[StrPipeVar] = Unassigned() - customer_credential_token: Optional[StrPipeVar] = Unassigned() - credential_provider_function: Optional[StrPipeVar] = Unassigned() - credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned() - workflow_type: Optional[StrPipeVar] = Unassigned() - session_tags: Optional[List[Tag]] = Unassigned() - source_identity: Optional[StrPipeVar] = Unassigned() - fas_source_arn: Optional[StrPipeVar] = Unassigned() - fas_source_account: Optional[StrPipeVar] = Unassigned() - experiment_config: Optional[ExperimentConfig] = Unassigned() - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned() - processing_job_response: Optional[CreateProcessingJobResponse] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "processing_job_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object processing_job_internal") - return None - - @classmethod + @Base.add_validate_call - def create( - cls, - processing_job_name: Union[StrPipeVar, object], - processing_resources: ProcessingResources, - app_specification: AppSpecification, - role_arn: StrPipeVar, - customer_details: CustomerDetails, - processing_inputs: Optional[List[ProcessingInputInternal]] = Unassigned(), - processing_output_config: Optional[ProcessingOutputConfig] = Unassigned(), - stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned(), - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - network_config: Optional[NetworkConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - billing_option: Optional[StrPipeVar] = Unassigned(), - billing_mode: Optional[StrPipeVar] = Unassigned(), - upstream_processing_output_config: Optional[UpstreamProcessingOutputConfig] = Unassigned(), - monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - training_job_arn: Optional[StrPipeVar] = Unassigned(), - state_machine_arn_provider_lambda_arn: Optional[StrPipeVar] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - platform_credential_token: Optional[StrPipeVar] = Unassigned(), - customer_credential_token: Optional[StrPipeVar] = Unassigned(), - credential_provider_function: Optional[StrPipeVar] = Unassigned(), - credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned(), - workflow_type: Optional[StrPipeVar] = Unassigned(), - session_tags: Optional[List[Tag]] = Unassigned(), - source_identity: Optional[StrPipeVar] = Unassigned(), - fas_source_arn: Optional[StrPipeVar] = Unassigned(), - fas_source_account: Optional[StrPipeVar] = Unassigned(), - experiment_config: Optional[ExperimentConfig] = Unassigned(), - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["ProcessingJobInternal"]: + def wait_for_delete( + self, + poll: int = 5, + timeout: Optional[int] = None, + ) -> None: """ - Create a ProcessingJobInternal resource - + Wait for a Pipeline resource to be deleted. + Parameters: - processing_job_name: - processing_resources: - app_specification: - role_arn: - customer_details: - processing_inputs: - processing_output_config: - stopping_condition: - environment: - network_config: - tags: - billing_option: - billing_mode: - upstream_processing_output_config: - monitoring_schedule_arn: - auto_ml_job_arn: - training_job_arn: - state_machine_arn_provider_lambda_arn: - fas_credentials: - platform_credential_token: - customer_credential_token: - credential_provider_function: - credential_provider_encryption_key: - workflow_type: - session_tags: - source_identity: - fas_source_arn: - fas_source_account: - experiment_config: - identity_center_user_token: - session: Boto3 session. - region: Region name. - - Returns: - The ProcessingJobInternal resource. - + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32417,106 +26516,70 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "ProcessingInputs": processing_inputs, - "ProcessingOutputConfig": processing_output_config, - "ProcessingJobName": processing_job_name, - "ProcessingResources": processing_resources, - "StoppingCondition": stopping_condition, - "AppSpecification": app_specification, - "Environment": environment, - "NetworkConfig": network_config, - "RoleArn": role_arn, - "Tags": tags, - "BillingOption": billing_option, - "BillingMode": billing_mode, - "CustomerDetails": customer_details, - "UpstreamProcessingOutputConfig": upstream_processing_output_config, - "MonitoringScheduleArn": monitoring_schedule_arn, - "AutoMLJobArn": auto_ml_job_arn, - "TrainingJobArn": training_job_arn, - "StateMachineArnProviderLambdaArn": state_machine_arn_provider_lambda_arn, - "FasCredentials": fas_credentials, - "PlatformCredentialToken": platform_credential_token, - "CustomerCredentialToken": customer_credential_token, - "CredentialProviderFunction": credential_provider_function, - "CredentialProviderEncryptionKey": credential_provider_encryption_key, - "WorkflowType": workflow_type, - "SessionTags": session_tags, - "SourceIdentity": source_identity, - "FasSourceArn": fas_source_arn, - "FasSourceAccount": fas_source_account, - "ExperimentConfig": experiment_config, - "IdentityCenterUserToken": identity_center_user_token, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_processing_job_internal API") - response = client.create_processing_job_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateProcessingJobInternalResponse") - return cls(**operation_input_args, **transformed_response) - - @Base.add_validate_call - def delete( - self, - processing_job_arn: Optional[StrPipeVar] = Unassigned(), - associated_parent_job_arn: Optional[StrPipeVar] = Unassigned(), - ) -> None: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - Delete a ProcessingJobInternal resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for Pipeline to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: try: - # AWS service call here + self.refresh() + current_status = self.pipeline_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Pipeline", status=current_status) except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "ProcessingJobName": self.processing_job_name, - "CustomerDetails": self.customer_details, - "ProcessingJobArn": processing_job_arn, - "AssociatedParentJobArn": associated_parent_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_processing_job_internal(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + + @classmethod @Base.add_validate_call - def stop(self) -> None: + def get_all( + cls, + pipeline_name_prefix: Optional[StrPipeVar] = Unassigned(), + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["Pipeline"]: """ - Stop a ProcessingJobInternal resource - + Get all Pipeline resources + + Parameters: + pipeline_name_prefix: The prefix of the pipeline name. + created_after: A filter that returns the pipelines that were created after a specified time. + created_before: A filter that returns the pipelines that were created before a specified time. + sort_by: The field by which to sort results. The default is CreatedTime. + sort_order: The sort order for results. + next_token: If the result of the previous ListPipelines request was truncated, the response includes a NextToken. To retrieve the next set of pipelines, use the token in the next request. + max_results: The maximum number of pipelines to return in the response. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed Pipeline resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32525,109 +26588,107 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "ProcessingJobName": self.processing_job_name, - "CustomerDetails": self.customer_details, - "Payer": self.payer, + 'PipelineNamePrefix': pipeline_name_prefix, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_pipelines', + summaries_key='PipelineSummaries', + summary_name='PipelineSummary', + resource_cls=Pipeline, + list_method_kwargs=operation_input_args + ) - client.stop_processing_job_internal(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") -''' -class Project(Base): +class PipelineExecution(Base): """ - Class representing resource Project - + Class representing resource PipelineExecution + Attributes: - project_arn: The Amazon Resource Name (ARN) of the project. - project_name: The name of the project. - project_id: The ID of the project. - project_status: The status of the project. - creation_time: The time when the project was created. - project_description: The description of the project. - service_catalog_provisioning_details: Information used to provision a service catalog product. For information, see What is Amazon Web Services Service Catalog. - service_catalog_provisioned_product_details: Information about a provisioned service catalog product. - template_provider_details: An array of template providers associated with the project. - created_by: - last_modified_time: The timestamp when project was last modified. - last_modified_by: - + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. + pipeline_execution_display_name: The display name of the pipeline execution. + pipeline_execution_status: The status of the pipeline execution. + pipeline_execution_description: The description of the pipeline execution. + pipeline_experiment_config: + failure_reason: If the execution failed, a message describing why. + creation_time: The time when the pipeline execution was created. + last_modified_time: The time when the pipeline execution was modified last. + created_by: + last_modified_by: + parallelism_configuration: The parallelism configuration applied to the pipeline. + selective_execution_config: The selective execution configuration applied to the pipeline run. + pipeline_version_id: The ID of the pipeline version. + m_lflow_config: The MLflow configuration of the pipeline execution. + """ - - project_name: StrPipeVar - project_arn: Optional[StrPipeVar] = Unassigned() - project_id: Optional[StrPipeVar] = Unassigned() - project_description: Optional[StrPipeVar] = Unassigned() - service_catalog_provisioning_details: Optional[ServiceCatalogProvisioningDetails] = Unassigned() - service_catalog_provisioned_product_details: Optional[ - ServiceCatalogProvisionedProductDetails - ] = Unassigned() - project_status: Optional[StrPipeVar] = Unassigned() - template_provider_details: Optional[List[TemplateProviderDetail]] = Unassigned() - created_by: Optional[UserContext] = Unassigned() + pipeline_execution_arn: StrPipeVar + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_execution_status: Optional[StrPipeVar] = Unassigned() + pipeline_execution_description: Optional[StrPipeVar] = Unassigned() + pipeline_experiment_config: Optional[PipelineExperimentConfig] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() - + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() + selective_execution_config: Optional[SelectiveExecutionConfig] = Unassigned() + pipeline_version_id: Optional[int] = Unassigned() + m_lflow_config: Optional[MLflowConfiguration] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "project_name" - resource_name_split = resource_name.split("_") + resource_name = 'pipeline_execution_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object project") + logger.error("Name attribute not found for object pipeline_execution") return None - + @classmethod @Base.add_validate_call - def create( + def get( cls, - project_name: StrPipeVar, - project_description: Optional[StrPipeVar] = Unassigned(), - service_catalog_provisioning_details: Optional[ - ServiceCatalogProvisioningDetails - ] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - template_providers: Optional[List[CreateTemplateProvider]] = Unassigned(), - workflow_disabled: Optional[bool] = Unassigned(), + pipeline_execution_arn: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["Project"]: + ) -> Optional["PipelineExecution"]: """ - Create a Project resource - + Get a PipelineExecution resource + Parameters: - project_name: The name of the project. - project_description: A description for the project. - 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. - 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. - template_providers: An array of template provider configurations for creating infrastructure resources for the project. - workflow_disabled: + pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. session: Boto3 session. region: Region name. - + Returns: - The Project resource. - + The PipelineExecution resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32636,62 +26697,39 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating project resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + operation_input_args = { - "ProjectName": project_name, - "ProjectDescription": project_description, - "ServiceCatalogProvisioningDetails": service_catalog_provisioning_details, - "Tags": tags, - "TemplateProviders": template_providers, - "WorkflowDisabled": workflow_disabled, + 'PipelineExecutionArn': pipeline_execution_arn, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Project", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_project(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get(project_name=project_name, session=session, region=region) - - @classmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_pipeline_execution(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribePipelineExecutionResponse') + pipeline_execution = cls(**transformed_response) + return pipeline_execution + @Base.add_validate_call - def get( - cls, - project_name: StrPipeVar, - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["Project"]: + def refresh( + self, + + ) -> Optional["PipelineExecution"]: """ - Get a Project resource - - Parameters: - project_name: The name of the project to describe. - session: Boto3 session. - region: Region name. - + Refresh a PipelineExecution resource + Returns: - The Project resource. - + The PipelineExecution resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32700,39 +26738,38 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "ProjectName": project_name, + 'PipelineExecutionArn': self.pipeline_execution_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_project(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeProjectOutput") - project = cls(**transformed_response) - return project - + + client = Base.get_sagemaker_client() + response = client.describe_pipeline_execution(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribePipelineExecutionResponse', self) + return self + @Base.add_validate_call - def refresh( + def update( self, - ) -> Optional["Project"]: + pipeline_execution_description: Optional[StrPipeVar] = Unassigned(), + pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned(), + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned(), + ) -> Optional["PipelineExecution"]: """ - Refresh a Project resource - + Update a PipelineExecution resource + Returns: - The Project resource. - + The PipelineExecution resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32741,47 +26778,51 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - + + logger.info("Updating pipeline_execution resource.") + client = Base.get_sagemaker_client() + operation_input_args = { - "ProjectName": self.project_name, + 'PipelineExecutionArn': self.pipeline_execution_arn, + 'PipelineExecutionDescription': pipeline_execution_description, + 'PipelineExecutionDisplayName': pipeline_execution_display_name, + 'ParallelismConfiguration': parallelism_configuration, } + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client() - response = client.describe_project(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeProjectOutput", self) + + # create the resource + response = client.update_pipeline_execution(**operation_input_args) + logger.debug(f"Response: {response}") + self.refresh() + return self - + + @Base.add_validate_call - def update( + def start( self, - project_description: Optional[StrPipeVar] = Unassigned(), - service_catalog_provisioning_update_details: Optional[ - ServiceCatalogProvisioningUpdateDetails - ] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - template_providers_to_update: Optional[List[UpdateTemplateProvider]] = Unassigned(), - workflow_disabled: Optional[bool] = Unassigned(), - ) -> Optional["Project"]: + pipeline_name: StrPipeVar, + client_request_token: StrPipeVar, + pipeline_parameters: Optional[List[Parameter]] = Unassigned(), + mlflow_experiment_name: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: """ - Update a Project resource - - Parameters: - 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. - 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. - template_providers_to_update: The template providers to update in the project. - workflow_disabled: - - Returns: - The Project resource. - + Start a PipelineExecution resource + + Parameters: + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32791,40 +26832,40 @@ def update( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. """ - - logger.info("Updating project resource.") - client = Base.get_sagemaker_client() - + + operation_input_args = { - "ProjectName": self.project_name, - "ProjectDescription": project_description, - "ServiceCatalogProvisioningUpdateDetails": service_catalog_provisioning_update_details, - "Tags": tags, - "TemplateProvidersToUpdate": template_providers_to_update, - "WorkflowDisabled": workflow_disabled, + 'PipelineName': pipeline_name, + 'PipelineExecutionDisplayName': self.pipeline_execution_display_name, + 'PipelineParameters': pipeline_parameters, + 'PipelineExecutionDescription': self.pipeline_execution_description, + 'ClientRequestToken': client_request_token, + 'ParallelismConfiguration': self.parallelism_configuration, + 'SelectiveExecutionConfig': self.selective_execution_config, + 'PipelineVersionId': self.pipeline_version_id, + 'MlflowExperimentName': mlflow_experiment_name, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_project(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling start_pipeline_execution API") + response = client.start_pipeline_execution(**operation_input_args) logger.debug(f"Response: {response}") - self.refresh() - - return self - + + @Base.add_validate_call - def delete( - self, - ) -> None: + def stop(self) -> None: """ - Delete a Project resource - + Stop a PipelineExecution resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32834,121 +26875,108 @@ def delete( error_code = e.response['Error']['Code'] ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client() - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "ProjectName": self.project_name, + 'PipelineExecutionArn': self.pipeline_execution_arn, + 'ClientRequestToken': self.client_request_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_project(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + client.stop_pipeline_execution(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Pending", - "CreateInProgress", - "CreateCompleted", - "CreateFailed", - "DeleteInProgress", - "DeleteFailed", - "DeleteCompleted", - "UpdateInProgress", - "UpdateCompleted", - "UpdateFailed", - ], + target_status: Literal['Executing', 'Stopping', 'Stopped', 'Failed', 'Succeeded'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ - Wait for a Project resource to reach certain status. - + Wait for a PipelineExecution resource to reach certain status. + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) - progress.add_task(f"Waiting for Project to reach [bold]{target_status} status...") + progress.add_task(f"Waiting for PipelineExecution to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() - current_status = self.project_status + current_status = self.pipeline_execution_status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Project", status=current_status, reason="(Unknown)" - ) - + raise FailedStatusError(resource_type="PipelineExecution", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="Project", status=current_status) + raise TimeoutExceededError(resource_type="PipelineExecution", status=current_status) time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), + pipeline_name: StrPipeVar, + created_after: Optional[datetime.datetime] = Unassigned(), + created_before: Optional[datetime.datetime] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), - project_status: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["Project"]: + ) -> ResourceIterator["PipelineExecution"]: """ - Get all Project resources - + Get all PipelineExecution resources + Parameters: - creation_time_after: A filter that returns the projects that were created after a specified time. - creation_time_before: A filter that returns the projects that were created before a specified time. - max_results: The maximum number of projects to return in the response. - name_contains: A filter that returns the projects whose name contains a specified string. - next_token: If the result of the previous ListProjects request was truncated, the response includes a NextToken. To retrieve the next set of projects, use the token in the next request. - sort_by: The field by which to sort results. The default is CreationTime. - sort_order: The sort order for results. The default is Ascending. - project_status: + pipeline_name: The name or Amazon Resource Name (ARN) of the pipeline. + created_after: A filter that returns the pipeline executions that were created after a specified time. + created_before: A filter that returns the pipeline executions that were created before a specified time. + sort_by: The field by which to sort results. The default is CreatedTime. + sort_order: The sort order for results. + next_token: If the result of the previous ListPipelineExecutions request was truncated, the response includes a NextToken. To retrieve the next set of pipeline executions, use the token in the next request. + max_results: The maximum number of pipeline executions to return in the response. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed Project resources. - + Iterator for listed PipelineExecution resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -32957,131 +26985,204 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'PipelineName': pipeline_name, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_pipeline_executions', + summaries_key='PipelineExecutionSummaries', + summary_name='PipelineExecutionSummary', + resource_cls=PipelineExecution, + list_method_kwargs=operation_input_args ) - + + + @Base.add_validate_call + def get_pipeline_definition( + self, + + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[DescribePipelineDefinitionForExecutionResponse]: + """ + Describes the details of an execution's pipeline definition. + + Parameters: + session: Boto3 session. + region: Region name. + + Returns: + DescribePipelineDefinitionForExecutionResponse + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "NameContains": name_contains, - "SortBy": sort_by, - "SortOrder": sort_order, - "ProjectStatus": project_status, + 'PipelineExecutionArn': self.pipeline_execution_arn, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling describe_pipeline_definition_for_execution API") + response = client.describe_pipeline_definition_for_execution(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'DescribePipelineDefinitionForExecutionResponse') + return DescribePipelineDefinitionForExecutionResponse(**transformed_response) + + + @Base.add_validate_call + def get_all_steps( + self, + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, + region: Optional[str] = None, + ) -> ResourceIterator[PipelineExecutionStep]: + """ + Gets a list of PipeLineExecutionStep objects. + + Parameters: + next_token: If the result of the previous ListPipelineExecutionSteps request was truncated, the response includes a NextToken. To retrieve the next set of pipeline execution steps, use the token in the next request. + max_results: The maximum number of pipeline execution steps to return in the response. + sort_order: The field by which to sort results. The default is CreatedTime. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed PipelineExecutionStep. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + + operation_input_args = { + 'PipelineExecutionArn': self.pipeline_execution_arn, + 'SortOrder': sort_order, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_projects", - summaries_key="ProjectSummaryList", - summary_name="ProjectSummary", - resource_cls=Project, - list_method_kwargs=operation_input_args, + list_method='list_pipeline_execution_steps', + summaries_key='PipelineExecutionSteps', + summary_name='PipelineExecutionStep', + resource_cls=PipelineExecutionStep, + list_method_kwargs=operation_input_args ) - - -class QuotaAllocation(Base): - """ - Class representing resource QuotaAllocation - - Attributes: - quota_allocation_arn: - quota_id: - quota_allocation_name: - quota_allocation_version: - quota_allocation_status: - cluster_arn: - quota_resources: - over_quota: - preemption_config: - activation_state: - quota_allocation_target: - creation_time: - created_by: - failure_reason: - quota_allocation_description: - last_modified_time: - last_modified_by: - - """ - - quota_allocation_arn: StrPipeVar - quota_id: Optional[StrPipeVar] = Unassigned() - quota_allocation_name: Optional[StrPipeVar] = Unassigned() - quota_allocation_version: Optional[int] = Unassigned() - quota_allocation_status: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - cluster_arn: Optional[StrPipeVar] = Unassigned() - quota_resources: Optional[List[QuotaResourceConfig]] = Unassigned() - over_quota: Optional[OverQuota] = Unassigned() - preemption_config: Optional[PreemptionConfig] = Unassigned() - activation_state: Optional[ActivationStateV1] = Unassigned() - quota_allocation_target: Optional[QuotaAllocationTarget] = Unassigned() - quota_allocation_description: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "quota_allocation_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object quota_allocation") - return None - - @classmethod + + @Base.add_validate_call - def create( - cls, - quota_allocation_name: StrPipeVar, - cluster_arn: StrPipeVar, - quota_resources: List[QuotaResourceConfig], - quota_allocation_target: QuotaAllocationTarget, - over_quota: Optional[OverQuota] = Unassigned(), - preemption_config: Optional[PreemptionConfig] = Unassigned(), - activation_state: Optional[ActivationStateV1] = Unassigned(), - quota_allocation_description: Optional[StrPipeVar] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), + def get_all_parameters( + self, session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["QuotaAllocation"]: + region: Optional[str] = None, + ) -> ResourceIterator[Parameter]: """ - Create a QuotaAllocation resource - + Gets a list of parameters for a pipeline execution. + Parameters: - quota_allocation_name: - cluster_arn: - quota_resources: - quota_allocation_target: - over_quota: - preemption_config: - activation_state: - quota_allocation_description: - tags: + next_token: If the result of the previous ListPipelineParametersForExecution request was truncated, the response includes a NextToken. To retrieve the next set of parameters, use the token in the next request. + max_results: The maximum number of parameters to return in the response. session: Boto3 session. region: Region name. - + Returns: - The QuotaAllocation resource. - + Iterator for listed Parameter. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + + operation_input_args = { + 'PipelineExecutionArn': self.pipeline_execution_arn, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + + return ResourceIterator( + client=client, + list_method='list_pipeline_parameters_for_execution', + summaries_key='PipelineParameters', + summary_name='Parameter', + resource_cls=Parameter, + list_method_kwargs=operation_input_args + ) + + + @Base.add_validate_call + def retry( + self, + client_request_token: StrPipeVar, + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Retry the execution of the pipeline. + + Parameters: + client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than once. + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33092,68 +27193,46 @@ def create( ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + ResourceNotFound: Resource being access is not found. """ - - logger.info("Creating quota_allocation resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "QuotaAllocationName": quota_allocation_name, - "ClusterArn": cluster_arn, - "QuotaResources": quota_resources, - "OverQuota": over_quota, - "QuotaAllocationTarget": quota_allocation_target, - "PreemptionConfig": preemption_config, - "ActivationState": activation_state, - "QuotaAllocationDescription": quota_allocation_description, - "Tags": tags, + 'PipelineExecutionArn': self.pipeline_execution_arn, + 'ClientRequestToken': client_request_token, + 'ParallelismConfiguration': self.parallelism_configuration, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="QuotaAllocation", operation_input_args=operation_input_args - ) - - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.create_quota_allocation(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling retry_pipeline_execution API") + response = client.retry_pipeline_execution(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - quota_allocation_arn=response["QuotaAllocationArn"], session=session, region=region - ) - - @classmethod + + + @Base.add_validate_call - def get( - cls, - quota_allocation_arn: StrPipeVar, - quota_allocation_version: Optional[int] = Unassigned(), + def send_execution_step_failure( + self, + callback_token: StrPipeVar, + client_request_token: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["QuotaAllocation"]: + region: Optional[str] = None, + ) -> None: """ - Get a QuotaAllocation resource - + Notifies the pipeline that the execution of a callback step failed, along with a message describing why. + Parameters: - quota_allocation_arn: - quota_allocation_version: + callback_token: The pipeline generated token from the Amazon SQS queue. + client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. session: Boto3 session. region: Region name. - - Returns: - The QuotaAllocation resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33162,41 +27241,50 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "QuotaAllocationArn": quota_allocation_arn, - "QuotaAllocationVersion": quota_allocation_version, + 'CallbackToken': callback_token, + 'FailureReason': self.failure_reason, + 'ClientRequestToken': client_request_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_quota_allocation(**operation_input_args) - - logger.debug(response) - - # deserialize the response - transformed_response = transform(response, "DescribeQuotaAllocationResponse") - quota_allocation = cls(**transformed_response) - return quota_allocation - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling send_pipeline_execution_step_failure API") + response = client.send_pipeline_execution_step_failure(**operation_input_args) + logger.debug(f"Response: {response}") + + + @Base.add_validate_call - def refresh( + def send_execution_step_success( self, - ) -> Optional["QuotaAllocation"]: + callback_token: StrPipeVar, + output_parameters: Optional[List[OutputParameter]] = Unassigned(), + client_request_token: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: """ - Refresh a QuotaAllocation resource - - Returns: - The QuotaAllocation resource. - + Notifies the pipeline that the execution of a callback step succeeded and provides a list of the step's output parameters. + + Parameters: + callback_token: The pipeline generated token from the Amazon SQS queue. + output_parameters: A list of the output parameters of the callback step. + client_request_token: A unique, case-sensitive identifier that you provide to ensure the idempotency of the operation. An idempotent operation completes no more than one time. + session: Boto3 session. + region: Region name. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33205,43 +27293,98 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "QuotaAllocationArn": self.quota_allocation_arn, - "QuotaAllocationVersion": self.quota_allocation_version, + 'CallbackToken': callback_token, + 'OutputParameters': output_parameters, + 'ClientRequestToken': client_request_token, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling send_pipeline_execution_step_success API") + response = client.send_pipeline_execution_step_success(**operation_input_args) + logger.debug(f"Response: {response}") + - client = Base.get_sagemaker_client() - response = client.describe_quota_allocation(**operation_input_args) - - # deserialize response and update self - transform(response, "DescribeQuotaAllocationResponse", self) - return self +class PresignedDomainUrl(Base): + """ + Class representing resource PresignedDomainUrl + + Attributes: + domain_id: The domain ID. + user_profile_name: The name of the UserProfile to sign-in as. + session_expiration_duration_in_seconds: The session expiration duration in seconds. This value defaults to 43200. + expires_in_seconds: The number of seconds until the pre-signed URL expires. This value defaults to 300. + space_name: The name of the space. + landing_uri: The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are: studio::relative/path: Directs users to the relative path in Studio. app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application. app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application. app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application. app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application. app:Canvas:relative/path: Directs users to the relative path in the Canvas application. + authorized_url: The presigned URL. + + """ + domain_id: StrPipeVar + user_profile_name: Union[StrPipeVar, object] + session_expiration_duration_in_seconds: Optional[int] = Unassigned() + expires_in_seconds: Optional[int] = Unassigned() + space_name: Optional[Union[StrPipeVar, object]] = Unassigned() + landing_uri: Optional[StrPipeVar] = Unassigned() + authorized_url: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'presigned_domain_url_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object presigned_domain_url") + return None + + @classmethod @Base.add_validate_call - def update( - self, - quota_allocation_version: Optional[int] = Unassigned(), - quota_resources: Optional[List[QuotaResourceConfig]] = Unassigned(), - over_quota: Optional[OverQuota] = Unassigned(), - preemption_config: Optional[PreemptionConfig] = Unassigned(), - activation_state: Optional[ActivationStateV1] = Unassigned(), - quota_allocation_target: Optional[QuotaAllocationTarget] = Unassigned(), - quota_allocation_description: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["QuotaAllocation"]: + def create( + cls, + domain_id: StrPipeVar, + user_profile_name: Union[StrPipeVar, object], + session_expiration_duration_in_seconds: Optional[int] = Unassigned(), + expires_in_seconds: Optional[int] = Unassigned(), + space_name: Optional[Union[StrPipeVar, object]] = Unassigned(), + landing_uri: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional["PresignedDomainUrl"]: """ - Update a QuotaAllocation resource - + Create a PresignedDomainUrl resource + + Parameters: + domain_id: The domain ID. + user_profile_name: The name of the UserProfile to sign-in as. + session_expiration_duration_in_seconds: The session expiration duration in seconds. This value defaults to 43200. + expires_in_seconds: The number of seconds until the pre-signed URL expires. This value defaults to 300. + space_name: The name of the space. + landing_uri: The landing page that the user is directed to when accessing the presigned URL. Using this value, users can access Studio or Studio Classic, even if it is not the default experience for the domain. The supported values are: studio::relative/path: Directs users to the relative path in Studio. app:JupyterServer:relative/path: Directs users to the relative path in the Studio Classic application. app:JupyterLab:relative/path: Directs users to the relative path in the JupyterLab application. app:RStudioServerPro:relative/path: Directs users to the relative path in the RStudio application. app:CodeEditor:relative/path: Directs users to the relative path in the Code Editor, based on Code-OSS, Visual Studio Code - Open Source application. app:Canvas:relative/path: Directs users to the relative path in the Canvas application. + session: Boto3 session. + region: Region name. + Returns: - The QuotaAllocation resource. - + The PresignedDomainUrl resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33250,45 +27393,92 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Updating quota_allocation resource.") - client = Base.get_sagemaker_client() - + + operation_input_args = { - "QuotaAllocationArn": self.quota_allocation_arn, - "QuotaAllocationVersion": quota_allocation_version, - "QuotaResources": quota_resources, - "OverQuota": over_quota, - "PreemptionConfig": preemption_config, - "ActivationState": activation_state, - "QuotaAllocationTarget": quota_allocation_target, - "QuotaAllocationDescription": quota_allocation_description, + 'DomainId': domain_id, + 'UserProfileName': user_profile_name, + 'SessionExpirationDurationInSeconds': session_expiration_duration_in_seconds, + 'ExpiresInSeconds': expires_in_seconds, + 'SpaceName': space_name, + 'LandingUri': landing_uri, } - logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_quota_allocation(**operation_input_args) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_presigned_domain_url API") + response = client.create_presigned_domain_url(**operation_input_args) logger.debug(f"Response: {response}") - self.refresh() + + transformed_response = transform(response, 'CreatePresignedDomainUrlResponse') + return cls(**operation_input_args, **transformed_response) - return self +class PresignedMlflowAppUrl(Base): + """ + Class representing resource PresignedMlflowAppUrl + + Attributes: + arn: The ARN of the MLflow App to connect to your MLflow UI. + expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + session_expiration_duration_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + authorized_url: A presigned URL with an authorization token. + + """ + arn: StrPipeVar + expires_in_seconds: Optional[int] = Unassigned() + session_expiration_duration_in_seconds: Optional[int] = Unassigned() + authorized_url: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'presigned_mlflow_app_url_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object presigned_mlflow_app_url") + return None + + @classmethod @Base.add_validate_call - def delete( - self, - ) -> None: + def create( + cls, + arn: StrPipeVar, + expires_in_seconds: Optional[int] = Unassigned(), + session_expiration_duration_in_seconds: Optional[int] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional["PresignedMlflowAppUrl"]: """ - Delete a QuotaAllocation resource - + Create a PresignedMlflowAppUrl resource + + Parameters: + arn: The ARN of the MLflow App to connect to your MLflow UI. + expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + session_expiration_duration_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + session: Boto3 session. + region: Region name. + + Returns: + The PresignedMlflowAppUrl resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33298,109 +27488,88 @@ def delete( error_code = e.response['Error']['Code'] ``` ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - client = Base.get_sagemaker_client() - + + operation_input_args = { - "QuotaAllocationArn": self.quota_allocation_arn, + 'Arn': arn, + 'ExpiresInSeconds': expires_in_seconds, + 'SessionExpirationDurationInSeconds': session_expiration_duration_in_seconds, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_presigned_mlflow_app_url API") + response = client.create_presigned_mlflow_app_url(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'CreatePresignedMlflowAppUrlResponse') + return cls(**operation_input_args, **transformed_response) - client.delete_quota_allocation(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - - @Base.add_validate_call - def wait_for_status( - self, - target_status: Literal[ - "Creating", - "CreateFailed", - "CreateRollbackFailed", - "Created", - "Updating", - "UpdateFailed", - "UpdateRollbackFailed", - "Updated", - "Deleting", - "DeleteFailed", - "DeleteRollbackFailed", - "Deleted", - ], - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a QuotaAllocation resource to reach certain status. - - Parameters: - target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for QuotaAllocation to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.quota_allocation_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="QuotaAllocation", - status=current_status, - reason=self.failure_reason, - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="QuotaAllocation", status=current_status - ) - time.sleep(poll) +class PresignedMlflowTrackingServerUrl(Base): + """ + Class representing resource PresignedMlflowTrackingServerUrl + + Attributes: + tracking_server_name: The name of the tracking server to connect to your MLflow UI. + expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + session_expiration_duration_in_seconds: The duration in seconds that your MLflow UI session is valid. + authorized_url: A presigned URL with an authorization token. + + """ + tracking_server_name: StrPipeVar + expires_in_seconds: Optional[int] = Unassigned() + session_expiration_duration_in_seconds: Optional[int] = Unassigned() + authorized_url: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'presigned_mlflow_tracking_server_url_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object presigned_mlflow_tracking_server_url") + return None + + @classmethod @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: + def create( + cls, + tracking_server_name: StrPipeVar, + expires_in_seconds: Optional[int] = Unassigned(), + session_expiration_duration_in_seconds: Optional[int] = Unassigned(), + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional["PresignedMlflowTrackingServerUrl"]: """ - Wait for a QuotaAllocation resource to be deleted. - + Create a PresignedMlflowTrackingServerUrl resource + Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - + tracking_server_name: The name of the tracking server to connect to your MLflow UI. + expires_in_seconds: The duration in seconds that your presigned URL is valid. The presigned URL can be used only once. + session_expiration_duration_in_seconds: The duration in seconds that your MLflow UI session is valid. + session: Boto3 session. + region: Region name. + + Returns: + The PresignedMlflowTrackingServerUrl resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33409,85 +27578,85 @@ def wait_for_delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. + ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for QuotaAllocation to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.quota_allocation_status - status.update(f"Current status: [bold]{current_status}") - - if current_status.lower() == "deleted": - logger.info("Resource was deleted.") - return - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="QuotaAllocation", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] + + + operation_input_args = { + 'TrackingServerName': tracking_server_name, + 'ExpiresInSeconds': expires_in_seconds, + 'SessionExpirationDurationInSeconds': session_expiration_duration_in_seconds, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_presigned_mlflow_tracking_server_url API") + response = client.create_presigned_mlflow_tracking_server_url(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'CreatePresignedMlflowTrackingServerUrlResponse') + return cls(**operation_input_args, **transformed_response) - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e - time.sleep(poll) +class PresignedNotebookInstanceUrl(Base): + """ + Class representing resource PresignedNotebookInstanceUrl + + Attributes: + notebook_instance_name: The name of the notebook instance. + session_expiration_duration_in_seconds: The duration of the session, in seconds. The default is 12 hours. + authorized_url: A JSON object that contains the URL string. + + """ + notebook_instance_name: Union[StrPipeVar, object] + session_expiration_duration_in_seconds: Optional[int] = Unassigned() + authorized_url: Optional[StrPipeVar] = Unassigned() + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'presigned_notebook_instance_url_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object presigned_notebook_instance_url") + return None + @classmethod @Base.add_validate_call - def get_all( + def create( cls, - created_after: Optional[datetime.datetime] = Unassigned(), - created_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - quota_allocation_status: Optional[StrPipeVar] = Unassigned(), - cluster_arn: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), + notebook_instance_name: Union[StrPipeVar, object], + session_expiration_duration_in_seconds: Optional[int] = Unassigned(), session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["QuotaAllocation"]: + region: Optional[str] = None, + ) -> Optional["PresignedNotebookInstanceUrl"]: """ - Get all QuotaAllocation resources - + Create a PresignedNotebookInstanceUrl resource + Parameters: - created_after: - created_before: - name_contains: - quota_allocation_status: - cluster_arn: - sort_by: - sort_order: - next_token: - max_results: + notebook_instance_name: The name of the notebook instance. + session_expiration_duration_in_seconds: The duration of the session, in seconds. The default is 12 hours. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed QuotaAllocation resources. - + The PresignedNotebookInstanceUrl resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33496,100 +27665,246 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + operation_input_args = { - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "NameContains": name_contains, - "QuotaAllocationStatus": quota_allocation_status, - "ClusterArn": cluster_arn, - "SortBy": sort_by, - "SortOrder": sort_order, + 'NotebookInstanceName': notebook_instance_name, + 'SessionExpirationDurationInSeconds': session_expiration_duration_in_seconds, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_quota_allocations", - summaries_key="QuotaAllocationSummaries", - summary_name="QuotaAllocationSummary", - resource_cls=QuotaAllocation, - list_method_kwargs=operation_input_args, - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling create_presigned_notebook_instance_url API") + response = client.create_presigned_notebook_instance_url(**operation_input_args) + logger.debug(f"Response: {response}") + + transformed_response = transform(response, 'CreatePresignedNotebookInstanceUrlOutput') + return cls(**operation_input_args, **transformed_response) -class ResourceCatalog(Base): +class ProcessingJob(Base): """ - Class representing resource ResourceCatalog - + Class representing resource ProcessingJob + Attributes: - resource_catalog_arn: The Amazon Resource Name (ARN) of the ResourceCatalog. - resource_catalog_name: The name of the ResourceCatalog. - description: A free form description of the ResourceCatalog. - creation_time: The time the ResourceCatalog was created. - + processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + processing_resources: Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance. + app_specification: Configures the processing job to run a specified container image. + processing_job_arn: The Amazon Resource Name (ARN) of the processing job. + processing_job_status: Provides the status of a processing job. + creation_time: The time at which the processing job was created. + processing_inputs: The inputs for a processing job. + 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 set in the Docker container. + network_config: Networking options for a processing job. + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf. + experiment_config: The configuration information used to create an experiment. + exit_message: An optional string, up to one KB in size, that contains metadata from the processing container when the processing job exits. + failure_reason: A string, up to one KB in size, that contains the reason a processing job failed, if it failed. + processing_end_time: The time at which the processing job completed. + processing_start_time: The time at which the processing job started. + last_modified_time: The time at which the processing job was last modified. + monitoring_schedule_arn: The ARN of a monitoring schedule for an endpoint associated with this processing job. + auto_ml_job_arn: The ARN of an AutoML job associated with this processing job. + training_job_arn: The ARN of a training job associated with this processing job. + """ - - resource_catalog_arn: StrPipeVar - resource_catalog_name: StrPipeVar - description: StrPipeVar - creation_time: datetime.datetime - + processing_job_name: StrPipeVar + processing_inputs: Optional[List[ProcessingInput]] = Unassigned() + processing_output_config: Optional[ProcessingOutputConfig] = Unassigned() + processing_resources: Optional[ProcessingResources] = Unassigned() + stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned() + app_specification: Optional[AppSpecification] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + network_config: Optional[NetworkConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + experiment_config: Optional[ExperimentConfig] = Unassigned() + processing_job_arn: Optional[StrPipeVar] = Unassigned() + processing_job_status: Optional[StrPipeVar] = Unassigned() + exit_message: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + processing_end_time: Optional[datetime.datetime] = Unassigned() + processing_start_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + training_job_arn: Optional[StrPipeVar] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "resource_catalog_name" - resource_name_split = resource_name.split("_") + resource_name = 'processing_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object resource_catalog") + logger.error("Name attribute not found for object processing_job") return None + + def populate_inputs_decorator(create_func): + @functools.wraps(create_func) + def wrapper(*args, **kwargs): + config_schema_for_resource = \ + { + "processing_resources": { + "cluster_config": { + "volume_kms_key_id": { + "type": "string" + } + } + }, + "processing_output_config": { + "kms_key_id": { + "type": "string" + } + }, + "network_config": { + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "role_arn": { + "type": "string" + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "ProcessingJob", **kwargs)) + return wrapper + @classmethod + @populate_inputs_decorator @Base.add_validate_call - def get_all( + def create( cls, - name_contains: Optional[StrPipeVar] = Unassigned(), - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), + processing_job_name: StrPipeVar, + processing_resources: ProcessingResources, + app_specification: AppSpecification, + role_arn: StrPipeVar, + processing_inputs: Optional[List[ProcessingInput]] = Unassigned(), + processing_output_config: Optional[ProcessingOutputConfig] = Unassigned(), + stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned(), + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), + network_config: Optional[NetworkConfig] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + experiment_config: Optional[ExperimentConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["ResourceCatalog"]: + ) -> Optional["ProcessingJob"]: + """ + Create a ProcessingJob resource + + Parameters: + processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. + processing_resources: Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance. + app_specification: Configures the processing job to run a specified Docker container image. + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf. + 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. 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. 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. + + Returns: + The ProcessingJob resource. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceInUse: Resource being accessed is in use. + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + ResourceNotFound: Resource being access is not found. + ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema + LocalConfigNotFoundError: Raised when a configuration file is not found in local file system + S3ConfigNotFoundError: Raised when a configuration file is not found in S3 + """ + + logger.info("Creating processing_job resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ProcessingInputs': processing_inputs, + 'ProcessingOutputConfig': processing_output_config, + 'ProcessingJobName': processing_job_name, + 'ProcessingResources': processing_resources, + 'StoppingCondition': stopping_condition, + 'AppSpecification': app_specification, + 'Environment': environment, + 'NetworkConfig': network_config, + 'RoleArn': role_arn, + 'Tags': tags, + 'ExperimentConfig': experiment_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='ProcessingJob', operation_input_args=operation_input_args) + + logger.debug(f"Input request: {operation_input_args}") + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + # create the resource + response = client.create_processing_job(**operation_input_args) + logger.debug(f"Response: {response}") + + return cls.get(processing_job_name=processing_job_name, session=session, region=region) + + @classmethod + @Base.add_validate_call + def get( + cls, + processing_job_name: StrPipeVar, + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> Optional["ProcessingJob"]: """ - Get all ResourceCatalog resources - + Get a ProcessingJob resource + Parameters: - name_contains: A string that partially matches one or more ResourceCatalogs names. Filters ResourceCatalog by name. - creation_time_after: Use this parameter to search for ResourceCatalogs created after a specific date and time. - creation_time_before: Use this parameter to search for ResourceCatalogs created before a specific date and time. - sort_order: The order in which the resource catalogs are listed. - sort_by: The value on which the resource catalog list is sorted. - max_results: The maximum number of results returned by ListResourceCatalogs. - next_token: A token to resume pagination of ListResourceCatalogs results. + processing_job_name: The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed ResourceCatalog resources. - + The ProcessingJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33598,55 +27913,39 @@ def get_all( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + operation_input_args = { - "NameContains": name_contains, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "SortOrder": sort_order, - "SortBy": sort_by, + 'ProcessingJobName': processing_job_name, } - # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_resource_catalogs", - summaries_key="ResourceCatalogs", - summary_name="ResourceCatalog", - resource_cls=ResourceCatalog, - list_method_kwargs=operation_input_args, - ) - - -class SagemakerServicecatalogPortfolio(Base): - """ - Class representing resource SagemakerServicecatalogPortfolio - - """ - - @staticmethod + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_processing_job(**operation_input_args) + + logger.debug(response) + + # deserialize the response + transformed_response = transform(response, 'DescribeProcessingJobResponse') + processing_job = cls(**transformed_response) + return processing_job + @Base.add_validate_call - def disable( - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + def refresh( + self, + + ) -> Optional["ProcessingJob"]: """ - Disables using Service Catalog in SageMaker. - - Parameters: - session: Boto3 session. - region: Region name. - + Refresh a ProcessingJob resource + + Returns: + The ProcessingJob resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33655,31 +27954,33 @@ def disable( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling disable_sagemaker_servicecatalog_portfolio API") - response = client.disable_sagemaker_servicecatalog_portfolio() - logger.debug(f"Response: {response}") - - @staticmethod + + operation_input_args = { + 'ProcessingJobName': self.processing_job_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client = Base.get_sagemaker_client() + response = client.describe_processing_job(**operation_input_args) + + # deserialize response and update self + transform(response, 'DescribeProcessingJobResponse', self) + return self + @Base.add_validate_call - def enable( - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> None: + def delete( + self, + + ) -> None: """ - Enables using Service Catalog in SageMaker. - - Parameters: - session: Boto3 session. - region: Region name. - + Delete a ProcessingJob resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33688,34 +27989,162 @@ def enable( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceInUse: Resource being accessed is in use. + ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client() + + operation_input_args = { + 'ProcessingJobName': self.processing_job_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.delete_processing_job(**operation_input_args) + + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def stop(self) -> None: + """ + Stop a ProcessingJob resource + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + ResourceNotFound: Resource being access is not found. + """ + + client = SageMakerClient().sagemaker_client + + operation_input_args = { + 'ProcessingJobName': self.processing_job_name, + } + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + client.stop_processing_job(**operation_input_args) + + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") + + @Base.add_validate_call + def wait( + self, + poll: int = 5, + timeout: Optional[int] = None, + logs: Optional[bool] = False, + ) -> None: + """ + Wait for a ProcessingJob resource. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + logs: Whether to print logs while waiting. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + + """ + terminal_states = ['Completed', 'Failed', 'Stopped'] + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - - logger.debug(f"Calling enable_sagemaker_servicecatalog_portfolio API") - response = client.enable_sagemaker_servicecatalog_portfolio() - logger.debug(f"Response: {response}") - - @staticmethod + progress.add_task("Waiting for ProcessingJob...") + status = Status("Current status:") + + instance_count = self.processing_resources.cluster_config.instance_count + if logs: + multi_stream_logger = MultiLogStreamHandler( + log_group_name=f"/aws/sagemaker/ProcessingJobs", + log_stream_name_prefix=self.get_name(), + expected_stream_count=instance_count + ) + + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.processing_job_status + status.update(f"Current status: [bold]{current_status}") + + if logs and multi_stream_logger.ready(): + stream_log_events = multi_stream_logger.get_latest_log_events() + for stream_id, event in stream_log_events: + logger.info(f"{stream_id}:\n{event['message']}") + + if current_status in terminal_states: + logger.info(f"Final Resource Status: [bold]{current_status}") + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="ProcessingJob", status=current_status, reason=self.failure_reason) + + return + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="ProcessingJob", status=current_status, message="Increase the timeout and try again.") + time.sleep(poll) + + @classmethod @Base.add_validate_call - def get_status( + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional[str]: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ProcessingJob"]: """ - Gets the status of Service Catalog in SageMaker. - + Get all ProcessingJob resources + Parameters: + creation_time_after: A filter that returns only processing jobs created after the specified time. + creation_time_before: A filter that returns only processing jobs created after the specified time. + last_modified_time_after: A filter that returns only processing jobs modified after the specified time. + last_modified_time_before: A filter that returns only processing jobs modified before the specified time. + name_contains: A string in the processing job name. This filter returns only processing jobs whose name contains the specified string. + status_equals: A filter that retrieves only processing jobs with a specific status. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Ascending. + next_token: If the result of the previous ListProcessingJobs request was truncated, the response includes a NextToken. To retrieve the next set of processing jobs, use the token in the next request. + max_results: The maximum number of processing jobs to return in the response. session: Boto3 session. region: Region name. - + Returns: - str - + Iterator for listed ProcessingJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33725,88 +28154,111 @@ def get_status( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_processing_jobs', + summaries_key='ProcessingJobSummaries', + summary_name='ProcessingJobSummary', + resource_cls=ProcessingJob, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling get_sagemaker_servicecatalog_portfolio_status API") - response = client.get_sagemaker_servicecatalog_portfolio_status() - logger.debug(f"Response: {response}") - - return list(response.values())[0] - -class SharedModel(Base): +class Project(Base): """ - Class representing resource SharedModel - + Class representing resource Project + Attributes: - shared_model_id: - shared_model_version: - owner: - creator: - model_artifacts: - comments: - model_name: - origin: - + project_arn: The Amazon Resource Name (ARN) of the project. + project_name: The name of the project. + project_id: The ID of the project. + project_status: The status of the project. + creation_time: The time when the project was created. + project_description: The description of the project. + service_catalog_provisioning_details: Information used to provision a service catalog product. For information, see What is Amazon Web Services Service Catalog. + service_catalog_provisioned_product_details: Information about a provisioned service catalog product. + template_provider_details: An array of template providers associated with the project. + created_by: + last_modified_time: The timestamp when project was last modified. + last_modified_by: + """ - - shared_model_id: StrPipeVar - shared_model_version: StrPipeVar - owner: Optional[StrPipeVar] = Unassigned() - creator: Optional[StrPipeVar] = Unassigned() - model_artifacts: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - comments: Optional[List[CommentEntity]] = Unassigned() - model_name: Optional[StrPipeVar] = Unassigned() - origin: Optional[StrPipeVar] = Unassigned() - + project_name: StrPipeVar + project_arn: Optional[StrPipeVar] = Unassigned() + project_id: Optional[StrPipeVar] = Unassigned() + project_description: Optional[StrPipeVar] = Unassigned() + service_catalog_provisioning_details: Optional[ServiceCatalogProvisioningDetails] = Unassigned() + service_catalog_provisioned_product_details: Optional[ServiceCatalogProvisionedProductDetails] = Unassigned() + project_status: Optional[StrPipeVar] = Unassigned() + template_provider_details: Optional[List[TemplateProviderDetail]] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + def get_name(self) -> str: attributes = vars(self) - resource_name = "shared_model_name" - resource_name_split = resource_name.split("_") + resource_name = 'project_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value - logger.error("Name attribute not found for object shared_model") + logger.error("Name attribute not found for object project") return None - + @classmethod @Base.add_validate_call def create( cls, - reviewer_user_profiles: List[StrPipeVar], - model_artifacts: Dict[StrPipeVar, StrPipeVar], - comment: Optional[StrPipeVar] = Unassigned(), - model_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - origin: Optional[StrPipeVar] = Unassigned(), + project_name: StrPipeVar, + project_description: Optional[StrPipeVar] = Unassigned(), + service_catalog_provisioning_details: Optional[ServiceCatalogProvisioningDetails] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + template_providers: Optional[List[CreateTemplateProvider]] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["SharedModel"]: + ) -> Optional["Project"]: """ - Create a SharedModel resource - + Create a Project resource + Parameters: - reviewer_user_profiles: - model_artifacts: - comment: - model_name: - origin: + project_name: The name of the project. + project_description: A description for the project. + 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. + 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. + template_providers: An array of template provider configurations for creating infrastructure resources for the project. session: Boto3 session. region: Region name. - + Returns: - The SharedModel resource. - + The Project resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33815,67 +28267,57 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - - logger.info("Creating shared_model resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "ReviewerUserProfiles": reviewer_user_profiles, - "ModelArtifacts": model_artifacts, - "Comment": comment, - "ModelName": model_name, - "Origin": origin, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="SharedModel", operation_input_args=operation_input_args - ) - + + logger.info("Creating project resource.") + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'ProjectName': project_name, + 'ProjectDescription': project_description, + 'ServiceCatalogProvisioningDetails': service_catalog_provisioning_details, + 'Tags': tags, + 'TemplateProviders': template_providers, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Project', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.create_shared_model(**operation_input_args) + response = client.create_project(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - shared_model_id=response["SharedModelId"], - shared_model_version=response["SharedModelVersion"], - session=session, - region=region, - ) - + + return cls.get(project_name=project_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( cls, - shared_model_id: StrPipeVar, - shared_model_version: StrPipeVar, + project_name: StrPipeVar, session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> Optional["SharedModel"]: + ) -> Optional["Project"]: """ - Get a SharedModel resource - + Get a Project resource + Parameters: - shared_model_id: - shared_model_version: + project_name: The name of the project to describe. session: Boto3 session. region: Region name. - + Returns: - The SharedModel resource. - + The Project resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33885,39 +28327,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "SharedModelId": shared_model_id, - "SharedModelVersion": shared_model_version, + 'ProjectName': project_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - response = client.describe_shared_model(**operation_input_args) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + response = client.describe_project(**operation_input_args) + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeSharedModelResponse") - shared_model = cls(**transformed_response) - return shared_model - + transformed_response = transform(response, 'DescribeProjectOutput') + project = cls(**transformed_response) + return project + @Base.add_validate_call def refresh( self, - ) -> Optional["SharedModel"]: + + ) -> Optional["Project"]: """ - Refresh a SharedModel resource - + Refresh a Project resource + Returns: - The SharedModel resource. - + The Project resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33927,41 +28367,42 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "SharedModelId": self.shared_model_id, - "SharedModelVersion": self.shared_model_version, + 'ProjectName': self.project_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() - response = client.describe_shared_model(**operation_input_args) - + response = client.describe_project(**operation_input_args) + # deserialize response and update self - transform(response, "DescribeSharedModelResponse", self) + transform(response, 'DescribeProjectOutput', self) return self - + @Base.add_validate_call def update( self, - shared_model_version: Optional[StrPipeVar] = Unassigned(), - comment: Optional[StrPipeVar] = Unassigned(), - model_artifacts: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - origin: Optional[StrPipeVar] = Unassigned(), - ) -> Optional["SharedModel"]: + project_description: Optional[StrPipeVar] = Unassigned(), + service_catalog_provisioning_update_details: Optional[ServiceCatalogProvisioningUpdateDetails] = Unassigned(), + tags: Optional[List[Tag]] = Unassigned(), + template_providers_to_update: Optional[List[UpdateTemplateProvider]] = Unassigned(), + ) -> Optional["Project"]: """ - Update a SharedModel resource - + Update a Project resource + Parameters: - comment: - + 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. + 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. + template_providers_to_update: The template providers to update in the project. + Returns: - The SharedModel resource. - + The Project resource. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -33970,39 +28411,41 @@ def update( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - - logger.info("Updating shared_model resource.") + + logger.info("Updating project resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "SharedModelId": self.shared_model_id, - "SharedModelVersion": shared_model_version, - "Comment": comment, - "ModelArtifacts": model_artifacts, - "Origin": origin, + 'ProjectName': self.project_name, + 'ProjectDescription': project_description, + 'ServiceCatalogProvisioningUpdateDetails': service_catalog_provisioning_update_details, + 'Tags': tags, + 'TemplateProvidersToUpdate': template_providers_to_update, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource - response = client.update_shared_model(**operation_input_args) + response = client.update_project(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ - Delete a SharedModel resource - + Delete a Project resource + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34011,51 +28454,107 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` + ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "SharedModelId": self.shared_model_id, - "SharedModelVersion": self.shared_model_version, + 'ProjectName': self.project_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_shared_model(**operation_input_args) - + + client.delete_project(**operation_input_args) + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + + @Base.add_validate_call + def wait_for_status( + self, + target_status: Literal['Pending', 'CreateInProgress', 'CreateCompleted', 'CreateFailed', 'DeleteInProgress', 'DeleteFailed', 'DeleteCompleted', 'UpdateInProgress', 'UpdateCompleted', 'UpdateFailed'], + poll: int = 5, + timeout: Optional[int] = None + ) -> None: + """ + Wait for a Project resource to reach certain status. + + Parameters: + target_status: The status to wait for. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. + """ + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task(f"Waiting for Project to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.project_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="Project", status=current_status, reason='(Unknown)') + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="Project", status=current_status) + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( cls, - creation_time_before: Optional[datetime.datetime] = Unassigned(), creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["SharedModel"]: + ) -> ResourceIterator["Project"]: """ - Get all SharedModel resources - + Get all Project resources + Parameters: - creation_time_before: - creation_time_after: - sort_by: - sort_order: - next_token: - max_results: + creation_time_after: A filter that returns the projects that were created after a specified time. + creation_time_before: A filter that returns the projects that were created before a specified time. + max_results: The maximum number of projects to return in the response. + name_contains: A filter that returns the projects whose name contains a specified string. + next_token: If the result of the previous ListProjects request was truncated, the response includes a NextToken. To retrieve the next set of projects, use the token in the next request. + sort_by: The field by which to sort results. The default is CreationTime. + sort_order: The sort order for results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: - Iterator for listed SharedModel resources. - + Iterator for listed Project resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34065,43 +28564,245 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + + operation_input_args = { + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'NameContains': name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + } + + # serialize the input request + operation_input_args = serialize(operation_input_args) + logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_projects', + summaries_key='ProjectSummaryList', + summary_name='ProjectSummary', + resource_cls=Project, + list_method_kwargs=operation_input_args ) + +class ResourceCatalog(Base): + """ + Class representing resource ResourceCatalog + + Attributes: + resource_catalog_arn: The Amazon Resource Name (ARN) of the ResourceCatalog. + resource_catalog_name: The name of the ResourceCatalog. + description: A free form description of the ResourceCatalog. + creation_time: The time the ResourceCatalog was created. + + """ + resource_catalog_arn: StrPipeVar + resource_catalog_name: StrPipeVar + description: StrPipeVar + creation_time: datetime.datetime + + def get_name(self) -> str: + attributes = vars(self) + resource_name = 'resource_catalog_name' + resource_name_split = resource_name.split('_') + attribute_name_candidates = [] + + l = len(resource_name_split) + for i in range(0, l): + attribute_name_candidates.append("_".join(resource_name_split[i:l])) + + for attribute, value in attributes.items(): + if attribute == 'name' or attribute in attribute_name_candidates: + return value + logger.error("Name attribute not found for object resource_catalog") + return None + + @classmethod + @Base.add_validate_call + def get_all( + cls, + name_contains: Optional[StrPipeVar] = Unassigned(), + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["ResourceCatalog"]: + """ + Get all ResourceCatalog resources + + Parameters: + name_contains: A string that partially matches one or more ResourceCatalogs names. Filters ResourceCatalog by name. + creation_time_after: Use this parameter to search for ResourceCatalogs created after a specific date and time. + creation_time_before: Use this parameter to search for ResourceCatalogs created before a specific date and time. + sort_order: The order in which the resource catalogs are listed. + sort_by: The value on which the resource catalog list is sorted. + max_results: The maximum number of results returned by ListResourceCatalogs. + next_token: A token to resume pagination of ListResourceCatalogs results. + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed ResourceCatalog resources. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "SortBy": sort_by, - "SortOrder": sort_order, + 'NameContains': name_contains, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'SortOrder': sort_order, + 'SortBy': sort_by, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_shared_models", - summaries_key="SharedModels", - summary_name="SharedModelListEntity", - resource_cls=SharedModel, - list_method_kwargs=operation_input_args, + list_method='list_resource_catalogs', + summaries_key='ResourceCatalogs', + summary_name='ResourceCatalog', + resource_cls=ResourceCatalog, + list_method_kwargs=operation_input_args ) -class SharedModelReviewers(Base): +class SagemakerServicecatalogPortfolio(Base): """ - Class representing resource SharedModelReviewers - + Class representing resource SagemakerServicecatalogPortfolio + """ + + @staticmethod + @Base.add_validate_call + def disable( + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Disables using Service Catalog in SageMaker. + + Parameters: + session: Boto3 session. + region: Region name. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling disable_sagemaker_servicecatalog_portfolio API") + response = client.disable_sagemaker_servicecatalog_portfolio() + logger.debug(f"Response: {response}") + + + @staticmethod + @Base.add_validate_call + def enable( + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> None: + """ + Enables using Service Catalog in SageMaker. + + Parameters: + session: Boto3 session. + region: Region name. + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling enable_sagemaker_servicecatalog_portfolio API") + response = client.enable_sagemaker_servicecatalog_portfolio() + logger.debug(f"Response: {response}") + + + @staticmethod + @Base.add_validate_call + def get_status( + session: Optional[Session] = None, + region: Optional[str] = None, + ) -> Optional[str]: + """ + Gets the status of Service Catalog in SageMaker. + + Parameters: + session: Boto3 session. + region: Region name. + + Returns: + str + + Raises: + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + The error message and error code can be parsed from the exception as follows: + ``` + try: + # AWS service call here + except botocore.exceptions.ClientError as e: + error_message = e.response['Error']['Message'] + error_code = e.response['Error']['Code'] + ``` + """ + + + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + logger.debug(f"Calling get_sagemaker_servicecatalog_portfolio_status API") + response = client.get_sagemaker_servicecatalog_portfolio_status() + logger.debug(f"Response: {response}") + + return list(response.values())[0] class Space(Base): """ Class representing resource Space - + Attributes: domain_id: The ID of the associated domain. space_arn: The space's Amazon Resource Name (ARN). @@ -34115,10 +28816,9 @@ class Space(Base): ownership_settings: The collection of ownership settings for a space. space_sharing_settings: The collection of space sharing settings for a space. space_display_name: The name of the space that appears in the Amazon SageMaker Studio UI. - url: Returns the URL of the space. If the space is created with Amazon Web Services IAM Identity Center (Successor to Amazon Web Services Single Sign-On) authentication, users can navigate to the URL after appending the respective redirect parameter for the application type to be federated through Amazon Web Services IAM Identity Center. The following application types are supported: Studio Classic: &redirect=JupyterServer JupyterLab: &redirect=JupyterLab Code Editor, based on Code-OSS, Visual Studio Code - Open Source: &redirect=CodeEditor - + url: Returns the URL of the space. If the space is created with Amazon Web Services IAM Identity Center (Successor to Amazon Web Services Single Sign-On) authentication, users can navigate to the URL after appending the respective redirect parameter for the application type to be federated through Amazon Web Services IAM Identity Center. The following application types are supported: Studio Classic: &redirect=JupyterServer JupyterLab: &redirect=JupyterLab Code Editor, based on Code-OSS, Visual Studio Code - Open Source: &redirect=CodeEditor + """ - domain_id: StrPipeVar space_name: StrPipeVar space_arn: Optional[StrPipeVar] = Unassigned() @@ -34132,23 +28832,23 @@ class Space(Base): space_sharing_settings: Optional[SpaceSharingSettings] = Unassigned() space_display_name: Optional[StrPipeVar] = Unassigned() url: Optional[StrPipeVar] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "space_name" - resource_name_split = resource_name.split("_") + resource_name = 'space_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object space") return None - + @classmethod @Base.add_validate_call def create( @@ -34165,7 +28865,7 @@ def create( ) -> Optional["Space"]: """ Create a Space resource - + Parameters: domain_id: The ID of the associated domain. space_name: The name of the space. @@ -34176,12 +28876,12 @@ def create( space_display_name: The name of the space that appears in the SageMaker Studio UI. session: Boto3 session. region: Region name. - + Returns: The Space resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34196,37 +28896,33 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating space resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "DomainId": domain_id, - "SpaceName": space_name, - "Tags": tags, - "SpaceSettings": space_settings, - "OwnershipSettings": ownership_settings, - "SpaceSharingSettings": space_sharing_settings, - "SpaceDisplayName": space_display_name, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Space", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'DomainId': domain_id, + 'SpaceName': space_name, + 'Tags': tags, + 'SpaceSettings': space_settings, + 'OwnershipSettings': ownership_settings, + 'SpaceSharingSettings': space_sharing_settings, + 'SpaceDisplayName': space_display_name, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Space', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_space(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(domain_id=domain_id, space_name=space_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -34238,18 +28934,18 @@ def get( ) -> Optional["Space"]: """ Get a Space resource - + Parameters: domain_id: The ID of the associated domain. space_name: The name of the space. session: Boto3 session. region: Region name. - + Returns: The Space resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34260,39 +28956,38 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": domain_id, - "SpaceName": space_name, + 'DomainId': domain_id, + 'SpaceName': space_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_space(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeSpaceResponse") + transformed_response = transform(response, 'DescribeSpaceResponse') space = cls(**transformed_response) return space - + @Base.add_validate_call def refresh( self, - ) -> Optional["Space"]: + + ) -> Optional["Space"]: """ Refresh a Space resource - + Returns: The Space resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34303,22 +28998,22 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": self.domain_id, - "SpaceName": self.space_name, + 'DomainId': self.domain_id, + 'SpaceName': self.space_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_space(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeSpaceResponse", self) + transform(response, 'DescribeSpaceResponse', self) return self - + @Base.add_validate_call def update( self, @@ -34327,12 +29022,12 @@ def update( ) -> Optional["Space"]: """ Update a Space resource - + Returns: The Space resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34345,37 +29040,38 @@ def update( ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating space resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "SpaceName": self.space_name, - "SpaceSettings": space_settings, - "SpaceDisplayName": space_display_name, + 'DomainId': self.domain_id, + 'SpaceName': self.space_name, + 'SpaceSettings': space_settings, + 'SpaceDisplayName': space_display_name, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_space(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a Space resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34387,85 +29083,75 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "SpaceName": self.space_name, + 'DomainId': self.domain_id, + 'SpaceName': self.space_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_space(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Deleting", - "Failed", - "InService", - "Pending", - "Updating", - "Update_Failed", - "Delete_Failed", - ], + target_status: Literal['Deleting', 'Failed', 'InService', 'Pending', 'Updating', 'Update_Failed', 'Delete_Failed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a Space resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for Space to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Space", status=current_status, reason=self.failure_reason - ) - + raise FailedStatusError(resource_type="Space", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Space", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -34474,13 +29160,13 @@ def wait_for_delete( ) -> None: """ Wait for a Space resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34494,47 +29180,37 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for Space to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if ( - "delete_failed" in current_status.lower() - or "deletefailed" in current_status.lower() - ): - raise DeleteFailedStatusError( - resource_type="Space", reason=self.failure_reason - ) - + + if "delete_failed" in current_status.lower() or "deletefailed" in current_status.lower(): + raise DeleteFailedStatusError(resource_type="Space", reason=self.failure_reason) + + + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Space", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -34548,7 +29224,7 @@ def get_all( ) -> ResourceIterator["Space"]: """ Get all Space resources - + Parameters: next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. max_results: This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10. @@ -34558,12 +29234,12 @@ def get_all( space_name_contains: A parameter by which to filter the results. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Space resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34573,36 +29249,34 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortOrder": sort_order, - "SortBy": sort_by, - "DomainIdEquals": domain_id_equals, - "SpaceNameContains": space_name_contains, + 'SortOrder': sort_order, + 'SortBy': sort_by, + 'DomainIdEquals': domain_id_equals, + 'SpaceNameContains': space_name_contains, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_spaces", - summaries_key="Spaces", - summary_name="SpaceDetails", + list_method='list_spaces', + summaries_key='Spaces', + summary_name='SpaceDetails', resource_cls=Space, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class StudioLifecycleConfig(Base): """ Class representing resource StudioLifecycleConfig - + Attributes: studio_lifecycle_config_arn: The ARN of the Lifecycle Configuration to describe. studio_lifecycle_config_name: The name of the Amazon SageMaker AI Studio Lifecycle Configuration that is described. @@ -34610,32 +29284,31 @@ class StudioLifecycleConfig(Base): last_modified_time: This value is equivalent to CreationTime because Amazon SageMaker AI Studio Lifecycle Configurations are immutable. studio_lifecycle_config_content: The content of your Amazon SageMaker AI Studio Lifecycle Configuration script. studio_lifecycle_config_app_type: The App type that the Lifecycle Configuration is attached to. - + """ - studio_lifecycle_config_name: StrPipeVar studio_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() studio_lifecycle_config_content: Optional[StrPipeVar] = Unassigned() studio_lifecycle_config_app_type: Optional[StrPipeVar] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "studio_lifecycle_config_name" - resource_name_split = resource_name.split("_") + resource_name = 'studio_lifecycle_config_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object studio_lifecycle_config") return None - + @classmethod @Base.add_validate_call def create( @@ -34649,20 +29322,20 @@ def create( ) -> Optional["StudioLifecycleConfig"]: """ Create a StudioLifecycleConfig resource - + Parameters: studio_lifecycle_config_name: The name of the Amazon SageMaker AI Studio Lifecycle Configuration to create. studio_lifecycle_config_content: The content of your Amazon SageMaker AI Studio Lifecycle Configuration script. This content must be base64 encoded. studio_lifecycle_config_app_type: The App type that the Lifecycle Configuration is attached to. - tags: Tags to be associated with the Lifecycle Configuration. 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: Tags to be associated with the Lifecycle Configuration. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API. session: Boto3 session. region: Region name. - + Returns: The StudioLifecycleConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34676,38 +29349,30 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating studio_lifecycle_config resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "StudioLifecycleConfigName": studio_lifecycle_config_name, - "StudioLifecycleConfigContent": studio_lifecycle_config_content, - "StudioLifecycleConfigAppType": studio_lifecycle_config_app_type, - "Tags": tags, + 'StudioLifecycleConfigName': studio_lifecycle_config_name, + 'StudioLifecycleConfigContent': studio_lifecycle_config_content, + 'StudioLifecycleConfigAppType': studio_lifecycle_config_app_type, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="StudioLifecycleConfig", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='StudioLifecycleConfig', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_studio_lifecycle_config(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - studio_lifecycle_config_name=studio_lifecycle_config_name, - session=session, - region=region, - ) - + + return cls.get(studio_lifecycle_config_name=studio_lifecycle_config_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -34718,17 +29383,17 @@ def get( ) -> Optional["StudioLifecycleConfig"]: """ Get a StudioLifecycleConfig resource - + Parameters: studio_lifecycle_config_name: The name of the Amazon SageMaker AI Studio Lifecycle Configuration to describe. session: Boto3 session. region: Region name. - + Returns: The StudioLifecycleConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34739,38 +29404,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "StudioLifecycleConfigName": studio_lifecycle_config_name, + 'StudioLifecycleConfigName': studio_lifecycle_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_studio_lifecycle_config(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeStudioLifecycleConfigResponse") + transformed_response = transform(response, 'DescribeStudioLifecycleConfigResponse') studio_lifecycle_config = cls(**transformed_response) return studio_lifecycle_config - + @Base.add_validate_call def refresh( self, - ) -> Optional["StudioLifecycleConfig"]: + + ) -> Optional["StudioLifecycleConfig"]: """ Refresh a StudioLifecycleConfig resource - + Returns: The StudioLifecycleConfig resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34781,30 +29445,31 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "StudioLifecycleConfigName": self.studio_lifecycle_config_name, + 'StudioLifecycleConfigName': self.studio_lifecycle_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_studio_lifecycle_config(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeStudioLifecycleConfigResponse", self) + transform(response, 'DescribeStudioLifecycleConfigResponse', self) return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a StudioLifecycleConfig resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34816,20 +29481,20 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "StudioLifecycleConfigName": self.studio_lifecycle_config_name, + 'StudioLifecycleConfigName': self.studio_lifecycle_config_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_studio_lifecycle_config(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -34847,7 +29512,7 @@ def get_all( ) -> ResourceIterator["StudioLifecycleConfig"]: """ Get all StudioLifecycleConfig resources - + Parameters: max_results: The total number of items to return in the response. If the total number of items available is more than the value specified, a NextToken is provided in the response. To resume pagination, provide the NextToken value in the as part of a subsequent call. The default value is 10. next_token: If the previous call to ListStudioLifecycleConfigs didn't return the full set of Lifecycle Configurations, the call returns a token for getting the next set of Lifecycle Configurations. @@ -34861,12 +29526,12 @@ def get_all( sort_order: The sort order. The default value is Descending. session: Boto3 session. region: Region name. - + Returns: Iterator for listed StudioLifecycleConfig resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34877,64 +29542,61 @@ def get_all( ``` ResourceInUse: Resource being accessed is in use. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NameContains": name_contains, - "AppTypeEquals": app_type_equals, - "CreationTimeBefore": creation_time_before, - "CreationTimeAfter": creation_time_after, - "ModifiedTimeBefore": modified_time_before, - "ModifiedTimeAfter": modified_time_after, - "SortBy": sort_by, - "SortOrder": sort_order, + 'NameContains': name_contains, + 'AppTypeEquals': app_type_equals, + 'CreationTimeBefore': creation_time_before, + 'CreationTimeAfter': creation_time_after, + 'ModifiedTimeBefore': modified_time_before, + 'ModifiedTimeAfter': modified_time_after, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_studio_lifecycle_configs", - summaries_key="StudioLifecycleConfigs", - summary_name="StudioLifecycleConfigDetails", + list_method='list_studio_lifecycle_configs', + summaries_key='StudioLifecycleConfigs', + summary_name='StudioLifecycleConfigDetails', resource_cls=StudioLifecycleConfig, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class SubscribedWorkteam(Base): """ Class representing resource SubscribedWorkteam - + Attributes: subscribed_workteam: A Workteam instance that contains information about the work team. - + """ - workteam_arn: StrPipeVar subscribed_workteam: Optional[SubscribedWorkteam] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "subscribed_workteam_name" - resource_name_split = resource_name.split("_") + resource_name = 'subscribed_workteam_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object subscribed_workteam") return None - + @classmethod @Base.add_validate_call def get( @@ -34945,17 +29607,17 @@ def get( ) -> Optional["SubscribedWorkteam"]: """ Get a SubscribedWorkteam resource - + Parameters: workteam_arn: The Amazon Resource Name (ARN) of the subscribed work team to describe. session: Boto3 session. region: Region name. - + Returns: The SubscribedWorkteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -34965,38 +29627,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkteamArn": workteam_arn, + 'WorkteamArn': workteam_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_subscribed_workteam(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeSubscribedWorkteamResponse") + transformed_response = transform(response, 'DescribeSubscribedWorkteamResponse') subscribed_workteam = cls(**transformed_response) return subscribed_workteam - + @Base.add_validate_call def refresh( self, - ) -> Optional["SubscribedWorkteam"]: + + ) -> Optional["SubscribedWorkteam"]: """ Refresh a SubscribedWorkteam resource - + Returns: The SubscribedWorkteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35006,21 +29667,21 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkteamArn": self.workteam_arn, + 'WorkteamArn': self.workteam_arn, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_subscribed_workteam(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeSubscribedWorkteamResponse", self) + transform(response, 'DescribeSubscribedWorkteamResponse', self) return self - + @classmethod @Base.add_validate_call def get_all( @@ -35031,19 +29692,19 @@ def get_all( ) -> ResourceIterator["SubscribedWorkteam"]: """ Get all SubscribedWorkteam resources - + Parameters: name_contains: A string in the work team name. This filter returns only work teams whose name contains the specified string. next_token: If the result of the previous ListSubscribedWorkteams request was truncated, the response includes a NextToken. To retrieve the next set of labeling jobs, use the token in the next request. max_results: The maximum number of work teams to return in each page of the response. session: Boto3 session. region: Region name. - + Returns: Iterator for listed SubscribedWorkteam resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35053,58 +29714,55 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "NameContains": name_contains, + 'NameContains': name_contains, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_subscribed_workteams", - summaries_key="SubscribedWorkteams", - summary_name="SubscribedWorkteam", + list_method='list_subscribed_workteams', + summaries_key='SubscribedWorkteams', + summary_name='SubscribedWorkteam', resource_cls=SubscribedWorkteam, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class Tag(Base): """ Class representing resource Tag - + Attributes: key: The tag key. Tag keys must be unique per resource. value: The tag value. - + """ - key: StrPipeVar value: StrPipeVar - + def get_name(self) -> str: attributes = vars(self) - resource_name = "tag_name" - resource_name_split = resource_name.split("_") + resource_name = 'tag_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object tag") return None - + @classmethod @Base.add_validate_call def get_all( @@ -35115,19 +29773,19 @@ def get_all( ) -> ResourceIterator["Tag"]: """ Get all Tag resources - + Parameters: resource_arn: The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve. - next_token: If the response to the previous ListTags request is truncated, SageMaker returns this token. To retrieve the next set of tags, use it in the subsequent request. + next_token: If the response to the previous ListTags request is truncated, SageMaker returns this token. To retrieve the next set of tags, use it in the subsequent request. max_results: Maximum number of tags to return. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Tag resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35137,48 +29795,45 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "ResourceArn": resource_arn, + 'ResourceArn': resource_arn, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_tags", - summaries_key="Tags", - summary_name="Tag", + list_method='list_tags', + summaries_key='Tags', + summary_name='Tag', resource_cls=Tag, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + @classmethod @Base.add_validate_call def add_tags( cls, resource_arn: StrPipeVar, - tags: List[Tag], - session: Optional[Session] = None, + tags: List[Tag], session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ Adds or overwrites one or more tags for the specified SageMaker resource. - + Parameters: resource_arn: The Amazon Resource Name (ARN) of the resource that you want to tag. 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. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35188,43 +29843,42 @@ def add_tags( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "ResourceArn": resource_arn, - "Tags": tags, + 'ResourceArn': resource_arn, + 'Tags': tags, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling add_tags API") response = client.add_tags(**operation_input_args) logger.debug(f"Response: {response}") - + + @classmethod @Base.add_validate_call def delete_tags( cls, resource_arn: StrPipeVar, - tag_keys: List[StrPipeVar], - session: Optional[Session] = None, + tag_keys: List[StrPipeVar], session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ Deletes the specified tags from an SageMaker resource. - + Parameters: resource_arn: The Amazon Resource Name (ARN) of the resource whose tags you want to delete. tag_keys: An array or one or more tag keys to delete. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35234,48 +29888,46 @@ def delete_tags( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "ResourceArn": resource_arn, - "TagKeys": tag_keys, + 'ResourceArn': resource_arn, + 'TagKeys': tag_keys, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling delete_tags API") response = client.delete_tags(**operation_input_args) logger.debug(f"Response: {response}") + class TrainingJob(Base): """ Class representing resource TrainingJob - + Attributes: - training_job_name: Name of the model training job. + training_job_name: Name of the model training job. training_job_arn: The Amazon Resource Name (ARN) of the training job. - model_artifacts: Information about the Amazon S3 location that is configured for storing model artifacts. - training_job_status: The status of the training job. SageMaker provides the following training job statuses: InProgress - The training is in progress. Completed - The training job has completed. Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call. Stopping - The training job is stopping. Stopped - The training job has stopped. For more detailed information, see SecondaryStatus. - secondary_status: Provides detailed information about the state of the training job. For detailed information on the secondary status of the training job, see StatusMessage under SecondaryStatusTransition. SageMaker provides primary statuses and secondary statuses that apply to each of them: InProgress Starting - Starting the training job. Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes. Training - Training is in progress. Interrupted - The job stopped because the managed spot training instances were interrupted. Uploading - Training is complete and the model artifacts are being uploaded to the S3 location. Completed Completed - The training job has completed. Failed Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse. Stopped MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime. MaxWaitTimeExceeded - The job stopped because it exceeded the maximum allowed wait time. Stopped - The training job has stopped. Stopping Stopping - Stopping the training job. Valid values for SecondaryStatus are subject to change. We no longer support the following secondary statuses: LaunchingMLInstances PreparingTraining DownloadingTrainingImage - 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. + model_artifacts: Information about the Amazon S3 location that is configured for storing model artifacts. + training_job_status: The status of the training job. SageMaker provides the following training job statuses: InProgress - The training is in progress. Completed - The training job has completed. Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call. Stopping - The training job is stopping. Stopped - The training job has stopped. For more detailed information, see SecondaryStatus. + secondary_status: Provides detailed information about the state of the training job. For detailed information on the secondary status of the training job, see StatusMessage under SecondaryStatusTransition. SageMaker provides primary statuses and secondary statuses that apply to each of them: InProgress Starting - Starting the training job. Pending - The training job is waiting for compute capacity or compute resource provision. Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes. Training - Training is in progress. Interrupted - The job stopped because the managed spot training instances were interrupted. Uploading - Training is complete and the model artifacts are being uploaded to the S3 location. Completed Completed - The training job has completed. Failed Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse. Stopped MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime. MaxWaitTimeExceeded - The job stopped because it exceeded the maximum allowed wait time. Stopped - The training job has stopped. Stopping Stopping - Stopping the training job. Valid values for SecondaryStatus are subject to change. We no longer support the following secondary statuses: LaunchingMLInstances PreparingTraining DownloadingTrainingImage + 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. creation_time: A timestamp that indicates when the training job was created. - processing_job_arn: tuning_job_arn: The Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job. labeling_job_arn: The Amazon Resource Name (ARN) of the SageMaker Ground Truth labeling job that created the transform or training job. auto_ml_job_arn: The Amazon Resource Name (ARN) of an AutoML job. - training_job_output: Information about the S3 location that is configured for storing optional output. - failure_reason: If the training job failed, the reason it failed. - hyper_parameters: Algorithm-specific parameters. - algorithm_specification: Information about the algorithm used for training, and algorithm metadata. - role_arn: The Amazon Web Services Identity and Access Management (IAM) role configured for the training job. - input_data_config: An array of Channel objects that describes each data input channel. - output_data_config: The S3 path where model artifacts that you configured when creating the job are stored. SageMaker creates subfolders for model artifacts. - resource_config: Resources, including ML compute instances and ML storage volumes, that are configured for model training. + failure_reason: If the training job failed, the reason it failed. + hyper_parameters: Algorithm-specific parameters. + algorithm_specification: Information about the algorithm used for training, and algorithm metadata. + role_arn: The Amazon Web Services Identity and Access Management (IAM) role configured for the training job. + input_data_config: An array of Channel objects that describes each data input channel. + output_data_config: The S3 path where model artifacts that you configured when creating the job are stored. SageMaker creates subfolders for model artifacts. + resource_config: Resources, including ML compute instances and ML storage volumes, that are configured for model training. warm_pool_status: The status of the warm pool associated with the training job. vpc_config: A VpcConfig object that specifies the VPC that this training job has access to. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud. training_start_time: Indicates the time when the training job starts on training instances. You are billed for the time interval between this time and the value of TrainingEndTime. The start time in CloudWatch Logs might be later than this time. The difference is due to the time it takes to download the training data and to the size of the training container. @@ -35286,47 +29938,37 @@ class TrainingJob(Base): enable_network_isolation: If you want to allow inbound or outbound network calls, except for calls between peers within a training cluster for distributed training, choose True. 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 algorithms in distributed training. enable_managed_spot_training: A Boolean indicating whether managed spot training is enabled (True) or not (False). - checkpoint_config: + checkpoint_config: training_time_in_seconds: The training time in seconds. billable_time_in_seconds: The billable time in seconds. Billable time refers to the absolute wall-clock time. Multiply BillableTimeInSeconds by the number of instances (InstanceCount) in your training cluster to get the total compute time SageMaker bills you if you run distributed training. The formula is as follows: BillableTimeInSeconds \* InstanceCount . You can calculate the savings from using managed spot training using the formula (1 - BillableTimeInSeconds / TrainingTimeInSeconds) \* 100. For example, if BillableTimeInSeconds is 100 and TrainingTimeInSeconds is 500, the savings is 80%. - billable_token_count: - debug_hook_config: - experiment_config: + billable_token_count: The billable token count for eligible serverless training jobs. + debug_hook_config: + experiment_config: debug_rule_configurations: Configuration information for Amazon SageMaker Debugger rules for debugging output tensors. - tensor_board_output_config: + tensor_board_output_config: debug_rule_evaluation_statuses: Evaluation status of Amazon SageMaker Debugger rules for debugging on a training job. - upstream_platform_config: - profiler_config: + profiler_config: 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. 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. + 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. - last_modified_by: - created_by: - disable_efa: - processing_job_config: - image_metadata: 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. - resource_tags: infra_check_config: Contains information about the infrastructure health check configuration for the training job. - serverless_job_config: - mlflow_config: - model_package_config: - mlflow_details: - progress_info: - output_model_package_arn: - + serverless_job_config: The configuration for serverless training jobs. + mlflow_config: The MLflow configuration using SageMaker managed MLflow. + model_package_config: The configuration for the model package. + mlflow_details: The MLflow details of this job. + progress_info: The Serverless training job progress information. + output_model_package_arn: The Amazon Resource Name (ARN) of the output model package containing model weights or checkpoints. + """ - training_job_name: StrPipeVar training_job_arn: Optional[StrPipeVar] = Unassigned() - processing_job_arn: Optional[StrPipeVar] = Unassigned() tuning_job_arn: Optional[StrPipeVar] = Unassigned() labeling_job_arn: Optional[StrPipeVar] = Unassigned() auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() model_artifacts: Optional[ModelArtifacts] = Unassigned() - training_job_output: Optional[TrainingJobOutput] = Unassigned() training_job_status: Optional[StrPipeVar] = Unassigned() secondary_status: Optional[StrPipeVar] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() @@ -35357,20 +29999,13 @@ class TrainingJob(Base): debug_rule_configurations: Optional[List[DebugRuleConfiguration]] = Unassigned() tensor_board_output_config: Optional[TensorBoardOutputConfig] = Unassigned() debug_rule_evaluation_statuses: Optional[List[DebugRuleEvaluationStatus]] = Unassigned() - upstream_platform_config: Optional[UpstreamPlatformConfig] = Unassigned() profiler_config: Optional[ProfilerConfig] = Unassigned() profiler_rule_configurations: Optional[List[ProfilerRuleConfiguration]] = Unassigned() profiler_rule_evaluation_statuses: Optional[List[ProfilerRuleEvaluationStatus]] = Unassigned() profiling_status: Optional[StrPipeVar] = Unassigned() environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() retry_strategy: Optional[RetryStrategy] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - disable_efa: Optional[bool] = Unassigned() - processing_job_config: Optional[ProcessingJobConfig] = Unassigned() - image_metadata: Optional[ImageMetadata] = Unassigned() remote_debug_config: Optional[RemoteDebugConfig] = Unassigned() - resource_tags: Optional[ResourceTags] = Unassigned() infra_check_config: Optional[InfraCheckConfig] = Unassigned() serverless_job_config: Optional[ServerlessJobConfig] = Unassigned() mlflow_config: Optional[MlflowConfig] = Unassigned() @@ -35378,52 +30013,88 @@ class TrainingJob(Base): mlflow_details: Optional[MlflowDetails] = Unassigned() progress_info: Optional[TrainingProgressInfo] = Unassigned() output_model_package_arn: Optional[StrPipeVar] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "training_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'training_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object training_job") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "model_artifacts": {"s3_model_artifacts": {"type": "string"}}, - "resource_config": {"volume_kms_key_id": {"type": "string"}}, - "role_arn": {"type": "string"}, - "output_data_config": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - }, - "checkpoint_config": {"s3_uri": {"type": "string"}}, - "debug_hook_config": {"s3_output_path": {"type": "string"}}, - "tensor_board_output_config": {"s3_output_path": {"type": "string"}}, - "profiler_config": {"s3_output_path": {"type": "string"}}, + config_schema_for_resource = \ + { + "model_artifacts": { + "s3_model_artifacts": { + "type": "string" } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "TrainingJob", **kwargs - ), - ) - + }, + "role_arn": { + "type": "string" + }, + "output_data_config": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "resource_config": { + "volume_kms_key_id": { + "type": "string" + } + }, + "vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "checkpoint_config": { + "s3_uri": { + "type": "string" + } + }, + "debug_hook_config": { + "s3_output_path": { + "type": "string" + } + }, + "tensor_board_output_config": { + "s3_output_path": { + "type": "string" + } + }, + "profiler_config": { + "s3_output_path": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "TrainingJob", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -35434,13 +30105,11 @@ def create( output_data_config: OutputDataConfig, hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), algorithm_specification: Optional[AlgorithmSpecification] = Unassigned(), - chained_customer_role_arn: Optional[StrPipeVar] = Unassigned(), input_data_config: Optional[List[Channel]] = Unassigned(), resource_config: Optional[ResourceConfig] = Unassigned(), vpc_config: Optional[VpcConfig] = Unassigned(), stopping_condition: Optional[StoppingCondition] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - resource_tags: Optional[ResourceTags] = Unassigned(), enable_network_isolation: Optional[bool] = Unassigned(), enable_inter_container_traffic_encryption: Optional[bool] = Unassigned(), enable_managed_spot_training: Optional[bool] = Unassigned(), @@ -35449,77 +30118,59 @@ def create( debug_rule_configurations: Optional[List[DebugRuleConfiguration]] = Unassigned(), tensor_board_output_config: Optional[TensorBoardOutputConfig] = Unassigned(), experiment_config: Optional[ExperimentConfig] = Unassigned(), - upstream_platform_config: Optional[UpstreamPlatformConfig] = Unassigned(), profiler_config: Optional[ProfilerConfig] = Unassigned(), profiler_rule_configurations: Optional[List[ProfilerRuleConfiguration]] = Unassigned(), - disable_efa: Optional[bool] = Unassigned(), environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), retry_strategy: Optional[RetryStrategy] = Unassigned(), - upstream_assume_role_source_arn: Optional[StrPipeVar] = Unassigned(), - upstream_assume_role_source_account: Optional[StrPipeVar] = Unassigned(), - on_hold_cluster_id: Optional[StrPipeVar] = Unassigned(), - target_compute_cell_account_id: Optional[StrPipeVar] = Unassigned(), - training_job_arn: Optional[StrPipeVar] = Unassigned(), remote_debug_config: Optional[RemoteDebugConfig] = Unassigned(), infra_check_config: Optional[InfraCheckConfig] = Unassigned(), session_chaining_config: Optional[SessionChainingConfig] = Unassigned(), serverless_job_config: Optional[ServerlessJobConfig] = Unassigned(), mlflow_config: Optional[MlflowConfig] = Unassigned(), - with_warm_pool_validation_error: Optional[bool] = Unassigned(), model_package_config: Optional[ModelPackageConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, ) -> Optional["TrainingJob"]: """ Create a TrainingJob resource - + Parameters: - training_job_name: The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. - role_arn: The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf. During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see SageMaker Roles. To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission. - output_data_config: Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts. - 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. - algorithm_specification: The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see Algorithms. For information about providing your own algorithms, see Using Your Own Algorithms with Amazon SageMaker. - chained_customer_role_arn: + training_job_name: The name of the training job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. + role_arn: The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf. During model training, SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see SageMaker Roles. To be able to pass this role to SageMaker, the caller of this API must have the iam:PassRole permission. + output_data_config: Specifies the path to the S3 location where you want to store model artifacts. SageMaker creates subfolders for the artifacts. + 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. + algorithm_specification: The registry path of the Docker image that contains the training algorithm and algorithm-specific metadata, including the input mode. For more information about algorithms provided by SageMaker, see Algorithms. For information about providing your own algorithms, see Using Your Own Algorithms with Amazon SageMaker. 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. 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. 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. - 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. - 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. - resource_tags: + 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. + 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. + 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. checkpoint_config: Contains information about the output location for managed spot training checkpoint data. - debug_hook_config: + debug_hook_config: debug_rule_configurations: Configuration information for Amazon SageMaker Debugger rules for debugging output tensors. - tensor_board_output_config: - experiment_config: - upstream_platform_config: - profiler_config: + tensor_board_output_config: + experiment_config: + profiler_config: profiler_rule_configurations: Configuration information for Amazon SageMaker Debugger rules for profiling system and framework metrics. - disable_efa: - 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. + 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. - upstream_assume_role_source_arn: - upstream_assume_role_source_account: - on_hold_cluster_id: - target_compute_cell_account_id: - training_job_arn: 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. session_chaining_config: Contains information about attribute-based access control (ABAC) for the training job. - serverless_job_config: - mlflow_config: - with_warm_pool_validation_error: - model_package_config: + serverless_job_config: The configuration for serverless training jobs. + mlflow_config: The MLflow configuration using SageMaker managed MLflow. + model_package_config: The configuration for the model package. session: Boto3 session. region: Region name. - + Returns: The TrainingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35535,68 +30186,54 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating training_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "TrainingJobName": training_job_name, - "HyperParameters": hyper_parameters, - "AlgorithmSpecification": algorithm_specification, - "RoleArn": role_arn, - "ChainedCustomerRoleArn": chained_customer_role_arn, - "InputDataConfig": input_data_config, - "OutputDataConfig": output_data_config, - "ResourceConfig": resource_config, - "VpcConfig": vpc_config, - "StoppingCondition": stopping_condition, - "Tags": tags, - "ResourceTags": resource_tags, - "EnableNetworkIsolation": enable_network_isolation, - "EnableInterContainerTrafficEncryption": enable_inter_container_traffic_encryption, - "EnableManagedSpotTraining": enable_managed_spot_training, - "CheckpointConfig": checkpoint_config, - "DebugHookConfig": debug_hook_config, - "DebugRuleConfigurations": debug_rule_configurations, - "TensorBoardOutputConfig": tensor_board_output_config, - "ExperimentConfig": experiment_config, - "UpstreamPlatformConfig": upstream_platform_config, - "ProfilerConfig": profiler_config, - "ProfilerRuleConfigurations": profiler_rule_configurations, - "DisableEFA": disable_efa, - "Environment": environment, - "RetryStrategy": retry_strategy, - "UpstreamAssumeRoleSourceArn": upstream_assume_role_source_arn, - "UpstreamAssumeRoleSourceAccount": upstream_assume_role_source_account, - "OnHoldClusterId": on_hold_cluster_id, - "TargetComputeCellAccountId": target_compute_cell_account_id, - "TrainingJobArn": training_job_arn, - "RemoteDebugConfig": remote_debug_config, - "InfraCheckConfig": infra_check_config, - "SessionChainingConfig": session_chaining_config, - "ServerlessJobConfig": serverless_job_config, - "MlflowConfig": mlflow_config, - "WithWarmPoolValidationError": with_warm_pool_validation_error, - "ModelPackageConfig": model_package_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="TrainingJob", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'TrainingJobName': training_job_name, + 'HyperParameters': hyper_parameters, + 'AlgorithmSpecification': algorithm_specification, + 'RoleArn': role_arn, + 'InputDataConfig': input_data_config, + 'OutputDataConfig': output_data_config, + 'ResourceConfig': resource_config, + 'VpcConfig': vpc_config, + 'StoppingCondition': stopping_condition, + 'Tags': tags, + 'EnableNetworkIsolation': enable_network_isolation, + 'EnableInterContainerTrafficEncryption': enable_inter_container_traffic_encryption, + 'EnableManagedSpotTraining': enable_managed_spot_training, + 'CheckpointConfig': checkpoint_config, + 'DebugHookConfig': debug_hook_config, + 'DebugRuleConfigurations': debug_rule_configurations, + 'TensorBoardOutputConfig': tensor_board_output_config, + 'ExperimentConfig': experiment_config, + 'ProfilerConfig': profiler_config, + 'ProfilerRuleConfigurations': profiler_rule_configurations, + 'Environment': environment, + 'RetryStrategy': retry_strategy, + 'RemoteDebugConfig': remote_debug_config, + 'InfraCheckConfig': infra_check_config, + 'SessionChainingConfig': session_chaining_config, + 'ServerlessJobConfig': serverless_job_config, + 'MlflowConfig': mlflow_config, + 'ModelPackageConfig': model_package_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='TrainingJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_training_job(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(training_job_name=training_job_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -35607,17 +30244,17 @@ def get( ) -> Optional["TrainingJob"]: """ Get a TrainingJob resource - + Parameters: training_job_name: The name of the training job. session: Boto3 session. region: Region name. - + Returns: The TrainingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35628,38 +30265,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrainingJobName": training_job_name, + 'TrainingJobName': training_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_training_job(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeTrainingJobResponse") + transformed_response = transform(response, 'DescribeTrainingJobResponse') training_job = cls(**transformed_response) return training_job - + @Base.add_validate_call def refresh( self, - ) -> Optional["TrainingJob"]: + + ) -> Optional["TrainingJob"]: """ Refresh a TrainingJob resource - + Returns: The TrainingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35670,21 +30306,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrainingJobName": self.training_job_name, + 'TrainingJobName': self.training_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_training_job(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeTrainingJobResponse", self) + transform(response, 'DescribeTrainingJobResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( @@ -35696,12 +30332,12 @@ def update( ) -> Optional["TrainingJob"]: """ Update a TrainingJob resource - + Returns: The TrainingJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35713,38 +30349,39 @@ def update( ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating training_job resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "TrainingJobName": self.training_job_name, - "ProfilerConfig": profiler_config, - "ProfilerRuleConfigurations": profiler_rule_configurations, - "ResourceConfig": resource_config, - "RemoteDebugConfig": remote_debug_config, + 'TrainingJobName': self.training_job_name, + 'ProfilerConfig': profiler_config, + 'ProfilerRuleConfigurations': profiler_rule_configurations, + 'ResourceConfig': resource_config, + 'RemoteDebugConfig': remote_debug_config, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_training_job(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a TrainingJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35756,27 +30393,27 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "TrainingJobName": self.training_job_name, + 'TrainingJobName': self.training_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_training_job(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def stop(self) -> None: """ Stop a TrainingJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -35787,20 +30424,20 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - + client = SageMakerClient().sagemaker_client - + operation_input_args = { - "TrainingJobName": self.training_job_name, + 'TrainingJobName': self.training_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.stop_training_job(**operation_input_args) - + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait( self, @@ -35810,500 +30447,95 @@ def wait( ) -> None: """ Wait for a TrainingJob resource. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. logs: Whether to print logs while waiting. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - + """ - terminal_states = ["Completed", "Failed", "Stopped"] + terminal_states = ['Completed', 'Failed', 'Stopped'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for TrainingJob...") status = Status("Current status:") - + instance_count = 1 # Default if not isinstance(self.resource_config, Unassigned): - if (hasattr(self.resource_config, 'instance_groups') and - self.resource_config.instance_groups and - not isinstance(self.resource_config.instance_groups, Unassigned)): + if ( + hasattr(self.resource_config, "instance_groups") + and self.resource_config.instance_groups + and not isinstance(self.resource_config.instance_groups, Unassigned) + ): instance_count = sum( instance_group.instance_count for instance_group in self.resource_config.instance_groups ) - elif hasattr(self.resource_config, 'instance_count'): + elif hasattr(self.resource_config, "instance_count"): instance_count = self.resource_config.instance_count - if logs: multi_stream_logger = MultiLogStreamHandler( log_group_name=f"/aws/sagemaker/TrainingJobs", log_stream_name_prefix=self.get_name(), - expected_stream_count=instance_count, + expected_stream_count=instance_count ) - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.training_job_status status.update(f"Current status: [bold]{current_status}") - + if logs and multi_stream_logger.ready(): stream_log_events = multi_stream_logger.get_latest_log_events() for stream_id, event in stream_log_events: logger.info(f"{stream_id}:\n{event['message']}") - + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="TrainingJob", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="TrainingJob", status=current_status, reason=self.failure_reason) + return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="TrainingJob", - status=current_status, - message="Your training job is still running. Call .refresh() to check its current status.", - ) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a TrainingJob resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for TrainingJob to be deleted...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.training_job_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="TrainingJob", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e + raise TimeoutExceededError(resource_type="TrainingJob", status=current_status, message="Your training job is still running. Call .refresh() to check its current status.") time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - warm_pool_status_equals: Optional[StrPipeVar] = Unassigned(), - training_plan_arn_equals: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["TrainingJob"]: - """ - Get all TrainingJob resources - - Parameters: - next_token: If the result of the previous ListTrainingJobs request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request. - max_results: The maximum number of training jobs to return in the response. - creation_time_after: A filter that returns only training jobs created after the specified time (timestamp). - creation_time_before: A filter that returns only training jobs created before the specified time (timestamp). - last_modified_time_after: A filter that returns only training jobs modified after the specified time (timestamp). - last_modified_time_before: A filter that returns only training jobs modified before the specified time (timestamp). - name_contains: A string in the training job name. This filter returns only training jobs whose name contains the specified string. - status_equals: A filter that retrieves only training jobs with a specific status. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: The sort order for results. The default is Ascending. - warm_pool_status_equals: A filter that retrieves only training jobs with a specific warm pool status. - training_plan_arn_equals: The Amazon Resource Name (ARN); of the training plan to filter training jobs by. For more information about reserving GPU capacity for your SageMaker training jobs using Amazon SageMaker Training Plan, see CreateTrainingPlan . - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed TrainingJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - "WarmPoolStatusEquals": warm_pool_status_equals, - "TrainingPlanArnEquals": training_plan_arn_equals, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_training_jobs", - summaries_key="TrainingJobSummaries", - summary_name="TrainingJobSummary", - resource_cls=TrainingJob, - list_method_kwargs=operation_input_args, - ) - -''' -class TrainingJobInternal(Base): - """ - Class representing resource TrainingJobInternal - - Attributes: - training_job_name: - algorithm_specification: - role_arn: - output_data_config: - resource_config: - stopping_condition: - hyper_parameters: - chained_customer_role_arn: - input_data_config: - vpc_config: - tags: - resource_tags: - enable_network_isolation: - enable_inter_container_traffic_encryption: - enable_managed_spot_training: - checkpoint_config: - environment: - retry_strategy: - processing_job_config: - customer_details: - processing_job_arn: - tuning_job_arn: - labeling_job_arn: - auto_ml_job_arn: - fas_credentials: - state_machine_arn: - experiment_config: - upstream_platform_config: - disable_efa: - billing_mode: - session_tags: - source_identity: - fas_source_arn: - fas_source_account: - sts_context_map: - identity_center_user_token: - training_job_response: - - """ - - training_job_name: Union[StrPipeVar, object] - algorithm_specification: AlgorithmSpecification - role_arn: StrPipeVar - output_data_config: OutputDataConfig - resource_config: ResourceConfig - stopping_condition: StoppingCondition - hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - chained_customer_role_arn: Optional[StrPipeVar] = Unassigned() - input_data_config: Optional[List[Channel]] = Unassigned() - vpc_config: Optional[VpcConfig] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - resource_tags: Optional[ResourceTags] = Unassigned() - enable_network_isolation: Optional[bool] = Unassigned() - enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() - enable_managed_spot_training: Optional[bool] = Unassigned() - checkpoint_config: Optional[CheckpointConfig] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - retry_strategy: Optional[RetryStrategy] = Unassigned() - processing_job_config: Optional[ProcessingJobConfig] = Unassigned() - customer_details: Optional[CustomerDetails] = Unassigned() - processing_job_arn: Optional[StrPipeVar] = Unassigned() - tuning_job_arn: Optional[StrPipeVar] = Unassigned() - labeling_job_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - state_machine_arn: Optional[StrPipeVar] = Unassigned() - experiment_config: Optional[ExperimentConfig] = Unassigned() - upstream_platform_config: Optional[UpstreamPlatformConfig] = Unassigned() - disable_efa: Optional[bool] = Unassigned() - billing_mode: Optional[StrPipeVar] = Unassigned() - session_tags: Optional[List[Tag]] = Unassigned() - source_identity: Optional[StrPipeVar] = Unassigned() - fas_source_arn: Optional[StrPipeVar] = Unassigned() - fas_source_account: Optional[StrPipeVar] = Unassigned() - sts_context_map: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned() - training_job_response: Optional[CreateTrainingJobResponse] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "training_job_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object training_job_internal") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - training_job_name: Union[StrPipeVar, object], - algorithm_specification: AlgorithmSpecification, - role_arn: StrPipeVar, - output_data_config: OutputDataConfig, - resource_config: ResourceConfig, - stopping_condition: StoppingCondition, - hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - chained_customer_role_arn: Optional[StrPipeVar] = Unassigned(), - input_data_config: Optional[List[Channel]] = Unassigned(), - vpc_config: Optional[VpcConfig] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - resource_tags: Optional[ResourceTags] = Unassigned(), - enable_network_isolation: Optional[bool] = Unassigned(), - enable_inter_container_traffic_encryption: Optional[bool] = Unassigned(), - enable_managed_spot_training: Optional[bool] = Unassigned(), - checkpoint_config: Optional[CheckpointConfig] = Unassigned(), - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - retry_strategy: Optional[RetryStrategy] = Unassigned(), - processing_job_config: Optional[ProcessingJobConfig] = Unassigned(), - customer_details: Optional[CustomerDetails] = Unassigned(), - processing_job_arn: Optional[StrPipeVar] = Unassigned(), - tuning_job_arn: Optional[StrPipeVar] = Unassigned(), - labeling_job_arn: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - state_machine_arn: Optional[StrPipeVar] = Unassigned(), - experiment_config: Optional[ExperimentConfig] = Unassigned(), - upstream_platform_config: Optional[UpstreamPlatformConfig] = Unassigned(), - disable_efa: Optional[bool] = Unassigned(), - billing_mode: Optional[StrPipeVar] = Unassigned(), - session_tags: Optional[List[Tag]] = Unassigned(), - source_identity: Optional[StrPipeVar] = Unassigned(), - fas_source_arn: Optional[StrPipeVar] = Unassigned(), - fas_source_account: Optional[StrPipeVar] = Unassigned(), - sts_context_map: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - identity_center_user_token: Optional[IdentityCenterUserToken] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["TrainingJobInternal"]: - """ - Create a TrainingJobInternal resource - - Parameters: - training_job_name: - algorithm_specification: - role_arn: - output_data_config: - resource_config: - stopping_condition: - hyper_parameters: - chained_customer_role_arn: - input_data_config: - vpc_config: - tags: - resource_tags: - enable_network_isolation: - enable_inter_container_traffic_encryption: - enable_managed_spot_training: - checkpoint_config: - environment: - retry_strategy: - processing_job_config: - customer_details: - processing_job_arn: - tuning_job_arn: - labeling_job_arn: - auto_ml_job_arn: - fas_credentials: - state_machine_arn: - experiment_config: - upstream_platform_config: - disable_efa: - billing_mode: - session_tags: - source_identity: - fas_source_arn: - fas_source_account: - sts_context_map: - identity_center_user_token: - session: Boto3 session. - region: Region name. - - Returns: - The TrainingJobInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "TrainingJobName": training_job_name, - "HyperParameters": hyper_parameters, - "AlgorithmSpecification": algorithm_specification, - "RoleArn": role_arn, - "ChainedCustomerRoleArn": chained_customer_role_arn, - "InputDataConfig": input_data_config, - "OutputDataConfig": output_data_config, - "ResourceConfig": resource_config, - "VpcConfig": vpc_config, - "StoppingCondition": stopping_condition, - "Tags": tags, - "ResourceTags": resource_tags, - "EnableNetworkIsolation": enable_network_isolation, - "EnableInterContainerTrafficEncryption": enable_inter_container_traffic_encryption, - "EnableManagedSpotTraining": enable_managed_spot_training, - "CheckpointConfig": checkpoint_config, - "Environment": environment, - "RetryStrategy": retry_strategy, - "ProcessingJobConfig": processing_job_config, - "CustomerDetails": customer_details, - "ProcessingJobArn": processing_job_arn, - "TuningJobArn": tuning_job_arn, - "LabelingJobArn": labeling_job_arn, - "AutoMLJobArn": auto_ml_job_arn, - "FasCredentials": fas_credentials, - "StateMachineArn": state_machine_arn, - "ExperimentConfig": experiment_config, - "UpstreamPlatformConfig": upstream_platform_config, - "DisableEFA": disable_efa, - "BillingMode": billing_mode, - "SessionTags": session_tags, - "SourceIdentity": source_identity, - "FasSourceArn": fas_source_arn, - "FasSourceAccount": fas_source_account, - "StsContextMap": sts_context_map, - "IdentityCenterUserToken": identity_center_user_token, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_training_job_internal API") - response = client.create_training_job_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateTrainingJobInternalResponse") - return cls(**operation_input_args, **transformed_response) - + @Base.add_validate_call - def delete( + def wait_for_delete( self, - training_job_arn: Optional[StrPipeVar] = Unassigned(), - associated_parent_job_arn: Optional[StrPipeVar] = Unassigned(), + poll: int = 5, + timeout: Optional[int] = None, ) -> None: """ - Delete a TrainingJobInternal resource - + Wait for a TrainingJob resource to be deleted. + + Parameters: + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36312,33 +30544,80 @@ def delete( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + DeleteFailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "TrainingJobName": self.training_job_name, - "CustomerDetails": self.customer_details, - "TrainingJobArn": training_job_arn, - "AssociatedParentJobArn": associated_parent_job_arn, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_training_job_internal(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), + ) + progress.add_task("Waiting for TrainingJob to be deleted...") + status = Status("Current status:") + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): + while True: + try: + self.refresh() + current_status = self.training_job_status + status.update(f"Current status: [bold]{current_status}") + + + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="TrainingJob", status=current_status) + except botocore.exceptions.ClientError as e: + error_code = e.response["Error"]["Code"] + + if "ResourceNotFound" in error_code or "ValidationException" in error_code: + logger.info("Resource was not found. It may have been deleted.") + return + raise e + time.sleep(poll) + + @classmethod @Base.add_validate_call - def stop(self) -> None: + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), + warm_pool_status_equals: Optional[StrPipeVar] = Unassigned(), + training_plan_arn_equals: Optional[StrPipeVar] = Unassigned(), + session: Optional[Session] = None, + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["TrainingJob"]: """ - Stop a TrainingJobInternal resource - + Get all TrainingJob resources + + Parameters: + next_token: If the result of the previous ListTrainingJobs request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request. + max_results: The maximum number of training jobs to return in the response. + creation_time_after: A filter that returns only training jobs created after the specified time (timestamp). + creation_time_before: A filter that returns only training jobs created before the specified time (timestamp). + last_modified_time_after: A filter that returns only training jobs modified after the specified time (timestamp). + last_modified_time_before: A filter that returns only training jobs modified before the specified time (timestamp). + name_contains: A string in the training job name. This filter returns only training jobs whose name contains the specified string. + status_equals: A filter that retrieves only training jobs with a specific status. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Ascending. + warm_pool_status_equals: A filter that retrieves only training jobs with a specific warm pool status. + training_plan_arn_equals: The Amazon Resource Name (ARN); of the training plan to filter training jobs by. For more information about reserving GPU capacity for your SageMaker training jobs using Amazon SageMaker Training Plan, see CreateTrainingPlan . + session: Boto3 session. + region: Region name. + + Returns: + Iterator for listed TrainingJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36347,28 +30626,41 @@ def stop(self) -> None: error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "TrainingJobName": self.training_job_name, - "CustomerDetails": self.customer_details, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'WarmPoolStatusEquals': warm_pool_status_equals, + 'TrainingPlanArnEquals': training_plan_arn_equals, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") + + return ResourceIterator( + client=client, + list_method='list_training_jobs', + summaries_key='TrainingJobSummaries', + summary_name='TrainingJobSummary', + resource_cls=TrainingJob, + list_method_kwargs=operation_input_args + ) - client.stop_training_job_internal(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") -''' class TrainingPlan(Base): """ Class representing resource TrainingPlan - + Attributes: training_plan_arn: The Amazon Resource Name (ARN); of the training plan. training_plan_name: The name of the training plan. @@ -36386,12 +30678,10 @@ class TrainingPlan(Base): unhealthy_instance_count: The number of instances in the training plan that are currently in an unhealthy state. available_spare_instance_count: The number of available spare instances in the training plan. total_ultra_server_count: The total number of UltraServers reserved to this training plan. - 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. - reserved_capacity_summaries: The list of Reserved Capacity providing the underlying compute resources of the plan. - training_plan_status_transitions: - + target_resources: The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) 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. A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment. + reserved_capacity_summaries: The list of Reserved Capacity providing the underlying compute resources of the plan. + """ - training_plan_name: StrPipeVar training_plan_arn: Optional[StrPipeVar] = Unassigned() status: Optional[StrPipeVar] = Unassigned() @@ -36410,24 +30700,23 @@ class TrainingPlan(Base): total_ultra_server_count: Optional[int] = Unassigned() target_resources: Optional[List[StrPipeVar]] = Unassigned() reserved_capacity_summaries: Optional[List[ReservedCapacitySummary]] = Unassigned() - training_plan_status_transitions: Optional[List[TrainingPlanStatusTransition]] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "training_plan_name" - resource_name_split = resource_name.split("_") + resource_name = 'training_plan_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object training_plan") return None - + @classmethod @Base.add_validate_call def create( @@ -36441,7 +30730,7 @@ def create( ) -> Optional["TrainingPlan"]: """ Create a TrainingPlan resource - + Parameters: training_plan_name: The name of the training plan to create. training_plan_offering_id: The unique identifier of the training plan offering to use for creating this plan. @@ -36449,12 +30738,12 @@ def create( tags: An array of key-value pairs to apply to this training plan. session: Boto3 session. region: Region name. - + Returns: The TrainingPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36470,34 +30759,30 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating training_plan resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + operation_input_args = { - "TrainingPlanName": training_plan_name, - "TrainingPlanOfferingId": training_plan_offering_id, - "SpareInstanceCountPerUltraServer": spare_instance_count_per_ultra_server, - "Tags": tags, + 'TrainingPlanName': training_plan_name, + 'TrainingPlanOfferingId': training_plan_offering_id, + 'SpareInstanceCountPerUltraServer': spare_instance_count_per_ultra_server, + 'Tags': tags, } - - operation_input_args = Base.populate_chained_attributes( - resource_name="TrainingPlan", operation_input_args=operation_input_args - ) - + + operation_input_args = Base.populate_chained_attributes(resource_name='TrainingPlan', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_training_plan(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(training_plan_name=training_plan_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -36508,17 +30793,17 @@ def get( ) -> Optional["TrainingPlan"]: """ Get a TrainingPlan resource - + Parameters: training_plan_name: The name of the training plan to describe. session: Boto3 session. region: Region name. - + Returns: The TrainingPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36529,38 +30814,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrainingPlanName": training_plan_name, + 'TrainingPlanName': training_plan_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_training_plan(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeTrainingPlanResponse") + transformed_response = transform(response, 'DescribeTrainingPlanResponse') training_plan = cls(**transformed_response) return training_plan - + @Base.add_validate_call def refresh( self, - ) -> Optional["TrainingPlan"]: + + ) -> Optional["TrainingPlan"]: """ Refresh a TrainingPlan resource - + Returns: The TrainingPlan resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36571,229 +30855,75 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrainingPlanName": self.training_plan_name, + 'TrainingPlanName': self.training_plan_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_training_plan(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeTrainingPlanResponse", self) - return self - - @Base.add_validate_call - def update( - self, - max_wait_time_in_seconds: Optional[int] = Unassigned(), - requested_start_time: Optional[datetime.datetime] = Unassigned(), - requested_end_time: Optional[datetime.datetime] = Unassigned(), - instance_count: Optional[int] = Unassigned(), - ) -> Optional["TrainingPlan"]: - """ - Update a TrainingPlan resource - - Parameters: - max_wait_time_in_seconds: - requested_start_time: - requested_end_time: - instance_count: - - Returns: - The TrainingPlan resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating training_plan resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "TrainingPlanName": self.training_plan_name, - "MaxWaitTimeInSeconds": max_wait_time_in_seconds, - "RequestedStartTime": requested_start_time, - "RequestedEndTime": requested_end_time, - "InstanceCount": instance_count, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_training_plan(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - + transform(response, 'DescribeTrainingPlanResponse', self) return self - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a TrainingPlan resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "TrainingPlanName": self.training_plan_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_training_plan(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Pending", "Active", "Scheduled", "Expired", "Failed"], + target_status: Literal['Pending', 'Active', 'Scheduled', 'Expired', 'Failed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a TrainingPlan resource to reach certain status. - + Parameters: target_status: The status to wait for. - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - FailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task(f"Waiting for TrainingPlan to reach [bold]{target_status} status...") - status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="TrainingPlan", - status=current_status, - reason=self.status_message, - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="TrainingPlan", status=current_status) - time.sleep(poll) - - @classmethod - @Base.add_validate_call - def load( - cls, - training_plan_arn: StrPipeVar, - capacity_resource_arn: StrPipeVar, - target_resources: List[StrPipeVar], - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> Optional["TrainingPlan"]: - """ - Import a TrainingPlan resource - - Parameters: - training_plan_arn: - capacity_resource_arn: - target_resources: - session: Boto3 session. - region: Region name. - - Returns: - The TrainingPlan resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceAlreadyExists - ResourceInUse: Resource being accessed is in use. - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. + poll: The number of seconds to wait between each poll. + timeout: The maximum number of seconds to wait before timing out. + + Raises: + TimeoutExceededError: If the resource does not reach a terminal state before the timeout. + FailedStatusError: If the resource reaches a failed state. + WaiterError: Raised when an error occurs while waiting. """ - - logger.info(f"Importing training_plan resource.") - client = SageMakerClient( - session=session, region_name=region, service_name="sagemaker" - ).client - - operation_input_args = { - "TrainingPlanArn": training_plan_arn, - "CapacityResourceArn": capacity_resource_arn, - "TargetResources": target_resources, - } - - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # import the resource - response = client.import_training_plan(**operation_input_args) - logger.debug(f"Response: {response}") - - return cls.get( - training_plan_name=response["TrainingPlanName"], session=session, region=region + start_time = time.time() + + progress = Progress(SpinnerColumn("bouncingBar"), + TextColumn("{task.description}"), + TimeElapsedColumn(), ) - + progress.add_task(f"Waiting for TrainingPlan to reach [bold]{target_status} status...") + status = Status("Current status:") + + with Live( + Panel( + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="TrainingPlan", status=current_status, reason=self.status_message) + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="TrainingPlan", status=current_status) + time.sleep(poll) + @classmethod @Base.add_validate_call def get_all( @@ -36808,7 +30938,7 @@ def get_all( ) -> ResourceIterator["TrainingPlan"]: """ Get all TrainingPlan resources - + Parameters: next_token: A token to continue pagination if more results are available. max_results: The maximum number of results to return in the response. @@ -36819,12 +30949,12 @@ def get_all( filters: Additional filters to apply to the list of training plans. session: Boto3 session. region: Region name. - + Returns: Iterator for listed TrainingPlan resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -36834,37 +30964,35 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "StartTimeAfter": start_time_after, - "StartTimeBefore": start_time_before, - "SortBy": sort_by, - "SortOrder": sort_order, - "Filters": filters, + 'StartTimeAfter': start_time_after, + 'StartTimeBefore': start_time_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'Filters': filters, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_training_plans", - summaries_key="TrainingPlanSummaries", - summary_name="TrainingPlanSummary", + list_method='list_training_plans', + summaries_key='TrainingPlanSummaries', + summary_name='TrainingPlanSummary', resource_cls=TrainingPlan, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class TransformJob(Base): """ Class representing resource TransformJob - + Attributes: transform_job_name: The name of the transform job. transform_job_arn: The Amazon Resource Name (ARN) of the transform job. @@ -36885,14 +31013,10 @@ class TransformJob(Base): transform_end_time: Indicates when the transform job has been completed, or has stopped or failed. You are billed for the time interval between this time and the value of TransformStartTime. labeling_job_arn: The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling job that created the transform or training job. auto_ml_job_arn: The Amazon Resource Name (ARN) of the AutoML transform job. - transform_job_progress: - data_processing: - experiment_config: - last_modified_by: - created_by: - + data_processing: + experiment_config: + """ - transform_job_name: StrPipeVar transform_job_arn: Optional[StrPipeVar] = Unassigned() transform_job_status: Optional[StrPipeVar] = Unassigned() @@ -36912,59 +31036,68 @@ class TransformJob(Base): transform_end_time: Optional[datetime.datetime] = Unassigned() labeling_job_arn: Optional[StrPipeVar] = Unassigned() auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - transform_job_progress: Optional[TransformJobProgress] = Unassigned() data_processing: Optional[DataProcessing] = Unassigned() experiment_config: Optional[ExperimentConfig] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "transform_job_name" - resource_name_split = resource_name.split("_") + resource_name = 'transform_job_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object transform_job") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "transform_input": { - "data_source": { - "s3_data_source": { - "s3_data_type": {"type": "string"}, - "s3_uri": {"type": "string"}, - } - } - }, - "transform_resources": {"volume_kms_key_id": {"type": "string"}}, - "transform_output": { - "s3_output_path": {"type": "string"}, - "kms_key_id": {"type": "string"}, - }, - "data_capture_config": { - "destination_s3_uri": {"type": "string"}, - "kms_key_id": {"type": "string"}, + config_schema_for_resource = \ + { + "transform_input": { + "data_source": { + "s3_data_source": { + "s3_data_type": { + "type": "string" }, + "s3_uri": { + "type": "string" + } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "TransformJob", **kwargs - ), - ) - + }, + "transform_resources": { + "volume_kms_key_id": { + "type": "string" + } + }, + "transform_output": { + "s3_output_path": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + }, + "data_capture_config": { + "destination_s3_uri": { + "type": "string" + }, + "kms_key_id": { + "type": "string" + } + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "TransformJob", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -36983,21 +31116,15 @@ def create( data_capture_config: Optional[BatchDataCaptureConfig] = Unassigned(), data_processing: Optional[DataProcessing] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - platform_credential_token: Optional[StrPipeVar] = Unassigned(), - customer_credential_token: Optional[StrPipeVar] = Unassigned(), - data_access_credential_token: Optional[StrPipeVar] = Unassigned(), - data_access_vpc_config: Optional[VpcConfig] = Unassigned(), - credential_provider_function: Optional[StrPipeVar] = Unassigned(), - credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned(), experiment_config: Optional[ExperimentConfig] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, ) -> Optional["TransformJob"]: """ Create a TransformJob resource - + Parameters: - transform_job_name: The name of the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. + transform_job_name: The name of the transform job. The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. model_name: The name of the model that you want to use for the transform job. ModelName must be the name of an existing Amazon SageMaker model within an Amazon Web Services Region in an Amazon Web Services account. transform_input: Describes the input source and the way the transform job consumes it. transform_output: Describes the results of the transform job. @@ -37010,21 +31137,15 @@ def create( data_capture_config: Configuration to control how SageMaker captures inference data. data_processing: The data structure used to specify the data to be used for inference in a batch transform job and to associate the data that is relevant to the prediction results in the output. The input filter provided allows you to exclude input data that is not needed for inference in a batch transform job. The output filter provided allows you to include input data relevant to interpreting the predictions in the output from the job. For more information, see Associate Prediction Results with their Corresponding Input Records. 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. - platform_credential_token: - customer_credential_token: - data_access_credential_token: - data_access_vpc_config: - credential_provider_function: - credential_provider_encryption_key: - experiment_config: + experiment_config: session: Boto3 session. region: Region name. - + Returns: The TransformJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37040,50 +31161,40 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating transform_job resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "TransformJobName": transform_job_name, - "ModelName": model_name, - "MaxConcurrentTransforms": max_concurrent_transforms, - "ModelClientConfig": model_client_config, - "MaxPayloadInMB": max_payload_in_mb, - "BatchStrategy": batch_strategy, - "Environment": environment, - "TransformInput": transform_input, - "TransformOutput": transform_output, - "DataCaptureConfig": data_capture_config, - "TransformResources": transform_resources, - "DataProcessing": data_processing, - "Tags": tags, - "PlatformCredentialToken": platform_credential_token, - "CustomerCredentialToken": customer_credential_token, - "DataAccessCredentialToken": data_access_credential_token, - "DataAccessVpcConfig": data_access_vpc_config, - "CredentialProviderFunction": credential_provider_function, - "CredentialProviderEncryptionKey": credential_provider_encryption_key, - "ExperimentConfig": experiment_config, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="TransformJob", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'TransformJobName': transform_job_name, + 'ModelName': model_name, + 'MaxConcurrentTransforms': max_concurrent_transforms, + 'ModelClientConfig': model_client_config, + 'MaxPayloadInMB': max_payload_in_mb, + 'BatchStrategy': batch_strategy, + 'Environment': environment, + 'TransformInput': transform_input, + 'TransformOutput': transform_output, + 'DataCaptureConfig': data_capture_config, + 'TransformResources': transform_resources, + 'DataProcessing': data_processing, + 'Tags': tags, + 'ExperimentConfig': experiment_config, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='TransformJob', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_transform_job(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(transform_job_name=transform_job_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -37094,17 +31205,17 @@ def get( ) -> Optional["TransformJob"]: """ Get a TransformJob resource - + Parameters: transform_job_name: The name of the transform job that you want to view details of. session: Boto3 session. region: Region name. - + Returns: The TransformJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37115,38 +31226,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TransformJobName": transform_job_name, + 'TransformJobName': transform_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_transform_job(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeTransformJobResponse") + transformed_response = transform(response, 'DescribeTransformJobResponse') transform_job = cls(**transformed_response) return transform_job - + @Base.add_validate_call def refresh( self, - ) -> Optional["TransformJob"]: + + ) -> Optional["TransformJob"]: """ Refresh a TransformJob resource - + Returns: The TransformJob resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37157,62 +31267,28 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TransformJobName": self.transform_job_name, + 'TransformJobName': self.transform_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_transform_job(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeTransformJobResponse", self) + transform(response, 'DescribeTransformJobResponse', self) return self - - @Base.add_validate_call - def delete( - self, - ) -> None: - """ - Delete a TransformJob resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - """ - - client = Base.get_sagemaker_client() - - operation_input_args = { - "TransformJobName": self.transform_job_name, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.delete_transform_job(**operation_input_args) - - logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def stop(self) -> None: """ Stop a TransformJob resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37223,20 +31299,20 @@ def stop(self) -> None: ``` ResourceNotFound: Resource being access is not found. """ - - client = SageMakerClient().client - + + client = SageMakerClient().sagemaker_client + operation_input_args = { - "TransformJobName": self.transform_job_name, + 'TransformJobName': self.transform_job_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.stop_transform_job(**operation_input_args) - + logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait( self, @@ -37246,305 +31322,105 @@ def wait( ) -> None: """ Wait for a TransformJob resource. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. logs: Whether to print logs while waiting. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. - + """ - terminal_states = ["Completed", "Failed", "Stopped"] + terminal_states = ['Completed', 'Failed', 'Stopped'] start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for TransformJob...") status = Status("Current status:") - + instance_count = self.transform_resources.instance_count if logs: multi_stream_logger = MultiLogStreamHandler( log_group_name=f"/aws/sagemaker/TransformJobs", log_stream_name_prefix=self.get_name(), - expected_stream_count=instance_count, + expected_stream_count=instance_count ) - + + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.transform_job_status status.update(f"Current status: [bold]{current_status}") - + if logs and multi_stream_logger.ready(): stream_log_events = multi_stream_logger.get_latest_log_events() for stream_id, event in stream_log_events: logger.info(f"{stream_id}:\n{event['message']}") - + if current_status in terminal_states: logger.info(f"Final Resource Status: [bold]{current_status}") - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="TransformJob", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="TransformJob", status=current_status, reason=self.failure_reason) + return - + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="TransformJob", status=current_status) + raise TimeoutExceededError(resource_type="TransformJob", status=current_status, message="Increase the timeout and try again.") time.sleep(poll) - - @classmethod - @Base.add_validate_call - def get_all( - cls, - creation_time_after: Optional[datetime.datetime] = Unassigned(), - creation_time_before: Optional[datetime.datetime] = Unassigned(), - last_modified_time_after: Optional[datetime.datetime] = Unassigned(), - last_modified_time_before: Optional[datetime.datetime] = Unassigned(), - name_contains: Optional[StrPipeVar] = Unassigned(), - status_equals: Optional[StrPipeVar] = Unassigned(), - sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, - region: Optional[StrPipeVar] = None, - ) -> ResourceIterator["TransformJob"]: - """ - Get all TransformJob resources - - Parameters: - creation_time_after: A filter that returns only transform jobs created after the specified time. - creation_time_before: A filter that returns only transform jobs created before the specified time. - last_modified_time_after: A filter that returns only transform jobs modified after the specified time. - last_modified_time_before: A filter that returns only transform jobs modified before the specified time. - name_contains: A string in the transform job name. This filter returns only transform jobs whose name contains the specified string. - status_equals: A filter that retrieves only transform jobs with a specific status. - sort_by: The field to sort results by. The default is CreationTime. - sort_order: The sort order for results. The default is Descending. - next_token: If the result of the previous ListTransformJobs request was truncated, the response includes a NextToken. To retrieve the next set of transform jobs, use the token in the next request. - max_results: The maximum number of transform jobs to return in the response. The default value is 10. - session: Boto3 session. - region: Region name. - - Returns: - Iterator for listed TransformJob resources. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "LastModifiedTimeAfter": last_modified_time_after, - "LastModifiedTimeBefore": last_modified_time_before, - "NameContains": name_contains, - "StatusEquals": status_equals, - "SortBy": sort_by, - "SortOrder": sort_order, - } - - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - return ResourceIterator( - client=client, - list_method="list_transform_jobs", - summaries_key="TransformJobSummaries", - summary_name="TransformJobSummary", - resource_cls=TransformJob, - list_method_kwargs=operation_input_args, - ) - -''' -class TransformJobInternal(Base): - """ - Class representing resource TransformJobInternal - - Attributes: - transform_job_name: - model_name: - transform_input: - transform_output: - transform_resources: - customer_details: - max_concurrent_transforms: - max_payload_in_mb: - model_client_config: - batch_strategy: - environment: - data_capture_config: - data_processing: - tags: - experiment_config: - state_machine_arn_provider_lambda_arn: - fas_credentials: - labeling_job_arn: - auto_ml_job_arn: - platform_credential_token: - customer_credential_token: - data_access_credential_token: - data_access_vpc_config: - credential_provider_function: - credential_provider_encryption_key: - billing_mode: - fas_source_arn: - fas_source_account: - transform_job_response: - - """ - - transform_job_name: Union[StrPipeVar, object] - model_name: Union[StrPipeVar, object] - transform_input: TransformInput - transform_output: TransformOutput - transform_resources: TransformResources - customer_details: CustomerDetails - max_concurrent_transforms: Optional[int] = Unassigned() - max_payload_in_mb: Optional[int] = Unassigned() - model_client_config: Optional[ModelClientConfig] = Unassigned() - batch_strategy: Optional[StrPipeVar] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - data_capture_config: Optional[BatchDataCaptureConfig] = Unassigned() - data_processing: Optional[DataProcessing] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - experiment_config: Optional[ExperimentConfig] = Unassigned() - state_machine_arn_provider_lambda_arn: Optional[StrPipeVar] = Unassigned() - fas_credentials: Optional[StrPipeVar] = Unassigned() - labeling_job_arn: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - platform_credential_token: Optional[StrPipeVar] = Unassigned() - customer_credential_token: Optional[StrPipeVar] = Unassigned() - data_access_credential_token: Optional[StrPipeVar] = Unassigned() - data_access_vpc_config: Optional[VpcConfig] = Unassigned() - credential_provider_function: Optional[StrPipeVar] = Unassigned() - credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned() - billing_mode: Optional[StrPipeVar] = Unassigned() - fas_source_arn: Optional[StrPipeVar] = Unassigned() - fas_source_account: Optional[StrPipeVar] = Unassigned() - transform_job_response: Optional[CreateTransformJobResponse] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "transform_job_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object transform_job_internal") - return None - + @classmethod - @Base.add_validate_call - def create( - cls, - transform_job_name: Union[StrPipeVar, object], - model_name: Union[StrPipeVar, object], - transform_input: TransformInput, - transform_output: TransformOutput, - transform_resources: TransformResources, - customer_details: CustomerDetails, - max_concurrent_transforms: Optional[int] = Unassigned(), - max_payload_in_mb: Optional[int] = Unassigned(), - model_client_config: Optional[ModelClientConfig] = Unassigned(), - batch_strategy: Optional[StrPipeVar] = Unassigned(), - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned(), - data_capture_config: Optional[BatchDataCaptureConfig] = Unassigned(), - data_processing: Optional[DataProcessing] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - experiment_config: Optional[ExperimentConfig] = Unassigned(), - state_machine_arn_provider_lambda_arn: Optional[StrPipeVar] = Unassigned(), - fas_credentials: Optional[StrPipeVar] = Unassigned(), - labeling_job_arn: Optional[StrPipeVar] = Unassigned(), - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned(), - platform_credential_token: Optional[StrPipeVar] = Unassigned(), - customer_credential_token: Optional[StrPipeVar] = Unassigned(), - data_access_credential_token: Optional[StrPipeVar] = Unassigned(), - data_access_vpc_config: Optional[VpcConfig] = Unassigned(), - credential_provider_function: Optional[StrPipeVar] = Unassigned(), - credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned(), - billing_mode: Optional[StrPipeVar] = Unassigned(), - fas_source_arn: Optional[StrPipeVar] = Unassigned(), - fas_source_account: Optional[StrPipeVar] = Unassigned(), + @Base.add_validate_call + def get_all( + cls, + creation_time_after: Optional[datetime.datetime] = Unassigned(), + creation_time_before: Optional[datetime.datetime] = Unassigned(), + last_modified_time_after: Optional[datetime.datetime] = Unassigned(), + last_modified_time_before: Optional[datetime.datetime] = Unassigned(), + name_contains: Optional[StrPipeVar] = Unassigned(), + status_equals: Optional[StrPipeVar] = Unassigned(), + sort_by: Optional[StrPipeVar] = Unassigned(), + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["TransformJobInternal"]: + region: Optional[StrPipeVar] = None, + ) -> ResourceIterator["TransformJob"]: """ - Create a TransformJobInternal resource - + Get all TransformJob resources + Parameters: - transform_job_name: - model_name: - transform_input: - transform_output: - transform_resources: - customer_details: - max_concurrent_transforms: - max_payload_in_mb: - model_client_config: - batch_strategy: - environment: - data_capture_config: - data_processing: - tags: - experiment_config: - state_machine_arn_provider_lambda_arn: - fas_credentials: - labeling_job_arn: - auto_ml_job_arn: - platform_credential_token: - customer_credential_token: - data_access_credential_token: - data_access_vpc_config: - credential_provider_function: - credential_provider_encryption_key: - billing_mode: - fas_source_arn: - fas_source_account: + creation_time_after: A filter that returns only transform jobs created after the specified time. + creation_time_before: A filter that returns only transform jobs created before the specified time. + last_modified_time_after: A filter that returns only transform jobs modified after the specified time. + last_modified_time_before: A filter that returns only transform jobs modified before the specified time. + name_contains: A string in the transform job name. This filter returns only transform jobs whose name contains the specified string. + status_equals: A filter that retrieves only transform jobs with a specific status. + sort_by: The field to sort results by. The default is CreationTime. + sort_order: The sort order for results. The default is Descending. + next_token: If the result of the previous ListTransformJobs request was truncated, the response includes a NextToken. To retrieve the next set of transform jobs, use the token in the next request. + max_results: The maximum number of transform jobs to return in the response. The default value is 10. session: Boto3 session. region: Region name. - + Returns: - The TransformJobInternal resource. - + Iterator for listed TransformJob resources. + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37553,95 +31429,39 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - ResourceInUse: Resource being accessed is in use. - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "TransformJobName": transform_job_name, - "ModelName": model_name, - "MaxConcurrentTransforms": max_concurrent_transforms, - "MaxPayloadInMB": max_payload_in_mb, - "ModelClientConfig": model_client_config, - "BatchStrategy": batch_strategy, - "Environment": environment, - "TransformInput": transform_input, - "TransformOutput": transform_output, - "DataCaptureConfig": data_capture_config, - "TransformResources": transform_resources, - "DataProcessing": data_processing, - "Tags": tags, - "ExperimentConfig": experiment_config, - "StateMachineArnProviderLambdaArn": state_machine_arn_provider_lambda_arn, - "CustomerDetails": customer_details, - "FasCredentials": fas_credentials, - "LabelingJobArn": labeling_job_arn, - "AutoMLJobArn": auto_ml_job_arn, - "PlatformCredentialToken": platform_credential_token, - "CustomerCredentialToken": customer_credential_token, - "DataAccessCredentialToken": data_access_credential_token, - "DataAccessVpcConfig": data_access_vpc_config, - "CredentialProviderFunction": credential_provider_function, - "CredentialProviderEncryptionKey": credential_provider_encryption_key, - "BillingMode": billing_mode, - "FasSourceArn": fas_source_arn, - "FasSourceAccount": fas_source_account, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'LastModifiedTimeAfter': last_modified_time_after, + 'LastModifiedTimeBefore': last_modified_time_before, + 'NameContains': name_contains, + 'StatusEquals': status_equals, + 'SortBy': sort_by, + 'SortOrder': sort_order, } + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" + + return ResourceIterator( + client=client, + list_method='list_transform_jobs', + summaries_key='TransformJobSummaries', + summary_name='TransformJobSummary', + resource_cls=TransformJob, + list_method_kwargs=operation_input_args ) - logger.debug(f"Calling create_transform_job_internal API") - response = client.create_transform_job_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateTransformJobInternalResponse") - return cls(**operation_input_args, **transformed_response) - - @Base.add_validate_call - def stop(self) -> None: - """ - Stop a TransformJobInternal resource - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceNotFound: Resource being access is not found. - """ - - client = SageMakerClient().client - - operation_input_args = { - "TransformJobName": self.transform_job_name, - "CustomerDetails": self.customer_details, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client.stop_transform_job_internal(**operation_input_args) - - logger.info(f"Stopping {self.__class__.__name__} - {self.get_name()}") -''' class Trial(Base): """ Class representing resource Trial - + Attributes: trial_name: The name of the trial. trial_arn: The Amazon Resource Name (ARN) of the trial. @@ -37652,10 +31472,9 @@ class Trial(Base): created_by: Who created the trial. last_modified_time: When the trial was last modified. last_modified_by: Who last modified the trial. - metadata_properties: - + metadata_properties: + """ - trial_name: StrPipeVar trial_arn: Optional[StrPipeVar] = Unassigned() display_name: Optional[StrPipeVar] = Unassigned() @@ -37666,23 +31485,23 @@ class Trial(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() metadata_properties: Optional[MetadataProperties] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "trial_name" - resource_name_split = resource_name.split("_") + resource_name = 'trial_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object trial") return None - + @classmethod @Base.add_validate_call def create( @@ -37697,21 +31516,21 @@ def create( ) -> Optional["Trial"]: """ Create a Trial resource - + Parameters: trial_name: The name of the trial. The name must be unique in your Amazon Web Services account and is not case-sensitive. experiment_name: The name of the experiment to associate the trial with. display_name: The name of the trial as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialName is displayed. - metadata_properties: + metadata_properties: tags: A list of tags to associate with the trial. You can use Search API to search on the tags. session: Boto3 session. region: Region name. - + Returns: The Trial resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37726,35 +31545,31 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating trial resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "TrialName": trial_name, - "DisplayName": display_name, - "ExperimentName": experiment_name, - "MetadataProperties": metadata_properties, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Trial", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'TrialName': trial_name, + 'DisplayName': display_name, + 'ExperimentName': experiment_name, + 'MetadataProperties': metadata_properties, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Trial', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_trial(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(trial_name=trial_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -37765,17 +31580,17 @@ def get( ) -> Optional["Trial"]: """ Get a Trial resource - + Parameters: trial_name: The name of the trial to describe. session: Boto3 session. region: Region name. - + Returns: The Trial resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37786,38 +31601,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrialName": trial_name, + 'TrialName': trial_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_trial(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeTrialResponse") + transformed_response = transform(response, 'DescribeTrialResponse') trial = cls(**transformed_response) return trial - + @Base.add_validate_call def refresh( self, - ) -> Optional["Trial"]: + + ) -> Optional["Trial"]: """ Refresh a Trial resource - + Returns: The Trial resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37828,21 +31642,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrialName": self.trial_name, + 'TrialName': self.trial_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_trial(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeTrialResponse", self) + transform(response, 'DescribeTrialResponse', self) return self - + @Base.add_validate_call def update( self, @@ -37850,12 +31664,12 @@ def update( ) -> Optional["Trial"]: """ Update a Trial resource - + Returns: The Trial resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37867,35 +31681,36 @@ def update( ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating trial resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "TrialName": self.trial_name, - "DisplayName": display_name, + 'TrialName': self.trial_name, + 'DisplayName': display_name, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_trial(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a Trial resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37906,20 +31721,20 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "TrialName": self.trial_name, + 'TrialName': self.trial_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_trial(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -37935,7 +31750,7 @@ def get_all( ) -> ResourceIterator["Trial"]: """ Get all Trial resources - + Parameters: experiment_name: A filter that returns only trials that are part of the specified experiment. trial_component_name: A filter that returns only trials that are associated with the specified trial component. @@ -37947,12 +31762,12 @@ def get_all( next_token: If the previous call to ListTrials didn't return the full set of trials, the call returns a token for getting the next set of trials. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Trial resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -37963,44 +31778,42 @@ def get_all( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "ExperimentName": experiment_name, - "TrialComponentName": trial_component_name, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'ExperimentName': experiment_name, + 'TrialComponentName': trial_component_name, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_trials", - summaries_key="TrialSummaries", - summary_name="TrialSummary", + list_method='list_trials', + summaries_key='TrialSummaries', + summary_name='TrialSummary', resource_cls=Trial, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class TrialComponent(Base): """ Class representing resource TrialComponent - + Attributes: trial_component_name: The name of the trial component. trial_component_arn: The Amazon Resource Name (ARN) of the trial component. display_name: The name of the component as displayed. If DisplayName isn't specified, TrialComponentName is displayed. source: The Amazon Resource Name (ARN) of the source and, optionally, the job type. - status: The status of the component. States include: InProgress Completed Failed + status: The status of the component. States include: InProgress Completed Failed start_time: When the component started. end_time: When the component ended. creation_time: When the component was created. @@ -38010,13 +31823,12 @@ class TrialComponent(Base): parameters: The hyperparameters of the component. input_artifacts: The input artifacts of the component. output_artifacts: The output artifacts of the component. - metadata_properties: + metadata_properties: metrics: The metrics for the component. lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. sources: A list of ARNs and, if applicable, job types for multiple sources of an experiment run. - + """ - trial_component_name: StrPipeVar trial_component_arn: Optional[StrPipeVar] = Unassigned() display_name: Optional[StrPipeVar] = Unassigned() @@ -38035,23 +31847,23 @@ class TrialComponent(Base): metrics: Optional[List[TrialComponentMetricSummary]] = Unassigned() lineage_group_arn: Optional[StrPipeVar] = Unassigned() sources: Optional[List[TrialComponentSource]] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "trial_component_name" - resource_name_split = resource_name.split("_") + resource_name = 'trial_component_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object trial_component") return None - + @classmethod @Base.add_validate_call def create( @@ -38071,26 +31883,26 @@ def create( ) -> Optional["TrialComponent"]: """ Create a TrialComponent resource - + Parameters: trial_component_name: The name of the component. The name must be unique in your Amazon Web Services account and is not case-sensitive. display_name: The name of the component as displayed. The name doesn't need to be unique. If DisplayName isn't specified, TrialComponentName is displayed. - status: The status of the component. States include: InProgress Completed Failed + status: The status of the component. States include: InProgress Completed Failed start_time: When the component started. end_time: When the component ended. parameters: The hyperparameters for the component. input_artifacts: The input artifacts for the component. Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types. output_artifacts: The output artifacts for the component. Examples of output artifacts are metrics, snapshots, logs, and images. - metadata_properties: + metadata_properties: tags: A list of tags to associate with the component. You can use Search API to search on the tags. session: Boto3 session. region: Region name. - + Returns: The TrialComponent resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38104,40 +31916,36 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating trial_component resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "TrialComponentName": trial_component_name, - "DisplayName": display_name, - "Status": status, - "StartTime": start_time, - "EndTime": end_time, - "Parameters": parameters, - "InputArtifacts": input_artifacts, - "OutputArtifacts": output_artifacts, - "MetadataProperties": metadata_properties, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="TrialComponent", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'TrialComponentName': trial_component_name, + 'DisplayName': display_name, + 'Status': status, + 'StartTime': start_time, + 'EndTime': end_time, + 'Parameters': parameters, + 'InputArtifacts': input_artifacts, + 'OutputArtifacts': output_artifacts, + 'MetadataProperties': metadata_properties, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='TrialComponent', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_trial_component(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(trial_component_name=trial_component_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -38148,17 +31956,17 @@ def get( ) -> Optional["TrialComponent"]: """ Get a TrialComponent resource - + Parameters: trial_component_name: The name of the trial component to describe. session: Boto3 session. region: Region name. - + Returns: The TrialComponent resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38169,38 +31977,37 @@ def get( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrialComponentName": trial_component_name, + 'TrialComponentName': trial_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_trial_component(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeTrialComponentResponse") + transformed_response = transform(response, 'DescribeTrialComponentResponse') trial_component = cls(**transformed_response) return trial_component - + @Base.add_validate_call def refresh( self, - ) -> Optional["TrialComponent"]: + + ) -> Optional["TrialComponent"]: """ Refresh a TrialComponent resource - + Returns: The TrialComponent resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38211,21 +32018,21 @@ def refresh( ``` ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "TrialComponentName": self.trial_component_name, + 'TrialComponentName': self.trial_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_trial_component(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeTrialComponentResponse", self) + transform(response, 'DescribeTrialComponentResponse', self) return self - + @Base.add_validate_call def update( self, @@ -38242,17 +32049,17 @@ def update( ) -> Optional["TrialComponent"]: """ Update a TrialComponent resource - + Parameters: parameters_to_remove: The hyperparameters to remove from the component. input_artifacts_to_remove: The input artifacts to remove from the component. output_artifacts_to_remove: The output artifacts to remove from the component. - + Returns: The TrialComponent resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38264,44 +32071,45 @@ def update( ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating trial_component resource.") client = Base.get_sagemaker_client() - - operation_input_args = { - "TrialComponentName": self.trial_component_name, - "DisplayName": display_name, - "Status": status, - "StartTime": start_time, - "EndTime": end_time, - "Parameters": parameters, - "ParametersToRemove": parameters_to_remove, - "InputArtifacts": input_artifacts, - "InputArtifactsToRemove": input_artifacts_to_remove, - "OutputArtifacts": output_artifacts, - "OutputArtifactsToRemove": output_artifacts_to_remove, + + operation_input_args = { + 'TrialComponentName': self.trial_component_name, + 'DisplayName': display_name, + 'Status': status, + 'StartTime': start_time, + 'EndTime': end_time, + 'Parameters': parameters, + 'ParametersToRemove': parameters_to_remove, + 'InputArtifacts': input_artifacts, + 'InputArtifactsToRemove': input_artifacts_to_remove, + 'OutputArtifacts': output_artifacts, + 'OutputArtifactsToRemove': output_artifacts_to_remove, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_trial_component(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a TrialComponent resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38312,141 +32120,74 @@ def delete( ``` ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "TrialComponentName": self.trial_component_name, + 'TrialComponentName': self.trial_component_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_trial_component(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "InProgress", "Completed", "Failed", "Stopping", "Stopped", "Deleting", "DeleteFailed" - ], + target_status: Literal['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a TrialComponent resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for TrialComponent to reach [bold]{target_status} status...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ), - transient=True, - ): - while True: - self.refresh() - current_status = self.status.primary_status - status.update(f"Current status: [bold]{current_status}") - - if target_status == current_status: - logger.info(f"Final Resource Status: [bold]{current_status}") - return - - if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="TrialComponent", status=current_status, reason="(Unknown)" - ) - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError(resource_type="TrialComponent", status=current_status) - time.sleep(poll) - - @Base.add_validate_call - def wait_for_delete( - self, - poll: int = 5, - timeout: Optional[int] = None, - ) -> None: - """ - Wait for a TrialComponent resource to be deleted. - - Parameters: - poll: The number of seconds to wait between each poll. - timeout: The maximum number of seconds to wait before timing out. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - TimeoutExceededError: If the resource does not reach a terminal state before the timeout. - DeleteFailedStatusError: If the resource reaches a failed state. - WaiterError: Raised when an error occurs while waiting. - """ - start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), - TextColumn("{task.description}"), - TimeElapsedColumn(), - ) - progress.add_task("Waiting for TrialComponent to be deleted...") - status = Status("Current status:") - + with Live( Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): - while True: - try: - self.refresh() - current_status = self.status.primary_status - status.update(f"Current status: [bold]{current_status}") - - if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="TrialComponent", status=current_status - ) - except botocore.exceptions.ClientError as e: - error_code = e.response["Error"]["Code"] - - if "ResourceNotFound" in error_code or "ValidationException" in error_code: - logger.info("Resource was not found. It may have been deleted.") - return - raise e + Group(progress, status), + title="Wait Log Panel", + border_style=Style(color=Color.BLUE.value + ) + ), + transient=True + ): + while True: + self.refresh() + current_status = self.status.primary_status + status.update(f"Current status: [bold]{current_status}") + + if target_status == current_status: + logger.info(f"Final Resource Status: [bold]{current_status}") + return + + if "failed" in current_status.lower(): + raise FailedStatusError(resource_type="TrialComponent", status=current_status, reason='(Unknown)') + + if timeout is not None and time.time() - start_time >= timeout: + raise TimeoutExceededError(resource_type="TrialComponent", status=current_status) time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -38463,7 +32204,7 @@ def get_all( ) -> ResourceIterator["TrialComponent"]: """ Get all TrialComponent resources - + Parameters: experiment_name: A filter that returns only components that are part of the specified experiment. If you specify ExperimentName, you can't filter by SourceArn or TrialName. trial_name: A filter that returns only components that are part of the specified trial. If you specify TrialName, you can't filter by ExperimentName or SourceArn. @@ -38476,12 +32217,12 @@ def get_all( next_token: If the previous call to ListTrialComponents didn't return the full set of components, the call returns a token for getting the next set of components. session: Boto3 session. region: Region name. - + Returns: Iterator for listed TrialComponent resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38492,34 +32233,33 @@ def get_all( ``` ResourceNotFound: Resource being access is not found. """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "ExperimentName": experiment_name, - "TrialName": trial_name, - "SourceArn": source_arn, - "CreatedAfter": created_after, - "CreatedBefore": created_before, - "SortBy": sort_by, - "SortOrder": sort_order, + 'ExperimentName': experiment_name, + 'TrialName': trial_name, + 'SourceArn': source_arn, + 'CreatedAfter': created_after, + 'CreatedBefore': created_before, + 'SortBy': sort_by, + 'SortOrder': sort_order, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_trial_components", - summaries_key="TrialComponentSummaries", - summary_name="TrialComponentSummary", + list_method='list_trial_components', + summaries_key='TrialComponentSummaries', + summary_name='TrialComponentSummary', resource_cls=TrialComponent, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def associate_trail( self, @@ -38529,14 +32269,14 @@ def associate_trail( ) -> None: """ Associates a trial component with a trial. - + Parameters: trial_name: The name of the trial to associate with. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38548,23 +32288,24 @@ def associate_trail( ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "TrialComponentName": self.trial_component_name, - "TrialName": trial_name, + 'TrialComponentName': self.trial_component_name, + 'TrialName': trial_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling associate_trial_component API") response = client.associate_trial_component(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def disassociate_trail( self, @@ -38574,14 +32315,14 @@ def disassociate_trail( ) -> None: """ Disassociates a trial component from a trial. - + Parameters: trial_name: The name of the trial to disassociate from. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38592,42 +32333,41 @@ def disassociate_trail( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "TrialComponentName": self.trial_component_name, - "TrialName": trial_name, + 'TrialComponentName': self.trial_component_name, + 'TrialName': trial_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + logger.debug(f"Calling disassociate_trial_component API") response = client.disassociate_trial_component(**operation_input_args) logger.debug(f"Response: {response}") - + + + @Base.add_validate_call def batch_put_metrics( self, - resource_arn: StrPipeVar, metric_data: List[RawMetricData], session: Optional[Session] = None, region: Optional[str] = None, ) -> None: """ - None - + Used to ingest training metrics into SageMaker. + Parameters: - resource_arn: - metric_data: + metric_data: A list of raw metric values to put. session: Boto3 session. region: Region name. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38637,44 +32377,43 @@ def batch_put_metrics( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "ResourceArn": resource_arn, - "MetricData": metric_data, + 'TrialComponentName': self.trial_component_name, + 'MetricData': metric_data, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-metrics" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-metrics') + logger.debug(f"Calling batch_put_metrics API") response = client.batch_put_metrics(**operation_input_args) logger.debug(f"Response: {response}") - + + @classmethod @Base.add_validate_call def batch_get_metrics( cls, - metric_queries: List[MetricQuery], - session: Optional[Session] = None, + metric_queries: List[MetricQuery], session: Optional[Session] = None, region: Optional[str] = None, ) -> Optional[BatchGetMetricsResponse]: """ - None - + Used to retrieve training metrics from SageMaker. + Parameters: - metric_queries: + metric_queries: Queries made to retrieve training metrics from SageMaker. session: Boto3 session. region: Region name. - + Returns: BatchGetMetricsResponse - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -38684,361 +32423,29 @@ def batch_get_metrics( error_code = e.response['Error']['Code'] ``` """ - + + operation_input_args = { - "MetricQueries": metric_queries, + 'MetricQueries': metric_queries, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker-metrics" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker-metrics') + logger.debug(f"Calling batch_get_metrics API") response = client.batch_get_metrics(**operation_input_args) logger.debug(f"Response: {response}") - - transformed_response = transform(response, "BatchGetMetricsResponse") + + transformed_response = transform(response, 'BatchGetMetricsResponse') return BatchGetMetricsResponse(**transformed_response) -class TrialComponentInternal(Base): - """ - Class representing resource TrialComponentInternal - - Attributes: - trial_component_name: - customer_details: - display_name: - creation_time: - source: - status: - start_time: - end_time: - parameters: - input_artifacts: - output_artifacts: - metadata_properties: - tags: - trial_component_arn: - - """ - - trial_component_name: Union[StrPipeVar, object] - customer_details: CustomerDetails - display_name: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - source: Optional[InputTrialComponentSource] = Unassigned() - status: Optional[TrialComponentStatus] = Unassigned() - start_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() - parameters: Optional[Dict[StrPipeVar, TrialComponentParameterValue]] = Unassigned() - input_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned() - output_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - trial_component_arn: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "trial_component_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object trial_component_internal") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - trial_component_name: Union[StrPipeVar, object], - customer_details: CustomerDetails, - display_name: Optional[StrPipeVar] = Unassigned(), - creation_time: Optional[datetime.datetime] = Unassigned(), - source: Optional[InputTrialComponentSource] = Unassigned(), - status: Optional[TrialComponentStatus] = Unassigned(), - start_time: Optional[datetime.datetime] = Unassigned(), - end_time: Optional[datetime.datetime] = Unassigned(), - parameters: Optional[Dict[StrPipeVar, TrialComponentParameterValue]] = Unassigned(), - input_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned(), - output_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["TrialComponentInternal"]: - """ - Create a TrialComponentInternal resource - - Parameters: - trial_component_name: - customer_details: - display_name: - creation_time: - source: - status: - start_time: - end_time: - parameters: - input_artifacts: - output_artifacts: - metadata_properties: - tags: - session: Boto3 session. - region: Region name. - - Returns: - The TrialComponentInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "TrialComponentName": trial_component_name, - "DisplayName": display_name, - "CreationTime": creation_time, - "Source": source, - "Status": status, - "StartTime": start_time, - "EndTime": end_time, - "Parameters": parameters, - "InputArtifacts": input_artifacts, - "OutputArtifacts": output_artifacts, - "MetadataProperties": metadata_properties, - "Tags": tags, - "CustomerDetails": customer_details, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_trial_component_internal API") - response = client.create_trial_component_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateTrialComponentInternalResponse") - return cls(**operation_input_args, **transformed_response) - - @Base.add_validate_call - def update( - self, - display_name: Optional[StrPipeVar] = Unassigned(), - status: Optional[TrialComponentStatus] = Unassigned(), - start_time: Optional[datetime.datetime] = Unassigned(), - end_time: Optional[datetime.datetime] = Unassigned(), - parameters: Optional[Dict[StrPipeVar, TrialComponentParameterValue]] = Unassigned(), - parameters_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - input_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned(), - input_artifacts_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - output_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned(), - output_artifacts_to_remove: Optional[List[StrPipeVar]] = Unassigned(), - customer_details: Optional[CustomerDetails] = Unassigned(), - ) -> Optional["TrialComponentInternal"]: - """ - Update a TrialComponentInternal resource - - Parameters: - parameters_to_remove: - input_artifacts_to_remove: - output_artifacts_to_remove: - - Returns: - The TrialComponentInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. - ResourceNotFound: Resource being access is not found. - """ - - logger.info("Updating trial_component_internal resource.") - client = Base.get_sagemaker_client() - - operation_input_args = { - "TrialComponentName": self.trial_component_name, - "DisplayName": display_name, - "Status": status, - "StartTime": start_time, - "EndTime": end_time, - "Parameters": parameters, - "ParametersToRemove": parameters_to_remove, - "InputArtifacts": input_artifacts, - "InputArtifactsToRemove": input_artifacts_to_remove, - "OutputArtifacts": output_artifacts, - "OutputArtifactsToRemove": output_artifacts_to_remove, - "CustomerDetails": customer_details, - } - logger.debug(f"Input request: {operation_input_args}") - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - # create the resource - response = client.update_trial_component_internal(**operation_input_args) - logger.debug(f"Response: {response}") - self.refresh() - - return self - - -class TrialInternal(Base): - """ - Class representing resource TrialInternal - - Attributes: - trial_name: - experiment_name: - display_name: - creation_time: - tags: - metadata_properties: - source: - customer_details: - trial_arn: - - """ - - trial_name: Union[StrPipeVar, object] - experiment_name: Union[StrPipeVar, object] - display_name: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - metadata_properties: Optional[MetadataProperties] = Unassigned() - source: Optional[InputTrialSource] = Unassigned() - customer_details: Optional[CustomerDetails] = Unassigned() - trial_arn: Optional[StrPipeVar] = Unassigned() - - def get_name(self) -> str: - attributes = vars(self) - resource_name = "trial_internal_name" - resource_name_split = resource_name.split("_") - attribute_name_candidates = [] - - l = len(resource_name_split) - for i in range(0, l): - attribute_name_candidates.append("_".join(resource_name_split[i:l])) - - for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: - return value - logger.error("Name attribute not found for object trial_internal") - return None - - @classmethod - @Base.add_validate_call - def create( - cls, - trial_name: Union[StrPipeVar, object], - experiment_name: Union[StrPipeVar, object], - display_name: Optional[StrPipeVar] = Unassigned(), - creation_time: Optional[datetime.datetime] = Unassigned(), - tags: Optional[List[Tag]] = Unassigned(), - metadata_properties: Optional[MetadataProperties] = Unassigned(), - source: Optional[InputTrialSource] = Unassigned(), - customer_details: Optional[CustomerDetails] = Unassigned(), - session: Optional[Session] = None, - region: Optional[str] = None, - ) -> Optional["TrialInternal"]: - """ - Create a TrialInternal resource - - Parameters: - trial_name: - experiment_name: - display_name: - creation_time: - tags: - metadata_properties: - source: - customer_details: - session: Boto3 session. - region: Region name. - - Returns: - The TrialInternal resource. - - Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. - The error message and error code can be parsed from the exception as follows: - ``` - try: - # AWS service call here - except botocore.exceptions.ClientError as e: - error_message = e.response['Error']['Message'] - error_code = e.response['Error']['Code'] - ``` - ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. - ResourceNotFound: Resource being access is not found. - ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema - LocalConfigNotFoundError: Raised when a configuration file is not found in local file system - S3ConfigNotFoundError: Raised when a configuration file is not found in S3 - """ - - operation_input_args = { - "TrialName": trial_name, - "DisplayName": display_name, - "ExperimentName": experiment_name, - "CreationTime": creation_time, - "Tags": tags, - "MetadataProperties": metadata_properties, - "Source": source, - "CustomerDetails": customer_details, - } - # serialize the input request - operation_input_args = serialize(operation_input_args) - logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - logger.debug(f"Calling create_trial_internal API") - response = client.create_trial_internal(**operation_input_args) - logger.debug(f"Response: {response}") - - transformed_response = transform(response, "CreateTrialInternalResponse") - return cls(**operation_input_args, **transformed_response) - - class UserProfile(Base): """ Class representing resource UserProfile - + Attributes: domain_id: The ID of the domain that contains the profile. user_profile_arn: The user profile Amazon Resource Name (ARN). @@ -39050,11 +32457,9 @@ class UserProfile(Base): failure_reason: The failure reason. single_sign_on_user_identifier: The IAM Identity Center user identifier. single_sign_on_user_value: The IAM Identity Center user value. - user_policy: user_settings: A collection of settings. - + """ - domain_id: StrPipeVar user_profile_name: StrPipeVar user_profile_arn: Optional[StrPipeVar] = Unassigned() @@ -39065,67 +32470,99 @@ class UserProfile(Base): failure_reason: Optional[StrPipeVar] = Unassigned() single_sign_on_user_identifier: Optional[StrPipeVar] = Unassigned() single_sign_on_user_value: Optional[StrPipeVar] = Unassigned() - user_policy: Optional[StrPipeVar] = Unassigned() user_settings: Optional[UserSettings] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "user_profile_name" - resource_name_split = resource_name.split("_") + resource_name = 'user_profile_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object user_profile") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "user_settings": { - "execution_role": {"type": "string"}, - "security_groups": {"type": "array", "items": {"type": "string"}}, - "sharing_settings": { - "s3_output_path": {"type": "string"}, - "s3_kms_key_id": {"type": "string"}, - }, - "canvas_app_settings": { - "time_series_forecasting_settings": { - "amazon_forecast_role_arn": {"type": "string"} - }, - "model_register_settings": { - "cross_account_model_register_role_arn": {"type": "string"} - }, - "workspace_settings": { - "s3_artifact_path": {"type": "string"}, - "s3_kms_key_id": {"type": "string"}, - }, - "generative_ai_settings": {"amazon_bedrock_role_arn": {"type": "string"}}, - "emr_serverless_settings": {"execution_role_arn": {"type": "string"}}, - }, - "jupyter_lab_app_settings": { - "emr_settings": { - "assumable_role_arns": {"type": "array", "items": {"type": "string"}}, - "execution_role_arns": {"type": "array", "items": {"type": "string"}}, - } - }, + config_schema_for_resource = \ + { + "user_settings": { + "execution_role": { + "type": "string" + }, + "security_groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "sharing_settings": { + "s3_output_path": { + "type": "string" + }, + "s3_kms_key_id": { + "type": "string" + } + }, + "canvas_app_settings": { + "time_series_forecasting_settings": { + "amazon_forecast_role_arn": { + "type": "string" + } + }, + "model_register_settings": { + "cross_account_model_register_role_arn": { + "type": "string" + } + }, + "workspace_settings": { + "s3_artifact_path": { + "type": "string" + }, + "s3_kms_key_id": { + "type": "string" } + }, + "generative_ai_settings": { + "amazon_bedrock_role_arn": { + "type": "string" + } + }, + "emr_serverless_settings": { + "execution_role_arn": { + "type": "string" + } + } + }, + "jupyter_lab_app_settings": { + "emr_settings": { + "assumable_role_arns": { + "type": "array", + "items": { + "type": "string" + } + }, + "execution_role_arns": { + "type": "array", + "items": { + "type": "string" + } + } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "UserProfile", **kwargs - ), - ) - + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "UserProfile", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -39136,30 +32573,28 @@ def create( single_sign_on_user_identifier: Optional[StrPipeVar] = Unassigned(), single_sign_on_user_value: Optional[StrPipeVar] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), - user_policy: Optional[StrPipeVar] = Unassigned(), user_settings: Optional[UserSettings] = Unassigned(), session: Optional[Session] = None, region: Optional[StrPipeVar] = None, ) -> Optional["UserProfile"]: """ Create a UserProfile resource - + Parameters: domain_id: The ID of the associated Domain. user_profile_name: A name for the UserProfile. This value is not case sensitive. - single_sign_on_user_identifier: A specifier for the type of value specified in SingleSignOnUserValue. Currently, the only supported value is "UserName". If the Domain's AuthMode is IAM Identity Center, this field is required. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified. - single_sign_on_user_value: The username of the associated Amazon Web Services Single Sign-On User for this UserProfile. If the Domain's AuthMode is IAM Identity Center, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified. + single_sign_on_user_identifier: A specifier for the type of value specified in SingleSignOnUserValue. Currently, the only supported value is "UserName". If the Domain's AuthMode is IAM Identity Center, this field is required. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified. + single_sign_on_user_value: The username of the associated Amazon Web Services Single Sign-On User for this UserProfile. If the Domain's AuthMode is IAM Identity Center, this field is required, and must match a valid username of a user in your directory. If the Domain's AuthMode is not IAM Identity Center, this field cannot be specified. tags: Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags that you specify for the User Profile are also added to all Apps that the User Profile launches. - user_policy: user_settings: A collection of settings. session: Boto3 session. region: Region name. - + Returns: The UserProfile resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39168,46 +32603,38 @@ def create( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessDeniedException ResourceInUse: Resource being accessed is in use. ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ConfigSchemaValidationError: Raised when a configuration file does not adhere to the schema LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating user_profile resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "DomainId": domain_id, - "UserProfileName": user_profile_name, - "SingleSignOnUserIdentifier": single_sign_on_user_identifier, - "SingleSignOnUserValue": single_sign_on_user_value, - "Tags": tags, - "UserPolicy": user_policy, - "UserSettings": user_settings, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="UserProfile", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'DomainId': domain_id, + 'UserProfileName': user_profile_name, + 'SingleSignOnUserIdentifier': single_sign_on_user_identifier, + 'SingleSignOnUserValue': single_sign_on_user_value, + 'Tags': tags, + 'UserSettings': user_settings, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='UserProfile', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_user_profile(**operation_input_args) logger.debug(f"Response: {response}") - - return cls.get( - domain_id=domain_id, user_profile_name=user_profile_name, session=session, region=region - ) - + + return cls.get(domain_id=domain_id, user_profile_name=user_profile_name, session=session, region=region) + @classmethod @Base.add_validate_call def get( @@ -39219,18 +32646,18 @@ def get( ) -> Optional["UserProfile"]: """ Get a UserProfile resource - + Parameters: domain_id: The domain ID. user_profile_name: The user profile name. This value is not case sensitive. session: Boto3 session. region: Region name. - + Returns: The UserProfile resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39239,43 +32666,41 @@ def get( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessDeniedException ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": domain_id, - "UserProfileName": user_profile_name, + 'DomainId': domain_id, + 'UserProfileName': user_profile_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_user_profile(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeUserProfileResponse") + transformed_response = transform(response, 'DescribeUserProfileResponse') user_profile = cls(**transformed_response) return user_profile - + @Base.add_validate_call def refresh( self, - ) -> Optional["UserProfile"]: + + ) -> Optional["UserProfile"]: """ Refresh a UserProfile resource - + Returns: The UserProfile resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39284,41 +32709,39 @@ def refresh( error_message = e.response['Error']['Message'] error_code = e.response['Error']['Code'] ``` - AccessDeniedException ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": self.user_profile_name, + 'DomainId': self.domain_id, + 'UserProfileName': self.user_profile_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_user_profile(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeUserProfileResponse", self) + transform(response, 'DescribeUserProfileResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( self, - user_policy: Optional[StrPipeVar] = Unassigned(), user_settings: Optional[UserSettings] = Unassigned(), ) -> Optional["UserProfile"]: """ Update a UserProfile resource - + Returns: The UserProfile resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39331,37 +32754,37 @@ def update( ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. ResourceNotFound: Resource being access is not found. """ - + logger.info("Updating user_profile resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": self.user_profile_name, - "UserPolicy": user_policy, - "UserSettings": user_settings, + 'DomainId': self.domain_id, + 'UserProfileName': self.user_profile_name, + 'UserSettings': user_settings, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_user_profile(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a UserProfile resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39373,87 +32796,75 @@ def delete( ResourceInUse: Resource being accessed is in use. ResourceNotFound: Resource being access is not found. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "DomainId": self.domain_id, - "UserProfileName": self.user_profile_name, + 'DomainId': self.domain_id, + 'UserProfileName': self.user_profile_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_user_profile(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal[ - "Deleting", - "Failed", - "InService", - "Pending", - "Updating", - "Update_Failed", - "Delete_Failed", - ], + target_status: Literal['Deleting', 'Failed', 'InService', 'Pending', 'Updating', 'Update_Failed', 'Delete_Failed'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a UserProfile resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for UserProfile to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="UserProfile", - status=current_status, - reason=self.failure_reason, - ) - + raise FailedStatusError(resource_type="UserProfile", status=current_status, reason=self.failure_reason) + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="UserProfile", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -39462,13 +32873,13 @@ def wait_for_delete( ) -> None: """ Wait for a UserProfile resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39482,49 +32893,37 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for UserProfile to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.status status.update(f"Current status: [bold]{current_status}") - - if ( - "delete_failed" in current_status.lower() - or "deletefailed" in current_status.lower() - ): - raise DeleteFailedStatusError( - resource_type="UserProfile", reason=self.failure_reason - ) - + + if "delete_failed" in current_status.lower() or "deletefailed" in current_status.lower(): + raise DeleteFailedStatusError(resource_type="UserProfile", reason=self.failure_reason) + + + if timeout is not None and time.time() - start_time >= timeout: - raise TimeoutExceededError( - resource_type="UserProfile", status=current_status - ) + raise TimeoutExceededError(resource_type="UserProfile", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -39538,7 +32937,7 @@ def get_all( ) -> ResourceIterator["UserProfile"]: """ Get all UserProfile resources - + Parameters: next_token: If the previous response was truncated, you will receive this token. Use it in your next request to receive the next set of results. max_results: This parameter defines the maximum number of results that can be return in a single response. The MaxResults parameter is an upper bound, not a target. If there are more results available than the value specified, a NextToken is provided in the response. The NextToken indicates that the user should get the next set of results by providing this token as a part of a subsequent call. The default value for MaxResults is 10. @@ -39548,12 +32947,12 @@ def get_all( user_profile_name_contains: A parameter by which to filter the results. session: Boto3 session. region: Region name. - + Returns: Iterator for listed UserProfile resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39563,80 +32962,83 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortOrder": sort_order, - "SortBy": sort_by, - "DomainIdEquals": domain_id_equals, - "UserProfileNameContains": user_profile_name_contains, + 'SortOrder': sort_order, + 'SortBy': sort_by, + 'DomainIdEquals': domain_id_equals, + 'UserProfileNameContains': user_profile_name_contains, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_user_profiles", - summaries_key="UserProfiles", - summary_name="UserProfileDetails", + list_method='list_user_profiles', + summaries_key='UserProfiles', + summary_name='UserProfileDetails', resource_cls=UserProfile, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class Workforce(Base): """ Class representing resource Workforce - + Attributes: workforce: A single private workforce, which is automatically created when you create your first private work team. You can create one private work force in each Amazon Web Services Region. By default, any workforce-related API operation used in a specific region will apply to the workforce created in that region. To learn how to create a private workforce, see Create a Private Workforce. - + """ - workforce_name: StrPipeVar workforce: Optional[Workforce] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "workforce_name" - resource_name_split = resource_name.split("_") + resource_name = 'workforce_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object workforce") return None + def populate_inputs_decorator(create_func): @functools.wraps(create_func) def wrapper(*args, **kwargs): - config_schema_for_resource = { - "workforce": { - "workforce_vpc_config": { - "security_group_ids": {"type": "array", "items": {"type": "string"}}, - "subnets": {"type": "array", "items": {"type": "string"}}, - } + config_schema_for_resource = \ + { + "workforce": { + "workforce_vpc_config": { + "security_group_ids": { + "type": "array", + "items": { + "type": "string" } + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + } } - return create_func( - *args, - **Base.get_updated_kwargs_with_configured_attributes( - config_schema_for_resource, "Workforce", **kwargs - ), - ) - + } + } + return create_func(*args, **Base.get_updated_kwargs_with_configured_attributes(config_schema_for_resource, "Workforce", **kwargs)) return wrapper - + @classmethod @populate_inputs_decorator @Base.add_validate_call @@ -39654,23 +33056,23 @@ def create( ) -> Optional["Workforce"]: """ Create a Workforce resource - + Parameters: workforce_name: The name of the private workforce. cognito_config: Use this parameter to configure an Amazon Cognito private workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool. Do not use OidcConfig if you specify values for CognitoConfig. oidc_config: Use this parameter to configure a private workforce using your own OIDC Identity Provider. Do not use CognitoConfig if you specify values for OidcConfig. - source_ip_config: + source_ip_config: 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. workforce_vpc_config: Use this parameter to configure a workforce using VPC. ip_address_type: Use this parameter to specify whether you want IPv4 only or dualstack (IPv4 and IPv6) to support your labeling workforce. session: Boto3 session. region: Region name. - + Returns: The Workforce resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39683,37 +33085,33 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating workforce resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "CognitoConfig": cognito_config, - "OidcConfig": oidc_config, - "SourceIpConfig": source_ip_config, - "WorkforceName": workforce_name, - "Tags": tags, - "WorkforceVpcConfig": workforce_vpc_config, - "IpAddressType": ip_address_type, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Workforce", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'CognitoConfig': cognito_config, + 'OidcConfig': oidc_config, + 'SourceIpConfig': source_ip_config, + 'WorkforceName': workforce_name, + 'Tags': tags, + 'WorkforceVpcConfig': workforce_vpc_config, + 'IpAddressType': ip_address_type, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Workforce', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_workforce(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(workforce_name=workforce_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -39724,17 +33122,17 @@ def get( ) -> Optional["Workforce"]: """ Get a Workforce resource - + Parameters: - workforce_name: The name of the private workforce whose access you want to restrict. WorkforceName is automatically set to default when a workforce is created and cannot be modified. + workforce_name: The name of the private workforce whose access you want to restrict. WorkforceName is automatically set to default when a workforce is created and cannot be modified. session: Boto3 session. region: Region name. - + Returns: The Workforce resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39744,38 +33142,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkforceName": workforce_name, + 'WorkforceName': workforce_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_workforce(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeWorkforceResponse") + transformed_response = transform(response, 'DescribeWorkforceResponse') workforce = cls(**transformed_response) return workforce - + @Base.add_validate_call def refresh( self, - ) -> Optional["Workforce"]: + + ) -> Optional["Workforce"]: """ Refresh a Workforce resource - + Returns: The Workforce resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39785,21 +33182,21 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkforceName": self.workforce_name, + 'WorkforceName': self.workforce_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_workforce(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeWorkforceResponse", self) + transform(response, 'DescribeWorkforceResponse', self) return self - + @populate_inputs_decorator @Base.add_validate_call def update( @@ -39811,18 +33208,18 @@ def update( ) -> Optional["Workforce"]: """ Update a Workforce resource - + Parameters: 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 oidc_config: Use this parameter to update your OIDC Identity Provider (IdP) configuration for a workforce made using your own IdP. workforce_vpc_config: Use this parameter to update your VPC configuration for a workforce. ip_address_type: Use this parameter to specify whether you want IPv4 only or dualstack (IPv4 and IPv6) to support your labeling workforce. - + Returns: The Workforce resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39833,38 +33230,39 @@ def update( ``` ConflictException: There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. """ - + logger.info("Updating workforce resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "WorkforceName": self.workforce_name, - "SourceIpConfig": source_ip_config, - "OidcConfig": oidc_config, - "WorkforceVpcConfig": workforce_vpc_config, - "IpAddressType": ip_address_type, + 'WorkforceName': self.workforce_name, + 'SourceIpConfig': source_ip_config, + 'OidcConfig': oidc_config, + 'WorkforceVpcConfig': workforce_vpc_config, + 'IpAddressType': ip_address_type, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_workforce(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a Workforce resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39874,76 +33272,74 @@ def delete( error_code = e.response['Error']['Code'] ``` """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "WorkforceName": self.workforce_name, + 'WorkforceName': self.workforce_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_workforce(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @Base.add_validate_call def wait_for_status( self, - target_status: Literal["Initializing", "Updating", "Deleting", "Failed", "Active"], + target_status: Literal['Initializing', 'Updating', 'Deleting', 'Failed', 'Active'], poll: int = 5, - timeout: Optional[int] = None, + timeout: Optional[int] = None ) -> None: """ Wait for a Workforce resource to reach certain status. - + Parameters: target_status: The status to wait for. poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: TimeoutExceededError: If the resource does not reach a terminal state before the timeout. FailedStatusError: If the resource reaches a failed state. WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task(f"Waiting for Workforce to reach [bold]{target_status} status...") status = Status("Current status:") - + with Live( Panel( Group(progress, status), title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), + border_style=Style(color=Color.BLUE.value + ) ), - transient=True, + transient=True ): while True: self.refresh() current_status = self.workforce.status status.update(f"Current status: [bold]{current_status}") - + if target_status == current_status: logger.info(f"Final Resource Status: [bold]{current_status}") return - + if "failed" in current_status.lower(): - raise FailedStatusError( - resource_type="Workforce", status=current_status, reason="(Unknown)" - ) - + raise FailedStatusError(resource_type="Workforce", status=current_status, reason='(Unknown)') + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Workforce", status=current_status) time.sleep(poll) - + @Base.add_validate_call def wait_for_delete( self, @@ -39952,13 +33348,13 @@ def wait_for_delete( ) -> None: """ Wait for a Workforce resource to be deleted. - + Parameters: poll: The number of seconds to wait between each poll. timeout: The maximum number of seconds to wait before timing out. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -39972,39 +33368,34 @@ def wait_for_delete( WaiterError: Raised when an error occurs while waiting. """ start_time = time.time() - - progress = Progress( - SpinnerColumn("bouncingBar"), + + progress = Progress(SpinnerColumn("bouncingBar"), TextColumn("{task.description}"), TimeElapsedColumn(), ) progress.add_task("Waiting for Workforce to be deleted...") status = Status("Current status:") - - with Live( - Panel( - Group(progress, status), - title="Wait Log Panel", - border_style=Style(color=Color.BLUE.value), - ) - ): + + with Live(Panel(Group(progress, status), title="Wait Log Panel", border_style=Style(color=Color.BLUE.value))): while True: try: self.refresh() current_status = self.workforce.status status.update(f"Current status: [bold]{current_status}") - + + + if timeout is not None and time.time() - start_time >= timeout: raise TimeoutExceededError(resource_type="Workforce", status=current_status) except botocore.exceptions.ClientError as e: error_code = e.response["Error"]["Code"] - + if "ResourceNotFound" in error_code or "ValidationException" in error_code: logger.info("Resource was not found. It may have been deleted.") return raise e time.sleep(poll) - + @classmethod @Base.add_validate_call def get_all( @@ -40017,7 +33408,7 @@ def get_all( ) -> ResourceIterator["Workforce"]: """ Get all Workforce resources - + Parameters: sort_by: Sort workforces using the workforce name or creation date. sort_order: Sort workforces in ascending or descending order. @@ -40026,12 +33417,12 @@ def get_all( max_results: The maximum number of workforces returned in the response. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Workforce resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40041,59 +33432,56 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_workforces", - summaries_key="Workforces", - summary_name="Workforce", + list_method='list_workforces', + summaries_key='Workforces', + summary_name='Workforce', resource_cls=Workforce, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) class Workteam(Base): """ Class representing resource Workteam - + Attributes: - workteam: A Workteam instance that contains information about the work team. - + workteam: A Workteam instance that contains information about the work team. + """ - workteam_name: StrPipeVar workteam: Optional[Workteam] = Unassigned() - + def get_name(self) -> str: attributes = vars(self) - resource_name = "workteam_name" - resource_name_split = resource_name.split("_") + resource_name = 'workteam_name' + resource_name_split = resource_name.split('_') attribute_name_candidates = [] - + l = len(resource_name_split) for i in range(0, l): attribute_name_candidates.append("_".join(resource_name_split[i:l])) - + for attribute, value in attributes.items(): - if attribute == "name" or attribute in attribute_name_candidates: + if attribute == 'name' or attribute in attribute_name_candidates: return value logger.error("Name attribute not found for object workteam") return None - + @classmethod @Base.add_validate_call def create( @@ -40102,8 +33490,6 @@ def create( member_definitions: List[MemberDefinition], description: StrPipeVar, workforce_name: Optional[Union[StrPipeVar, object]] = Unassigned(), - membership_rule: Optional[MembershipRule] = Unassigned(), - membership_type: Optional[StrPipeVar] = Unassigned(), notification_configuration: Optional[NotificationConfiguration] = Unassigned(), worker_access_configuration: Optional[WorkerAccessConfiguration] = Unassigned(), tags: Optional[List[Tag]] = Unassigned(), @@ -40112,25 +33498,23 @@ def create( ) -> Optional["Workteam"]: """ Create a Workteam resource - + Parameters: workteam_name: The name of the work team. Use this name to identify the work team. member_definitions: A list of MemberDefinition objects that contains objects that identify the workers that make up the work team. Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. Do not provide input for both of these parameters in a single request. For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools. For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups. description: A description of the work team. workforce_name: The name of the workforce. - membership_rule: - membership_type: notification_configuration: Configures notification of workers regarding available or expiring work items. worker_access_configuration: Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL. tags: An array of key-value pairs. For more information, see Resource Tag and Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide. session: Boto3 session. region: Region name. - + Returns: The Workteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40145,39 +33529,33 @@ def create( LocalConfigNotFoundError: Raised when a configuration file is not found in local file system S3ConfigNotFoundError: Raised when a configuration file is not found in S3 """ - + logger.info("Creating workteam resource.") - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - - operation_input_args = { - "WorkteamName": workteam_name, - "WorkforceName": workforce_name, - "MemberDefinitions": member_definitions, - "MembershipRule": membership_rule, - "MembershipType": membership_type, - "Description": description, - "NotificationConfiguration": notification_configuration, - "WorkerAccessConfiguration": worker_access_configuration, - "Tags": tags, - } - - operation_input_args = Base.populate_chained_attributes( - resource_name="Workteam", operation_input_args=operation_input_args - ) - + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + operation_input_args = { + 'WorkteamName': workteam_name, + 'WorkforceName': workforce_name, + 'MemberDefinitions': member_definitions, + 'Description': description, + 'NotificationConfiguration': notification_configuration, + 'WorkerAccessConfiguration': worker_access_configuration, + 'Tags': tags, + } + + operation_input_args = Base.populate_chained_attributes(resource_name='Workteam', operation_input_args=operation_input_args) + logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.create_workteam(**operation_input_args) logger.debug(f"Response: {response}") - + return cls.get(workteam_name=workteam_name, session=session, region=region) - + @classmethod @Base.add_validate_call def get( @@ -40188,17 +33566,17 @@ def get( ) -> Optional["Workteam"]: """ Get a Workteam resource - + Parameters: workteam_name: The name of the work team to return a description of. session: Boto3 session. region: Region name. - + Returns: The Workteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40208,38 +33586,37 @@ def get( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkteamName": workteam_name, + 'WorkteamName': workteam_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') response = client.describe_workteam(**operation_input_args) - + logger.debug(response) - + # deserialize the response - transformed_response = transform(response, "DescribeWorkteamResponse") + transformed_response = transform(response, 'DescribeWorkteamResponse') workteam = cls(**transformed_response) return workteam - + @Base.add_validate_call def refresh( self, - ) -> Optional["Workteam"]: + + ) -> Optional["Workteam"]: """ Refresh a Workteam resource - + Returns: The Workteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40249,47 +33626,43 @@ def refresh( error_code = e.response['Error']['Code'] ``` """ - + operation_input_args = { - "WorkteamName": self.workteam_name, + 'WorkteamName': self.workteam_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client = Base.get_sagemaker_client() response = client.describe_workteam(**operation_input_args) - + # deserialize response and update self - transform(response, "DescribeWorkteamResponse", self) + transform(response, 'DescribeWorkteamResponse', self) return self - + @Base.add_validate_call def update( self, member_definitions: Optional[List[MemberDefinition]] = Unassigned(), - membership_rule: Optional[MembershipRule] = Unassigned(), - membership_type: Optional[StrPipeVar] = Unassigned(), description: Optional[StrPipeVar] = Unassigned(), notification_configuration: Optional[NotificationConfiguration] = Unassigned(), worker_access_configuration: Optional[WorkerAccessConfiguration] = Unassigned(), ) -> Optional["Workteam"]: """ Update a Workteam resource - + Parameters: - member_definitions: A list of MemberDefinition objects that contains objects that identify the workers that make up the work team. Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. You should not provide input for both of these parameters in a single request. For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools. For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups. Be aware that user groups that are already in the work team must also be listed in Groups when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update. - membership_rule: - membership_type: + member_definitions: A list of MemberDefinition objects that contains objects that identify the workers that make up the work team. Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. You should not provide input for both of these parameters in a single request. For workforces created using Amazon Cognito, private work teams correspond to Amazon Cognito user groups within the user pool used to create a workforce. All of the CognitoMemberDefinition objects that make up the member definition must have the same ClientId and UserPool values. To add a Amazon Cognito user group to an existing worker pool, see Adding groups to a User Pool. For more information about user pools, see Amazon Cognito User Pools. For workforces created using your own OIDC IdP, specify the user groups that you want to include in your private work team in OidcMemberDefinition by listing those groups in Groups. Be aware that user groups that are already in the work team must also be listed in Groups when you make this request to remain on the work team. If you do not include these user groups, they will no longer be associated with the work team you update. description: An updated description for the work team. notification_configuration: Configures SNS topic notifications for available or expiring work items worker_access_configuration: Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL. - + Returns: The Workteam resource. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40300,40 +33673,39 @@ def update( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + logger.info("Updating workteam resource.") client = Base.get_sagemaker_client() - + operation_input_args = { - "WorkteamName": self.workteam_name, - "MemberDefinitions": member_definitions, - "MembershipRule": membership_rule, - "MembershipType": membership_type, - "Description": description, - "NotificationConfiguration": notification_configuration, - "WorkerAccessConfiguration": worker_access_configuration, + 'WorkteamName': self.workteam_name, + 'MemberDefinitions': member_definitions, + 'Description': description, + 'NotificationConfiguration': notification_configuration, + 'WorkerAccessConfiguration': worker_access_configuration, } logger.debug(f"Input request: {operation_input_args}") # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + # create the resource response = client.update_workteam(**operation_input_args) logger.debug(f"Response: {response}") self.refresh() - + return self - + @Base.add_validate_call def delete( self, - ) -> None: + + ) -> None: """ Delete a Workteam resource - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40344,20 +33716,20 @@ def delete( ``` ResourceLimitExceeded: You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. """ - + client = Base.get_sagemaker_client() - + operation_input_args = { - "WorkteamName": self.workteam_name, + 'WorkteamName': self.workteam_name, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + client.delete_workteam(**operation_input_args) - + logger.info(f"Deleting {self.__class__.__name__} - {self.get_name()}") - + @classmethod @Base.add_validate_call def get_all( @@ -40370,7 +33742,7 @@ def get_all( ) -> ResourceIterator["Workteam"]: """ Get all Workteam resources - + Parameters: sort_by: The field to sort results by. The default is CreationTime. sort_order: The sort order for results. The default is Ascending. @@ -40379,12 +33751,12 @@ def get_all( max_results: The maximum number of work teams to return in each page of the response. session: Boto3 session. region: Region name. - + Returns: Iterator for listed Workteam resources. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40394,30 +33766,29 @@ def get_all( error_code = e.response['Error']['Code'] ``` """ - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name="sagemaker") + operation_input_args = { - "SortBy": sort_by, - "SortOrder": sort_order, - "NameContains": name_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, + 'NameContains': name_contains, } - + # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - + return ResourceIterator( client=client, - list_method="list_workteams", - summaries_key="Workteams", - summary_name="Workteam", + list_method='list_workteams', + summaries_key='Workteams', + summary_name='Workteam', resource_cls=Workteam, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) - + + @Base.add_validate_call def get_all_labeling_jobs( self, @@ -40426,13 +33797,12 @@ def get_all_labeling_jobs( creation_time_before: Optional[datetime.datetime] = Unassigned(), job_reference_code_contains: Optional[StrPipeVar] = Unassigned(), sort_by: Optional[StrPipeVar] = Unassigned(), - sort_order: Optional[StrPipeVar] = Unassigned(), - session: Optional[Session] = None, + sort_order: Optional[StrPipeVar] = Unassigned(), session: Optional[Session] = None, region: Optional[str] = None, ) -> ResourceIterator[LabelingJob]: """ Gets a list of labeling jobs assigned to a specified work team. - + Parameters: workteam_arn: The Amazon Resource Name (ARN) of the work team for which you want to see labeling jobs for. max_results: The maximum number of labeling jobs to return in each page of the response. @@ -40444,12 +33814,12 @@ def get_all_labeling_jobs( sort_order: The sort order for results. The default is Ascending. session: Boto3 session. region: Region name. - + Returns: Iterator for listed LabelingJob. - + Raises: - botocore.exceptions.ClientError: This exception is raised for AWS service related errors. + botocore.exceptions.ClientError: This exception is raised for AWS service related errors. The error message and error code can be parsed from the exception as follows: ``` try: @@ -40460,28 +33830,30 @@ def get_all_labeling_jobs( ``` ResourceNotFound: Resource being access is not found. """ - + + operation_input_args = { - "WorkteamArn": workteam_arn, - "CreationTimeAfter": creation_time_after, - "CreationTimeBefore": creation_time_before, - "JobReferenceCodeContains": job_reference_code_contains, - "SortBy": sort_by, - "SortOrder": sort_order, + 'WorkteamArn': workteam_arn, + 'CreationTimeAfter': creation_time_after, + 'CreationTimeBefore': creation_time_before, + 'JobReferenceCodeContains': job_reference_code_contains, + 'SortBy': sort_by, + 'SortOrder': sort_order, } # serialize the input request operation_input_args = serialize(operation_input_args) logger.debug(f"Serialized input request: {operation_input_args}") - - client = Base.get_sagemaker_client( - session=session, region_name=region, service_name="sagemaker" - ) - + + client = Base.get_sagemaker_client(session=session, region_name=region, service_name='sagemaker') + + return ResourceIterator( client=client, - list_method="list_labeling_jobs_for_workteam", - summaries_key="LabelingJobSummaryList", - summary_name="LabelingJobForWorkteamSummary", + list_method='list_labeling_jobs_for_workteam', + summaries_key='LabelingJobSummaryList', + summary_name='LabelingJobForWorkteamSummary', resource_cls=LabelingJob, - list_method_kwargs=operation_input_args, + list_method_kwargs=operation_input_args ) + + diff --git a/sagemaker-core/src/sagemaker/core/shapes.py b/sagemaker-core/src/sagemaker/core/shapes.py new file mode 100644 index 0000000000..8f99bcba8c --- /dev/null +++ b/sagemaker-core/src/sagemaker/core/shapes.py @@ -0,0 +1,15154 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. +import datetime +import warnings + +from pydantic import BaseModel, ConfigDict +from typing import List, Dict, Optional, Any, Union +from sagemaker.core.utils.utils import Unassigned +from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar + +# Suppress Pydantic warnings about field names shadowing parent attributes +warnings.filterwarnings("ignore", message=".*shadows an attribute.*") + + +class Base(BaseModel): + model_config = ConfigDict(protected_namespaces=(), validate_assignment=True, extra="forbid") + + +class InternalDependencyException(Base): + """ + InternalDependencyException + Your request caused an exception with an internal dependency. Contact customer support. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class InternalFailure(Base): + """ + InternalFailure + An internal failure occurred. Try your request again. If the problem persists, contact Amazon Web Services customer support. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class InternalStreamFailure(Base): + """ + InternalStreamFailure + The stream processing failed because of an unknown error, exception or failure. Try your request again. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class InvokeEndpointAsyncOutput(Base): + """ + InvokeEndpointAsyncOutput + + Attributes + ---------------------- + inference_id: Identifier for an inference request. This will be the same as the InferenceId specified in the input. Amazon SageMaker will generate an identifier for you if you do not specify one. + output_location: The Amazon S3 URI where the inference response payload is stored. + failure_location: The Amazon S3 URI where the inference failure response payload is stored. + """ + + inference_id: Optional[StrPipeVar] = Unassigned() + output_location: Optional[StrPipeVar] = Unassigned() + failure_location: Optional[StrPipeVar] = Unassigned() + + +class InvokeEndpointOutput(Base): + """ + InvokeEndpointOutput + + Attributes + ---------------------- + body: Includes the inference provided by the model. For information about the format of the response body, see Common Data Formats-Inference. If the explainer is activated, the body includes the explanations provided by the model. For more information, see the Response section under Invoke the Endpoint in the Developer Guide. + content_type: The MIME type of the inference returned from the model container. + invoked_production_variant: Identifies the production variant that was invoked. + custom_attributes: Provides additional information in the response about the inference returned by 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 return an ID received in the CustomAttributes header of a request or other metadata that a service endpoint was programmed to produce. 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). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back. 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. + new_session_id: If you created a stateful session with your request, the ID and expiration time that the model assigns to that session. + closed_session_id: If you closed a stateful session with your request, the ID of that session. + """ + + body: Any + content_type: Optional[StrPipeVar] = Unassigned() + invoked_production_variant: Optional[StrPipeVar] = Unassigned() + custom_attributes: Optional[StrPipeVar] = Unassigned() + new_session_id: Optional[StrPipeVar] = Unassigned() + closed_session_id: Optional[StrPipeVar] = Unassigned() + + +class PayloadPart(Base): + """ + PayloadPart + A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts. + + Attributes + ---------------------- + bytes: A blob that contains part of the response for your streaming inference request. + """ + + bytes: Optional[Any] = Unassigned() + + +class ModelStreamError(Base): + """ + 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. + + Attributes + ---------------------- + message + error_code: 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. + """ + + message: Optional[StrPipeVar] = Unassigned() + error_code: Optional[StrPipeVar] = Unassigned() + + +class ResponseStream(Base): + """ + ResponseStream + A stream of payload parts. Each part contains a portion of the response for a streaming inference request. + + Attributes + ---------------------- + payload_part: A wrapper for pieces of the payload that's returned in response to a streaming inference request. A streaming inference response consists of one or more payload parts. + model_stream_error: 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. + internal_stream_failure: The stream processing failed because of an unknown error, exception or failure. Try your request again. + """ + + payload_part: Optional[PayloadPart] = Unassigned() + model_stream_error: Optional[ModelStreamError] = Unassigned() + internal_stream_failure: Optional[InternalStreamFailure] = Unassigned() + + +class InvokeEndpointWithResponseStreamOutput(Base): + """ + InvokeEndpointWithResponseStreamOutput + + Attributes + ---------------------- + body + content_type: The MIME type of the inference returned from the model container. + invoked_production_variant: Identifies the production variant that was invoked. + custom_attributes: Provides additional information in the response about the inference returned by 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 return an ID received in the CustomAttributes header of a request or other metadata that a service endpoint was programmed to produce. 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). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back. 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. + """ + + body: ResponseStream + content_type: Optional[StrPipeVar] = Unassigned() + invoked_production_variant: Optional[StrPipeVar] = Unassigned() + custom_attributes: Optional[StrPipeVar] = Unassigned() + + +class ModelError(Base): + """ + ModelError + Model (owned by the customer in the container) returned 4xx or 5xx error code. + + Attributes + ---------------------- + message + original_status_code: Original status code. + original_message: Original message. + log_stream_arn: The Amazon Resource Name (ARN) of the log stream. + """ + + message: Optional[StrPipeVar] = Unassigned() + original_status_code: Optional[int] = Unassigned() + original_message: Optional[StrPipeVar] = Unassigned() + log_stream_arn: Optional[StrPipeVar] = Unassigned() + + +class ModelNotReadyException(Base): + """ + ModelNotReadyException + Either a serverless endpoint variant's resources are still being provisioned, or a multi-model endpoint is still downloading or loading the target model. Wait and try your request again. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class ServiceUnavailable(Base): + """ + ServiceUnavailable + The service is currently unavailable. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class ValidationError(Base): + """ + ValidationError + There was an error validating your request. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class AccessForbidden(Base): + """ + AccessForbidden + You do not have permission to perform an action. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class BatchGetRecordError(Base): + """ + BatchGetRecordError + The error that has occurred when attempting to retrieve a batch of Records. + + Attributes + ---------------------- + feature_group_name: The name of the feature group that the record belongs to. + record_identifier_value_as_string: The value for the RecordIdentifier in string format of a Record from a FeatureGroup that is causing an error when attempting to be retrieved. + error_code: The error code of an error that has occurred when attempting to retrieve a batch of Records. For more information on errors, see Errors. + error_message: The error message of an error that has occurred when attempting to retrieve a record in the batch. + """ + + feature_group_name: Union[StrPipeVar, object] + record_identifier_value_as_string: StrPipeVar + error_code: StrPipeVar + error_message: StrPipeVar + + +class BatchGetRecordIdentifier(Base): + """ + BatchGetRecordIdentifier + The identifier that identifies the batch of Records you are retrieving in a batch. + + Attributes + ---------------------- + feature_group_name: The name or Amazon Resource Name (ARN) of the FeatureGroup containing the records you are retrieving in a batch. + record_identifiers_value_as_string: The value for a list of record identifiers in string format. + feature_names: List of names of Features to be retrieved. If not specified, the latest value for all the Features are returned. + """ + + feature_group_name: Union[StrPipeVar, object] + record_identifiers_value_as_string: List[StrPipeVar] + feature_names: Optional[List[StrPipeVar]] = Unassigned() + + +class FeatureValue(Base): + """ + FeatureValue + The value associated with a feature. + + Attributes + ---------------------- + feature_name: The name of a feature that a feature value corresponds to. + value_as_string: The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string. + value_as_string_list: The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string. + """ + + feature_name: StrPipeVar + value_as_string: Optional[StrPipeVar] = Unassigned() + value_as_string_list: Optional[List[StrPipeVar]] = Unassigned() + + +class BatchGetRecordResultDetail(Base): + """ + BatchGetRecordResultDetail + The output of records that have been retrieved in a batch. + + Attributes + ---------------------- + feature_group_name: The FeatureGroupName containing Records you retrieved in a batch. + record_identifier_value_as_string: The value of the record identifier in string format. + record: The Record retrieved. + expires_at: The ExpiresAt ISO string of the requested record. + """ + + feature_group_name: Union[StrPipeVar, object] + record_identifier_value_as_string: StrPipeVar + record: List[FeatureValue] + expires_at: Optional[StrPipeVar] = Unassigned() + + +class BatchGetRecordResponse(Base): + """ + BatchGetRecordResponse + + Attributes + ---------------------- + records: A list of Records you requested to be retrieved in batch. + errors: A list of errors that have occurred when retrieving a batch of Records. + unprocessed_identifiers: A unprocessed list of FeatureGroup names, with their corresponding RecordIdentifier value, and Feature name. + """ + + records: List[BatchGetRecordResultDetail] + errors: List[BatchGetRecordError] + unprocessed_identifiers: List[BatchGetRecordIdentifier] + + +class GetRecordResponse(Base): + """ + GetRecordResponse + + Attributes + ---------------------- + record: The record you requested. A list of FeatureValues. + expires_at: The ExpiresAt ISO string of the requested record. + """ + + record: Optional[List[FeatureValue]] = Unassigned() + expires_at: Optional[StrPipeVar] = Unassigned() + + +class TtlDuration(Base): + """ + TtlDuration + Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide. + + Attributes + ---------------------- + unit: TtlDuration time unit. + value: TtlDuration time value. + """ + + unit: Optional[StrPipeVar] = Unassigned() + value: Optional[int] = Unassigned() + + +class ResourceNotFound(Base): + """ + ResourceNotFound + Resource being access is not found. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class MetricQuery(Base): + """ + MetricQuery + Specifies a query to retrieve training metrics from SageMaker. + + Attributes + ---------------------- + metric_name: The name of the metric to retrieve. + resource_arn: The ARN of the SageMaker resource to retrieve metrics for. + metric_stat: The metrics stat type of metrics to retrieve. + period: The time period of metrics to retrieve. + x_axis_type: The x-axis type of metrics to retrieve. + start: The start time of metrics to retrieve. + end: The end time of metrics to retrieve. + """ + + metric_name: StrPipeVar + resource_arn: StrPipeVar + metric_stat: StrPipeVar + period: StrPipeVar + x_axis_type: StrPipeVar + start: Optional[int] = Unassigned() + end: Optional[int] = Unassigned() + + +class MetricQueryResult(Base): + """ + MetricQueryResult + The result of a query to retrieve training metrics from SageMaker. + + Attributes + ---------------------- + status: The status of the metric query. + message: A message describing the status of the metric query. + x_axis_values: The values for the x-axis of the metrics. + metric_values: The metric values retrieved by the query. + """ + + status: StrPipeVar + x_axis_values: List[int] + metric_values: List[float] + message: Optional[StrPipeVar] = Unassigned() + + +class BatchGetMetricsResponse(Base): + """ + BatchGetMetricsResponse + + Attributes + ---------------------- + metric_query_results: The results of a query to retrieve training metrics from SageMaker. + """ + + metric_query_results: Optional[List[MetricQueryResult]] = Unassigned() + + +class BatchPutMetricsError(Base): + """ + BatchPutMetricsError + An error that occured when putting the metric data. + + Attributes + ---------------------- + code: The error code of an error that occured when attempting to put metrics. METRIC_LIMIT_EXCEEDED: The maximum amount of metrics per resource is exceeded. INTERNAL_ERROR: An internal error occured. VALIDATION_ERROR: The metric data failed validation. CONFLICT_ERROR: Multiple requests attempted to modify the same data simultaneously. + metric_index: An index that corresponds to the metric in the request. + """ + + code: Optional[StrPipeVar] = Unassigned() + metric_index: Optional[int] = Unassigned() + + +class RawMetricData(Base): + """ + RawMetricData + The raw metric data to associate with the resource. + + Attributes + ---------------------- + metric_name: The name of the metric. + timestamp: The time that the metric was recorded. + step: The metric step (epoch). + value: The metric value. + """ + + metric_name: StrPipeVar + timestamp: datetime.datetime + value: float + step: Optional[int] = Unassigned() + + +class AIBenchmarkInferenceComponent(Base): + """ + AIBenchmarkInferenceComponent + An inference component to benchmark. + + Attributes + ---------------------- + identifier: The name or Amazon Resource Name (ARN) of the inference component. + """ + + identifier: StrPipeVar + + +class AIBenchmarkEndpoint(Base): + """ + AIBenchmarkEndpoint + The SageMaker endpoint configuration for benchmarking. + + Attributes + ---------------------- + identifier: The name or Amazon Resource Name (ARN) of the SageMaker endpoint to benchmark. + target_container_hostname: The hostname of the specific container to target within a multi-container endpoint. + inference_components: The list of inference components to benchmark on the endpoint. + """ + + identifier: StrPipeVar + target_container_hostname: Optional[StrPipeVar] = Unassigned() + inference_components: Optional[List[AIBenchmarkInferenceComponent]] = Unassigned() + + +class AIBenchmarkJobSummary(Base): + """ + AIBenchmarkJobSummary + Summary information about an AI benchmark job. + + Attributes + ---------------------- + ai_benchmark_job_name: The name of the benchmark job. + ai_benchmark_job_arn: The Amazon Resource Name (ARN) of the benchmark job. + ai_benchmark_job_status: The status of the benchmark job. + creation_time: A timestamp that indicates when the benchmark job was created. + end_time: A timestamp that indicates when the benchmark job completed. + ai_workload_config_name: The name of the AI workload configuration used by the benchmark job. + """ + + ai_benchmark_job_name: StrPipeVar + ai_benchmark_job_arn: StrPipeVar + ai_benchmark_job_status: StrPipeVar + creation_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + ai_workload_config_name: Optional[StrPipeVar] = Unassigned() + + +class VpcConfig(Base): + """ + VpcConfig + Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. + + Attributes + ---------------------- + security_group_ids: The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones. + """ + + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] + + +class AIBenchmarkNetworkConfig(Base): + """ + AIBenchmarkNetworkConfig + The network configuration for an AI benchmark job. + + Attributes + ---------------------- + vpc_config: The VPC configuration, including security group IDs and subnet IDs. + """ + + vpc_config: Optional[VpcConfig] = Unassigned() + + +class AIBenchmarkOutputConfig(Base): + """ + AIBenchmarkOutputConfig + The output configuration for an AI benchmark job. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where benchmark results are stored. + """ + + s3_output_location: StrPipeVar + + +class AICloudWatchLogs(Base): + """ + AICloudWatchLogs + CloudWatch log information for an AI benchmark or recommendation job. + + Attributes + ---------------------- + log_group_arn: The Amazon Resource Name (ARN) of the CloudWatch log group. + log_stream_name: The name of the CloudWatch log stream. + """ + + log_group_arn: Optional[StrPipeVar] = Unassigned() + log_stream_name: Optional[StrPipeVar] = Unassigned() + + +class AIBenchmarkOutputResult(Base): + """ + AIBenchmarkOutputResult + The output result of an AI benchmark job, including the Amazon S3 location and CloudWatch log information. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where benchmark results are stored. + cloud_watch_logs: The CloudWatch log information for the benchmark job. + """ + + s3_output_location: StrPipeVar + cloud_watch_logs: Optional[List[AICloudWatchLogs]] = Unassigned() + + +class AIBenchmarkTarget(Base): + """ + AIBenchmarkTarget + The target for an AI benchmark job. This is a union type — specify one of the members. + + Attributes + ---------------------- + endpoint: The SageMaker endpoint to benchmark. + """ + + endpoint: Optional[AIBenchmarkEndpoint] = Unassigned() + + +class AICapacityReservationConfig(Base): + """ + AICapacityReservationConfig + The capacity reservation configuration for an AI recommendation job. + + Attributes + ---------------------- + capacity_reservation_preference: The capacity reservation preference. The only valid value is capacity-reservations-only. + ml_reservation_arns: The list of ML reservation ARNs to use. + """ + + capacity_reservation_preference: Optional[StrPipeVar] = Unassigned() + ml_reservation_arns: Optional[List[StrPipeVar]] = Unassigned() + + +class AIWorkloadS3DataSource(Base): + """ + AIWorkloadS3DataSource + The Amazon S3 data source for an AI workload. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI of the data. + """ + + s3_uri: StrPipeVar + + +class AIWorkloadDataSource(Base): + """ + AIWorkloadDataSource + The data source for an AI workload input data channel. + + Attributes + ---------------------- + s3_data_source: The Amazon S3 data source configuration. + """ + + s3_data_source: Optional[AIWorkloadS3DataSource] = Unassigned() + + +class AIWorkloadInputDataConfig(Base): + """ + AIWorkloadInputDataConfig + A channel of input data for an AI workload configuration. Each channel has a name and a data source. + + Attributes + ---------------------- + channel_name: The logical name for the data channel. + data_source: The data source for this channel. + """ + + channel_name: StrPipeVar + data_source: AIWorkloadDataSource + + +class AIDatasetConfig(Base): + """ + AIDatasetConfig + The dataset configuration for an AI workload. This is a union type — specify one of the members. + + Attributes + ---------------------- + input_data_config: An array of input data channel configurations for the workload. + """ + + input_data_config: Optional[List[AIWorkloadInputDataConfig]] = Unassigned() + + +class AIModelSourceS3(Base): + """ + AIModelSourceS3 + The Amazon S3 model source configuration. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI of the model artifacts. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + +class AIModelSource(Base): + """ + AIModelSource + The source of the model for an AI recommendation job. This is a union type. + + Attributes + ---------------------- + s3: The Amazon S3 location of the model artifacts. + """ + + s3: Optional[AIModelSourceS3] = Unassigned() + + +class AIRecommendationOptimizationDetail(Base): + """ + AIRecommendationOptimizationDetail + Details about an optimization technique applied in a recommendation. + + Attributes + ---------------------- + optimization_type: The type of optimization. Valid values are SpeculativeDecoding and KernelTuning. + optimization_config: A map of configuration parameters for the optimization technique. + """ + + optimization_type: StrPipeVar + optimization_config: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class AIRecommendationInstanceDetail(Base): + """ + AIRecommendationInstanceDetail + Instance details for a recommendation. + + Attributes + ---------------------- + instance_type: The recommended instance type. + instance_count: The recommended number of instances. + copy_count_per_instance: The number of model copies per instance. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[int] = Unassigned() + copy_count_per_instance: Optional[int] = Unassigned() + + +class AIRecommendationModelDetails(Base): + """ + AIRecommendationModelDetails + Details about the model package in a recommendation. + + Attributes + ---------------------- + model_package_arn: The Amazon Resource Name (ARN) of the model package. + inference_specification_name: The name of the inference specification within the model package. + instance_details: The instance details for this recommendation, including instance type, count, and model copies per instance. + """ + + model_package_arn: Optional[StrPipeVar] = Unassigned() + inference_specification_name: Optional[StrPipeVar] = Unassigned() + instance_details: Optional[List[AIRecommendationInstanceDetail]] = Unassigned() + + +class AIRecommendationDeploymentS3Channel(Base): + """ + AIRecommendationDeploymentS3Channel + An Amazon S3 data channel for a recommended deployment configuration, containing model artifacts or optimized model outputs. + + Attributes + ---------------------- + channel_name: A custom name for this Amazon S3 data channel. + uri: The Amazon S3 URI of the data for this channel. + """ + + channel_name: Optional[StrPipeVar] = Unassigned() + uri: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationDeploymentConfiguration(Base): + """ + AIRecommendationDeploymentConfiguration + The deployment configuration for a recommendation. + + Attributes + ---------------------- + s3: The Amazon S3 data channels for the deployment. + image_uri: The URI of the container image for the deployment. + instance_type: The recommended instance type for the deployment. + instance_count: The recommended number of instances for the deployment. + copy_count_per_instance: The number of model copies per instance. + environment_variables: The environment variables for the deployment. + """ + + s3: Optional[List[AIRecommendationDeploymentS3Channel]] = Unassigned() + image_uri: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[int] = Unassigned() + copy_count_per_instance: Optional[int] = Unassigned() + environment_variables: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class AIRecommendationPerformanceMetric(Base): + """ + AIRecommendationPerformanceMetric + An expected performance metric for a recommendation. + + Attributes + ---------------------- + metric: The name of the performance metric. + stat: The statistical measure for the metric. + value: The value of the metric. + unit: The unit of the metric value. + """ + + metric: StrPipeVar + value: StrPipeVar + stat: Optional[StrPipeVar] = Unassigned() + unit: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendation(Base): + """ + AIRecommendation + An optimization recommendation generated by an AI recommendation job. + + Attributes + ---------------------- + recommendation_description: A description of the recommendation. + optimization_details: The optimization techniques applied in this recommendation. + model_details: Details about the model package associated with this recommendation. + deployment_configuration: The deployment configuration for this recommendation, including the container image, instance type, instance count, and environment variables. + ai_benchmark_job_arn: The Amazon Resource Name (ARN) of the benchmark job associated with this recommendation. + expected_performance: The expected performance metrics for this recommendation. + """ + + recommendation_description: Optional[StrPipeVar] = Unassigned() + optimization_details: Optional[List[AIRecommendationOptimizationDetail]] = Unassigned() + model_details: Optional[AIRecommendationModelDetails] = Unassigned() + deployment_configuration: Optional[AIRecommendationDeploymentConfiguration] = Unassigned() + ai_benchmark_job_arn: Optional[StrPipeVar] = Unassigned() + expected_performance: Optional[List[AIRecommendationPerformanceMetric]] = Unassigned() + + +class AIRecommendationComputeSpec(Base): + """ + AIRecommendationComputeSpec + The compute resource specification for an AI recommendation job. + + Attributes + ---------------------- + instance_types: The list of instance types to consider for recommendations. You can specify up to 3 instance types. + capacity_reservation_config: The capacity reservation configuration. + """ + + instance_types: Optional[List[StrPipeVar]] = Unassigned() + capacity_reservation_config: Optional[AICapacityReservationConfig] = Unassigned() + + +class AIRecommendationConstraint(Base): + """ + AIRecommendationConstraint + A performance constraint for an AI recommendation job. + + Attributes + ---------------------- + metric: The performance metric. Valid values are ttft-ms (time to first token in milliseconds), throughput, and cost. + """ + + metric: StrPipeVar + + +class AIRecommendationInferenceSpecification(Base): + """ + AIRecommendationInferenceSpecification + The inference framework for an AI recommendation job. + + Attributes + ---------------------- + framework: The inference framework. Valid values are LMI and VLLM. + """ + + framework: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationJobSummary(Base): + """ + AIRecommendationJobSummary + Summary information about an AI recommendation job. + + Attributes + ---------------------- + ai_recommendation_job_name: The name of the recommendation job. + ai_recommendation_job_arn: The Amazon Resource Name (ARN) of the recommendation job. + ai_recommendation_job_status: The status of the recommendation job. + creation_time: A timestamp that indicates when the recommendation job was created. + end_time: A timestamp that indicates when the recommendation job completed. + """ + + ai_recommendation_job_name: StrPipeVar + ai_recommendation_job_arn: StrPipeVar + ai_recommendation_job_status: StrPipeVar + creation_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + + +class AIRecommendationOutputConfig(Base): + """ + AIRecommendationOutputConfig + The output configuration for an AI recommendation job. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where recommendation results are stored. + model_package_group_identifier: The name or Amazon Resource Name (ARN) of the model package group where the optimized model is registered as a new model package version. + """ + + s3_output_location: Optional[StrPipeVar] = Unassigned() + model_package_group_identifier: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationOutputResult(Base): + """ + AIRecommendationOutputResult + The output configuration for an AI recommendation job, including the S3 location for results and the model package group for deployment. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where the recommendation job writes its output results. + model_package_group_identifier: The name or Amazon Resource Name (ARN) of the model package group where deployment-ready model packages are registered. + """ + + s3_output_location: StrPipeVar + model_package_group_identifier: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationPerformanceTarget(Base): + """ + AIRecommendationPerformanceTarget + The performance targets for an AI recommendation job. + + Attributes + ---------------------- + constraints: An array of performance constraints that define the optimization objectives. + """ + + constraints: List[AIRecommendationConstraint] + + +class AIWorkloadConfigSummary(Base): + """ + AIWorkloadConfigSummary + Summary information about an AI workload configuration. + + Attributes + ---------------------- + ai_workload_config_name: The name of the AI workload configuration. + ai_workload_config_arn: The Amazon Resource Name (ARN) of the AI workload configuration. + creation_time: A timestamp that indicates when the configuration was created. + """ + + ai_workload_config_name: StrPipeVar + ai_workload_config_arn: StrPipeVar + creation_time: datetime.datetime + + +class WorkloadSpec(Base): + """ + WorkloadSpec + The workload specification for benchmark tool configuration. Provide an inline YAML or JSON string. + + Attributes + ---------------------- + inline: An inline YAML or JSON string that defines benchmark parameters. + """ + + inline: Optional[StrPipeVar] = Unassigned() + + +class AIWorkloadConfigs(Base): + """ + AIWorkloadConfigs + The benchmark tool configuration for an AI workload. + + Attributes + ---------------------- + workload_spec: The workload specification that defines benchmark parameters. + """ + + workload_spec: WorkloadSpec + + +class AcceleratorPartitionConfig(Base): + """ + AcceleratorPartitionConfig + Configuration for allocating accelerator partitions. + + Attributes + ---------------------- + type: The Multi-Instance GPU (MIG) profile type that defines the partition configuration. The profile specifies the compute and memory allocation for each partition instance. The available profile types depend on the instance type specified in the compute quota configuration. + count: The number of accelerator partitions to allocate with the specified partition type. If you don't specify a value for vCPU and MemoryInGiB, SageMaker AI automatically allocates ratio-based values for those parameters based on the accelerator partition count you provide. + """ + + type: StrPipeVar + count: int + + +class ActionSource(Base): + """ + ActionSource + A structure describing the source of an action. + + Attributes + ---------------------- + source_uri: The URI of the source. + source_type: The type of the source. + source_id: The ID of the source. + """ + + source_uri: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + source_id: Optional[StrPipeVar] = Unassigned() + + +class ActionSummary(Base): + """ + ActionSummary + Lists the properties of an action. An action represents an action or activity. Some examples are a workflow step and a model deployment. Generally, an action involves at least one input artifact or output artifact. + + Attributes + ---------------------- + action_arn: The Amazon Resource Name (ARN) of the action. + action_name: The name of the action. + source: The source of the action. + action_type: The type of the action. + status: The status of the action. + creation_time: When the action was created. + last_modified_time: When the action was last modified. + """ + + action_arn: Optional[StrPipeVar] = Unassigned() + action_name: Optional[Union[StrPipeVar, object]] = Unassigned() + source: Optional[ActionSource] = Unassigned() + action_type: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class AddClusterNodeSpecification(Base): + """ + AddClusterNodeSpecification + Specifies an instance group and the number of nodes to add to it. + + Attributes + ---------------------- + instance_group_name: The name of the instance group to which you want to add nodes. + increment_target_count_by: The number of nodes to add to the specified instance group. The total number of nodes across all instance groups in a single request cannot exceed 50. + availability_zones: The availability zones in which to add nodes. Use this to target node placement in specific availability zones within a flexible instance group. + instance_types: The instance types to use when adding nodes. Use this to target specific instance types within a flexible instance group. + """ + + instance_group_name: StrPipeVar + increment_target_count_by: int + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() + + +class Tag(Base): + """ + Tag + A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags. For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy. + + Attributes + ---------------------- + key: The tag key. Tag keys must be unique per resource. + value: The tag value. + """ + + key: StrPipeVar + value: StrPipeVar + + +class AdditionalEnis(Base): + """ + AdditionalEnis + Information about additional Elastic Network Interfaces (ENIs) associated with an instance. + + Attributes + ---------------------- + efa_enis: A list of Elastic Fabric Adapter (EFA) ENIs associated with the instance. + """ + + efa_enis: Optional[List[StrPipeVar]] = Unassigned() + + +class ModelAccessConfig(Base): + """ + ModelAccessConfig + The access configuration file to control access to the ML model. You can explicitly accept the model end-user license agreement (EULA) within the ModelAccessConfig. If you are a Jumpstart user, see the End-user license agreements section for more details on accepting the EULA. If you are an AutoML user, see the Optional Parameters section of Create an AutoML job to fine-tune text generation models using the API for details on How to set the EULA acceptance when fine-tuning a model using the AutoML API. + + Attributes + ---------------------- + accept_eula: Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. + """ + + accept_eula: bool + + +class InferenceHubAccessConfig(Base): + """ + InferenceHubAccessConfig + Configuration information specifying which hub contents have accessible deployment options. + + Attributes + ---------------------- + hub_content_arn: The ARN of the hub content for which deployment access is allowed. + """ + + hub_content_arn: StrPipeVar + + +class S3ModelDataSource(Base): + """ + S3ModelDataSource + Specifies the S3 location of ML model data to deploy. + + Attributes + ---------------------- + s3_uri: Specifies the S3 path of ML model data to deploy. + s3_data_type: Specifies the type of ML model data to deploy. If you choose S3Prefix, S3Uri identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix as part of the ML model data to deploy. A valid key name prefix identified by S3Uri always ends with a forward slash (/). If you choose S3Object, S3Uri identifies an object that is the ML model data to deploy. + compression_type: Specifies how the ML model data is prepared. If you choose Gzip and choose S3Object as the value of S3DataType, S3Uri identifies an object that is a gzip-compressed TAR archive. SageMaker will attempt to decompress and untar the object during model deployment. If you choose None and chooose S3Object as the value of S3DataType, S3Uri identifies an object that represents an uncompressed ML model to deploy. If you choose None and choose S3Prefix as the value of S3DataType, S3Uri identifies a key name prefix, under which all objects represents the uncompressed ML model to deploy. If you choose None, then SageMaker will follow rules below when creating model data files under /opt/ml/model directory for use by your inference code: If you choose S3Object as the value of S3DataType, then SageMaker will split the key of the S3 object referenced by S3Uri by slash (/), and use the last part as the filename of the file holding the content of the S3 object. If you choose S3Prefix as the value of S3DataType, then for each S3 object under the key name pefix referenced by S3Uri, SageMaker will trim its key by the prefix, and use the remainder as the path (relative to /opt/ml/model) of the file holding the content of the S3 object. SageMaker will split the remainder by slash (/), using intermediate parts as directory names and the last part as filename of the file holding the content of the S3 object. Do not use any of the following as file names or directory names: An empty or blank string A string which contains null bytes A string longer than 255 bytes A single dot (.) A double dot (..) Ambiguous file names will result in model deployment failure. For example, if your uncompressed ML model consists of two S3 objects s3://mybucket/model/weights and s3://mybucket/model/weights/part1 and you specify s3://mybucket/model/ as the value of S3Uri and S3Prefix as the value of S3DataType, then it will result in name clash between /opt/ml/model/weights (a regular file) and /opt/ml/model/weights/ (a directory). Do not organize the model artifacts in S3 console using folders. When you create a folder in S3 console, S3 creates a 0-byte object with a key set to the folder name you provide. They key of the 0-byte object ends with a slash (/) which violates SageMaker restrictions on model artifact file names, leading to model deployment failure. + model_access_config: Specifies the access configuration file for the ML model. You can explicitly accept the model end-user license agreement (EULA) within the ModelAccessConfig. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. + hub_access_config: Configuration information for hub access. + manifest_s3_uri: The Amazon S3 URI of the manifest file. The manifest file is a CSV file that stores the artifact locations. + e_tag: The ETag associated with S3 URI. + manifest_etag: The ETag associated with Manifest S3 URI. + """ + + s3_uri: StrPipeVar + s3_data_type: StrPipeVar + compression_type: StrPipeVar + model_access_config: Optional[ModelAccessConfig] = Unassigned() + hub_access_config: Optional[InferenceHubAccessConfig] = Unassigned() + manifest_s3_uri: Optional[StrPipeVar] = Unassigned() + e_tag: Optional[StrPipeVar] = Unassigned() + manifest_etag: Optional[StrPipeVar] = Unassigned() + + +class ModelDataSource(Base): + """ + ModelDataSource + Specifies the location of ML model data to deploy. If specified, you must specify one and only one of the available data sources. + + Attributes + ---------------------- + s3_data_source: Specifies the S3 location of ML model data to deploy. + """ + + s3_data_source: Optional[S3ModelDataSource] = Unassigned() + + +class ModelInput(Base): + """ + ModelInput + Input object for the model. + + Attributes + ---------------------- + data_input_config: The input configuration object for the model. + """ + + data_input_config: StrPipeVar + + +class AdditionalModelDataSource(Base): + """ + AdditionalModelDataSource + Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModel action. + + Attributes + ---------------------- + channel_name: A custom name for this AdditionalModelDataSource object. + s3_data_source + """ + + channel_name: StrPipeVar + s3_data_source: S3ModelDataSource + + +class AdditionalS3DataSource(Base): + """ + AdditionalS3DataSource + A data source used for training or inference that is in addition to the input dataset or model data. + + Attributes + ---------------------- + s3_data_type: The data type of the additional data source that you specify for use in inference or training. + s3_uri: The uniform resource identifier (URI) used to identify an additional data source used in inference or training. + compression_type: The type of compression used for an additional data source used in inference or training. Specify None if your additional data source is not compressed. + e_tag: The ETag associated with S3 URI. + """ + + s3_data_type: StrPipeVar + s3_uri: StrPipeVar + compression_type: Optional[StrPipeVar] = Unassigned() + e_tag: Optional[StrPipeVar] = Unassigned() + + +class BaseModel(Base): + """ + BaseModel + Identifies the foundation model that was used as the starting point for model customization. + + Attributes + ---------------------- + hub_content_name: The hub content name of the base model. + hub_content_version: The hub content version of the base model. + recipe_name: The recipe name of the base model. + """ + + hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned() + hub_content_version: Optional[StrPipeVar] = Unassigned() + recipe_name: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageContainerDefinition(Base): + """ + ModelPackageContainerDefinition + Describes the Docker container for the model package. + + Attributes + ---------------------- + container_hostname: The DNS host name for the Docker container. + image: The Amazon Elastic Container Registry (Amazon ECR) path where inference code is stored. If you are using your own custom algorithm instead of an algorithm provided by SageMaker, the inference code must meet SageMaker requirements. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker. + image_digest: An MD5 hash of the training algorithm that identifies the Docker image used for training. + model_data_url: The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The model artifacts must be in an S3 bucket that is in the same region as the model package. + model_data_source: Specifies the location of ML model data to deploy during endpoint creation. + product_id: The Amazon Web Services Marketplace product ID of the model package. + environment: The environment variables to set in the Docker container. Each key and value in the Environment string to string map can have length of up to 1024. We support up to 16 entries in the map. + model_input: A structure with Model Input details. + framework: The machine learning framework of the model package container image. + framework_version: The framework version of the Model Package Container Image. + nearest_model_name: The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model. You can find a list of benchmarked models by calling ListModelMetadata. + additional_model_data_sources: Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModelPackage action. + additional_s3_data_source: The additional data source that is used during inference in the Docker container for your model package. + model_data_e_tag: The ETag associated with Model Data URL. + is_checkpoint: Specifies whether the model data is a training checkpoint. + base_model: Identifies the foundation model that was used as the starting point for model customization. + """ + + container_hostname: Optional[StrPipeVar] = Unassigned() + image: Optional[StrPipeVar] = Unassigned() + image_digest: Optional[StrPipeVar] = Unassigned() + model_data_url: Optional[StrPipeVar] = Unassigned() + model_data_source: Optional[ModelDataSource] = Unassigned() + product_id: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + model_input: Optional[ModelInput] = Unassigned() + framework: Optional[StrPipeVar] = Unassigned() + framework_version: Optional[StrPipeVar] = Unassigned() + nearest_model_name: Optional[StrPipeVar] = Unassigned() + additional_model_data_sources: Optional[List[AdditionalModelDataSource]] = Unassigned() + additional_s3_data_source: Optional[AdditionalS3DataSource] = Unassigned() + model_data_e_tag: Optional[StrPipeVar] = Unassigned() + is_checkpoint: Optional[bool] = Unassigned() + base_model: Optional[BaseModel] = Unassigned() + + +class AdditionalInferenceSpecificationDefinition(Base): + """ + AdditionalInferenceSpecificationDefinition + A structure of additional Inference Specification. Additional Inference Specification specifies details about inference jobs that can be run with models based on this model package + + Attributes + ---------------------- + name: A unique name to identify the additional inference specification. The name must be unique within the list of your additional inference specifications for a particular model package. + description: A description of the additional Inference specification + containers: The Amazon ECR registry path of the Docker image that contains the inference code. + supported_transform_instance_types: A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed. + supported_realtime_inference_instance_types: A list of the instance types that are used to generate inferences in real-time. + supported_content_types: The supported MIME types for the input data. + supported_response_mime_types: The supported MIME types for the output data. + """ + + name: StrPipeVar + containers: List[ModelPackageContainerDefinition] + description: Optional[StrPipeVar] = Unassigned() + supported_transform_instance_types: Optional[List[StrPipeVar]] = Unassigned() + supported_realtime_inference_instance_types: Optional[List[StrPipeVar]] = Unassigned() + supported_content_types: Optional[List[StrPipeVar]] = Unassigned() + supported_response_mime_types: Optional[List[StrPipeVar]] = Unassigned() + + +class AgentVersion(Base): + """ + AgentVersion + Edge Manager agent version. + + Attributes + ---------------------- + version: Version of the agent. + agent_count: The number of Edge Manager agents. + """ + + version: StrPipeVar + agent_count: int + + +class Alarm(Base): + """ + Alarm + An Amazon CloudWatch alarm configured to monitor metrics on an endpoint. + + Attributes + ---------------------- + alarm_name: The name of a CloudWatch alarm in your account. + """ + + alarm_name: Optional[StrPipeVar] = 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: StrPipeVar + + +class MetricDefinition(Base): + """ + MetricDefinition + Specifies a metric that the training algorithm writes to stderr or stdout. You can view these logs to understand how your training job performs and check for any errors encountered during training. SageMaker hyperparameter tuning captures all defined metrics. Specify one of the defined metrics to use as an objective metric using the TuningObjective parameter in the HyperParameterTrainingJobDefinition API to evaluate job performance during hyperparameter tuning. + + Attributes + ---------------------- + name: The name of the metric. + regex: A regular expression that searches the output of a training job and gets the value of the metric. For more information about using regular expressions to define metrics, see Defining metrics and environment variables. + """ + + name: StrPipeVar + regex: StrPipeVar + + +class TrainingRepositoryAuthConfig(Base): + """ + TrainingRepositoryAuthConfig + An object containing authentication information for a private Docker registry. + + Attributes + ---------------------- + training_repository_credentials_provider_arn: The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function used to give SageMaker access credentials to your private Docker registry. + """ + + training_repository_credentials_provider_arn: StrPipeVar + + +class TrainingImageConfig(Base): + """ + TrainingImageConfig + The configuration to use an image from a private Docker registry for a training job. + + Attributes + ---------------------- + training_repository_access_mode: The method that your training job will use to gain access to the images in your private Docker registry. For access to an image in a private Docker registry, set to Vpc. + training_repository_auth_config: An object containing authentication information for a private Docker registry containing your training images. + """ + + training_repository_access_mode: StrPipeVar + training_repository_auth_config: Optional[TrainingRepositoryAuthConfig] = Unassigned() + + +class AlgorithmSpecification(Base): + """ + AlgorithmSpecification + Specifies the training algorithm to use in a CreateTrainingJob request. SageMaker uses its own SageMaker account credentials to pull and access built-in algorithms so built-in algorithms are universally accessible across all Amazon Web Services accounts. As a result, built-in algorithms have standard, unrestricted access. You cannot restrict built-in algorithms using IAM roles. Use custom algorithms if you require specific access controls. For more information about algorithms provided by SageMaker, see Algorithms. For information about using your own algorithms, see Using Your Own Algorithms with Amazon SageMaker. + + Attributes + ---------------------- + training_image: The registry path of the Docker image that contains the training algorithm. For information about docker registry paths for SageMaker built-in algorithms, see Docker Registry Paths and Example Code in the Amazon SageMaker developer guide. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information about using your custom training container, see Using Your Own Algorithms with Amazon SageMaker. You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter. For more information, see the note in the AlgorithmName parameter description. + algorithm_name: The name of the algorithm resource to use for the training job. This must be an algorithm resource that you created or subscribe to on Amazon Web Services Marketplace. You must specify either the algorithm name to the AlgorithmName parameter or the image URI of the algorithm container to the TrainingImage parameter. Note that the AlgorithmName parameter is mutually exclusive with the TrainingImage parameter. If you specify a value for the AlgorithmName parameter, you can't specify a value for TrainingImage, and vice versa. If you specify values for both parameters, the training job might break; if you don't specify any value for both parameters, the training job might raise a null error. + training_input_mode + metric_definitions: A list of metric definition objects. Each object specifies the metric name and regular expressions used to parse algorithm logs. SageMaker publishes each metric to Amazon CloudWatch. + enable_sage_maker_metrics_time_series: To generate and save time-series metrics during training, set to true. The default is false and time-series metrics aren't generated except in the following cases: You use one of the SageMaker built-in algorithms You use one of the following Prebuilt SageMaker Docker Images: Tensorflow (version >= 1.15) MXNet (version >= 1.6) PyTorch (version >= 1.3) You specify at least one MetricDefinition + container_entrypoint: The entrypoint script for a Docker container used to run a training job. This script takes precedence over the default train processing instructions. See How Amazon SageMaker Runs Your Training Image for more information. + container_arguments: The arguments for a container used to run a training job. See How Amazon SageMaker Runs Your Training Image for additional information. + training_image_config: The configuration to use an image from a private Docker registry for a training job. + """ + + training_input_mode: StrPipeVar + training_image: Optional[StrPipeVar] = Unassigned() + algorithm_name: Optional[Union[StrPipeVar, object]] = Unassigned() + metric_definitions: Optional[List[MetricDefinition]] = Unassigned() + enable_sage_maker_metrics_time_series: Optional[bool] = Unassigned() + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + training_image_config: Optional[TrainingImageConfig] = Unassigned() + + +class AlgorithmStatusItem(Base): + """ + AlgorithmStatusItem + Represents the overall status of an algorithm. + + Attributes + ---------------------- + name: The name of the algorithm for which the overall status is being reported. + status: The current status. + failure_reason: if the overall status is Failed, the reason for the failure. + """ + + name: StrPipeVar + status: StrPipeVar + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class AlgorithmStatusDetails(Base): + """ + AlgorithmStatusDetails + Specifies the validation and image scan statuses of the algorithm. + + Attributes + ---------------------- + validation_statuses: The status of algorithm validation. + image_scan_statuses: The status of the scan of the algorithm's Docker image container. + """ + + validation_statuses: Optional[List[AlgorithmStatusItem]] = Unassigned() + image_scan_statuses: Optional[List[AlgorithmStatusItem]] = Unassigned() + + +class AlgorithmSummary(Base): + """ + AlgorithmSummary + Provides summary information about an algorithm. + + Attributes + ---------------------- + algorithm_name: The name of the algorithm that is described by the summary. + algorithm_arn: The Amazon Resource Name (ARN) of the algorithm. + algorithm_description: A brief description of the algorithm. + creation_time: A timestamp that shows when the algorithm was created. + algorithm_status: The overall status of the algorithm. + """ + + algorithm_name: Union[StrPipeVar, object] + algorithm_arn: StrPipeVar + creation_time: datetime.datetime + algorithm_status: StrPipeVar + algorithm_description: Optional[StrPipeVar] = Unassigned() + + +class HubAccessConfig(Base): + """ + HubAccessConfig + The configuration for a private hub model reference that points to a public SageMaker JumpStart model. For more information about private hubs, see Private curated hubs for foundation model access control in JumpStart. + + Attributes + ---------------------- + hub_content_arn: The ARN of your private model hub content. This should be a ModelReference resource type that points to a SageMaker JumpStart public hub model. + """ + + hub_content_arn: StrPipeVar + + +class S3DataSource(Base): + """ + S3DataSource + Describes the S3 data source. Your input bucket must be in the same Amazon Web Services region as your training job. + + Attributes + ---------------------- + s3_data_type: If you choose S3Prefix, S3Uri identifies a key name prefix. SageMaker uses all objects that match the specified key name prefix for model training. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want SageMaker to use for model training. If you choose AugmentedManifestFile, S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile can only be used if the Channel's input mode is Pipe. If you choose Converse, S3Uri identifies an Amazon S3 location that contains data formatted according to Converse format. This format structures conversational messages with specific roles and content types used for training and fine-tuning foundational models. + s3_uri: Depending on the value specified for the S3DataType, identifies either a key name prefix or a manifest. For example: A key name prefix might look like this: s3://bucketname/exampleprefix/ A manifest might look like this: s3://bucketname/example.manifest A manifest is an S3 object which is a JSON file consisting of an array of elements. The first element is a prefix which is followed by one or more suffixes. SageMaker appends the suffix elements to the prefix to get a full set of S3Uri. Note that the prefix must be a valid non-empty S3Uri that precludes users from specifying a manifest whose individual S3Uri is sourced from different S3 buckets. The following code example shows a valid manifest format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] This JSON is equivalent to the following S3Uri list: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uri in this manifest is the input data for the channel for this data source. The object that each S3Uri points to must be readable by the IAM role that SageMaker uses to perform tasks on your behalf. Your input bucket must be located in same Amazon Web Services region as your training job. + s3_data_distribution_type: If you want SageMaker to replicate the entire dataset on each ML compute instance that is launched for model training, specify FullyReplicated. If you want SageMaker to replicate a subset of data on each ML compute instance that is launched for model training, specify ShardedByS3Key. If there are n ML compute instances launched for a training job, each instance gets approximately 1/n of the number of S3 objects. In this case, model training on each machine uses only the subset of training data. Don't choose more ML compute instances for training than available S3 objects. If you do, some nodes won't get any data and you will pay for nodes that aren't getting any training data. This applies in both File and Pipe modes. Keep this in mind when developing algorithms. In distributed training, where you use multiple ML compute EC2 instances, you might choose ShardedByS3Key. If the algorithm requires copying training data to the ML storage volume (when TrainingInputMode is set to File), this copies 1/n of the number of objects. + attribute_names: A list of one or more attribute names to use that are found in a specified augmented manifest file. + instance_group_names: A list of names of instance groups that get data from the S3 data source. + model_access_config + hub_access_config: The configuration for a private hub model reference that points to a SageMaker JumpStart public hub model. + """ + + s3_data_type: StrPipeVar + s3_uri: StrPipeVar + s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() + attribute_names: Optional[List[StrPipeVar]] = Unassigned() + instance_group_names: Optional[List[StrPipeVar]] = Unassigned() + model_access_config: Optional[ModelAccessConfig] = Unassigned() + hub_access_config: Optional[HubAccessConfig] = Unassigned() + + +class FileSystemDataSource(Base): + """ + FileSystemDataSource + Specifies a file system data source for a channel. + + Attributes + ---------------------- + file_system_id: The file system id. + file_system_access_mode: The access mode of the mount of the directory associated with the channel. A directory can be mounted either in ro (read-only) or rw (read-write) mode. + file_system_type: The file system type. + directory_path: The full path to the directory to associate with the channel. + """ + + file_system_id: StrPipeVar + file_system_access_mode: StrPipeVar + file_system_type: StrPipeVar + directory_path: StrPipeVar + + +class DatasetSource(Base): + """ + DatasetSource + Specifies a dataset source for a channel. + + Attributes + ---------------------- + dataset_arn: The Amazon Resource Name (ARN) of the dataset resource. + """ + + dataset_arn: StrPipeVar + + +class DataSource(Base): + """ + DataSource + Describes the location of the channel data. + + Attributes + ---------------------- + s3_data_source: The S3 location of the data source that is associated with a channel. + file_system_data_source: The file system that is associated with a channel. + dataset_source: The dataset resource that's associated with a channel. + """ + + s3_data_source: Optional[S3DataSource] = Unassigned() + file_system_data_source: Optional[FileSystemDataSource] = Unassigned() + dataset_source: Optional[DatasetSource] = Unassigned() + + +class ShuffleConfig(Base): + """ + ShuffleConfig + A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType, the results of the S3 key prefix matches are shuffled. If you use ManifestFile, the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value. For Pipe input mode, when ShuffleConfig is specified shuffling is done at the start of every epoch. With large datasets, this ensures that the order of the training data is different for each epoch, and it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key, the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch. + + Attributes + ---------------------- + seed: Determines the shuffling order in ShuffleConfig value. + """ + + seed: int + + +class Channel(Base): + """ + Channel + A channel is a named input source that training algorithms can consume. + + Attributes + ---------------------- + channel_name: The name of the channel. + data_source: The location of the channel data. + content_type: The MIME type of the data. + compression_type: If training data is compressed, the compression type. The default value is None. CompressionType is used only in Pipe input mode. In File mode, leave this field unset or set it to None. + record_wrapper_type: Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO. In File mode, leave this field unset or set it to None. + input_mode: (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode, SageMaker uses the value set for TrainingInputMode. Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode. To use a model for incremental training, choose File input model. + shuffle_config: A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType, this shuffles the results of the S3 key prefix matches. If you use ManifestFile, the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value. For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key, the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch. + """ + + channel_name: StrPipeVar + data_source: DataSource + content_type: Optional[StrPipeVar] = Unassigned() + compression_type: Optional[StrPipeVar] = Unassigned() + record_wrapper_type: Optional[StrPipeVar] = Unassigned() + input_mode: Optional[StrPipeVar] = Unassigned() + shuffle_config: Optional[ShuffleConfig] = Unassigned() + + +class OutputDataConfig(Base): + """ + OutputDataConfig + Provides information about how to store model training results (model artifacts). + + Attributes + ---------------------- + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" If you use a KMS key ID or an alias of your KMS key, the SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. If the output data is stored in Amazon S3 Express One Zone, it is encrypted with server-side encryption with Amazon S3 managed keys (SSE-S3). KMS key is not supported for Amazon S3 Express One Zone The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. + s3_output_path: Identifies the S3 path where you want SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix. + compression_type: The model output compression type. Select None to output an uncompressed model, recommended for large model outputs. Defaults to gzip. + """ + + s3_output_path: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + compression_type: Optional[StrPipeVar] = Unassigned() + + +class InstanceGroup(Base): + """ + InstanceGroup + Defines an instance group for heterogeneous cluster training. When requesting a training job using the CreateTrainingJob API, you can configure multiple instance groups . + + Attributes + ---------------------- + instance_type: Specifies the instance type of the instance group. + instance_count: Specifies the number of instances of the instance group. + instance_group_name: Specifies the name of the instance group. + """ + + instance_type: StrPipeVar + instance_count: int + instance_group_name: StrPipeVar + + +class PlacementSpecification(Base): + """ + PlacementSpecification + Specifies how instances should be placed on a specific UltraServer. + + Attributes + ---------------------- + ultra_server_id: The unique identifier of the UltraServer where instances should be placed. + instance_count: The number of ML compute instances required to be placed together on the same UltraServer. Minimum value of 1. + """ + + instance_count: int + ultra_server_id: Optional[StrPipeVar] = Unassigned() + + +class InstancePlacementConfig(Base): + """ + InstancePlacementConfig + Configuration for how instances are placed and allocated within UltraServers. This is only applicable for UltraServer capacity. + + Attributes + ---------------------- + enable_multiple_jobs: If set to true, allows multiple jobs to share the same UltraServer instances. If set to false, ensures this job's instances are placed on an UltraServer exclusively, with no other jobs sharing the same UltraServer. Default is false. + placement_specifications: A list of specifications for how instances should be placed on specific UltraServers. Maximum of 10 items is supported. + """ + + enable_multiple_jobs: Optional[bool] = Unassigned() + placement_specifications: Optional[List[PlacementSpecification]] = Unassigned() + + +class ResourceConfig(Base): + """ + ResourceConfig + Describes the resources, including machine learning (ML) compute instances and ML storage volumes, to use for model training. + + Attributes + ---------------------- + instance_type: The ML compute instance type. + instance_count: The number of ML compute instances to use. For distributed training, provide a value greater than 1. + volume_size_in_gb: The size of the ML storage volume that you want to provision. SageMaker automatically selects the volume size for serverless training jobs. You cannot customize this setting. ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification. When using an ML instance with NVMe SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5. When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML instance families that use EBS volumes include ml.c5 and ml.p2. To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. + volume_kms_key_id: The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job. Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. The VolumeKmsKeyId can be in any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + keep_alive_period_in_seconds: The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. + instance_groups: The configuration of a heterogeneous cluster in JSON format. + training_plan_arn: The Amazon Resource Name (ARN); of the training plan to use for this resource configuration. + instance_placement_config: Configuration for how training job instances are placed and allocated within UltraServers. Only applicable for UltraServer capacity. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[IntPipeVar] = Unassigned() + volume_size_in_gb: Optional[IntPipeVar] = Unassigned() + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + keep_alive_period_in_seconds: Optional[IntPipeVar] = Unassigned() + instance_groups: Optional[List[InstanceGroup]] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + instance_placement_config: Optional[InstancePlacementConfig] = Unassigned() + + +class StoppingCondition(Base): + """ + StoppingCondition + Specifies a limit to how long a job can run. When the job reaches the time limit, SageMaker ends the job. Use this API to cap costs. To stop a training 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. The training algorithms provided by SageMaker automatically save the intermediate results of a model training job when possible. This attempt to save artifacts is only a best effort case as model might not be in a state from which it can be saved. For example, if training has just started, the model might not be ready to save. When saved, this intermediate data is a valid model artifact. You can use it to create a model with CreateModel. The Neural Topic Model (NTM) currently does not support saving intermediate model artifacts. When training NTMs, make sure that the maximum runtime is sufficient for the training job to complete. + + Attributes + ---------------------- + max_runtime_in_seconds: The maximum length of time, in seconds, that a training or compilation job can run before it is stopped. For compilation jobs, if the job does not complete during this time, a TimeOut error is generated. We recommend starting with 900 seconds and increasing as necessary based on your model. For all other jobs, if the job does not complete during this time, SageMaker ends the job. When RetryStrategy is specified in the job request, MaxRuntimeInSeconds specifies the maximum time for all of the attempts in total, not each individual attempt. The default value is 1 day. The maximum value is 28 days. The maximum time that a TrainingJob can run in total, including any time spent publishing metrics or archiving and uploading models after it has been stopped, is 30 days. + max_wait_time_in_seconds: The maximum length of time, in seconds, that a managed Spot training job has to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the job can run. It must be equal to or greater than MaxRuntimeInSeconds. If the job does not complete during this time, SageMaker ends the job. When RetryStrategy is specified in the job request, MaxWaitTimeInSeconds specifies the maximum time for all of the attempts in total, not each individual attempt. + max_pending_time_in_seconds: The maximum length of time, in seconds, that a training or compilation job can be pending before it is stopped. When working with training jobs that use capacity from training plans, not all Pending job states count against the MaxPendingTimeInSeconds limit. The following scenarios do not increment the MaxPendingTimeInSeconds counter: The plan is in a Scheduled state: Jobs queued (in Pending status) before a plan's start date (waiting for scheduled start time) Between capacity reservations: Jobs temporarily back to Pending status between two capacity reservation periods MaxPendingTimeInSeconds only increments when jobs are actively waiting for capacity in an Active plan. + """ + + max_runtime_in_seconds: Optional[int] = Unassigned() + max_wait_time_in_seconds: Optional[int] = Unassigned() + max_pending_time_in_seconds: Optional[int] = Unassigned() + + +class TrainingJobDefinition(Base): + """ + TrainingJobDefinition + Defines the input needed to run a training job using the algorithm. + + Attributes + ---------------------- + training_input_mode + hyper_parameters: The hyperparameters used for the training job. + input_data_config: An array of Channel objects, each of which specifies an input source. + output_data_config: the path to the S3 bucket 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. + 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. + """ + + training_input_mode: StrPipeVar + input_data_config: List[Channel] + output_data_config: OutputDataConfig + resource_config: ResourceConfig + stopping_condition: StoppingCondition + hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class TransformS3DataSource(Base): + """ + TransformS3DataSource + Describes the S3 data source. + + Attributes + ---------------------- + s3_data_type: If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for batch transform. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for batch transform. The following values are compatible: ManifestFile, S3Prefix The following value is not compatible: AugmentedManifestFile + s3_uri: Depending on the value specified for the S3DataType, identifies either a key name prefix or a manifest. For example: A key name prefix might look like this: s3://bucketname/exampleprefix/. A manifest might look like this: s3://bucketname/example.manifest The manifest is an S3 object which is a JSON file with the following format: [ {"prefix": "s3://customer_bucket/some/prefix/"}, "relative/path/to/custdata-1", "relative/path/custdata-2", ... "relative/path/custdata-N" ] The preceding JSON matches the following S3Uris: s3://customer_bucket/some/prefix/relative/path/to/custdata-1 s3://customer_bucket/some/prefix/relative/path/custdata-2 ... s3://customer_bucket/some/prefix/relative/path/custdata-N The complete set of S3Uris in this manifest constitutes the input data for the channel for this datasource. The object that each S3Uris points to must be readable by the IAM role that Amazon SageMaker uses to perform tasks on your behalf. + """ + + s3_data_type: StrPipeVar + s3_uri: StrPipeVar + + +class TransformDataSource(Base): + """ + TransformDataSource + Describes the location of the channel data. + + Attributes + ---------------------- + s3_data_source: The S3 location of the data source that is associated with a channel. + """ + + s3_data_source: TransformS3DataSource + + +class TransformInput(Base): + """ + TransformInput + Describes the input source of a transform job and the way the transform job consumes it. + + Attributes + ---------------------- + data_source: Describes the location of the channel data, which is, the S3 location of the input data that the model can consume. + content_type: The multipurpose internet mail extension (MIME) type of the data. Amazon SageMaker uses the MIME type with each http call to transfer data to the transform job. + compression_type: If your transform data is compressed, specify the compression type. Amazon SageMaker automatically decompresses the data for the transform job accordingly. The default value is None. + split_type: The method to use to split the transform job's data files into smaller batches. Splitting is necessary when the total size of each object is too large to fit in a single request. You can also use data splitting to improve performance by processing multiple concurrent mini-batches. The default value for SplitType is None, which indicates that input data files are not split, and request payloads contain the entire contents of an input object. Set the value of this parameter to Line to split records on a newline character boundary. SplitType also supports a number of record-oriented binary data formats. Currently, the supported record formats are: RecordIO TFRecord When splitting is enabled, the size of a mini-batch depends on the values of the BatchStrategy and MaxPayloadInMB parameters. When the value of BatchStrategy is MultiRecord, Amazon SageMaker sends the maximum number of records in each request, up to the MaxPayloadInMB limit. If the value of BatchStrategy is SingleRecord, Amazon SageMaker sends individual records in each request. Some data formats represent a record as a binary payload wrapped with extra padding bytes. When splitting is applied to a binary data format, padding is removed if the value of BatchStrategy is set to SingleRecord. Padding is not removed if the value of BatchStrategy is set to MultiRecord. For more information about RecordIO, see Create a Dataset Using RecordIO in the MXNet documentation. For more information about TFRecord, see Consuming TFRecord data in the TensorFlow documentation. + """ + + data_source: TransformDataSource + content_type: Optional[StrPipeVar] = Unassigned() + compression_type: Optional[StrPipeVar] = Unassigned() + split_type: Optional[StrPipeVar] = Unassigned() + + +class TransformOutput(Base): + """ + TransformOutput + Describes the results of a transform job. + + Attributes + ---------------------- + s3_output_path: The Amazon S3 path where you want Amazon SageMaker to store the results of the transform job. For example, s3://bucket-name/key-name-prefix. For every S3 object used as input for the transform job, batch transform stores the transformed data with an .out suffix in a corresponding subfolder in the location in the output prefix. For example, for the input data stored at s3://bucket-name/input-name-prefix/dataset01/data.csv, batch transform stores the transformed data at s3://bucket-name/output-name-prefix/input-name-prefix/data.csv.out. Batch transform doesn't upload partially processed objects. For an input S3 object that contains multiple records, it creates an .out file only if the transform job succeeds on the entire file. When the input contains multiple S3 objects, the batch transform job processes the listed S3 objects and uploads only the output for successfully processed objects. If any object fails in the transform job batch transform marks the job as failed to prompt investigation. + accept: The MIME type used to specify the output data. Amazon SageMaker uses the MIME type with each http call to transfer data from the transform job. + assemble_with: Defines how to assemble the results of the transform job as a single S3 object. Choose a format that is most convenient to you. To concatenate the results in binary format, specify None. To add a newline character at the end of every transformed record, specify Line. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. + """ + + s3_output_path: StrPipeVar + accept: Optional[StrPipeVar] = Unassigned() + assemble_with: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class TransformResources(Base): + """ + TransformResources + Describes the resources, including ML instance types and ML instance count, to use for transform job. + + Attributes + ---------------------- + instance_type: The ML compute instance type for the transform job. If you are using built-in algorithms to transform moderately sized datasets, we recommend using ml.m4.xlarge or ml.m5.largeinstance types. + instance_count: The number of ML compute instances to use in the transform job. The default value is 1, and the maximum is 100. For distributed transform jobs, specify a value greater than 1. + volume_kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt model data on the storage volume attached to the ML compute instance(s) that run the batch transform job. Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. The VolumeKmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias + transform_ami_version: Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. al2-ami-sagemaker-batch-gpu-470 Accelerator: GPU NVIDIA driver version: 470 al2-ami-sagemaker-batch-gpu-535 Accelerator: GPU NVIDIA driver version: 535 + """ + + instance_type: StrPipeVar + instance_count: int + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + transform_ami_version: Optional[StrPipeVar] = Unassigned() + + +class TransformJobDefinition(Base): + """ + TransformJobDefinition + Defines the input needed to run a transform job using the inference specification specified in the algorithm. + + Attributes + ---------------------- + max_concurrent_transforms: The maximum number of parallel requests that can be sent to each instance in a transform job. The default value is 1. + max_payload_in_mb: The maximum payload size allowed, in MB. A payload is the data portion of a record (without metadata). + batch_strategy: A string that determines the number of records included in a single mini-batch. SingleRecord means only one record is used per mini-batch. MultiRecord means a mini-batch is set to contain as many records that can fit within the MaxPayloadInMB limit. + environment: The environment variables to set in the Docker container. We support up to 16 key and values entries in the map. + transform_input: A description of the input source and the way the transform job consumes it. + transform_output: Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job. + transform_resources: Identifies the ML compute instances for the transform job. + """ + + transform_input: TransformInput + transform_output: TransformOutput + transform_resources: TransformResources + max_concurrent_transforms: Optional[int] = Unassigned() + max_payload_in_mb: Optional[int] = Unassigned() + batch_strategy: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class AlgorithmValidationProfile(Base): + """ + AlgorithmValidationProfile + Defines a training job and a batch transform job that SageMaker runs to validate your algorithm. The data provided in the validation profile is made available to your buyers on Amazon Web Services Marketplace. + + Attributes + ---------------------- + profile_name: The name of the profile for the algorithm. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen). + training_job_definition: The TrainingJobDefinition object that describes the training job that SageMaker runs to validate your algorithm. + transform_job_definition: The TransformJobDefinition object that describes the transform job that SageMaker runs to validate your algorithm. + """ + + profile_name: StrPipeVar + training_job_definition: TrainingJobDefinition + transform_job_definition: Optional[TransformJobDefinition] = Unassigned() + + +class AlgorithmValidationSpecification(Base): + """ + AlgorithmValidationSpecification + Specifies configurations for one or more training jobs that SageMaker runs to test the algorithm. + + Attributes + ---------------------- + validation_role: The IAM roles that SageMaker uses to run the training jobs. + validation_profiles: An array of AlgorithmValidationProfile objects, each of which specifies a training job and batch transform job that SageMaker runs to validate your algorithm. + """ + + validation_role: StrPipeVar + validation_profiles: List[AlgorithmValidationProfile] + + +class AmazonQSettings(Base): + """ + AmazonQSettings + A collection of settings that configure the Amazon Q experience within the domain. + + Attributes + ---------------------- + status: Whether Amazon Q has been enabled within the domain. + q_profile_arn: The ARN of the Amazon Q profile used within the domain. + """ + + status: Optional[StrPipeVar] = Unassigned() + q_profile_arn: Optional[StrPipeVar] = Unassigned() + + +class AnnotationConsolidationConfig(Base): + """ + AnnotationConsolidationConfig + Configures how labels are consolidated across human workers and processes output data. + + Attributes + ---------------------- + annotation_consolidation_lambda_arn: The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data. For built-in task types, use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for AnnotationConsolidationLambdaArn. For custom labeling workflows, see Post-annotation Lambda. Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes. arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-BoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-BoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-BoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-BoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-BoundingBox Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClass Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClassMultiLabel Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-SemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-SemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-SemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-SemanticSegmentation Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClass Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClassMultiLabel Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label. arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:ACS-NamedEntityRecognition Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoMultiClass Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectDetection Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectTracking 3D Point Cloud Object Detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectDetection 3D Point Cloud Object Tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudSemanticSegmentation Use the following ARNs for Label Verification and Adjustment Jobs Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels . Semantic Segmentation Adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentSemanticSegmentation Semantic Segmentation Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationSemanticSegmentation Bounding Box Adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentBoundingBox Bounding Box Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationBoundingBox Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectDetection Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectTracking 3D Point Cloud Object Detection Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectDetection 3D Point Cloud Object Tracking Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects that appear in a sequence of 3D point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation Adjustment - Use this task type when you want workers to adjust a point-level semantic segmentation masks using a paint tool. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudSemanticSegmentation Generative AI/Custom - Direct passthrough of output data without any transformation. arn:aws:lambda:us-east-1:432418664414:function:ACS-PassThrough arn:aws:lambda:us-east-2:266458841044:function:ACS-PassThrough arn:aws:lambda:us-west-2:081040173940:function:ACS-PassThrough arn:aws:lambda:eu-west-1:568282634449:function:ACS-PassThrough arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-PassThrough arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-PassThrough arn:aws:lambda:ap-south-1:565803892007:function:ACS-PassThrough arn:aws:lambda:eu-central-1:203001061592:function:ACS-PassThrough arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-PassThrough arn:aws:lambda:eu-west-2:487402164563:function:ACS-PassThrough arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-PassThrough arn:aws:lambda:ca-central-1:918755190332:function:ACS-PassThrough + """ + + annotation_consolidation_lambda_arn: StrPipeVar + + +class ResourceSpec(Base): + """ + ResourceSpec + Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on. When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value. + + Attributes + ---------------------- + sage_maker_image_arn: The ARN of the SageMaker AI image that the image version belongs to. + sage_maker_image_version_arn: The ARN of the image version created on the instance. To clear the value set for SageMakerImageVersionArn, pass None as the value. + sage_maker_image_version_alias: The SageMakerImageVersionAlias of the image to launch with. This value is in SemVer 2.0.0 versioning format. + instance_type: The instance type that the image version runs on. JupyterServer apps only support the system value. For KernelGateway apps, the system value is translated to ml.t3.medium. KernelGateway apps also support all other values for available instance types. + lifecycle_config_arn: The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource. + """ + + sage_maker_image_arn: Optional[StrPipeVar] = Unassigned() + sage_maker_image_version_arn: Optional[StrPipeVar] = Unassigned() + sage_maker_image_version_alias: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + + +class AppDetails(Base): + """ + AppDetails + Details about an Amazon SageMaker AI app. + + Attributes + ---------------------- + domain_id: The domain ID. + user_profile_name: The user profile name. + space_name: The name of the space. + app_type: The type of app. + app_name: The name of the app. + status: The status. + creation_time: The creation time. + resource_spec + """ + + domain_id: Optional[StrPipeVar] = Unassigned() + user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() + space_name: Optional[Union[StrPipeVar, object]] = Unassigned() + app_type: Optional[StrPipeVar] = Unassigned() + app_name: Optional[Union[StrPipeVar, object]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + resource_spec: Optional[ResourceSpec] = Unassigned() + + +class KernelSpec(Base): + """ + KernelSpec + The specification of a Jupyter kernel. + + Attributes + ---------------------- + name: The name of the Jupyter kernel in the image. This value is case sensitive. + display_name: The display name of the kernel. + """ + + name: StrPipeVar + display_name: Optional[StrPipeVar] = Unassigned() + + +class FileSystemConfig(Base): + """ + FileSystemConfig + The Amazon Elastic File System storage configuration for a SageMaker AI image. + + Attributes + ---------------------- + mount_path: The path within the image to mount the user's EFS home directory. The directory should be empty. If not specified, defaults to /home/sagemaker-user. + default_uid: The default POSIX user ID (UID). If not specified, defaults to 1000. + default_gid: The default POSIX group ID (GID). If not specified, defaults to 100. + """ + + mount_path: Optional[StrPipeVar] = Unassigned() + default_uid: Optional[int] = Unassigned() + default_gid: Optional[int] = Unassigned() + + +class KernelGatewayImageConfig(Base): + """ + KernelGatewayImageConfig + The configuration for the file system and kernels in a SageMaker AI image running as a KernelGateway app. + + Attributes + ---------------------- + kernel_specs: The specification of the Jupyter kernels in the image. + file_system_config: The Amazon Elastic File System storage configuration for a SageMaker AI image. + """ + + kernel_specs: List[KernelSpec] + file_system_config: Optional[FileSystemConfig] = Unassigned() + + +class ContainerConfig(Base): + """ + ContainerConfig + The configuration used to run the application image container. + + Attributes + ---------------------- + container_arguments: The arguments for the container when you're running the application. + container_entrypoint: The entrypoint used to run the application in the container. + container_environment_variables: The environment variables to set in the container + """ + + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_environment_variables: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class JupyterLabAppImageConfig(Base): + """ + JupyterLabAppImageConfig + The configuration for the file system and kernels in a SageMaker AI image running as a JupyterLab app. The FileSystemConfig object is not supported. + + Attributes + ---------------------- + file_system_config + container_config + """ + + file_system_config: Optional[FileSystemConfig] = Unassigned() + container_config: Optional[ContainerConfig] = Unassigned() + + +class CodeEditorAppImageConfig(Base): + """ + CodeEditorAppImageConfig + The configuration for the file system and kernels in a SageMaker image running as a Code Editor app. The FileSystemConfig object is not supported. + + Attributes + ---------------------- + file_system_config + container_config + """ + + file_system_config: Optional[FileSystemConfig] = Unassigned() + container_config: Optional[ContainerConfig] = Unassigned() + + +class AppImageConfigDetails(Base): + """ + AppImageConfigDetails + The configuration for running a SageMaker AI image as a KernelGateway app. + + Attributes + ---------------------- + app_image_config_arn: The ARN of the AppImageConfig. + app_image_config_name: The name of the AppImageConfig. Must be unique to your account. + creation_time: When the AppImageConfig was created. + last_modified_time: When the AppImageConfig was last modified. + kernel_gateway_image_config: The configuration for the file system and kernels in the SageMaker AI image. + jupyter_lab_app_image_config: The configuration for the file system and the runtime, such as the environment variables and entry point. + code_editor_app_image_config: The configuration for the file system and the runtime, such as the environment variables and entry point. + """ + + app_image_config_arn: Optional[StrPipeVar] = Unassigned() + app_image_config_name: Optional[Union[StrPipeVar, object]] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned() + jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned() + code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned() + + +class IdleSettings(Base): + """ + IdleSettings + Settings related to idle shutdown of Studio applications. + + Attributes + ---------------------- + lifecycle_management: Indicates whether idle shutdown is activated for the application type. + idle_timeout_in_minutes: The time that SageMaker waits after the application becomes idle before shutting it down. + min_idle_timeout_in_minutes: The minimum value in minutes that custom idle shutdown can be set to by the user. + max_idle_timeout_in_minutes: The maximum value in minutes that custom idle shutdown can be set to by the user. + """ + + lifecycle_management: Optional[StrPipeVar] = Unassigned() + idle_timeout_in_minutes: Optional[int] = Unassigned() + min_idle_timeout_in_minutes: Optional[int] = Unassigned() + max_idle_timeout_in_minutes: Optional[int] = Unassigned() + + +class AppLifecycleManagement(Base): + """ + AppLifecycleManagement + Settings that are used to configure and manage the lifecycle of Amazon SageMaker Studio applications. + + Attributes + ---------------------- + idle_settings: Settings related to idle shutdown of Studio applications. + """ + + idle_settings: Optional[IdleSettings] = Unassigned() + + +class AppSpecification(Base): + """ + AppSpecification + Configuration to run a processing job in a specified container image. + + Attributes + ---------------------- + image_uri: The container image to be run by the processing job. + container_entrypoint: The entrypoint for a container used to run a processing job. + container_arguments: The arguments for a container used to run a processing job. + """ + + image_uri: StrPipeVar + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + + +class ArtifactSourceType(Base): + """ + ArtifactSourceType + The ID and ID type of an artifact source. + + Attributes + ---------------------- + source_id_type: The type of ID. + value: The ID. + """ + + source_id_type: StrPipeVar + value: StrPipeVar + + +class ArtifactSource(Base): + """ + ArtifactSource + A structure describing the source of an artifact. + + Attributes + ---------------------- + source_uri: The URI of the source. + source_types: A list of source types. + """ + + source_uri: StrPipeVar + source_types: Optional[List[ArtifactSourceType]] = Unassigned() + + +class ArtifactSummary(Base): + """ + ArtifactSummary + Lists a summary of the properties of an artifact. An artifact represents a URI addressable object or data. Some examples are a dataset and a model. + + Attributes + ---------------------- + artifact_arn: The Amazon Resource Name (ARN) of the artifact. + artifact_name: The name of the artifact. + source: The source of the artifact. + artifact_type: The type of the artifact. + creation_time: When the artifact was created. + last_modified_time: When the artifact was last modified. + """ + + artifact_arn: Optional[StrPipeVar] = Unassigned() + artifact_name: Optional[Union[StrPipeVar, object]] = Unassigned() + source: Optional[ArtifactSource] = Unassigned() + artifact_type: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class AssociationInfo(Base): + """ + AssociationInfo + The data type used to describe the relationship between different sources. + + Attributes + ---------------------- + source_arn: The Amazon Resource Name (ARN) of the AssociationInfo source. + destination_arn: The Amazon Resource Name (ARN) of the AssociationInfo destination. + """ + + source_arn: StrPipeVar + destination_arn: StrPipeVar + + +class IamIdentity(Base): + """ + IamIdentity + The IAM Identity details associated with the user. These details are associated with model package groups, model packages and project entities only. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the IAM identity. + principal_id: The ID of the principal that assumes the IAM identity. + source_identity: The person or application which assumes the IAM identity. + """ + + arn: Optional[StrPipeVar] = Unassigned() + principal_id: Optional[StrPipeVar] = Unassigned() + source_identity: Optional[StrPipeVar] = Unassigned() + + +class UserContext(Base): + """ + UserContext + Information about the user who created or modified a SageMaker resource. + + Attributes + ---------------------- + user_profile_arn: The Amazon Resource Name (ARN) of the user's profile. + user_profile_name: The name of the user's profile. + domain_id: The domain associated with the user. + iam_identity: The IAM Identity details associated with the user. These details are associated with model package groups, model packages, and project entities only. + """ + + user_profile_arn: Optional[StrPipeVar] = Unassigned() + user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() + domain_id: Optional[StrPipeVar] = Unassigned() + iam_identity: Optional[IamIdentity] = Unassigned() + + +class AssociationSummary(Base): + """ + AssociationSummary + Lists a summary of the properties of an association. An association is an entity that links other lineage or experiment entities. An example would be an association between a training job and a model. + + Attributes + ---------------------- + source_arn: The ARN of the source. + destination_arn: The Amazon Resource Name (ARN) of the destination. + source_type: The source type. + destination_type: The destination type. + association_type: The type of the association. + source_name: The name of the source. + destination_name: The name of the destination. + creation_time: When the association was created. + created_by + """ + + source_arn: Optional[StrPipeVar] = Unassigned() + destination_arn: Optional[StrPipeVar] = Unassigned() + source_type: Optional[StrPipeVar] = Unassigned() + destination_type: Optional[StrPipeVar] = Unassigned() + association_type: Optional[StrPipeVar] = Unassigned() + source_name: Optional[StrPipeVar] = Unassigned() + destination_name: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + + +class AsyncInferenceClientConfig(Base): + """ + AsyncInferenceClientConfig + Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference. + + Attributes + ---------------------- + max_concurrent_invocations_per_instance: The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value. + """ + + max_concurrent_invocations_per_instance: Optional[int] = Unassigned() + + +class AsyncInferenceNotificationConfig(Base): + """ + AsyncInferenceNotificationConfig + Specifies the configuration for notifications of inference results for asynchronous inference. + + Attributes + ---------------------- + success_topic: Amazon SNS topic to post a notification to when inference completes successfully. If no topic is provided, no notification is sent on success. + error_topic: Amazon SNS topic to post a notification to when inference fails. If no topic is provided, no notification is sent on failure. + include_inference_response_in: The Amazon SNS topics where you want the inference response to be included. The inference response is included only if the response size is less than or equal to 128 KB. + """ + + success_topic: Optional[StrPipeVar] = Unassigned() + error_topic: Optional[StrPipeVar] = Unassigned() + include_inference_response_in: Optional[List[StrPipeVar]] = Unassigned() + + +class AsyncInferenceOutputConfig(Base): + """ + AsyncInferenceOutputConfig + Specifies the configuration for asynchronous inference invocation outputs. + + Attributes + ---------------------- + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the asynchronous inference output in Amazon S3. + s3_output_path: The Amazon S3 location to upload inference responses to. + notification_config: Specifies the configuration for notifications of inference results for asynchronous inference. + s3_failure_path: The Amazon S3 location to upload failure inference responses to. + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + s3_output_path: Optional[StrPipeVar] = Unassigned() + notification_config: Optional[AsyncInferenceNotificationConfig] = Unassigned() + s3_failure_path: Optional[StrPipeVar] = Unassigned() + + +class AsyncInferenceConfig(Base): + """ + AsyncInferenceConfig + Specifies configuration for how an endpoint performs asynchronous inference. + + Attributes + ---------------------- + client_config: Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference. + output_config: Specifies the configuration for asynchronous inference invocation outputs. + """ + + output_config: AsyncInferenceOutputConfig + client_config: Optional[AsyncInferenceClientConfig] = Unassigned() + + +class AthenaDatasetDefinition(Base): + """ + AthenaDatasetDefinition + Configuration for Athena Dataset Definition input. + + Attributes + ---------------------- + catalog + database + query_string + work_group + output_s3_uri: The location in Amazon S3 where Athena query results are stored. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data generated from an Athena query execution. + output_format + output_compression + """ + + catalog: StrPipeVar + database: StrPipeVar + query_string: StrPipeVar + output_s3_uri: StrPipeVar + output_format: StrPipeVar + work_group: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + output_compression: Optional[StrPipeVar] = Unassigned() + + +class AuthorizedUrl(Base): + """ + AuthorizedUrl + Contains a presigned URL and its associated local file path for downloading hub content artifacts. + + Attributes + ---------------------- + url: The presigned S3 URL that provides temporary, secure access to download the file. URLs expire within 15 minutes for security purposes. + local_path: The recommended local file path where the downloaded file should be stored to maintain proper directory structure and file organization. + """ + + url: Optional[StrPipeVar] = Unassigned() + local_path: Optional[StrPipeVar] = Unassigned() + + +class AutoMLAlgorithmConfig(Base): + """ + AutoMLAlgorithmConfig + The selection of algorithms trained on your dataset to generate the model candidates for an Autopilot job. + + Attributes + ---------------------- + auto_ml_algorithms: The selection of algorithms trained on your dataset to generate the model candidates for an Autopilot job. For the tabular problem type TabularJobConfig: Selected algorithms must belong to the list corresponding to the training mode set in AutoMLJobConfig.Mode (ENSEMBLING or HYPERPARAMETER_TUNING). Choose a minimum of 1 algorithm. In ENSEMBLING mode: "catboost" "extra-trees" "fastai" "lightgbm" "linear-learner" "nn-torch" "randomforest" "xgboost" In HYPERPARAMETER_TUNING mode: "linear-learner" "mlp" "xgboost" For the time-series forecasting problem type TimeSeriesForecastingJobConfig: Choose your algorithms from this list. "cnn-qr" "deepar" "prophet" "arima" "npts" "ets" + """ + + auto_ml_algorithms: List[StrPipeVar] + + +class FinalAutoMLJobObjectiveMetric(Base): + """ + FinalAutoMLJobObjectiveMetric + The best candidate result from an AutoML training job. + + Attributes + ---------------------- + type: The type of metric with the best result. + metric_name: The name of the metric with the best result. For a description of the possible objective metrics, see AutoMLJobObjective$MetricName. + value: The value of the metric with the best result. + standard_metric_name: The name of the standard metric. For a description of the standard metrics, see Autopilot candidate metrics. + """ + + metric_name: StrPipeVar + value: float + type: Optional[StrPipeVar] = Unassigned() + standard_metric_name: Optional[StrPipeVar] = Unassigned() + + +class AutoMLCandidateStep(Base): + """ + AutoMLCandidateStep + Information about the steps for a candidate and what step it is working on. + + Attributes + ---------------------- + candidate_step_type: Whether the candidate is at the transform, training, or processing step. + candidate_step_arn: The ARN for the candidate's step. + candidate_step_name: The name for the candidate's step. + """ + + candidate_step_type: StrPipeVar + candidate_step_arn: StrPipeVar + candidate_step_name: StrPipeVar + + +class AutoMLContainerDefinition(Base): + """ + AutoMLContainerDefinition + A list of container definitions that describe the different containers that make up an AutoML candidate. For more information, see ContainerDefinition. + + Attributes + ---------------------- + image: The Amazon Elastic Container Registry (Amazon ECR) path of the container. For more information, see ContainerDefinition. + model_data_url: The location of the model artifacts. For more information, see ContainerDefinition. + environment: The environment variables to set in the container. For more information, see ContainerDefinition. + """ + + image: StrPipeVar + model_data_url: StrPipeVar + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class CandidateArtifactLocations(Base): + """ + CandidateArtifactLocations + The location of artifacts for an AutoML candidate job. + + Attributes + ---------------------- + explainability: The Amazon S3 prefix to the explainability artifacts generated for the AutoML candidate. + model_insights: The Amazon S3 prefix to the model insight artifacts generated for the AutoML candidate. + backtest_results: The Amazon S3 prefix to the accuracy metrics and the inference results observed over the testing window. Available only for the time-series forecasting problem type. + """ + + explainability: StrPipeVar + model_insights: Optional[StrPipeVar] = Unassigned() + backtest_results: Optional[StrPipeVar] = Unassigned() + + +class MetricDatum(Base): + """ + MetricDatum + Information about the metric for a candidate produced by an AutoML job. + + Attributes + ---------------------- + metric_name: The name of the metric. + standard_metric_name: The name of the standard metric. For definitions of the standard metrics, see Autopilot candidate metrics . + value: The value of the metric. + set: The dataset split from which the AutoML job produced the metric. + """ + + metric_name: Optional[StrPipeVar] = Unassigned() + standard_metric_name: Optional[StrPipeVar] = Unassigned() + value: Optional[float] = Unassigned() + set: Optional[StrPipeVar] = Unassigned() + + +class CandidateProperties(Base): + """ + CandidateProperties + The properties of an AutoML candidate job. + + Attributes + ---------------------- + candidate_artifact_locations: The Amazon S3 prefix to the artifacts generated for an AutoML candidate. + candidate_metrics: Information about the candidate metrics for an AutoML job. + """ + + candidate_artifact_locations: Optional[CandidateArtifactLocations] = Unassigned() + candidate_metrics: Optional[List[MetricDatum]] = Unassigned() + + +class AutoMLCandidate(Base): + """ + AutoMLCandidate + Information about a candidate produced by an AutoML training job, including its status, steps, and other properties. + + Attributes + ---------------------- + candidate_name: The name of the candidate. + final_auto_ml_job_objective_metric + objective_status: The objective's status. + candidate_steps: Information about the candidate's steps. + candidate_status: The candidate's status. + inference_containers: Information about the recommended inference container definitions. + creation_time: The creation time. + end_time: The end time. + last_modified_time: The last modified time. + failure_reason: The failure reason. + candidate_properties: The properties of an AutoML candidate job. + inference_container_definitions: The mapping of all supported processing unit (CPU, GPU, etc...) to inference container definitions for the candidate. This field is populated for the AutoML jobs V2 (for example, for jobs created by calling CreateAutoMLJobV2) related to image or text classification problem types only. + """ + + candidate_name: StrPipeVar + objective_status: StrPipeVar + candidate_steps: List[AutoMLCandidateStep] + candidate_status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + final_auto_ml_job_objective_metric: Optional[FinalAutoMLJobObjectiveMetric] = Unassigned() + inference_containers: Optional[List[AutoMLContainerDefinition]] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + candidate_properties: Optional[CandidateProperties] = Unassigned() + inference_container_definitions: Optional[Dict[StrPipeVar, List[AutoMLContainerDefinition]]] = ( + Unassigned() + ) + + +class AutoMLCandidateGenerationConfig(Base): + """ + AutoMLCandidateGenerationConfig + Stores the configuration information for how a candidate is generated (optional). + + Attributes + ---------------------- + feature_specification_s3_uri: A URL to the Amazon S3 data source containing selected features from the input data source to run an Autopilot job. You can input FeatureAttributeNames (optional) in JSON format as shown below: { "FeatureAttributeNames":["col1", "col2", ...] }. You can also specify the data type of the feature (optional) in the format shown below: { "FeatureDataTypes":{"col1":"numeric", "col2":"categorical" ... } } These column keys may not include the target column. In ensembling mode, Autopilot only supports the following data types: numeric, categorical, text, and datetime. In HPO mode, Autopilot can support numeric, categorical, text, datetime, and sequence. If only FeatureDataTypes is provided, the column keys (col1, col2,..) should be a subset of the column names in the input data. If both FeatureDataTypes and FeatureAttributeNames are provided, then the column keys should be a subset of the column names provided in FeatureAttributeNames. The key name FeatureAttributeNames is fixed. The values listed in ["col1", "col2", ...] are case sensitive and should be a list of strings containing unique values that are a subset of the column names in the input data. The list of columns provided must not include the target column. + algorithms_config: Stores the configuration information for the selection of algorithms trained on tabular data. The list of available algorithms to choose from depends on the training mode set in TabularJobConfig.Mode . AlgorithmsConfig should not be set if the training mode is set on AUTO. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode. For the list of all algorithms per problem type and training mode, see AutoMLAlgorithmConfig. For more information on each algorithm, see the Algorithm support section in Autopilot developer guide. + """ + + feature_specification_s3_uri: Optional[StrPipeVar] = Unassigned() + algorithms_config: Optional[List[AutoMLAlgorithmConfig]] = Unassigned() + + +class AutoMLS3DataSource(Base): + """ + AutoMLS3DataSource + Describes the Amazon S3 data source. + + Attributes + ---------------------- + s3_data_type: The data type. If you choose S3Prefix, S3Uri identifies a key name prefix. SageMaker AI uses all objects that match the specified key name prefix for model training. The S3Prefix should have the following format: s3://DOC-EXAMPLE-BUCKET/DOC-EXAMPLE-FOLDER-OR-FILE If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want SageMaker AI to use for model training. A ManifestFile should have the format shown below: [ {"prefix": "s3://DOC-EXAMPLE-BUCKET/DOC-EXAMPLE-FOLDER/DOC-EXAMPLE-PREFIX/"}, "DOC-EXAMPLE-RELATIVE-PATH/DOC-EXAMPLE-FOLDER/DATA-1", "DOC-EXAMPLE-RELATIVE-PATH/DOC-EXAMPLE-FOLDER/DATA-2", ... "DOC-EXAMPLE-RELATIVE-PATH/DOC-EXAMPLE-FOLDER/DATA-N" ] If you choose AugmentedManifestFile, S3Uri identifies an object that is an augmented manifest file in JSON lines format. This file contains the data you want to use for model training. AugmentedManifestFile is available for V2 API jobs only (for example, for jobs created by calling CreateAutoMLJobV2). Here is a minimal, single-record example of an AugmentedManifestFile: {"source-ref": "s3://DOC-EXAMPLE-BUCKET/DOC-EXAMPLE-FOLDER/cats/cat.jpg", "label-metadata": {"class-name": "cat" } For more information on AugmentedManifestFile, see Provide Dataset Metadata to Training Jobs with an Augmented Manifest File. + s3_uri: The URL to the Amazon S3 data source. The Uri refers to the Amazon S3 prefix or ManifestFile depending on the data type. + """ + + s3_data_type: StrPipeVar + s3_uri: StrPipeVar + + +class AutoMLDataSource(Base): + """ + AutoMLDataSource + The data source for the Autopilot job. + + Attributes + ---------------------- + s3_data_source: The Amazon S3 location of the input data. + """ + + s3_data_source: AutoMLS3DataSource + + +class AutoMLChannel(Base): + """ + AutoMLChannel + A channel is a named input source that training algorithms can consume. The validation dataset size is limited to less than 2 GB. The training dataset size must be less than 100 GB. For more information, see Channel. A validation dataset must contain the same headers as the training dataset. + + Attributes + ---------------------- + data_source: The data source for an AutoML channel. + compression_type: You can use Gzip or None. The default value is None. + target_attribute_name: The name of the target variable in supervised learning, usually represented by 'y'. + content_type: The content type of the data from the input source. You can use text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. + channel_type: The channel type (optional) is an enum string. The default value is training. Channels for training and validation must share the same ContentType and TargetAttributeName. For information on specifying training and validation channel types, see How to specify training and validation datasets. + sample_weight_attribute_name: If specified, this column name indicates which column of the dataset should be treated as sample weights for use by the objective metric during the training, evaluation, and the selection of the best model. This column is not considered as a predictive feature. For more information on Autopilot metrics, see Metrics and validation. Sample weights should be numeric, non-negative, with larger values indicating which rows are more important than others. Data points that have invalid or no weight value are excluded. Support for sample weights is available in Ensembling mode only. + """ + + target_attribute_name: StrPipeVar + data_source: Optional[AutoMLDataSource] = Unassigned() + compression_type: Optional[StrPipeVar] = Unassigned() + content_type: Optional[StrPipeVar] = Unassigned() + channel_type: Optional[StrPipeVar] = Unassigned() + sample_weight_attribute_name: Optional[StrPipeVar] = Unassigned() + + +class EmrServerlessComputeConfig(Base): + """ + EmrServerlessComputeConfig + This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment. Specifies the compute configuration for the EMR Serverless job. + + Attributes + ---------------------- + execution_role_arn: The ARN of the IAM role granting the AutoML job V2 the necessary permissions access policies to list, connect to, or manage EMR Serverless jobs. For detailed information about the required permissions of this role, see "How to configure AutoML to initiate a remote job on EMR Serverless for large datasets" in Create a regression or classification job for tabular data using the AutoML API or Create an AutoML job for time-series forecasting using the API. + """ + + execution_role_arn: StrPipeVar + + +class AutoMLComputeConfig(Base): + """ + AutoMLComputeConfig + This data type is intended for use exclusively by SageMaker Canvas and cannot be used in other contexts at the moment. Specifies the compute configuration for an AutoML job V2. + + Attributes + ---------------------- + emr_serverless_compute_config: The configuration for using EMR Serverless to run the AutoML job V2. To allow your AutoML job V2 to automatically initiate a remote job on EMR Serverless when additional compute resources are needed to process large datasets, you need to provide an EmrServerlessComputeConfig object, which includes an ExecutionRoleARN attribute, to the AutoMLComputeConfig of the AutoML job V2 input request. By seamlessly transitioning to EMR Serverless when required, the AutoML job can handle datasets that would otherwise exceed the initially provisioned resources, without any manual intervention from you. EMR Serverless is available for the tabular and time series problem types. We recommend setting up this option for tabular datasets larger than 5 GB and time series datasets larger than 30 GB. + """ + + emr_serverless_compute_config: Optional[EmrServerlessComputeConfig] = Unassigned() + + +class AutoMLDataSplitConfig(Base): + """ + AutoMLDataSplitConfig + This structure specifies how to split the data into train and validation datasets. The validation and training datasets must contain the same headers. For jobs created by calling CreateAutoMLJob, the validation dataset must be less than 2 GB in size. + + Attributes + ---------------------- + validation_fraction: The validation fraction (optional) is a float that specifies the portion of the training dataset to be used for validation. The default value is 0.2, and values must be greater than 0 and less than 1. We recommend setting this value to be less than 0.5. + """ + + validation_fraction: Optional[float] = Unassigned() + + +class AutoMLJobArtifacts(Base): + """ + AutoMLJobArtifacts + The artifacts that are generated during an AutoML job. + + Attributes + ---------------------- + candidate_definition_notebook_location: The URL of the notebook location. + data_exploration_notebook_location: The URL of the notebook location. + """ + + candidate_definition_notebook_location: Optional[StrPipeVar] = Unassigned() + data_exploration_notebook_location: Optional[StrPipeVar] = Unassigned() + + +class AutoMLJobChannel(Base): + """ + AutoMLJobChannel + A channel is a named input source that training algorithms can consume. This channel is used for AutoML jobs V2 (jobs created by calling CreateAutoMLJobV2). + + Attributes + ---------------------- + channel_type: The type of channel. Defines whether the data are used for training or validation. The default value is training. Channels for training and validation must share the same ContentType The type of channel defaults to training for the time-series forecasting problem type. + content_type: The content type of the data from the input source. The following are the allowed content types for different problems: For tabular problem types: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For image classification: image/png, image/jpeg, or image/*. The default value is image/*. For text classification: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For time-series forecasting: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For text generation (LLMs fine-tuning): text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. + compression_type: The allowed compression types depend on the input format and problem type. We allow the compression type Gzip for S3Prefix inputs on tabular data only. For all other inputs, the compression type should be None. If no compression type is provided, we default to None. + data_source: The data source for an AutoML channel (Required). + """ + + channel_type: Optional[StrPipeVar] = Unassigned() + content_type: Optional[StrPipeVar] = Unassigned() + compression_type: Optional[StrPipeVar] = Unassigned() + data_source: Optional[AutoMLDataSource] = Unassigned() + + +class AutoMLJobCompletionCriteria(Base): + """ + AutoMLJobCompletionCriteria + How long a job is allowed to run, or how many candidates a job is allowed to generate. + + Attributes + ---------------------- + max_candidates: The maximum number of times a training job is allowed to run. For text and image classification, time-series forecasting, as well as text generation (LLMs fine-tuning) problem types, the supported value is 1. For tabular problem types, the maximum value is 750. + max_runtime_per_training_job_in_seconds: The maximum time, in seconds, that each training job executed inside hyperparameter tuning is allowed to run as part of a hyperparameter tuning job. For more information, see the StoppingCondition used by the CreateHyperParameterTuningJob action. For job V2s (jobs created by calling CreateAutoMLJobV2), this field controls the runtime of the job candidate. For TextGenerationJobConfig problem types, the maximum time defaults to 72 hours (259200 seconds). + max_auto_ml_job_runtime_in_seconds: The maximum runtime, in seconds, an AutoML job has to complete. If an AutoML job exceeds the maximum runtime, the job is stopped automatically and its processing is ended gracefully. The AutoML job identifies the best model whose training was completed and marks it as the best-performing model. Any unfinished steps of the job, such as automatic one-click Autopilot model deployment, are not completed. + """ + + max_candidates: Optional[int] = Unassigned() + max_runtime_per_training_job_in_seconds: Optional[int] = Unassigned() + max_auto_ml_job_runtime_in_seconds: Optional[int] = Unassigned() + + +class AutoMLSecurityConfig(Base): + """ + AutoMLSecurityConfig + Security options. + + Attributes + ---------------------- + volume_kms_key_id: The key used to encrypt stored data. + enable_inter_container_traffic_encryption: Whether to use traffic encryption between the container layers. + vpc_config: The VPC configuration. + """ + + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + + +class AutoMLJobConfig(Base): + """ + AutoMLJobConfig + A collection of settings used for an AutoML job. + + Attributes + ---------------------- + completion_criteria: How long an AutoML job is allowed to run, or how many candidates a job is allowed to generate. + security_config: The security configuration for traffic encryption or Amazon VPC settings. + candidate_generation_config: The configuration for generating a candidate for an AutoML job (optional). + data_split_config: The configuration for splitting the input training dataset. Type: AutoMLDataSplitConfig + mode: The method that Autopilot uses to train the data. You can either specify the mode manually or let Autopilot choose for you based on the dataset size by selecting AUTO. In AUTO mode, Autopilot chooses ENSEMBLING for datasets smaller than 100 MB, and HYPERPARAMETER_TUNING for larger ones. The ENSEMBLING mode uses a multi-stack ensemble model to predict classification and regression tasks directly from your dataset. This machine learning mode combines several base models to produce an optimal predictive model. It then uses a stacking ensemble method to combine predictions from contributing members. A multi-stack ensemble model can provide better performance over a single model by combining the predictive capabilities of multiple models. See Autopilot algorithm support for a list of algorithms supported by ENSEMBLING mode. The HYPERPARAMETER_TUNING (HPO) mode uses the best hyperparameters to train the best version of a model. HPO automatically selects an algorithm for the type of problem you want to solve. Then HPO finds the best hyperparameters according to your objective metric. See Autopilot algorithm support for a list of algorithms supported by HYPERPARAMETER_TUNING mode. + """ + + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + security_config: Optional[AutoMLSecurityConfig] = Unassigned() + candidate_generation_config: Optional[AutoMLCandidateGenerationConfig] = Unassigned() + data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned() + mode: Optional[StrPipeVar] = Unassigned() + + +class AutoMLJobObjective(Base): + """ + AutoMLJobObjective + Specifies a metric to minimize or maximize as the objective of an AutoML job. + + Attributes + ---------------------- + metric_name: The name of the objective metric used to measure the predictive quality of a machine learning system. During training, the model's parameters are updated iteratively to optimize its performance based on the feedback provided by the objective metric when evaluating the model on the validation dataset. The list of available metrics supported by Autopilot and the default metric applied when you do not specify a metric name explicitly depend on the problem type. For tabular problem types: List of available metrics: Regression: MAE, MSE, R2, RMSE Binary classification: Accuracy, AUC, BalancedAccuracy, F1, Precision, Recall Multiclass classification: Accuracy, BalancedAccuracy, F1macro, PrecisionMacro, RecallMacro For a description of each metric, see Autopilot metrics for classification and regression. Default objective metrics: Regression: MSE. Binary classification: F1. Multiclass classification: Accuracy. For image or text classification problem types: List of available metrics: Accuracy For a description of each metric, see Autopilot metrics for text and image classification. Default objective metrics: Accuracy For time-series forecasting problem types: List of available metrics: RMSE, wQL, Average wQL, MASE, MAPE, WAPE For a description of each metric, see Autopilot metrics for time-series forecasting. Default objective metrics: AverageWeightedQuantileLoss For text generation problem types (LLMs fine-tuning): Fine-tuning language models in Autopilot does not require setting the AutoMLJobObjective field. Autopilot fine-tunes LLMs without requiring multiple candidates to be trained and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your target model to enhance a default objective metric, the cross-entropy loss. After fine-tuning a language model, you can evaluate the quality of its generated text using different metrics. For a list of the available metrics, see Metrics for fine-tuning LLMs in Autopilot. + """ + + metric_name: StrPipeVar + + +class AutoMLJobStepMetadata(Base): + """ + AutoMLJobStepMetadata + Metadata for an AutoML job step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the AutoML job. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class AutoMLPartialFailureReason(Base): + """ + AutoMLPartialFailureReason + The reason for a partial failure of an AutoML job. + + Attributes + ---------------------- + partial_failure_message: The message containing the reason for a partial failure of an AutoML job. + """ + + partial_failure_message: Optional[StrPipeVar] = Unassigned() + + +class AutoMLJobSummary(Base): + """ + AutoMLJobSummary + Provides a summary about an AutoML job. + + Attributes + ---------------------- + auto_ml_job_name: The name of the AutoML job you are requesting. + auto_ml_job_arn: The ARN of the AutoML job. + auto_ml_job_status: The status of the AutoML job. + auto_ml_job_secondary_status: The secondary status of the AutoML job. + creation_time: When the AutoML job was created. + end_time: The end time of an AutoML job. + last_modified_time: When the AutoML job was last modified. + failure_reason: The failure reason of an AutoML job. + partial_failure_reasons: The list of reasons for partial failures within an AutoML job. + """ + + auto_ml_job_name: StrPipeVar + auto_ml_job_arn: StrPipeVar + auto_ml_job_status: StrPipeVar + auto_ml_job_secondary_status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + partial_failure_reasons: Optional[List[AutoMLPartialFailureReason]] = Unassigned() + + +class AutoMLOutputDataConfig(Base): + """ + AutoMLOutputDataConfig + The output data configuration. + + Attributes + ---------------------- + kms_key_id: The Key Management Service encryption key ID. + s3_output_path: The Amazon S3 output path. Must be 512 characters or less. + """ + + s3_output_path: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ImageClassificationJobConfig(Base): + """ + ImageClassificationJobConfig + The collection of settings used by an AutoML job V2 for the image classification problem type. + + Attributes + ---------------------- + completion_criteria: How long a job is allowed to run, or how many candidates a job is allowed to generate. + """ + + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + + +class TextClassificationJobConfig(Base): + """ + TextClassificationJobConfig + The collection of settings used by an AutoML job V2 for the text classification problem type. + + Attributes + ---------------------- + completion_criteria: How long a job is allowed to run, or how many candidates a job is allowed to generate. + content_column: The name of the column used to provide the sentences to be classified. It should not be the same as the target column. + target_label_column: The name of the column used to provide the class labels. It should not be same as the content column. + """ + + content_column: StrPipeVar + target_label_column: StrPipeVar + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + + +class TimeSeriesTransformations(Base): + """ + TimeSeriesTransformations + Transformations allowed on the dataset. Supported transformations are Filling and Aggregation. Filling specifies how to add values to missing values in the dataset. Aggregation defines how to aggregate data that does not align with forecast frequency. + + Attributes + ---------------------- + filling: A key value pair defining the filling method for a column, where the key is the column name and the value is an object which defines the filling logic. You can specify multiple filling methods for a single column. The supported filling methods and their corresponding options are: frontfill: none (Supported only for target column) middlefill: zero, value, median, mean, min, max backfill: zero, value, median, mean, min, max futurefill: zero, value, median, mean, min, max To set a filling method to a specific value, set the fill parameter to the chosen filling method value (for example "backfill" : "value"), and define the filling value in an additional parameter prefixed with "_value". For example, to set backfill to a value of 2, you must include two parameters: "backfill": "value" and "backfill_value":"2". + aggregation: A key value pair defining the aggregation method for a column, where the key is the column name and the value is the aggregation method. The supported aggregation methods are sum (default), avg, first, min, max. Aggregation is only supported for the target column. + """ + + filling: Optional[Dict[StrPipeVar, Dict[StrPipeVar, StrPipeVar]]] = Unassigned() + aggregation: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class TimeSeriesConfig(Base): + """ + TimeSeriesConfig + The collection of components that defines the time-series. + + Attributes + ---------------------- + target_attribute_name: The name of the column representing the target variable that you want to predict for each item in your dataset. The data type of the target variable must be numerical. + timestamp_attribute_name: The name of the column indicating a point in time at which the target value of a given item is recorded. + item_identifier_attribute_name: The name of the column that represents the set of item identifiers for which you want to predict the target value. + grouping_attribute_names: A set of columns names that can be grouped with the item identifier column to create a composite key for which a target value is predicted. + """ + + target_attribute_name: StrPipeVar + timestamp_attribute_name: StrPipeVar + item_identifier_attribute_name: StrPipeVar + grouping_attribute_names: Optional[List[StrPipeVar]] = Unassigned() + + +class HolidayConfigAttributes(Base): + """ + HolidayConfigAttributes + Stores the holiday featurization attributes applicable to each item of time-series datasets during the training of a forecasting model. This allows the model to identify patterns associated with specific holidays. + + Attributes + ---------------------- + country_code: The country code for the holiday calendar. For the list of public holiday calendars supported by AutoML job V2, see Country Codes. Use the country code corresponding to the country of your choice. + """ + + country_code: Optional[StrPipeVar] = Unassigned() + + +class CandidateGenerationConfig(Base): + """ + CandidateGenerationConfig + Stores the configuration information for how model candidates are generated using an AutoML job V2. + + Attributes + ---------------------- + algorithms_config: Your Autopilot job trains a default set of algorithms on your dataset. For tabular and time-series data, you can customize the algorithm list by selecting a subset of algorithms for your problem type. AlgorithmsConfig stores the customized selection of algorithms to train on your data. For the tabular problem type TabularJobConfig, the list of available algorithms to choose from depends on the training mode set in AutoMLJobConfig.Mode . AlgorithmsConfig should not be set when the training mode AutoMLJobConfig.Mode is set to AUTO. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode. For the list of all algorithms per training mode, see AlgorithmConfig. For more information on each algorithm, see the Algorithm support section in the Autopilot developer guide. For the time-series forecasting problem type TimeSeriesForecastingJobConfig, choose your algorithms from the list provided in AlgorithmConfig. For more information on each algorithm, see the Algorithms support for time-series forecasting section in the Autopilot developer guide. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting. + """ + + algorithms_config: Optional[List[AutoMLAlgorithmConfig]] = Unassigned() + + +class TimeSeriesForecastingJobConfig(Base): + """ + TimeSeriesForecastingJobConfig + The collection of settings used by an AutoML job V2 for the time-series forecasting problem type. + + Attributes + ---------------------- + feature_specification_s3_uri: A URL to the Amazon S3 data source containing additional selected features that complement the target, itemID, timestamp, and grouped columns set in TimeSeriesConfig. When not provided, the AutoML job V2 includes all the columns from the original dataset that are not already declared in TimeSeriesConfig. If provided, the AutoML job V2 only considers these additional columns as a complement to the ones declared in TimeSeriesConfig. You can input FeatureAttributeNames (optional) in JSON format as shown below: { "FeatureAttributeNames":["col1", "col2", ...] }. You can also specify the data type of the feature (optional) in the format shown below: { "FeatureDataTypes":{"col1":"numeric", "col2":"categorical" ... } } Autopilot supports the following data types: numeric, categorical, text, and datetime. These column keys must not include any column set in TimeSeriesConfig. + completion_criteria + forecast_frequency: The frequency of predictions in a forecast. Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, 1D indicates every day and 15min indicates every 15 minutes. The value of a frequency must not overlap with the next larger frequency. For example, you must use a frequency of 1H instead of 60min. The valid values for each frequency are the following: Minute - 1-59 Hour - 1-23 Day - 1-6 Week - 1-4 Month - 1-11 Year - 1 + forecast_horizon: The number of time-steps that the model predicts. The forecast horizon is also called the prediction length. The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the time-steps in the dataset. + forecast_quantiles: The quantiles used to train the model for forecasts at a specified quantile. You can specify quantiles from 0.01 (p1) to 0.99 (p99), by increments of 0.01 or higher. Up to five forecast quantiles can be specified. When ForecastQuantiles is not provided, the AutoML job uses the quantiles p10, p50, and p90 as default. + transformations: The transformations modifying specific attributes of the time-series, such as filling strategies for missing values. + time_series_config: The collection of components that defines the time-series. + holiday_config: The collection of holiday featurization attributes used to incorporate national holiday information into your forecasting model. + candidate_generation_config + """ + + forecast_frequency: StrPipeVar + forecast_horizon: int + time_series_config: TimeSeriesConfig + feature_specification_s3_uri: Optional[StrPipeVar] = Unassigned() + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + forecast_quantiles: Optional[List[StrPipeVar]] = Unassigned() + transformations: Optional[TimeSeriesTransformations] = Unassigned() + holiday_config: Optional[List[HolidayConfigAttributes]] = Unassigned() + candidate_generation_config: Optional[CandidateGenerationConfig] = Unassigned() + + +class TabularJobConfig(Base): + """ + TabularJobConfig + The collection of settings used by an AutoML job V2 for the tabular problem type. + + Attributes + ---------------------- + candidate_generation_config: The configuration information of how model candidates are generated. + completion_criteria + feature_specification_s3_uri: A URL to the Amazon S3 data source containing selected features from the input data source to run an Autopilot job V2. You can input FeatureAttributeNames (optional) in JSON format as shown below: { "FeatureAttributeNames":["col1", "col2", ...] }. You can also specify the data type of the feature (optional) in the format shown below: { "FeatureDataTypes":{"col1":"numeric", "col2":"categorical" ... } } These column keys may not include the target column. In ensembling mode, Autopilot only supports the following data types: numeric, categorical, text, and datetime. In HPO mode, Autopilot can support numeric, categorical, text, datetime, and sequence. If only FeatureDataTypes is provided, the column keys (col1, col2,..) should be a subset of the column names in the input data. If both FeatureDataTypes and FeatureAttributeNames are provided, then the column keys should be a subset of the column names provided in FeatureAttributeNames. The key name FeatureAttributeNames is fixed. The values listed in ["col1", "col2", ...] are case sensitive and should be a list of strings containing unique values that are a subset of the column names in the input data. The list of columns provided must not include the target column. + mode: The method that Autopilot uses to train the data. You can either specify the mode manually or let Autopilot choose for you based on the dataset size by selecting AUTO. In AUTO mode, Autopilot chooses ENSEMBLING for datasets smaller than 100 MB, and HYPERPARAMETER_TUNING for larger ones. The ENSEMBLING mode uses a multi-stack ensemble model to predict classification and regression tasks directly from your dataset. This machine learning mode combines several base models to produce an optimal predictive model. It then uses a stacking ensemble method to combine predictions from contributing members. A multi-stack ensemble model can provide better performance over a single model by combining the predictive capabilities of multiple models. See Autopilot algorithm support for a list of algorithms supported by ENSEMBLING mode. The HYPERPARAMETER_TUNING (HPO) mode uses the best hyperparameters to train the best version of a model. HPO automatically selects an algorithm for the type of problem you want to solve. Then HPO finds the best hyperparameters according to your objective metric. See Autopilot algorithm support for a list of algorithms supported by HYPERPARAMETER_TUNING mode. + generate_candidate_definitions_only: Generates possible candidates without training the models. A model candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings. + problem_type: The type of supervised learning problem available for the model candidates of the AutoML job V2. For more information, see SageMaker Autopilot problem types. You must either specify the type of supervised learning problem in ProblemType and provide the AutoMLJobObjective metric, or none at all. + target_attribute_name: The name of the target variable in supervised learning, usually represented by 'y'. + sample_weight_attribute_name: If specified, this column name indicates which column of the dataset should be treated as sample weights for use by the objective metric during the training, evaluation, and the selection of the best model. This column is not considered as a predictive feature. For more information on Autopilot metrics, see Metrics and validation. Sample weights should be numeric, non-negative, with larger values indicating which rows are more important than others. Data points that have invalid or no weight value are excluded. Support for sample weights is available in Ensembling mode only. + """ + + target_attribute_name: StrPipeVar + candidate_generation_config: Optional[CandidateGenerationConfig] = Unassigned() + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + feature_specification_s3_uri: Optional[StrPipeVar] = Unassigned() + mode: Optional[StrPipeVar] = Unassigned() + generate_candidate_definitions_only: Optional[bool] = Unassigned() + problem_type: Optional[StrPipeVar] = Unassigned() + sample_weight_attribute_name: Optional[StrPipeVar] = Unassigned() + + +class TextGenerationJobConfig(Base): + """ + TextGenerationJobConfig + The collection of settings used by an AutoML job V2 for the text generation problem type. The text generation models that support fine-tuning in Autopilot are currently accessible exclusively in regions supported by Canvas. Refer to the documentation of Canvas for the full list of its supported Regions. + + Attributes + ---------------------- + completion_criteria: How long a fine-tuning job is allowed to run. For TextGenerationJobConfig problem types, the MaxRuntimePerTrainingJobInSeconds attribute of AutoMLJobCompletionCriteria defaults to 72h (259200s). + base_model_name: The name of the base model to fine-tune. Autopilot supports fine-tuning a variety of large language models. For information on the list of supported models, see Text generation models supporting fine-tuning in Autopilot. If no BaseModelName is provided, the default model used is Falcon7BInstruct. + text_generation_hyper_parameters: The hyperparameters used to configure and optimize the learning process of the base model. You can set any combination of the following hyperparameters for all base models. For more information on each supported hyperparameter, see Optimize the learning process of your text generation models with hyperparameters. "epochCount": The number of times the model goes through the entire training dataset. Its value should be a string containing an integer value within the range of "1" to "10". "batchSize": The number of data samples used in each iteration of training. Its value should be a string containing an integer value within the range of "1" to "64". "learningRate": The step size at which a model's parameters are updated during training. Its value should be a string containing a floating-point value within the range of "0" to "1". "learningRateWarmupSteps": The number of training steps during which the learning rate gradually increases before reaching its target or maximum value. Its value should be a string containing an integer value within the range of "0" to "250". Here is an example where all four hyperparameters are configured. { "epochCount":"5", "learningRate":"0.5", "batchSize": "32", "learningRateWarmupSteps": "10" } + model_access_config + """ + + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + base_model_name: Optional[StrPipeVar] = Unassigned() + text_generation_hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + model_access_config: Optional[ModelAccessConfig] = Unassigned() + + +class AutoMLProblemTypeConfig(Base): + """ + AutoMLProblemTypeConfig + A collection of settings specific to the problem type used to configure an AutoML job V2. There must be one and only one config of the following type. + + Attributes + ---------------------- + image_classification_job_config: Settings used to configure an AutoML job V2 for the image classification problem type. + text_classification_job_config: Settings used to configure an AutoML job V2 for the text classification problem type. + time_series_forecasting_job_config: Settings used to configure an AutoML job V2 for the time-series forecasting problem type. + tabular_job_config: Settings used to configure an AutoML job V2 for the tabular problem type (regression, classification). + text_generation_job_config: Settings used to configure an AutoML job V2 for the text generation (LLMs fine-tuning) problem type. The text generation models that support fine-tuning in Autopilot are currently accessible exclusively in regions supported by Canvas. Refer to the documentation of Canvas for the full list of its supported Regions. + """ + + image_classification_job_config: Optional[ImageClassificationJobConfig] = Unassigned() + text_classification_job_config: Optional[TextClassificationJobConfig] = Unassigned() + time_series_forecasting_job_config: Optional[TimeSeriesForecastingJobConfig] = Unassigned() + tabular_job_config: Optional[TabularJobConfig] = Unassigned() + text_generation_job_config: Optional[TextGenerationJobConfig] = Unassigned() + + +class TabularResolvedAttributes(Base): + """ + TabularResolvedAttributes + The resolved attributes specific to the tabular problem type. + + Attributes + ---------------------- + problem_type: The type of supervised learning problem available for the model candidates of the AutoML job V2 (Binary Classification, Multiclass Classification, Regression). For more information, see SageMaker Autopilot problem types. + """ + + problem_type: Optional[StrPipeVar] = Unassigned() + + +class TextGenerationResolvedAttributes(Base): + """ + TextGenerationResolvedAttributes + The resolved attributes specific to the text generation problem type. + + Attributes + ---------------------- + base_model_name: The name of the base model to fine-tune. + """ + + base_model_name: Optional[StrPipeVar] = Unassigned() + + +class AutoMLProblemTypeResolvedAttributes(Base): + """ + AutoMLProblemTypeResolvedAttributes + Stores resolved attributes specific to the problem type of an AutoML job V2. + + Attributes + ---------------------- + tabular_resolved_attributes: The resolved attributes for the tabular problem type. + text_generation_resolved_attributes: The resolved attributes for the text generation problem type. + """ + + tabular_resolved_attributes: Optional[TabularResolvedAttributes] = Unassigned() + text_generation_resolved_attributes: Optional[TextGenerationResolvedAttributes] = Unassigned() + + +class AutoMLResolvedAttributes(Base): + """ + AutoMLResolvedAttributes + The resolved attributes used to configure an AutoML job V2. + + Attributes + ---------------------- + auto_ml_job_objective + completion_criteria + auto_ml_problem_type_resolved_attributes: Defines the resolved attributes specific to a problem type. + """ + + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + auto_ml_problem_type_resolved_attributes: Optional[AutoMLProblemTypeResolvedAttributes] = ( + Unassigned() + ) + + +class AutoParameter(Base): + """ + AutoParameter + The name and an example value of the hyperparameter that you want to use in Autotune. If Automatic model tuning (AMT) determines that your hyperparameter is eligible for Autotune, an optimal hyperparameter range is selected for you. + + Attributes + ---------------------- + name: The name of the hyperparameter to optimize using Autotune. + value_hint: An example value of the hyperparameter to optimize using Autotune. + """ + + name: StrPipeVar + value_hint: StrPipeVar + + +class AutoRollbackConfig(Base): + """ + AutoRollbackConfig + Automatic rollback configuration for handling endpoint deployment failures and recovery. + + Attributes + ---------------------- + alarms: List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms are tripped during a deployment, SageMaker rolls back the deployment. + """ + + alarms: Optional[List[Alarm]] = Unassigned() + + +class Autotune(Base): + """ + Autotune + A flag to indicate if you want to use Autotune to automatically find optimal values for the following fields: ParameterRanges: The names and ranges of parameters that a hyperparameter tuning job can optimize. ResourceLimits: The maximum resources that can be used for a training job. These resources include the maximum number of training jobs, the maximum runtime of a tuning job, and the maximum number of training jobs to run at the same time. TrainingJobEarlyStoppingType: A flag that specifies whether or not to use early stopping for training jobs launched by a hyperparameter tuning job. RetryStrategy: The number of times to retry a training job. Strategy: Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training jobs that it launches. ConvergenceDetected: A flag to indicate that Automatic model tuning (AMT) has detected model convergence. + + Attributes + ---------------------- + mode: Set Mode to Enabled if you want to use Autotune. + """ + + mode: StrPipeVar + + +class AvailableUpgrade(Base): + """ + AvailableUpgrade + Contains information about an available upgrade for a SageMaker Partner AI App, including the version number and release notes. + + Attributes + ---------------------- + version: The semantic version number of the available upgrade for the SageMaker Partner AI App. + release_notes: A list of release notes describing the changes and improvements included in the available upgrade version. + """ + + version: Optional[StrPipeVar] = Unassigned() + release_notes: Optional[List[StrPipeVar]] = Unassigned() + + +class BatchAddClusterNodesError(Base): + """ + BatchAddClusterNodesError + Information about an error that occurred during the node addition operation. + + Attributes + ---------------------- + instance_group_name: The name of the instance group for which the error occurred. + error_code: The error code associated with the failure. Possible values include InstanceGroupNotFound and InvalidInstanceGroupState. + failed_count: The number of nodes that failed to be added to the specified instance group. + availability_zones: The availability zones associated with the failed node addition request. + instance_types: The instance types associated with the failed node addition request. + message: A descriptive message providing additional details about the error. + """ + + instance_group_name: StrPipeVar + error_code: StrPipeVar + failed_count: int + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() + message: Optional[StrPipeVar] = Unassigned() + + +class NodeAdditionResult(Base): + """ + NodeAdditionResult + Information about a node that was successfully added to the cluster. + + Attributes + ---------------------- + node_logical_id: A unique identifier assigned to the node that can be used to track its provisioning status through the DescribeClusterNode operation. + instance_group_name: The name of the instance group to which the node was added. + status: The current status of the node. Possible values include Pending, Running, Failed, ShuttingDown, SystemUpdating, DeepHealthCheckInProgress, and NotFound. + availability_zones: The availability zones associated with the successfully added node. + instance_types: The instance types associated with the successfully added node. + """ + + node_logical_id: StrPipeVar + instance_group_name: StrPipeVar + status: StrPipeVar + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() + + +class BatchDataCaptureConfig(Base): + """ + BatchDataCaptureConfig + Configuration to control how SageMaker captures inference data for batch transform jobs. + + Attributes + ---------------------- + destination_s3_uri: The Amazon S3 location being used to capture the data. + kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the batch transform job. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias + generate_inference_id: Flag that indicates whether to append inference id to the output. + """ + + destination_s3_uri: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + generate_inference_id: Optional[bool] = Unassigned() + + +class BatchDeleteClusterNodeLogicalIdsError(Base): + """ + BatchDeleteClusterNodeLogicalIdsError + Information about an error that occurred when attempting to delete a node identified by its NodeLogicalId. + + Attributes + ---------------------- + code: The error code associated with the failure. Possible values include NodeLogicalIdNotFound, InvalidNodeStatus, and InternalError. + message: A descriptive message providing additional details about the error. + node_logical_id: The NodeLogicalId of the node that could not be deleted. + """ + + code: StrPipeVar + message: StrPipeVar + node_logical_id: StrPipeVar + + +class BatchDeleteClusterNodesError(Base): + """ + BatchDeleteClusterNodesError + Represents an error encountered when deleting a node from a SageMaker HyperPod cluster. + + Attributes + ---------------------- + code: The error code associated with the error encountered when deleting a node. The code provides information about the specific issue encountered, such as the node not being found, the node's status being invalid for deletion, or the node ID being in use by another process. + message: A message describing the error encountered when deleting a node. + node_id: The ID of the node that encountered an error during the deletion process. + """ + + code: StrPipeVar + message: StrPipeVar + node_id: StrPipeVar + + +class BatchDeleteClusterNodesResponse(Base): + """ + BatchDeleteClusterNodesResponse + + Attributes + ---------------------- + failed: A list of errors encountered when deleting the specified nodes. + successful: A list of node IDs that were successfully deleted from the specified cluster. + failed_node_logical_ids: A list of NodeLogicalIds that could not be deleted, along with error information explaining why the deletion failed. + successful_node_logical_ids: A list of NodeLogicalIds that were successfully deleted from the cluster. + """ + + failed: Optional[List[BatchDeleteClusterNodesError]] = Unassigned() + successful: Optional[List[StrPipeVar]] = Unassigned() + failed_node_logical_ids: Optional[List[BatchDeleteClusterNodeLogicalIdsError]] = Unassigned() + successful_node_logical_ids: Optional[List[StrPipeVar]] = Unassigned() + + +class BatchDescribeModelPackageError(Base): + """ + BatchDescribeModelPackageError + The error code and error description associated with the resource. + + Attributes + ---------------------- + error_code: + error_response: + """ + + error_code: StrPipeVar + error_response: StrPipeVar + + +class InferenceSpecification(Base): + """ + InferenceSpecification + Defines how to perform inference generation after a training job is run. + + Attributes + ---------------------- + containers: The Amazon ECR registry path of the Docker image that contains the inference code. + supported_transform_instance_types: A list of the instance types on which a transformation job can be run or on which an endpoint can be deployed. This parameter is required for unversioned models, and optional for versioned models. + supported_realtime_inference_instance_types: A list of the instance types that are used to generate inferences in real-time. This parameter is required for unversioned models, and optional for versioned models. + supported_content_types: The supported MIME types for the input data. + supported_response_mime_types: The supported MIME types for the output data. + """ + + containers: List[ModelPackageContainerDefinition] + supported_transform_instance_types: Optional[List[StrPipeVar]] = Unassigned() + supported_realtime_inference_instance_types: Optional[List[StrPipeVar]] = Unassigned() + supported_content_types: Optional[List[StrPipeVar]] = Unassigned() + supported_response_mime_types: Optional[List[StrPipeVar]] = Unassigned() + + +class BatchDescribeModelPackageSummary(Base): + """ + BatchDescribeModelPackageSummary + Provides summary information about the model package. + + Attributes + ---------------------- + model_package_group_name: The group name for the model package + model_package_version: The version number of a versioned model. + model_package_arn: The Amazon Resource Name (ARN) of the model package. + model_package_description: The description of the model package. + creation_time: The creation time of the mortgage package summary. + inference_specification + model_package_status: The status of the mortgage package. + model_approval_status: The approval status of the model. + model_package_registration_type: The package registration type of the model package summary. + """ + + model_package_group_name: Union[StrPipeVar, object] + model_package_arn: StrPipeVar + creation_time: datetime.datetime + inference_specification: InferenceSpecification + model_package_status: StrPipeVar + model_package_version: Optional[int] = Unassigned() + model_package_description: Optional[StrPipeVar] = Unassigned() + model_approval_status: Optional[StrPipeVar] = Unassigned() + model_package_registration_type: Optional[StrPipeVar] = Unassigned() + + +class BatchDescribeModelPackageOutput(Base): + """ + BatchDescribeModelPackageOutput + + Attributes + ---------------------- + model_package_summaries: The summaries for the model package versions + batch_describe_model_package_error_map: A map of the resource and BatchDescribeModelPackageError objects reporting the error associated with describing the model package. + """ + + model_package_summaries: Optional[Dict[StrPipeVar, BatchDescribeModelPackageSummary]] = ( + Unassigned() + ) + batch_describe_model_package_error_map: Optional[ + Dict[StrPipeVar, BatchDescribeModelPackageError] + ] = Unassigned() + + +class BatchRebootClusterNodeLogicalIdsError(Base): + """ + BatchRebootClusterNodeLogicalIdsError + Represents an error encountered when rebooting a node (identified by its logical node ID) from a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_logical_id: The logical node ID of the node that encountered an error during the reboot operation. + error_code: The error code associated with the error encountered when rebooting a node by logical node ID. Possible values: InstanceIdNotFound: The node does not exist in the specified cluster. InvalidInstanceStatus: The node is in a state that does not allow rebooting. Wait for the node to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when rebooting a node by logical node ID. + """ + + node_logical_id: StrPipeVar + error_code: StrPipeVar + message: StrPipeVar + + +class BatchRebootClusterNodesError(Base): + """ + BatchRebootClusterNodesError + Represents an error encountered when rebooting a node from a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_id: The EC2 instance ID of the node that encountered an error during the reboot operation. + error_code: The error code associated with the error encountered when rebooting a node. Possible values: InstanceIdNotFound: The instance does not exist in the specified cluster. InvalidInstanceStatus: The instance is in a state that does not allow rebooting. Wait for the instance to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when rebooting a node. + """ + + node_id: StrPipeVar + error_code: StrPipeVar + message: StrPipeVar + + +class BatchReplaceClusterNodeLogicalIdsError(Base): + """ + BatchReplaceClusterNodeLogicalIdsError + Represents an error encountered when replacing a node (identified by its logical node ID) in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_logical_id: The logical node ID of the node that encountered an error during the replacement operation. + error_code: The error code associated with the error encountered when replacing a node by logical node ID. Possible values: InstanceIdNotFound: The node does not exist in the specified cluster. InvalidInstanceStatus: The node is in a state that does not allow replacement. Wait for the node to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when replacing a node by logical node ID. + """ + + node_logical_id: StrPipeVar + error_code: StrPipeVar + message: StrPipeVar + + +class BatchReplaceClusterNodesError(Base): + """ + BatchReplaceClusterNodesError + Represents an error encountered when replacing a node in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_id: The EC2 instance ID of the node that encountered an error during the replacement operation. + error_code: The error code associated with the error encountered when replacing a node. Possible values: InstanceIdNotFound: The instance does not exist in the specified cluster. InvalidInstanceStatus: The instance is in a state that does not allow replacement. Wait for the instance to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when replacing a node. + """ + + node_id: StrPipeVar + error_code: StrPipeVar + message: StrPipeVar + + +class MonitoringCsvDatasetFormat(Base): + """ + MonitoringCsvDatasetFormat + Represents the CSV dataset format used when running a monitoring job. + + Attributes + ---------------------- + header: Indicates if the CSV data has a header. + """ + + header: Optional[bool] = Unassigned() + + +class MonitoringJsonDatasetFormat(Base): + """ + MonitoringJsonDatasetFormat + Represents the JSON dataset format used when running a monitoring job. + + Attributes + ---------------------- + line: Indicates if the file should be read as a JSON object per line. + """ + + line: Optional[bool] = Unassigned() + + +class MonitoringParquetDatasetFormat(Base): + """ + MonitoringParquetDatasetFormat + Represents the Parquet dataset format used when running a monitoring job. + + Attributes + ---------------------- + """ + + +class MonitoringDatasetFormat(Base): + """ + MonitoringDatasetFormat + Represents the dataset format used when running a monitoring job. + + Attributes + ---------------------- + csv: The CSV dataset used in the monitoring job. + json: The JSON dataset used in the monitoring job + parquet: The Parquet dataset used in the monitoring job + """ + + csv: Optional[MonitoringCsvDatasetFormat] = Unassigned() + json: Optional[MonitoringJsonDatasetFormat] = Unassigned() + parquet: Optional[MonitoringParquetDatasetFormat] = Unassigned() + + +class BatchTransformInput(Base): + """ + BatchTransformInput + Input object for the batch transform job. + + Attributes + ---------------------- + data_captured_destination_s3_uri: The Amazon S3 location being used to capture the data. + dataset_format: The dataset format for your batch transform job. + local_path: Path to the filesystem where the batch transform data is available to the container. + s3_input_mode: Whether the Pipe or File is used as the input mode for transferring data for the monitoring job. Pipe mode is recommended for large datasets. File mode is useful for small files that fit in memory. Defaults to File. + s3_data_distribution_type: Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defaults to FullyReplicated + features_attribute: The attributes of the input data that are the input features. + inference_attribute: The attribute of the input data that represents the ground truth label. + probability_attribute: In a classification problem, the attribute that represents the class probability. + probability_threshold_attribute: The threshold for the class probability to be evaluated as a positive result. + start_time_offset: If specified, monitoring jobs substract this time from the start time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. + end_time_offset: If specified, monitoring jobs subtract this time from the end time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. + exclude_features_attribute: The attributes of the input data to exclude from the analysis. + """ + + data_captured_destination_s3_uri: StrPipeVar + dataset_format: MonitoringDatasetFormat + local_path: StrPipeVar + s3_input_mode: Optional[StrPipeVar] = Unassigned() + s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() + features_attribute: Optional[StrPipeVar] = Unassigned() + inference_attribute: Optional[StrPipeVar] = Unassigned() + probability_attribute: Optional[StrPipeVar] = Unassigned() + probability_threshold_attribute: Optional[float] = Unassigned() + start_time_offset: Optional[StrPipeVar] = Unassigned() + end_time_offset: Optional[StrPipeVar] = Unassigned() + exclude_features_attribute: Optional[StrPipeVar] = Unassigned() + + +class BedrockCustomModelDeploymentMetadata(Base): + """ + BedrockCustomModelDeploymentMetadata + The metadata of the Amazon Bedrock custom model deployment. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) for the Amazon Bedrock custom model deployment. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class BedrockCustomModelMetadata(Base): + """ + BedrockCustomModelMetadata + The metadata of the Amazon Bedrock custom model. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock custom model. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class BedrockModelImportMetadata(Base): + """ + BedrockModelImportMetadata + The metadata of the Amazon Bedrock model import. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock model import. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class BedrockProvisionedModelThroughputMetadata(Base): + """ + BedrockProvisionedModelThroughputMetadata + The metadata of the Amazon Bedrock provisioned model throughput. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock provisioned model throughput. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class BestObjectiveNotImproving(Base): + """ + BestObjectiveNotImproving + A structure that keeps track of which training jobs launched by your hyperparameter tuning job are not improving model performance as evaluated against an objective function. + + Attributes + ---------------------- + max_number_of_training_jobs_not_improving: The number of training jobs that have failed to improve model performance by 1% or greater over prior training jobs as evaluated against an objective function. + """ + + max_number_of_training_jobs_not_improving: Optional[int] = Unassigned() + + +class MetricsSource(Base): + """ + MetricsSource + Details about the metrics source. + + Attributes + ---------------------- + content_type: The metric source content type. + content_digest: The hash key used for the metrics source. + s3_uri: The S3 URI for the metrics source. + """ + + content_type: StrPipeVar + s3_uri: StrPipeVar + content_digest: Optional[StrPipeVar] = Unassigned() + + +class Bias(Base): + """ + Bias + Contains bias metrics for a model. + + Attributes + ---------------------- + report: The bias report for a model + pre_training_report: The pre-training bias report for a model. + post_training_report: The post-training bias report for a model. + """ + + report: Optional[MetricsSource] = Unassigned() + pre_training_report: Optional[MetricsSource] = Unassigned() + post_training_report: Optional[MetricsSource] = Unassigned() + + +class CapacitySize(Base): + """ + CapacitySize + 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. + + Attributes + ---------------------- + type: Specifies the endpoint capacity type. INSTANCE_COUNT: The endpoint activates based on the number of instances. CAPACITY_PERCENT: The endpoint activates based on the specified percentage of capacity. + value: Defines the capacity size, either as a number of instances or a capacity percentage. + """ + + type: StrPipeVar + value: int + + +class TrafficRoutingConfig(Base): + """ + TrafficRoutingConfig + Defines the traffic routing strategy during an endpoint deployment to shift traffic from the old fleet to the new fleet. + + Attributes + ---------------------- + type: Traffic routing strategy type. ALL_AT_ONCE: Endpoint traffic shifts to the new fleet in a single step. CANARY: Endpoint traffic shifts to the new fleet in two steps. The first step is the canary, which is a small portion of the traffic. The second step is the remainder of the traffic. LINEAR: Endpoint traffic shifts to the new fleet in n steps of a configurable size. + wait_interval_in_seconds: The waiting time (in seconds) between incremental steps to turn on traffic on the new endpoint fleet. + canary_size: Batch size for the first step to turn on traffic on the new endpoint fleet. Value must be less than or equal to 50% of the variant's total instance count. + linear_step_size: Batch size for each step to turn on traffic on the new endpoint fleet. Value must be 10-50% of the variant's total instance count. + """ + + type: StrPipeVar + wait_interval_in_seconds: int + canary_size: Optional[CapacitySize] = Unassigned() + linear_step_size: Optional[CapacitySize] = Unassigned() + + +class BlueGreenUpdatePolicy(Base): + """ + BlueGreenUpdatePolicy + Update policy for a blue/green deployment. If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default. + + Attributes + ---------------------- + traffic_routing_configuration: Defines the traffic routing strategy to shift traffic from the old fleet to the new fleet during an endpoint deployment. + termination_wait_in_seconds: Additional waiting time in seconds after the completion of an endpoint deployment before terminating the old endpoint fleet. Default is 0. + maximum_execution_timeout_in_seconds: Maximum execution timeout for the deployment. Note that the timeout value should be larger than the total waiting time specified in TerminationWaitInSeconds and WaitIntervalInSeconds. + """ + + traffic_routing_configuration: TrafficRoutingConfig + termination_wait_in_seconds: Optional[int] = Unassigned() + maximum_execution_timeout_in_seconds: Optional[int] = Unassigned() + + +class CacheHitResult(Base): + """ + CacheHitResult + Details on the cache hit of a pipeline execution step. + + Attributes + ---------------------- + source_pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. + """ + + source_pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + + +class OutputParameter(Base): + """ + OutputParameter + An output parameter of a pipeline step. + + Attributes + ---------------------- + name: The name of the output parameter. + value: The value of the output parameter. + """ + + name: StrPipeVar + value: StrPipeVar + + +class CallbackStepMetadata(Base): + """ + CallbackStepMetadata + Metadata about a callback step. + + Attributes + ---------------------- + callback_token: The pipeline generated token from the Amazon SQS queue. + sqs_queue_url: The URL of the Amazon Simple Queue Service (Amazon SQS) queue used by the callback step. + output_parameters: A list of the output parameters of the callback step. + """ + + callback_token: Optional[StrPipeVar] = Unassigned() + sqs_queue_url: Optional[StrPipeVar] = Unassigned() + output_parameters: Optional[List[OutputParameter]] = Unassigned() + + +class TimeSeriesForecastingSettings(Base): + """ + TimeSeriesForecastingSettings + Time series forecast settings for the SageMaker Canvas application. + + Attributes + ---------------------- + status: Describes whether time series forecasting is enabled or disabled in the Canvas application. + amazon_forecast_role_arn: The IAM role that Canvas passes to Amazon Forecast for time series forecasting. By default, Canvas uses the execution role specified in the UserProfile that launches the Canvas application. If an execution role is not specified in the UserProfile, Canvas uses the execution role specified in the Domain that owns the UserProfile. To allow time series forecasting, this IAM role should have the AmazonSageMakerCanvasForecastAccess policy attached and forecast.amazonaws.com added in the trust relationship as a service principal. + """ + + status: Optional[StrPipeVar] = Unassigned() + amazon_forecast_role_arn: Optional[StrPipeVar] = Unassigned() + + +class ModelRegisterSettings(Base): + """ + ModelRegisterSettings + The model registry settings for the SageMaker Canvas application. + + Attributes + ---------------------- + status: Describes whether the integration to the model registry is enabled or disabled in the Canvas application. + cross_account_model_register_role_arn: The Amazon Resource Name (ARN) of the SageMaker model registry account. Required only to register model versions created by a different SageMaker Canvas Amazon Web Services account than the Amazon Web Services account in which SageMaker model registry is set up. + """ + + status: Optional[StrPipeVar] = Unassigned() + cross_account_model_register_role_arn: Optional[StrPipeVar] = Unassigned() + + +class WorkspaceSettings(Base): + """ + WorkspaceSettings + The workspace settings for the SageMaker Canvas application. + + Attributes + ---------------------- + s3_artifact_path: The Amazon S3 bucket used to store artifacts generated by Canvas. Updating the Amazon S3 location impacts existing configuration settings, and Canvas users no longer have access to their artifacts. Canvas users must log out and log back in to apply the new location. + s3_kms_key_id: The Amazon Web Services Key Management Service (KMS) encryption key ID that is used to encrypt artifacts generated by Canvas in the Amazon S3 bucket. + """ + + s3_artifact_path: Optional[StrPipeVar] = Unassigned() + s3_kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class IdentityProviderOAuthSetting(Base): + """ + IdentityProviderOAuthSetting + The Amazon SageMaker Canvas application setting where you configure OAuth for connecting to an external data source, such as Snowflake. + + Attributes + ---------------------- + data_source_name: The name of the data source that you're connecting to. Canvas currently supports OAuth for Snowflake and Salesforce Data Cloud. + status: Describes whether OAuth for a data source is enabled or disabled in the Canvas application. + secret_arn: The ARN of an Amazon Web Services Secrets Manager secret that stores the credentials from your identity provider, such as the client ID and secret, authorization URL, and token URL. + """ + + data_source_name: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + secret_arn: Optional[StrPipeVar] = Unassigned() + + +class DirectDeploySettings(Base): + """ + DirectDeploySettings + The model deployment settings for the SageMaker Canvas application. In order to enable model deployment for Canvas, the SageMaker Domain's or user profile's Amazon Web Services IAM execution role must have the AmazonSageMakerCanvasDirectDeployAccess policy attached. You can also turn on model deployment permissions through the SageMaker Domain's or user profile's settings in the SageMaker console. + + Attributes + ---------------------- + status: Describes whether model deployment permissions are enabled or disabled in the Canvas application. + """ + + status: Optional[StrPipeVar] = Unassigned() + + +class KendraSettings(Base): + """ + KendraSettings + The Amazon SageMaker Canvas application setting where you configure document querying. + + Attributes + ---------------------- + status: Describes whether the document querying feature is enabled or disabled in the Canvas application. + """ + + status: Optional[StrPipeVar] = Unassigned() + + +class GenerativeAiSettings(Base): + """ + GenerativeAiSettings + The generative AI settings for the SageMaker Canvas application. Configure these settings for Canvas users starting chats with generative AI foundation models. For more information, see Use generative AI with foundation models. + + Attributes + ---------------------- + amazon_bedrock_role_arn: The ARN of an Amazon Web Services IAM role that allows fine-tuning of large language models (LLMs) in Amazon Bedrock. The IAM role should have Amazon S3 read and write permissions, as well as a trust relationship that establishes bedrock.amazonaws.com as a service principal. + """ + + amazon_bedrock_role_arn: Optional[StrPipeVar] = Unassigned() + + +class EmrServerlessSettings(Base): + """ + EmrServerlessSettings + The settings for running Amazon EMR Serverless jobs in SageMaker Canvas. + + Attributes + ---------------------- + execution_role_arn: The Amazon Resource Name (ARN) of the Amazon Web Services IAM role that is assumed for running Amazon EMR Serverless jobs in SageMaker Canvas. This role should have the necessary permissions to read and write data attached and a trust relationship with EMR Serverless. + status: Describes whether Amazon EMR Serverless job capabilities are enabled or disabled in the SageMaker Canvas application. + """ + + execution_role_arn: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + + +class CanvasAppSettings(Base): + """ + CanvasAppSettings + The SageMaker Canvas application settings. + + Attributes + ---------------------- + time_series_forecasting_settings: Time series forecast settings for the SageMaker Canvas application. + model_register_settings: The model registry settings for the SageMaker Canvas application. + workspace_settings: The workspace settings for the SageMaker Canvas application. + identity_provider_o_auth_settings: The settings for connecting to an external data source with OAuth. + direct_deploy_settings: The model deployment settings for the SageMaker Canvas application. + kendra_settings: The settings for document querying. + generative_ai_settings: The generative AI settings for the SageMaker Canvas application. + emr_serverless_settings: The settings for running Amazon EMR Serverless data processing jobs in SageMaker Canvas. + """ + + time_series_forecasting_settings: Optional[TimeSeriesForecastingSettings] = Unassigned() + model_register_settings: Optional[ModelRegisterSettings] = Unassigned() + workspace_settings: Optional[WorkspaceSettings] = Unassigned() + identity_provider_o_auth_settings: Optional[List[IdentityProviderOAuthSetting]] = Unassigned() + direct_deploy_settings: Optional[DirectDeploySettings] = Unassigned() + kendra_settings: Optional[KendraSettings] = Unassigned() + generative_ai_settings: Optional[GenerativeAiSettings] = Unassigned() + emr_serverless_settings: Optional[EmrServerlessSettings] = Unassigned() + + +class CapacityReservation(Base): + """ + CapacityReservation + Information about the Capacity Reservation used by an instance or instance group. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the Capacity Reservation. + type: The type of Capacity Reservation. Valid values are ODCR (On-Demand Capacity Reservation) or CRG (Capacity Reservation Group). + """ + + arn: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = 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: StrPipeVar + value: int + + +class CaptureContentTypeHeader(Base): + """ + CaptureContentTypeHeader + Configuration specifying how to treat different headers. If no headers are specified Amazon SageMaker AI will by default base64 encode when capturing the data. + + Attributes + ---------------------- + csv_content_types: The list of all content type headers that Amazon SageMaker AI will treat as CSV and capture accordingly. + json_content_types: The list of all content type headers that SageMaker AI will treat as JSON and capture accordingly. + """ + + csv_content_types: Optional[List[StrPipeVar]] = Unassigned() + json_content_types: Optional[List[StrPipeVar]] = Unassigned() + + +class CaptureOption(Base): + """ + CaptureOption + Specifies data Model Monitor will capture. + + Attributes + ---------------------- + capture_mode: Specify the boundary of data to capture. + """ + + capture_mode: StrPipeVar + + +class CategoricalParameter(Base): + """ + CategoricalParameter + Environment parameters you want to benchmark your load test against. + + Attributes + ---------------------- + name: The Name of the environment variable. + value: The list of values you can pass. + """ + + name: StrPipeVar + value: List[StrPipeVar] + + +class CategoricalParameterRange(Base): + """ + CategoricalParameterRange + A list of categorical hyperparameters to tune. + + Attributes + ---------------------- + name: The name of the categorical hyperparameter to tune. + values: A list of the categories for the hyperparameter. + """ + + name: StrPipeVar + values: List[StrPipeVar] + + +class CategoricalParameterRangeSpecification(Base): + """ + CategoricalParameterRangeSpecification + Defines the possible values for a categorical hyperparameter. + + Attributes + ---------------------- + values: The allowed categories for the hyperparameter. + """ + + values: List[StrPipeVar] + + +class CfnStackCreateParameter(Base): + """ + CfnStackCreateParameter + A key-value pair that represents a parameter for the CloudFormation stack. + + Attributes + ---------------------- + key: The name of the CloudFormation parameter. + value: The value of the CloudFormation parameter. + """ + + key: StrPipeVar + value: Optional[StrPipeVar] = Unassigned() + + +class CfnCreateTemplateProvider(Base): + """ + CfnCreateTemplateProvider + The CloudFormation template provider configuration for creating infrastructure resources. + + Attributes + ---------------------- + template_name: A unique identifier for the template within the project. + template_url: The Amazon S3 URL of the CloudFormation template. + role_arn: The IAM role that CloudFormation assumes when creating the stack. + parameters: An array of CloudFormation stack parameters. + """ + + template_name: StrPipeVar + template_url: StrPipeVar + role_arn: Optional[StrPipeVar] = Unassigned() + parameters: Optional[List[CfnStackCreateParameter]] = Unassigned() + + +class CfnStackDetail(Base): + """ + CfnStackDetail + Details about the CloudFormation stack. + + Attributes + ---------------------- + name: The name of the CloudFormation stack. + id: The unique identifier of the CloudFormation stack. + status_message: A human-readable message about the stack's current status. + """ + + status_message: StrPipeVar + name: Optional[StrPipeVar] = Unassigned() + id: Optional[StrPipeVar] = Unassigned() + + +class CfnStackParameter(Base): + """ + CfnStackParameter + A key-value pair representing a parameter used in the CloudFormation stack. + + Attributes + ---------------------- + key: The name of the CloudFormation parameter. + value: The value of the CloudFormation parameter. + """ + + key: StrPipeVar + value: Optional[StrPipeVar] = Unassigned() + + +class CfnStackUpdateParameter(Base): + """ + CfnStackUpdateParameter + A key-value pair representing a parameter used in the CloudFormation stack. + + Attributes + ---------------------- + key: The name of the CloudFormation parameter. + value: The value of the CloudFormation parameter. + """ + + key: StrPipeVar + value: Optional[StrPipeVar] = Unassigned() + + +class CfnTemplateProviderDetail(Base): + """ + CfnTemplateProviderDetail + Details about a CloudFormation template provider configuration and associated provisioning information. + + Attributes + ---------------------- + template_name: The unique identifier of the template within the project. + template_url: The Amazon S3 URL of the CloudFormation template. + role_arn: The IAM role used by CloudFormation to create the stack. + parameters: An array of CloudFormation stack parameters. + stack_detail: Information about the CloudFormation stack created by the template provider. + """ + + template_name: StrPipeVar + template_url: StrPipeVar + role_arn: Optional[StrPipeVar] = Unassigned() + parameters: Optional[List[CfnStackParameter]] = Unassigned() + stack_detail: Optional[CfnStackDetail] = Unassigned() + + +class CfnUpdateTemplateProvider(Base): + """ + CfnUpdateTemplateProvider + Contains configuration details for updating an existing CloudFormation template provider in the project. + + Attributes + ---------------------- + template_name: The unique identifier of the template to update within the project. + template_url: The Amazon S3 URL of the CloudFormation template. + parameters: An array of CloudFormation stack parameters. + """ + + template_name: StrPipeVar + template_url: StrPipeVar + parameters: Optional[List[CfnStackUpdateParameter]] = Unassigned() + + +class ChannelSpecification(Base): + """ + ChannelSpecification + Defines a named input source, called a channel, to be used by an algorithm. + + Attributes + ---------------------- + name: The name of the channel. + description: A brief description of the channel. + is_required: Indicates whether the channel is required by the algorithm. + supported_content_types: The supported MIME types for the data. + supported_compression_types: The allowed compression types, if data compression is used. + supported_input_modes: The allowed input mode, either FILE or PIPE. In FILE mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In PIPE mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume. + """ + + name: StrPipeVar + supported_content_types: List[StrPipeVar] + supported_input_modes: List[StrPipeVar] + description: Optional[StrPipeVar] = Unassigned() + is_required: Optional[bool] = Unassigned() + supported_compression_types: Optional[List[StrPipeVar]] = Unassigned() + + +class CheckpointConfig(Base): + """ + CheckpointConfig + Contains information about the output location for managed spot training checkpoint data. + + Attributes + ---------------------- + s3_uri: Identifies the S3 path where you want SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix. + local_path: (Optional) The local directory where checkpoints are written. The default directory is /opt/ml/checkpoints/. + """ + + s3_uri: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + + +class ClarifyCheckStepMetadata(Base): + """ + ClarifyCheckStepMetadata + The container for the metadata for the ClarifyCheck step. For more information, see the topic on ClarifyCheck step in the Amazon SageMaker Developer Guide. + + Attributes + ---------------------- + check_type: The type of the Clarify Check step + baseline_used_for_drift_check_constraints: The Amazon S3 URI of baseline constraints file to be used for the drift check. + calculated_baseline_constraints: The Amazon S3 URI of the newly calculated baseline constraints file. + model_package_group_name: The model package group name. + violation_report: The Amazon S3 URI of the violation report if violations are detected. + check_job_arn: The Amazon Resource Name (ARN) of the check processing job that was run by this step's execution. + skip_check: This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available. + register_new_baseline: This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints property. + """ + + check_type: Optional[StrPipeVar] = Unassigned() + baseline_used_for_drift_check_constraints: Optional[StrPipeVar] = Unassigned() + calculated_baseline_constraints: Optional[StrPipeVar] = Unassigned() + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + violation_report: Optional[StrPipeVar] = Unassigned() + check_job_arn: Optional[StrPipeVar] = Unassigned() + skip_check: Optional[bool] = Unassigned() + register_new_baseline: Optional[bool] = Unassigned() + + +class ClarifyInferenceConfig(Base): + """ + ClarifyInferenceConfig + The inference configuration parameter for the model container. + + Attributes + ---------------------- + features_attribute: Provides the JMESPath expression to extract the features from a model container input in JSON Lines format. For example, if FeaturesAttribute is the JMESPath expression 'myfeatures', it extracts a list of features [1,2,3] from request data '{"myfeatures":[1,2,3]}'. + content_template: A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{"myfeatures":$features}' will format a list of features [1,2,3] into the record string '{"myfeatures":[1,2,3]}'. Required only when the model container input is in JSON Lines format. + max_record_count: The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset. A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1, the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime. + max_payload_in_mb: The maximum payload size (MB) allowed of a request from the explainer to the model container. Defaults to 6 MB. + probability_index: A zero-based index used to extract a probability value (score) or list from model container output in CSV format. If this value is not provided, the entire model container output will be treated as a probability value (score) or list. Example for a single class model: If the model container output consists of a string-formatted prediction label followed by its probability: '1,0.6', set ProbabilityIndex to 1 to select the probability value 0.6. Example for a multiclass model: If the model container output consists of a string-formatted prediction label followed by its probability: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set ProbabilityIndex to 1 to select the probability values [0.1,0.6,0.3]. + label_index: A zero-based index used to extract a label header or list of label headers from model container output in CSV format. Example for a multiclass model: If the model container output consists of label headers followed by probabilities: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set LabelIndex to 0 to select the label headers ['cat','dog','fish']. + probability_attribute: A JMESPath expression used to extract the probability (or score) from the model container output if the model container is in JSON Lines format. Example: If the model container output of a single request is '{"predicted_label":1,"probability":0.6}', then set ProbabilityAttribute to 'probability'. + label_attribute: A JMESPath expression used to locate the list of label headers in the model container output. Example: If the model container output of a batch request is '{"labels":["cat","dog","fish"],"probability":[0.6,0.3,0.1]}', then set LabelAttribute to 'labels' to extract the list of label headers ["cat","dog","fish"] + label_headers: For multiclass classification problems, the label headers are the names of the classes. Otherwise, the label header is the name of the predicted label. These are used to help readability for the output of the InvokeEndpoint API. See the response section under Invoke the endpoint in the Developer Guide for more information. If there are no label headers in the model container output, provide them manually using this parameter. + feature_headers: The names of the features. If provided, these are included in the endpoint response payload to help readability of the InvokeEndpoint output. See the Response section under Invoke the endpoint in the Developer Guide for more information. + feature_types: A list of data types of the features (optional). Applicable only to NLP explainability. If provided, FeatureTypes must have at least one 'text' string (for example, ['text']). If FeatureTypes is not provided, the explainer infers the feature types based on the baseline data. The feature types are included in the endpoint response payload. For additional information see the response section under Invoke the endpoint in the Developer Guide for more information. + """ + + features_attribute: Optional[StrPipeVar] = Unassigned() + content_template: Optional[StrPipeVar] = Unassigned() + max_record_count: Optional[int] = Unassigned() + max_payload_in_mb: Optional[int] = Unassigned() + probability_index: Optional[int] = Unassigned() + label_index: Optional[int] = Unassigned() + probability_attribute: Optional[StrPipeVar] = Unassigned() + label_attribute: Optional[StrPipeVar] = Unassigned() + label_headers: Optional[List[StrPipeVar]] = Unassigned() + feature_headers: Optional[List[StrPipeVar]] = Unassigned() + feature_types: Optional[List[StrPipeVar]] = Unassigned() + + +class ClarifyShapBaselineConfig(Base): + """ + ClarifyShapBaselineConfig + The configuration for the SHAP baseline (also called the background or reference dataset) of the Kernal SHAP algorithm. The number of records in the baseline data determines the size of the synthetic dataset, which has an impact on latency of explainability requests. For more information, see the Synthetic data of Configure and create an endpoint. ShapBaseline and ShapBaselineUri are mutually exclusive parameters. One or the either is required to configure a SHAP baseline. + + Attributes + ---------------------- + mime_type: The MIME type of the baseline data. Choose from 'text/csv' or 'application/jsonlines'. Defaults to 'text/csv'. + shap_baseline: The inline SHAP baseline data in string format. ShapBaseline can have one or multiple records to be used as the baseline dataset. The format of the SHAP baseline file should be the same format as the training dataset. For example, if the training dataset is in CSV format and each record contains four features, and all features are numerical, then the format of the baseline data should also share these characteristics. For natural language processing (NLP) of text columns, the baseline value should be the value used to replace the unit of text specified by the Granularity of the TextConfig parameter. The size limit for ShapBasline is 4 KB. Use the ShapBaselineUri parameter if you want to provide more than 4 KB of baseline data. + shap_baseline_uri: The uniform resource identifier (URI) of the S3 bucket where the SHAP baseline file is stored. The format of the SHAP baseline file should be the same format as the format of the training dataset. For example, if the training dataset is in CSV format, and each record in the training dataset has four features, and all features are numerical, then the baseline file should also have this same format. Each record should contain only the features. If you are using a virtual private cloud (VPC), the ShapBaselineUri should be accessible to the VPC. For more information about setting up endpoints with Amazon Virtual Private Cloud, see Give SageMaker access to Resources in your Amazon Virtual Private Cloud. + """ + + mime_type: Optional[StrPipeVar] = Unassigned() + shap_baseline: Optional[StrPipeVar] = Unassigned() + shap_baseline_uri: Optional[StrPipeVar] = Unassigned() + + +class ClarifyTextConfig(Base): + """ + ClarifyTextConfig + A parameter used to configure the SageMaker Clarify explainer to treat text features as text so that explanations are provided for individual units of text. Required only for natural language processing (NLP) explainability. + + Attributes + ---------------------- + language: Specifies the language of the text features in ISO 639-1 or ISO 639-3 code of a supported language. For a mix of multiple languages, use code 'xx'. + granularity: The unit of granularity for the analysis of text features. For example, if the unit is 'token', then each token (like a word in English) of the text is treated as a feature. SHAP values are computed for each unit/feature. + """ + + language: StrPipeVar + granularity: StrPipeVar + + +class ClarifyShapConfig(Base): + """ + ClarifyShapConfig + The configuration for SHAP analysis using SageMaker Clarify Explainer. + + Attributes + ---------------------- + shap_baseline_config: The configuration for the SHAP baseline of the Kernal SHAP algorithm. + number_of_samples: The number of samples to be used for analysis by the Kernal SHAP algorithm. The number of samples determines the size of the synthetic dataset, which has an impact on latency of explainability requests. For more information, see the Synthetic data of Configure and create an endpoint. + use_logit: A Boolean toggle to indicate if you want to use the logit function (true) or log-odds units (false) for model predictions. Defaults to false. + seed: The starting value used to initialize the random number generator in the explainer. Provide a value for this parameter to obtain a deterministic SHAP result. + text_config: A parameter that indicates if text features are treated as text and explanations are provided for individual units of text. Required for natural language processing (NLP) explainability only. + """ + + shap_baseline_config: ClarifyShapBaselineConfig + number_of_samples: Optional[int] = Unassigned() + use_logit: Optional[bool] = Unassigned() + seed: Optional[int] = Unassigned() + text_config: Optional[ClarifyTextConfig] = Unassigned() + + +class ClarifyExplainerConfig(Base): + """ + ClarifyExplainerConfig + The configuration parameters for the SageMaker Clarify explainer. + + Attributes + ---------------------- + enable_explanations: A JMESPath boolean expression used to filter which records to explain. Explanations are activated by default. See EnableExplanations for additional information. + inference_config: The inference configuration parameter for the model container. + shap_config: The configuration for SHAP analysis. + """ + + shap_config: ClarifyShapConfig + enable_explanations: Optional[StrPipeVar] = Unassigned() + inference_config: Optional[ClarifyInferenceConfig] = Unassigned() + + +class ClusterAutoScalingConfig(Base): + """ + ClusterAutoScalingConfig + Specifies the autoscaling configuration for a HyperPod cluster. + + Attributes + ---------------------- + mode: Describes whether autoscaling is enabled or disabled for the cluster. Valid values are Enable and Disable. + auto_scaler_type: The type of autoscaler to use. Currently supported value is Karpenter. + """ + + mode: StrPipeVar + auto_scaler_type: Optional[StrPipeVar] = Unassigned() + + +class ClusterAutoScalingConfigOutput(Base): + """ + ClusterAutoScalingConfigOutput + The autoscaling configuration and status information for a HyperPod cluster. + + Attributes + ---------------------- + mode: Describes whether autoscaling is enabled or disabled for the cluster. + auto_scaler_type: The type of autoscaler configured for the cluster. + status: The current status of the autoscaling configuration. Valid values are InService, Failed, Creating, and Deleting. + failure_message: If the autoscaling status is Failed, this field contains a message describing the failure. + """ + + mode: StrPipeVar + status: StrPipeVar + auto_scaler_type: Optional[StrPipeVar] = Unassigned() + failure_message: Optional[StrPipeVar] = Unassigned() + + +class ClusterSpotOptions(Base): + """ + ClusterSpotOptions + Configuration options specific to Spot instances. + + Attributes + ---------------------- + """ + + +class ClusterOnDemandOptions(Base): + """ + ClusterOnDemandOptions + Configuration options specific to On-Demand instances. + + Attributes + ---------------------- + """ + + +class ClusterCapacityRequirements(Base): + """ + ClusterCapacityRequirements + Defines the instance capacity requirements for an instance group, including configurations for both Spot and On-Demand capacity types. + + Attributes + ---------------------- + spot: Configuration options specific to Spot instances. + on_demand: Configuration options specific to On-Demand instances. + """ + + spot: Optional[ClusterSpotOptions] = Unassigned() + on_demand: Optional[ClusterOnDemandOptions] = Unassigned() + + +class ClusterEbsVolumeConfig(Base): + """ + ClusterEbsVolumeConfig + Defines the configuration for attaching an additional Amazon Elastic Block Store (EBS) volume to each instance of the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024. + + Attributes + ---------------------- + volume_size_in_gb: The size in gigabytes (GB) of the additional EBS volume to be attached to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker. + volume_kms_key_id: The ID of a KMS key to encrypt the Amazon EBS volume. + root_volume: Specifies whether the configuration is for the cluster's root or secondary Amazon EBS volume. You can specify two ClusterEbsVolumeConfig fields to configure both the root and secondary volumes. Set the value to True if you'd like to provide your own customer managed Amazon Web Services KMS key to encrypt the root volume. When True: The configuration is applied to the root volume. You can't specify the VolumeSizeInGB field. The size of the root volume is determined for you. You must specify a KMS key ID for VolumeKmsKeyId to encrypt the root volume with your own KMS key instead of an Amazon Web Services owned KMS key. Otherwise, by default, the value is False, and the following applies: The configuration is applied to the secondary volume, while the root volume is encrypted with an Amazon Web Services owned key. You must specify the VolumeSizeInGB field. You can optionally specify the VolumeKmsKeyId to encrypt the secondary volume with your own KMS key instead of an Amazon Web Services owned KMS key. + """ + + volume_size_in_gb: Optional[int] = Unassigned() + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + root_volume: Optional[bool] = Unassigned() + + +class ClusterMetadata(Base): + """ + ClusterMetadata + Metadata information about a HyperPod cluster showing information about the cluster level operations, such as creating, updating, and deleting. + + Attributes + ---------------------- + failure_message: An error message describing why the cluster level operation (such as creating, updating, or deleting) failed. + eks_role_access_entries: A list of Amazon EKS IAM role ARNs associated with the cluster. This is created by HyperPod on your behalf and only applies for EKS orchestrated clusters. + slr_access_entry: The Service-Linked Role (SLR) associated with the cluster. This is created by HyperPod on your behalf and only applies for EKS orchestrated clusters. + """ + + failure_message: Optional[StrPipeVar] = Unassigned() + eks_role_access_entries: Optional[List[StrPipeVar]] = Unassigned() + slr_access_entry: Optional[StrPipeVar] = Unassigned() + + +class InstanceGroupMetadata(Base): + """ + InstanceGroupMetadata + Metadata information about an instance group in a HyperPod cluster. + + Attributes + ---------------------- + failure_message: An error message describing why the instance group level operation (such as creating, scaling, or deleting) failed. + availability_zone_id: The ID of the Availability Zone where the instance group is located. + capacity_reservation: Information about the Capacity Reservation used by the instance group. + subnet_id: The ID of the subnet where the instance group is located. + security_group_ids: A list of security group IDs associated with the instance group. + ami_override: If you use a custom Amazon Machine Image (AMI) for the instance group, this field shows the ID of the custom AMI. + """ + + failure_message: Optional[StrPipeVar] = Unassigned() + availability_zone_id: Optional[StrPipeVar] = Unassigned() + capacity_reservation: Optional[CapacityReservation] = Unassigned() + subnet_id: Optional[StrPipeVar] = Unassigned() + security_group_ids: Optional[List[StrPipeVar]] = Unassigned() + ami_override: Optional[StrPipeVar] = Unassigned() + + +class InstanceGroupScalingMetadata(Base): + """ + InstanceGroupScalingMetadata + Metadata information about scaling operations for an instance group. + + Attributes + ---------------------- + instance_count: The current number of instances in the group. + target_count: The desired number of instances for the group after scaling. + min_count: Minimum instance count of the instance group. + failure_message: An error message describing why the scaling operation failed, if applicable. + """ + + instance_count: Optional[int] = Unassigned() + target_count: Optional[int] = Unassigned() + min_count: Optional[int] = Unassigned() + failure_message: Optional[StrPipeVar] = Unassigned() + + +class InstanceMetadata(Base): + """ + InstanceMetadata + Metadata information about an instance in a HyperPod cluster. + + Attributes + ---------------------- + customer_eni: The ID of the customer-managed Elastic Network Interface (ENI) associated with the instance. + additional_enis: Information about additional Elastic Network Interfaces (ENIs) associated with the instance. + capacity_reservation: Information about the Capacity Reservation used by the instance. + failure_message: An error message describing why the instance creation or update failed, if applicable. + lcs_execution_state: The execution state of the Lifecycle Script (LCS) for the instance. + node_logical_id: The unique logical identifier of the node within the cluster. The ID used here is the same object as in the BatchAddClusterNodes API. + """ + + customer_eni: Optional[StrPipeVar] = Unassigned() + additional_enis: Optional[AdditionalEnis] = Unassigned() + capacity_reservation: Optional[CapacityReservation] = Unassigned() + failure_message: Optional[StrPipeVar] = Unassigned() + lcs_execution_state: Optional[StrPipeVar] = Unassigned() + node_logical_id: Optional[StrPipeVar] = Unassigned() + + +class EventMetadata(Base): + """ + EventMetadata + Metadata associated with a cluster event, which may include details about various resource types. + + Attributes + ---------------------- + cluster: Metadata specific to cluster-level events. + instance_group: Metadata specific to instance group-level events. + instance_group_scaling: Metadata related to instance group scaling events. + instance: Metadata specific to instance-level events. + """ + + cluster: Optional[ClusterMetadata] = Unassigned() + instance_group: Optional[InstanceGroupMetadata] = Unassigned() + instance_group_scaling: Optional[InstanceGroupScalingMetadata] = Unassigned() + instance: Optional[InstanceMetadata] = Unassigned() + + +class EventDetails(Base): + """ + EventDetails + Detailed information about a specific event, including event metadata. + + Attributes + ---------------------- + event_metadata: Metadata specific to the event, which may include information about the cluster, instance group, or instance involved. + """ + + event_metadata: Optional[EventMetadata] = Unassigned() + + +class ClusterEventDetail(Base): + """ + ClusterEventDetail + Detailed information about a specific event in a HyperPod cluster. + + Attributes + ---------------------- + event_id: The unique identifier (UUID) of the event. + cluster_arn: The Amazon Resource Name (ARN) of the HyperPod cluster associated with the event. + cluster_name: The name of the HyperPod cluster associated with the event. + instance_group_name: The name of the instance group associated with the event, if applicable. + instance_id: The EC2 instance ID associated with the event, if applicable. + resource_type: The type of resource associated with the event. Valid values are Cluster, InstanceGroup, or Instance. + event_time: The timestamp when the event occurred. + event_details: Additional details about the event, including event-specific metadata. + description: A human-readable description of the event. + """ + + event_id: StrPipeVar + cluster_arn: StrPipeVar + cluster_name: Union[StrPipeVar, object] + resource_type: StrPipeVar + event_time: datetime.datetime + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_id: Optional[StrPipeVar] = Unassigned() + event_details: Optional[EventDetails] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + + +class ClusterEventSummary(Base): + """ + ClusterEventSummary + A summary of an event in a HyperPod cluster. + + Attributes + ---------------------- + event_id: The unique identifier (UUID) of the event. + cluster_arn: The Amazon Resource Name (ARN) of the HyperPod cluster associated with the event. + cluster_name: The name of the HyperPod cluster associated with the event. + instance_group_name: The name of the instance group associated with the event, if applicable. + instance_id: The Amazon Elastic Compute Cloud (EC2) instance ID associated with the event, if applicable. + resource_type: The type of resource associated with the event. Valid values are Cluster, InstanceGroup, or Instance. + event_time: The timestamp when the event occurred. + description: A brief, human-readable description of the event. + """ + + event_id: StrPipeVar + cluster_arn: StrPipeVar + cluster_name: Union[StrPipeVar, object] + resource_type: StrPipeVar + event_time: datetime.datetime + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_id: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + + +class ClusterFsxLustreConfig(Base): + """ + ClusterFsxLustreConfig + Defines the configuration for attaching an Amazon FSx for Lustre file system to instances in a SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + dns_name: The DNS name of the Amazon FSx for Lustre file system. + mount_name: The mount name of the Amazon FSx for Lustre file system. + mount_path: The local path where the Amazon FSx for Lustre file system is mounted on instances. + """ + + dns_name: StrPipeVar + mount_name: StrPipeVar + mount_path: Optional[StrPipeVar] = Unassigned() + + +class ClusterFsxOpenZfsConfig(Base): + """ + ClusterFsxOpenZfsConfig + Defines the configuration for attaching an Amazon FSx for OpenZFS file system to instances in a SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + dns_name: The DNS name of the Amazon FSx for OpenZFS file system. + mount_path: The local path where the Amazon FSx for OpenZFS file system is mounted on instances. + """ + + dns_name: StrPipeVar + mount_path: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceRequirementDetails(Base): + """ + ClusterInstanceRequirementDetails + The instance requirement details for a flexible instance group, including the current and desired instance types. + + Attributes + ---------------------- + current_instance_types: The instance types currently in use by the instance group. + desired_instance_types: The desired instance types for the instance group, as specified in the most recent update request. + """ + + current_instance_types: Optional[List[StrPipeVar]] = Unassigned() + desired_instance_types: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterInstanceTypeDetail(Base): + """ + ClusterInstanceTypeDetail + Details about a specific instance type within a flexible instance group, including the count and configuration. + + Attributes + ---------------------- + instance_type: The instance type. + current_count: The number of instances of this type currently running in the instance group. + threads_per_core: The number of threads per CPU core for this instance type. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + current_count: Optional[int] = Unassigned() + threads_per_core: Optional[int] = Unassigned() + + +class ClusterLifeCycleConfig(Base): + """ + ClusterLifeCycleConfig + The lifecycle configuration for a SageMaker HyperPod cluster. + + Attributes + ---------------------- + source_s3_uri: An Amazon S3 bucket path where your lifecycle scripts are stored. Make sure that the S3 bucket path starts with s3://sagemaker-. The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker-. + on_create: The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This entrypoint script runs during cluster creation. + on_init_complete: The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This script runs on the node after the AMI-based initialization is complete. + """ + + source_s3_uri: Optional[StrPipeVar] = Unassigned() + on_create: Optional[StrPipeVar] = Unassigned() + on_init_complete: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceStorageConfig(Base): + """ + ClusterInstanceStorageConfig + Defines the configuration for attaching additional storage to the instances in the SageMaker HyperPod cluster instance group. To learn more, see SageMaker HyperPod release notes: June 20, 2024. + + Attributes + ---------------------- + ebs_volume_config: Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker. + fsx_lustre_config: Defines the configuration for attaching an Amazon FSx for Lustre file system to the instances in the SageMaker HyperPod cluster instance group. + fsx_open_zfs_config: Defines the configuration for attaching an Amazon FSx for OpenZFS file system to the instances in the SageMaker HyperPod cluster instance group. + """ + + ebs_volume_config: Optional[ClusterEbsVolumeConfig] = Unassigned() + fsx_lustre_config: Optional[ClusterFsxLustreConfig] = Unassigned() + fsx_open_zfs_config: Optional[ClusterFsxOpenZfsConfig] = 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: StrPipeVar + deployment_config: Optional[DeploymentConfiguration] = Unassigned() + + +class ClusterKubernetesTaint(Base): + """ + ClusterKubernetesTaint + A Kubernetes taint that can be applied to cluster nodes. + + Attributes + ---------------------- + key: The key of the taint. + value: The value of the taint. + effect: The effect of the taint. Valid values are NoSchedule, PreferNoSchedule, and NoExecute. + """ + + key: StrPipeVar + effect: StrPipeVar + value: Optional[StrPipeVar] = Unassigned() + + +class ClusterKubernetesConfigDetails(Base): + """ + ClusterKubernetesConfigDetails + Detailed Kubernetes configuration showing both the current and desired state of labels and taints for cluster nodes. + + Attributes + ---------------------- + current_labels: The current labels applied to cluster nodes of an instance group. + desired_labels: The desired labels to be applied to cluster nodes of an instance group. + current_taints: The current taints applied to cluster nodes of an instance group. + desired_taints: The desired taints to be applied to cluster nodes of an instance group. + """ + + current_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + desired_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + current_taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() + desired_taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() + + +class ClusterSlurmConfigDetails(Base): + """ + ClusterSlurmConfigDetails + The Slurm configuration details for an instance group in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_type: The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login. + partition_names: The list of Slurm partition names that the instance group belongs to. + """ + + node_type: StrPipeVar + partition_names: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterNetworkInterfaceDetails(Base): + """ + ClusterNetworkInterfaceDetails + The network interface configuration details for a Amazon SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + interface_type: The type of network interface for the instance group. Valid values are efa and efa-only. + """ + + interface_type: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceGroupDetails(Base): + """ + ClusterInstanceGroupDetails + Details of an instance group in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + current_count: The number of instances that are currently in the instance group of a SageMaker HyperPod cluster. + target_count: The number of instances you specified to add to the instance group of a SageMaker HyperPod cluster. + min_count: The minimum number of instances that must be available in the instance group of a SageMaker HyperPod cluster before it transitions to InService status. + instance_group_name: The name of the instance group of a SageMaker HyperPod cluster. + instance_type: The instance type of the instance group of a SageMaker HyperPod cluster. + instance_requirements: The instance requirements for the instance group, including the current and desired instance types. This field is present for flexible instance groups that support multiple instance types. + instance_type_details: Details about the instance types in the instance group, including the count and configuration of each instance type. This field is present for flexible instance groups that support multiple instance types. + life_cycle_config: Details of LifeCycle configuration for the instance group. + execution_role: The execution role for the instance group to assume. + threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. + instance_storage_configs: The additional storage configurations for the instances in the SageMaker HyperPod cluster instance group. + on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated. + status: The current status of the cluster instance group. InService: The instance group is active and healthy. Creating: The instance group is being provisioned. Updating: The instance group is being updated. Failed: The instance group has failed to provision or is no longer healthy. Degraded: The instance group is degraded, meaning that some instances have failed to provision or are no longer healthy. Deleting: The instance group is being deleted. + 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_image_id: The ID of the Amazon Machine Image (AMI) currently in use by the instance group. + desired_image_id: The ID of the Amazon Machine Image (AMI) desired for the instance group. + active_operations: A map indicating active operations currently in progress for the instance group of a SageMaker HyperPod cluster. When there is a scaling operation in progress, this map contains a key Scaling with value 1. + kubernetes_config: The Kubernetes configuration for the instance group that contains labels and taints to be applied for the nodes in this instance group. + capacity_requirements: The instance capacity requirements for the instance group. + target_state_count: Represents the number of running nodes using the desired Image ID. During software update operations: This count shows the number of nodes running on the desired Image ID. If a rollback occurs, the current image ID and desired image ID (both included in the describe cluster response) swap values. The TargetStateCount then shows the number of nodes running on the newly designated desired image ID (which was previously the current image ID). During simultaneous scaling and software update operations: This count shows the number of instances running on the desired image ID, including any new instances created as part of the scaling request. New nodes are always created using the desired image ID, so TargetStateCount reflects the total count of nodes running on the desired image ID, even during rollback scenarios. + software_update_status: Status of the last software udpate request. Status transitions follow these possible sequences: Pending -> InProgress -> Succeeded Pending -> InProgress -> RollbackInProgress -> RollbackComplete Pending -> InProgress -> RollbackInProgress -> Failed + active_software_update_config + slurm_config: The Slurm configuration for the instance group. + network_interface: The network interface configuration for the instance group. + """ + + current_count: Optional[int] = Unassigned() + target_count: Optional[int] = Unassigned() + min_count: Optional[int] = Unassigned() + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + instance_requirements: Optional[ClusterInstanceRequirementDetails] = Unassigned() + instance_type_details: Optional[List[ClusterInstanceTypeDetail]] = Unassigned() + life_cycle_config: Optional[ClusterLifeCycleConfig] = Unassigned() + execution_role: Optional[StrPipeVar] = Unassigned() + threads_per_core: Optional[int] = Unassigned() + instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() + on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + training_plan_status: Optional[StrPipeVar] = Unassigned() + override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() + current_image_id: Optional[StrPipeVar] = Unassigned() + desired_image_id: Optional[StrPipeVar] = Unassigned() + active_operations: Optional[Dict[StrPipeVar, int]] = Unassigned() + kubernetes_config: Optional[ClusterKubernetesConfigDetails] = Unassigned() + capacity_requirements: Optional[ClusterCapacityRequirements] = Unassigned() + target_state_count: Optional[int] = Unassigned() + software_update_status: Optional[StrPipeVar] = Unassigned() + active_software_update_config: Optional[DeploymentConfiguration] = Unassigned() + slurm_config: Optional[ClusterSlurmConfigDetails] = Unassigned() + network_interface: Optional[ClusterNetworkInterfaceDetails] = Unassigned() + + +class ClusterInstanceRequirements(Base): + """ + ClusterInstanceRequirements + The instance requirements for a flexible instance group. Use this to specify multiple instance types that the instance group can use. The order of instance types in the list determines the priority for instance provisioning. + + Attributes + ---------------------- + instance_types: The list of instance types that the instance group can use. The order of instance types determines the priority—HyperPod attempts to provision instances using the first instance type in the list and falls back to subsequent types if capacity is unavailable. + """ + + instance_types: List[StrPipeVar] + + +class ClusterKubernetesConfig(Base): + """ + ClusterKubernetesConfig + Kubernetes configuration that specifies labels and taints to be applied to cluster nodes in an instance group. + + Attributes + ---------------------- + labels: Key-value pairs of labels to be applied to cluster nodes. + taints: List of taints to be applied to cluster nodes. + """ + + labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() + + +class ClusterSlurmConfig(Base): + """ + ClusterSlurmConfig + The Slurm configuration for an instance group in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_type: The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login. + partition_names: The list of Slurm partition names that the instance group belongs to. + """ + + node_type: StrPipeVar + partition_names: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterNetworkInterface(Base): + """ + ClusterNetworkInterface + The network interface configuration for a Amazon SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + interface_type: The type of network interface for the instance group. Valid values: efa – An EFA with ENA interface, which provides both the EFA device for low-latency, high-throughput communication and the ENA device for IP networking. efa-only – An EFA-only interface, which provides only the EFA device capabilities without the ENA device for traditional IP networking. For more information, see Elastic Fabric Adapter. + """ + + interface_type: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceGroupSpecification(Base): + """ + ClusterInstanceGroupSpecification + The specifications of an instance group that you need to define. + + Attributes + ---------------------- + instance_count: Specifies the number of instances to add to the instance group of a SageMaker HyperPod cluster. + min_instance_count: Defines the minimum number of instances required for an instance group to become InService. If this threshold isn't met within 3 hours, the instance group rolls back to its previous state - zero instances for new instance groups, or previous settings for existing instance groups. MinInstanceCount only affects the initial transition to InService and does not guarantee maintaining this minimum afterward. + instance_group_name: Specifies the name of the instance group. + instance_type: Specifies the instance type of the instance group. + instance_requirements: The instance requirements for the instance group, including the instance types to use. Use this to create a flexible instance group that supports multiple instance types. The InstanceType and InstanceRequirements properties are mutually exclusive. + life_cycle_config: Specifies the LifeCycle configuration for the instance group. + execution_role: Specifies an IAM execution role to be assumed by the instance group. + threads_per_core: Specifies the value for Threads per core. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For instance types that doesn't support multithreading, specify 1. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. + instance_storage_configs: Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group. + 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. + 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. + kubernetes_config: Specifies the Kubernetes configuration for the instance group. You describe what you want the labels and taints to look like, and the cluster works to reconcile the actual state with the declared state for nodes in this instance group. + slurm_config: Specifies the Slurm configuration for the instance group. + capacity_requirements: Specifies the capacity requirements for the instance group. + network_interface: The network interface configuration for the instance group. + """ + + instance_count: int + instance_group_name: StrPipeVar + execution_role: StrPipeVar + min_instance_count: Optional[int] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + instance_requirements: Optional[ClusterInstanceRequirements] = Unassigned() + life_cycle_config: Optional[ClusterLifeCycleConfig] = Unassigned() + threads_per_core: Optional[int] = Unassigned() + instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() + on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() + image_id: Optional[StrPipeVar] = Unassigned() + kubernetes_config: Optional[ClusterKubernetesConfig] = Unassigned() + slurm_config: Optional[ClusterSlurmConfig] = Unassigned() + capacity_requirements: Optional[ClusterCapacityRequirements] = Unassigned() + network_interface: Optional[ClusterNetworkInterface] = Unassigned() + + +class ClusterInstancePlacement(Base): + """ + ClusterInstancePlacement + Specifies the placement details for the node in the SageMaker HyperPod cluster, including the Availability Zone and the unique identifier (ID) of the Availability Zone. + + Attributes + ---------------------- + availability_zone: The Availability Zone where the node in the SageMaker HyperPod cluster is launched. + availability_zone_id: The unique identifier (ID) of the Availability Zone where the node in the SageMaker HyperPod cluster is launched. + """ + + availability_zone: Optional[StrPipeVar] = Unassigned() + availability_zone_id: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceStatusDetails(Base): + """ + ClusterInstanceStatusDetails + Details of an instance in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + status: The status of an instance in a SageMaker HyperPod cluster. + message: The message from an instance in a SageMaker HyperPod cluster. + """ + + status: StrPipeVar + message: Optional[StrPipeVar] = Unassigned() + + +class ClusterKubernetesConfigNodeDetails(Base): + """ + ClusterKubernetesConfigNodeDetails + Node-specific Kubernetes configuration showing both current and desired state of labels and taints for an individual cluster node. + + Attributes + ---------------------- + current_labels: The current labels applied to the cluster node. + desired_labels: The desired labels to be applied to the cluster node. + current_taints: The current taints applied to the cluster node. + desired_taints: The desired taints to be applied to the cluster node. + """ + + current_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + desired_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + current_taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() + desired_taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() + + +class UltraServerInfo(Base): + """ + UltraServerInfo + Contains information about the UltraServer object. + + Attributes + ---------------------- + id: The unique identifier of the UltraServer. + type: The type of the UltraServer. + """ + + id: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() + + +class ClusterNodeDetails(Base): + """ + ClusterNodeDetails + Details of an instance (also called a node interchangeably) in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + instance_group_name: The instance group name in which the instance is. + instance_id: The ID of the instance. + node_logical_id: A unique identifier for the node that persists throughout its lifecycle, from provisioning request to termination. This identifier can be used to track the node even before it has an assigned InstanceId. + 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 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. + instance_storage_configs: The configurations of additional storage specified to the instance group where the instance (node) is launched. + private_primary_ip: The private primary IP address of the SageMaker HyperPod cluster node. + private_primary_ipv6: The private primary IPv6 address of the SageMaker HyperPod cluster node when configured with an Amazon VPC that supports IPv6 and includes subnets with IPv6 addressing enabled in either the cluster Amazon VPC configuration or the instance group Amazon VPC configuration. + private_dns_hostname: The private DNS hostname of the SageMaker HyperPod cluster node. + placement: The placement details of the SageMaker HyperPod cluster node. + current_image_id: The ID of the Amazon Machine Image (AMI) currently in use by the node. + desired_image_id: The ID of the Amazon Machine Image (AMI) desired for the node. + ultra_server_info: Contains information about the UltraServer. + kubernetes_config: The Kubernetes configuration applied to this node, showing both the current and desired state of labels and taints. The cluster works to reconcile the actual state with the declared state. + capacity_type: The capacity type of the node. Valid values are OnDemand and Spot. When set to OnDemand, the node is launched as an On-Demand instance. When set to Spot, the node is launched as a Spot instance. + network_interface: The network interface configuration for the cluster node. + """ + + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_id: Optional[StrPipeVar] = Unassigned() + node_logical_id: Optional[StrPipeVar] = Unassigned() + instance_status: Optional[ClusterInstanceStatusDetails] = Unassigned() + instance_type: Optional[StrPipeVar] = 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() + instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() + private_primary_ip: Optional[StrPipeVar] = Unassigned() + private_primary_ipv6: Optional[StrPipeVar] = Unassigned() + private_dns_hostname: Optional[StrPipeVar] = Unassigned() + placement: Optional[ClusterInstancePlacement] = Unassigned() + current_image_id: Optional[StrPipeVar] = Unassigned() + desired_image_id: Optional[StrPipeVar] = Unassigned() + ultra_server_info: Optional[UltraServerInfo] = Unassigned() + kubernetes_config: Optional[ClusterKubernetesConfigNodeDetails] = Unassigned() + capacity_type: Optional[StrPipeVar] = Unassigned() + network_interface: Optional[ClusterNetworkInterfaceDetails] = Unassigned() + + +class ClusterNodeSummary(Base): + """ + ClusterNodeSummary + Lists a summary of the properties of an instance (also called a node interchangeably) of a SageMaker HyperPod cluster. + + Attributes + ---------------------- + instance_group_name: The name of the instance group in which the instance is. + instance_id: The ID of the instance. + node_logical_id: A unique identifier for the node that persists throughout its lifecycle, from provisioning request to termination. This identifier can be used to track the node even before it has an assigned InstanceId. This field is only included when IncludeNodeLogicalIds is set to True in the ListClusterNodes request. + instance_type: The type of the instance. + launch_time: The time when the instance is launched. + last_software_update_time: The time when SageMaker last updated the software of the instances in the cluster. + instance_status: The status of the instance. + ultra_server_info: Contains information about the UltraServer. + private_dns_hostname: The private DNS hostname of the SageMaker HyperPod cluster node. + """ + + instance_group_name: StrPipeVar + instance_id: StrPipeVar + instance_type: StrPipeVar + launch_time: datetime.datetime + instance_status: ClusterInstanceStatusDetails + node_logical_id: Optional[StrPipeVar] = Unassigned() + last_software_update_time: Optional[datetime.datetime] = Unassigned() + ultra_server_info: Optional[UltraServerInfo] = Unassigned() + private_dns_hostname: Optional[StrPipeVar] = Unassigned() + + +class ClusterOrchestratorEksConfig(Base): + """ + ClusterOrchestratorEksConfig + The configuration settings for the Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster. + + Attributes + ---------------------- + cluster_arn: The Amazon Resource Name (ARN) of the Amazon EKS cluster associated with the SageMaker HyperPod cluster. + """ + + cluster_arn: StrPipeVar + + +class ClusterOrchestratorSlurmConfig(Base): + """ + ClusterOrchestratorSlurmConfig + The configuration settings for the Slurm orchestrator used with the SageMaker HyperPod cluster. + + Attributes + ---------------------- + slurm_config_strategy: The strategy for managing partitions for the Slurm configuration. Valid values are Managed, Overwrite, and Merge. + """ + + slurm_config_strategy: Optional[StrPipeVar] = Unassigned() + + +class ClusterOrchestrator(Base): + """ + ClusterOrchestrator + The type of orchestrator used for the SageMaker HyperPod cluster. + + Attributes + ---------------------- + eks: The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster. + slurm: The Slurm orchestrator configuration for the SageMaker HyperPod cluster. + """ + + eks: Optional[ClusterOrchestratorEksConfig] = Unassigned() + slurm: Optional[ClusterOrchestratorSlurmConfig] = Unassigned() + + +class FSxLustreConfig(Base): + """ + FSxLustreConfig + Configuration settings for an Amazon FSx for Lustre file system to be used with the cluster. + + Attributes + ---------------------- + size_in_gi_b: The storage capacity of the Amazon FSx for Lustre file system, specified in gibibytes (GiB). + per_unit_storage_throughput: The throughput capacity of the Amazon FSx for Lustre file system, measured in MB/s per TiB of storage. + """ + + size_in_gi_b: int + per_unit_storage_throughput: int + + +class EnvironmentConfigDetails(Base): + """ + EnvironmentConfigDetails + The configuration details for the restricted instance groups (RIG) environment. + + Attributes + ---------------------- + f_sx_lustre_config: Configuration settings for an Amazon FSx for Lustre file system to be used with the cluster. + s3_output_path: The Amazon S3 path where output data from the restricted instance group (RIG) environment will be stored. + """ + + f_sx_lustre_config: Optional[FSxLustreConfig] = Unassigned() + s3_output_path: Optional[StrPipeVar] = Unassigned() + + +class ClusterRestrictedInstanceGroupDetails(Base): + """ + ClusterRestrictedInstanceGroupDetails + The instance group details of the restricted instance group (RIG). + + Attributes + ---------------------- + current_count: The number of instances that are currently in the restricted instance group of a SageMaker HyperPod cluster. + target_count: The number of instances you specified to add to the restricted instance group of a SageMaker HyperPod cluster. + instance_group_name: The name of the restricted instance group of a SageMaker HyperPod cluster. + instance_type: The instance type of the restricted instance group of a SageMaker HyperPod cluster. + execution_role: The execution role for the restricted instance group to assume. + threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. + instance_storage_configs: The additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group. + on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster's restricted instance group is created or updated. + status: The current status of the cluster's restricted instance group. InService: The restricted instance group is active and healthy. Creating: The restricted instance group is being provisioned. Updating: The restricted instance group is being updated. Failed: The restricted instance group has failed to provision or is no longer healthy. Degraded: The restricted instance group is degraded, meaning that some instances have failed to provision or are no longer healthy. Deleting: The restricted instance group is being deleted. + training_plan_arn: The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving 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 restricted instance group. + override_vpc_config + scheduled_update_config + environment_config: The configuration for the restricted instance groups (RIG) environment. + """ + + current_count: Optional[int] = Unassigned() + target_count: Optional[int] = Unassigned() + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + execution_role: Optional[StrPipeVar] = Unassigned() + threads_per_core: Optional[int] = Unassigned() + instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() + on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + training_plan_status: Optional[StrPipeVar] = Unassigned() + override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() + environment_config: Optional[EnvironmentConfigDetails] = Unassigned() + + +class EnvironmentConfig(Base): + """ + EnvironmentConfig + The configuration for the restricted instance groups (RIG) environment. + + Attributes + ---------------------- + f_sx_lustre_config: Configuration settings for an Amazon FSx for Lustre file system to be used with the cluster. + """ + + f_sx_lustre_config: Optional[FSxLustreConfig] = Unassigned() + + +class ClusterRestrictedInstanceGroupSpecification(Base): + """ + ClusterRestrictedInstanceGroupSpecification + The specifications of a restricted instance group that you need to define. + + Attributes + ---------------------- + instance_count: Specifies the number of instances to add to the restricted instance group of a SageMaker HyperPod cluster. + instance_group_name: Specifies the name of the restricted instance group. + instance_type: Specifies the instance type of the restricted instance group. + execution_role: Specifies an IAM execution role to be assumed by the restricted instance group. + threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. + instance_storage_configs: Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group. + on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster restricted instance group is created or updated. + training_plan_arn: The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + override_vpc_config + scheduled_update_config + environment_config: The configuration for the restricted instance groups (RIG) environment. + """ + + instance_count: int + instance_group_name: StrPipeVar + instance_type: StrPipeVar + execution_role: StrPipeVar + environment_config: EnvironmentConfig + threads_per_core: Optional[int] = Unassigned() + instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() + on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + override_vpc_config: Optional[VpcConfig] = Unassigned() + scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() + + +class ClusterSchedulerConfigSummary(Base): + """ + ClusterSchedulerConfigSummary + Summary of the cluster policy. + + Attributes + ---------------------- + cluster_scheduler_config_arn: ARN of the cluster policy. + cluster_scheduler_config_id: ID of the cluster policy. + cluster_scheduler_config_version: Version of the cluster policy. + name: Name of the cluster policy. + creation_time: Creation time of the cluster policy. + last_modified_time: Last modified time of the cluster policy. + status: Status of the cluster policy. + cluster_arn: ARN of the cluster. + """ + + cluster_scheduler_config_arn: StrPipeVar + cluster_scheduler_config_id: StrPipeVar + name: StrPipeVar + creation_time: datetime.datetime + status: StrPipeVar + cluster_scheduler_config_version: Optional[int] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + cluster_arn: Optional[StrPipeVar] = Unassigned() + + +class ClusterSummary(Base): + """ + ClusterSummary + Lists a summary of the properties of a SageMaker HyperPod cluster. + + Attributes + ---------------------- + cluster_arn: The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. + cluster_name: The name of the SageMaker HyperPod cluster. + creation_time: The time when the SageMaker HyperPod cluster is created. + cluster_status: The status of the SageMaker HyperPod cluster. + training_plan_arns: A list of Amazon Resource Names (ARNs) of the training plans associated with this cluster. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + """ + + cluster_arn: StrPipeVar + cluster_name: Union[StrPipeVar, object] + creation_time: datetime.datetime + cluster_status: StrPipeVar + training_plan_arns: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterTieredStorageConfig(Base): + """ + ClusterTieredStorageConfig + Defines the configuration for managed tier checkpointing in a HyperPod cluster. Managed tier checkpointing uses multiple storage tiers, including cluster CPU memory, to provide faster checkpoint operations and improved fault tolerance for large-scale model training. The system automatically saves checkpoints at high frequency to memory and periodically persists them to durable storage, like Amazon S3. + + Attributes + ---------------------- + mode: Specifies whether managed tier checkpointing is enabled or disabled for the HyperPod cluster. When set to Enable, the system installs a memory management daemon that provides disaggregated memory as a service for checkpoint storage. When set to Disable, the feature is turned off and the memory management daemon is removed from the cluster. + instance_memory_allocation_percentage: The percentage (int) of cluster memory to allocate for checkpointing. + """ + + mode: StrPipeVar + instance_memory_allocation_percentage: Optional[int] = Unassigned() + + +class CustomImage(Base): + """ + CustomImage + A custom SageMaker AI image. For more information, see Bring your own SageMaker AI image. + + Attributes + ---------------------- + image_name: The name of the CustomImage. Must be unique to your account. + image_version_number: The version number of the CustomImage. + app_image_config_name: The name of the AppImageConfig. + """ + + image_name: Union[StrPipeVar, object] + app_image_config_name: Union[StrPipeVar, object] + image_version_number: Optional[int] = Unassigned() + + +class CodeEditorAppSettings(Base): + """ + CodeEditorAppSettings + The Code Editor application settings. For more information about Code Editor, see Get started with Code Editor in Amazon SageMaker. + + Attributes + ---------------------- + default_resource_spec + custom_images: A list of custom SageMaker images that are configured to run as a Code Editor app. + lifecycle_config_arns: The Amazon Resource Name (ARN) of the Code Editor application lifecycle configuration. + app_lifecycle_management: Settings that are used to configure and manage the lifecycle of CodeEditor applications. + built_in_lifecycle_config_arn: The lifecycle configuration that runs before the default lifecycle configuration. It can override changes made in the default lifecycle configuration. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + custom_images: Optional[List[CustomImage]] = Unassigned() + lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() + app_lifecycle_management: Optional[AppLifecycleManagement] = Unassigned() + built_in_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + + +class CodeRepository(Base): + """ + CodeRepository + A Git repository that SageMaker AI automatically displays to users for cloning in the JupyterServer application. + + Attributes + ---------------------- + repository_url: The URL of the Git repository. + """ + + repository_url: StrPipeVar + + +class GitConfig(Base): + """ + GitConfig + Specifies configuration details for a Git repository in your Amazon Web Services account. + + Attributes + ---------------------- + repository_url: The URL where the Git repository is located. + branch: The default branch for the Git repository. + secret_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of AWSCURRENT and must be in the following format: {"username": UserName, "password": Password} + """ + + repository_url: StrPipeVar + branch: Optional[StrPipeVar] = Unassigned() + secret_arn: Optional[StrPipeVar] = Unassigned() + + +class CodeRepositorySummary(Base): + """ + CodeRepositorySummary + Specifies summary information about a Git repository. + + Attributes + ---------------------- + code_repository_name: The name of the Git repository. + code_repository_arn: The Amazon Resource Name (ARN) of the Git repository. + creation_time: The date and time that the Git repository was created. + last_modified_time: The date and time that the Git repository was last modified. + git_config: Configuration details for the Git repository, including the URL where it is located and the ARN of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the repository. + """ + + code_repository_name: Union[StrPipeVar, object] + code_repository_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + git_config: Optional[GitConfig] = Unassigned() + + +class CognitoConfig(Base): + """ + CognitoConfig + Use this parameter to configure your Amazon Cognito workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool. + + Attributes + ---------------------- + user_pool: A user pool is a user directory in Amazon Cognito. With a user pool, your users can sign in to your web or mobile app through Amazon Cognito. Your users can also sign in through social identity providers like Google, Facebook, Amazon, or Apple, and through SAML identity providers. + client_id: The client ID for your Amazon Cognito user pool. + """ + + user_pool: StrPipeVar + client_id: StrPipeVar + + +class CognitoMemberDefinition(Base): + """ + CognitoMemberDefinition + Identifies a Amazon Cognito user group. A user group can be used in on or more work teams. + + Attributes + ---------------------- + user_pool: An identifier for a user pool. The user pool must be in the same region as the service that you are calling. + user_group: An identifier for a user group. + client_id: An identifier for an application client. You must create the app client ID using Amazon Cognito. + """ + + user_pool: StrPipeVar + user_group: StrPipeVar + client_id: StrPipeVar + + +class VectorConfig(Base): + """ + VectorConfig + Configuration for your vector collection type. + + Attributes + ---------------------- + dimension: The number of elements in your vector. + """ + + dimension: int + + +class CollectionConfig(Base): + """ + CollectionConfig + Configuration for your collection. + + Attributes + ---------------------- + vector_config: Configuration for your vector collection type. Dimension: The number of elements in your vector. + """ + + vector_config: Optional[VectorConfig] = Unassigned() + + +class CollectionConfiguration(Base): + """ + CollectionConfiguration + Configuration information for the Amazon SageMaker Debugger output tensor collections. + + Attributes + ---------------------- + collection_name: The name of the tensor collection. The name must be unique relative to other rule configuration names. + collection_parameters: Parameter values for the tensor collection. The allowed parameters are "name", "include_regex", "reduction_config", "save_config", "tensor_names", and "save_histogram". + """ + + collection_name: Optional[StrPipeVar] = Unassigned() + collection_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class CompilationJobSummary(Base): + """ + CompilationJobSummary + A summary of a model compilation job. + + Attributes + ---------------------- + compilation_job_name: The name of the model compilation job that you want a summary for. + compilation_job_arn: The Amazon Resource Name (ARN) of the model compilation job. + creation_time: The time when the model compilation job was created. + compilation_start_time: The time when the model compilation job started. + compilation_end_time: The time when the model compilation job completed. + compilation_target_device: The type of device that the model will run on after the compilation job has completed. + compilation_target_platform_os: The type of OS that the model will run on after the compilation job has completed. + compilation_target_platform_arch: The type of architecture that the model will run on after the compilation job has completed. + compilation_target_platform_accelerator: The type of accelerator that the model will run on after the compilation job has completed. + last_modified_time: The time when the model compilation job was last modified. + compilation_job_status: The status of the model compilation job. + """ + + compilation_job_name: Union[StrPipeVar, object] + compilation_job_arn: StrPipeVar + creation_time: datetime.datetime + compilation_job_status: StrPipeVar + compilation_start_time: Optional[datetime.datetime] = Unassigned() + compilation_end_time: Optional[datetime.datetime] = Unassigned() + compilation_target_device: Optional[StrPipeVar] = Unassigned() + compilation_target_platform_os: Optional[StrPipeVar] = Unassigned() + compilation_target_platform_arch: Optional[StrPipeVar] = Unassigned() + compilation_target_platform_accelerator: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class ComputeQuotaResourceConfig(Base): + """ + ComputeQuotaResourceConfig + Configuration of the resources used for the compute allocation definition. + + Attributes + ---------------------- + instance_type: The instance type of the instance group for the cluster. + count: The number of instances to add to the instance group of a SageMaker HyperPod cluster. + accelerators: The number of accelerators to allocate. If you don't specify a value for vCPU and MemoryInGiB, SageMaker AI automatically allocates ratio-based values for those parameters based on the number of accelerators you provide. For example, if you allocate 16 out of 32 total accelerators, SageMaker AI uses the ratio of 0.5 and allocates values to vCPU and MemoryInGiB. + v_cpu: The number of vCPU to allocate. If you specify a value only for vCPU, SageMaker AI automatically allocates ratio-based values for MemoryInGiB based on this vCPU parameter. For example, if you allocate 20 out of 40 total vCPU, SageMaker AI uses the ratio of 0.5 and allocates values to MemoryInGiB. Accelerators are set to 0. + memory_in_gi_b: The amount of memory in GiB to allocate. If you specify a value only for this parameter, SageMaker AI automatically allocates a ratio-based value for vCPU based on this memory that you provide. For example, if you allocate 200 out of 400 total memory in GiB, SageMaker AI uses the ratio of 0.5 and allocates values to vCPU. Accelerators are set to 0. + accelerator_partition: The accelerator partition configuration for fractional GPU allocation. + """ + + instance_type: StrPipeVar + count: Optional[int] = Unassigned() + accelerators: Optional[int] = Unassigned() + v_cpu: Optional[float] = Unassigned() + memory_in_gi_b: Optional[float] = Unassigned() + accelerator_partition: Optional[AcceleratorPartitionConfig] = Unassigned() + + +class ResourceSharingConfig(Base): + """ + ResourceSharingConfig + Resource sharing configuration. + + Attributes + ---------------------- + strategy: The strategy of how idle compute is shared within the cluster. The following are the options of strategies. DontLend: entities do not lend idle compute. Lend: entities can lend idle compute to entities that can borrow. LendandBorrow: entities can lend idle compute and borrow idle compute from other entities. Default is LendandBorrow. + borrow_limit: The limit on how much idle compute can be borrowed.The values can be 1 - 500 percent of idle compute that the team is allowed to borrow. Default is 50. + absolute_borrow_limits: The absolute limits on compute resources that can be borrowed from idle compute. When specified, these limits define the maximum amount of specific resource types (such as accelerators, vCPU, or memory) that an entity can borrow, regardless of the percentage-based BorrowLimit. + """ + + strategy: StrPipeVar + borrow_limit: Optional[int] = Unassigned() + absolute_borrow_limits: Optional[List[ComputeQuotaResourceConfig]] = Unassigned() + + +class ComputeQuotaConfig(Base): + """ + ComputeQuotaConfig + Configuration of the compute allocation definition for an entity. This includes the resource sharing option and the setting to preempt low priority tasks. + + Attributes + ---------------------- + compute_quota_resources: Allocate compute resources by instance types. + resource_sharing_config: Resource sharing configuration. This defines how an entity can lend and borrow idle compute with other entities within the cluster. + preempt_team_tasks: Allows workloads from within an entity to preempt same-team workloads. When set to LowerPriority, the entity's lower priority tasks are preempted by their own higher priority tasks. Default is LowerPriority. + """ + + compute_quota_resources: Optional[List[ComputeQuotaResourceConfig]] = Unassigned() + resource_sharing_config: Optional[ResourceSharingConfig] = Unassigned() + preempt_team_tasks: Optional[StrPipeVar] = Unassigned() + + +class ComputeQuotaTarget(Base): + """ + ComputeQuotaTarget + The target entity to allocate compute resources to. + + Attributes + ---------------------- + team_name: Name of the team to allocate compute resources to. + fair_share_weight: Assigned entity fair-share weight. Idle compute will be shared across entities based on these assigned weights. This weight is only used when FairShare is enabled. A weight of 0 is the lowest priority and 100 is the highest. Weight 0 is the default. + """ + + team_name: StrPipeVar + fair_share_weight: Optional[int] = Unassigned() + + +class ComputeQuotaSummary(Base): + """ + ComputeQuotaSummary + Summary of the compute allocation definition. + + Attributes + ---------------------- + compute_quota_arn: ARN of the compute allocation definition. + compute_quota_id: ID of the compute allocation definition. + name: Name of the compute allocation definition. + compute_quota_version: Version of the compute allocation definition. + status: Status of the compute allocation definition. + cluster_arn: ARN of the cluster. + compute_quota_config: Configuration of the compute allocation definition. This includes the resource sharing option, and the setting to preempt low priority tasks. + compute_quota_target: The target entity to allocate compute resources to. + activation_state: The state of the compute allocation being described. Use to enable or disable compute allocation. Default is Enabled. + creation_time: Creation time of the compute allocation definition. + last_modified_time: Last modified time of the compute allocation definition. + """ + + compute_quota_arn: StrPipeVar + compute_quota_id: StrPipeVar + name: StrPipeVar + status: StrPipeVar + compute_quota_target: ComputeQuotaTarget + creation_time: datetime.datetime + compute_quota_version: Optional[int] = Unassigned() + cluster_arn: Optional[StrPipeVar] = Unassigned() + compute_quota_config: Optional[ComputeQuotaConfig] = Unassigned() + activation_state: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class ConditionStepMetadata(Base): + """ + ConditionStepMetadata + Metadata for a Condition step. + + Attributes + ---------------------- + outcome: The outcome of the Condition step evaluation. + """ + + outcome: Optional[StrPipeVar] = Unassigned() + + +class ConflictException(Base): + """ + ConflictException + There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class RepositoryAuthConfig(Base): + """ + RepositoryAuthConfig + Specifies an authentication configuration for the private docker registry where your model image is hosted. Specify a value for this property only if you specified Vpc as the value for the RepositoryAccessMode field of the ImageConfig object that you passed to a call to CreateModel and the private Docker registry where the model image is hosted requires authentication. + + Attributes + ---------------------- + repository_credentials_provider_arn: The Amazon Resource Name (ARN) of an Amazon Web Services Lambda function that provides credentials to authenticate to the private Docker registry where your model image is hosted. For information about how to create an Amazon Web Services Lambda function, see Create a Lambda function with the console in the Amazon Web Services Lambda Developer Guide. + """ + + repository_credentials_provider_arn: StrPipeVar + + +class ImageConfig(Base): + """ + ImageConfig + Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon Virtual Private Cloud (VPC). + + Attributes + ---------------------- + repository_access_mode: Set this to one of the following values: Platform - The model image is hosted in Amazon ECR. Vpc - The model image is hosted in a private Docker registry in your VPC. + repository_auth_config: (Optional) Specifies an authentication configuration for the private docker registry where your model image is hosted. Specify a value for this property only if you specified Vpc as the value for the RepositoryAccessMode field, and the private Docker registry where the model image is hosted requires authentication. + """ + + repository_access_mode: StrPipeVar + repository_auth_config: Optional[RepositoryAuthConfig] = Unassigned() + + +class MultiModelConfig(Base): + """ + MultiModelConfig + Specifies additional configuration for hosting multi-model endpoints. + + Attributes + ---------------------- + model_cache_setting: Whether to cache models for a multi-model endpoint. By default, multi-model endpoints cache models so that a model does not have to be loaded into memory each time it is invoked. Some use cases do not benefit from model caching. For example, if an endpoint hosts a large number of models that are each invoked infrequently, the endpoint might perform better if you disable model caching. To disable model caching, set the value of this parameter to Disabled. + """ + + model_cache_setting: Optional[StrPipeVar] = Unassigned() + + +class ContainerDefinition(Base): + """ + ContainerDefinition + Describes the container, as part of model definition. + + Attributes + ---------------------- + container_hostname: This parameter is ignored for models that contain only a PrimaryContainer. When a ContainerDefinition is part of an inference pipeline, the value of the parameter uniquely identifies the container for the purposes of logging and metrics. For information, see Use Logs and Metrics to Monitor an Inference Pipeline. If you don't specify a value for this parameter for a ContainerDefinition that is part of an inference pipeline, a unique name is automatically assigned based on the position of the ContainerDefinition in the pipeline. If you specify a value for the ContainerHostName for any ContainerDefinition that is part of an inference pipeline, you must specify a value for the ContainerHostName parameter of every ContainerDefinition in that pipeline. + image: The path where inference code is stored. This can be either in Amazon EC2 Container Registry or in a Docker registry that is accessible from the same VPC that you configure for your endpoint. If you are using your own custom algorithm instead of an algorithm provided by SageMaker, the inference code must meet SageMaker requirements. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker. The model artifacts in an Amazon S3 bucket and the Docker image for inference container in Amazon EC2 Container Registry must be in the same region as the model or endpoint you are creating. + image_config: Specifies whether the model container is in Amazon ECR or a private Docker registry accessible from your Amazon Virtual Private Cloud (VPC). For information about storing containers in a private Docker registry, see Use a Private Docker Registry for Real-Time Inference Containers. The model artifacts in an Amazon S3 bucket and the Docker image for inference container in Amazon EC2 Container Registry must be in the same region as the model or endpoint you are creating. + mode: Whether the container hosts a single model or multiple models. + model_data_url: The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The S3 path is required for SageMaker built-in algorithms, but not if you use your own algorithms. For more information on built-in algorithms, see Common Parameters. The model artifacts must be in an S3 bucket that is in the same region as the model or endpoint you are creating. If you provide a value for this parameter, SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provide. Amazon Web Services STS is activated in your Amazon Web Services account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region in the Amazon Web Services Identity and Access Management User Guide. If you use a built-in algorithm to create a model, SageMaker requires that you provide a S3 path to the model artifacts in ModelDataUrl. + model_data_source: Specifies the location of ML model data to deploy. Currently you cannot use ModelDataSource in conjunction with SageMaker batch transform, SageMaker serverless endpoints, SageMaker multi-model endpoints, and SageMaker Marketplace. + additional_model_data_sources: Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModel action. + environment: The environment variables to set in the Docker container. Don't include any sensitive data in your environment variables. The maximum length of each key and value in the Environment map is 1024 bytes. The maximum length of all keys and values in the map, combined, is 32 KB. If you pass multiple containers to a CreateModel request, then the maximum length of all of their maps, combined, is also 32 KB. + model_package_name: The name or Amazon Resource Name (ARN) of the model package to use to create the model. + inference_specification_name: The inference specification name in the model package version. + multi_model_config: Specifies additional configuration for multi-model endpoints. + """ + + container_hostname: Optional[StrPipeVar] = Unassigned() + image: Optional[StrPipeVar] = Unassigned() + image_config: Optional[ImageConfig] = Unassigned() + mode: Optional[StrPipeVar] = Unassigned() + model_data_url: Optional[StrPipeVar] = Unassigned() + model_data_source: Optional[ModelDataSource] = Unassigned() + additional_model_data_sources: Optional[List[AdditionalModelDataSource]] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + model_package_name: Optional[Union[StrPipeVar, object]] = Unassigned() + inference_specification_name: Optional[StrPipeVar] = Unassigned() + multi_model_config: Optional[MultiModelConfig] = Unassigned() + + +class ContextSource(Base): + """ + ContextSource + A structure describing the source of a context. + + Attributes + ---------------------- + source_uri: The URI of the source. + source_type: The type of the source. + source_id: The ID of the source. + """ + + source_uri: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + source_id: Optional[StrPipeVar] = Unassigned() + + +class ContextSummary(Base): + """ + ContextSummary + Lists a summary of the properties of a context. A context provides a logical grouping of other entities. + + Attributes + ---------------------- + context_arn: The Amazon Resource Name (ARN) of the context. + context_name: The name of the context. + source: The source of the context. + context_type: The type of the context. + creation_time: When the context was created. + last_modified_time: When the context was last modified. + """ + + context_arn: Optional[StrPipeVar] = Unassigned() + context_name: Optional[Union[StrPipeVar, object]] = Unassigned() + source: Optional[ContextSource] = Unassigned() + context_type: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class ContinuousParameterRange(Base): + """ + ContinuousParameterRange + A list of continuous hyperparameters to tune. + + Attributes + ---------------------- + name: The name of the continuous hyperparameter to tune. + min_value: The minimum value for the hyperparameter. The tuning job uses floating-point values between this value and MaxValuefor tuning. + max_value: The maximum value for the hyperparameter. The tuning job uses floating-point values between MinValue value and this value for tuning. + scaling_type: The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values: Auto SageMaker hyperparameter tuning chooses the best scale for the hyperparameter. Linear Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale. Logarithmic Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale. Logarithmic scaling works only for ranges that have only values greater than 0. ReverseLogarithmic Hyperparameter tuning searches the values in the hyperparameter range by using a reverse logarithmic scale. Reverse logarithmic scaling works only for ranges that are entirely within the range 0<=x<1.0. + """ + + name: StrPipeVar + min_value: StrPipeVar + max_value: StrPipeVar + scaling_type: Optional[StrPipeVar] = Unassigned() + + +class ContinuousParameterRangeSpecification(Base): + """ + ContinuousParameterRangeSpecification + Defines the possible values for a continuous hyperparameter. + + Attributes + ---------------------- + min_value: The minimum floating-point value allowed. + max_value: The maximum floating-point value allowed. + """ + + min_value: StrPipeVar + max_value: StrPipeVar + + +class ConvergenceDetected(Base): + """ + ConvergenceDetected + A flag to indicating that automatic model tuning (AMT) has detected model convergence, defined as a lack of significant improvement (1% or less) against an objective metric. + + Attributes + ---------------------- + complete_on_convergence: A flag to stop a tuning job once AMT has detected that the job has converged. + """ + + complete_on_convergence: Optional[StrPipeVar] = Unassigned() + + +class MetadataProperties(Base): + """ + MetadataProperties + Metadata properties of the tracking entity, trial, or trial component. + + Attributes + ---------------------- + commit_id: The commit ID. + repository: The repository. + generated_by: The entity this entity was generated by. + project_id: The project ID. + """ + + commit_id: Optional[StrPipeVar] = Unassigned() + repository: Optional[StrPipeVar] = Unassigned() + generated_by: Optional[StrPipeVar] = Unassigned() + project_id: Optional[StrPipeVar] = Unassigned() + + +class IntegerParameterRangeSpecification(Base): + """ + IntegerParameterRangeSpecification + Defines the possible values for an integer hyperparameter. + + Attributes + ---------------------- + min_value: The minimum integer value allowed. + max_value: The maximum integer value allowed. + """ + + min_value: StrPipeVar + max_value: StrPipeVar + + +class ParameterRange(Base): + """ + ParameterRange + Defines the possible values for categorical, continuous, and integer hyperparameters to be used by an algorithm. + + Attributes + ---------------------- + integer_parameter_range_specification: A IntegerParameterRangeSpecification object that defines the possible values for an integer hyperparameter. + continuous_parameter_range_specification: A ContinuousParameterRangeSpecification object that defines the possible values for a continuous hyperparameter. + categorical_parameter_range_specification: A CategoricalParameterRangeSpecification object that defines the possible values for a categorical hyperparameter. + """ + + integer_parameter_range_specification: Optional[IntegerParameterRangeSpecification] = ( + Unassigned() + ) + continuous_parameter_range_specification: Optional[ContinuousParameterRangeSpecification] = ( + Unassigned() + ) + categorical_parameter_range_specification: Optional[CategoricalParameterRangeSpecification] = ( + Unassigned() + ) + + +class HyperParameterSpecification(Base): + """ + HyperParameterSpecification + Defines a hyperparameter to be used by an algorithm. + + Attributes + ---------------------- + name: The name of this hyperparameter. The name must be unique. + description: A brief description of the hyperparameter. + type: The type of this hyperparameter. The valid types are Integer, Continuous, Categorical, and FreeText. + range: The allowed range for this hyperparameter. + is_tunable: Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. + is_required: Indicates whether this hyperparameter is required. + default_value: The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. + """ + + name: StrPipeVar + type: StrPipeVar + description: Optional[StrPipeVar] = Unassigned() + range: Optional[ParameterRange] = Unassigned() + is_tunable: Optional[bool] = Unassigned() + is_required: Optional[bool] = Unassigned() + default_value: Optional[StrPipeVar] = Unassigned() + + +class HyperParameterTuningJobObjective(Base): + """ + HyperParameterTuningJobObjective + Defines the objective metric for a hyperparameter tuning job. Hyperparameter tuning uses the value of this metric to evaluate the training jobs it launches, and returns the training job that results in either the highest or lowest value for this metric, depending on the value you specify for the Type parameter. If you want to define a custom objective metric, see Define metrics and environment variables. + + Attributes + ---------------------- + type: Whether to minimize or maximize the objective metric. + metric_name: The name of the metric to use for the objective metric. + """ + + type: StrPipeVar + metric_name: StrPipeVar + + +class TrainingSpecification(Base): + """ + TrainingSpecification + Defines how the algorithm is used for a training job. + + Attributes + ---------------------- + training_image: The Amazon ECR registry path of the Docker image that contains the training algorithm. + training_image_digest: An MD5 hash of the training algorithm that identifies the Docker image used for training. + supported_hyper_parameters: A list of the HyperParameterSpecification objects, that define the supported hyperparameters. This is required if the algorithm supports automatic model tuning.> + supported_training_instance_types: A list of the instance types that this algorithm can use for training. + supports_distributed_training: Indicates whether the algorithm supports distributed training. If set to false, buyers can't request more than one instance during training. + metric_definitions: A list of MetricDefinition objects, which are used for parsing metrics generated by the algorithm. + training_channels: A list of ChannelSpecification objects, which specify the input sources to be used by the algorithm. + supported_tuning_job_objective_metrics: A list of the metrics that the algorithm emits that can be used as the objective metric in a hyperparameter tuning job. + additional_s3_data_source: The additional data source used during the training job. + """ + + training_image: StrPipeVar + supported_training_instance_types: List[StrPipeVar] + training_channels: List[ChannelSpecification] + training_image_digest: Optional[StrPipeVar] = Unassigned() + supported_hyper_parameters: Optional[List[HyperParameterSpecification]] = Unassigned() + supports_distributed_training: Optional[bool] = Unassigned() + metric_definitions: Optional[List[MetricDefinition]] = Unassigned() + supported_tuning_job_objective_metrics: Optional[List[HyperParameterTuningJobObjective]] = ( + Unassigned() + ) + additional_s3_data_source: Optional[AdditionalS3DataSource] = Unassigned() + + +class ModelDeployConfig(Base): + """ + ModelDeployConfig + Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment. + + Attributes + ---------------------- + auto_generate_endpoint_name: Set to True to automatically generate an endpoint name for a one-click Autopilot model deployment; set to False otherwise. The default value is False. If you set AutoGenerateEndpointName to True, do not specify the EndpointName; otherwise a 400 error is thrown. + endpoint_name: Specifies the endpoint name to use for a one-click Autopilot model deployment if the endpoint name is not generated automatically. Specify the EndpointName if and only if you set AutoGenerateEndpointName to False; otherwise a 400 error is thrown. + """ + + auto_generate_endpoint_name: Optional[bool] = Unassigned() + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class PriorityClass(Base): + """ + PriorityClass + Priority class configuration. When included in PriorityClasses, these class configurations define how tasks are queued. + + Attributes + ---------------------- + name: Name of the priority class. + weight: Weight of the priority class. The value is within a range from 0 to 100, where 0 is the default. A weight of 0 is the lowest priority and 100 is the highest. Weight 0 is the default. + """ + + name: StrPipeVar + weight: int + + +class SchedulerConfig(Base): + """ + SchedulerConfig + Cluster policy configuration. This policy is used for task prioritization and fair-share allocation. This helps prioritize critical workloads and distributes idle compute across entities. + + Attributes + ---------------------- + priority_classes: List of the priority classes, PriorityClass, of the cluster policy. When specified, these class configurations define how tasks are queued. + fair_share: When enabled, entities borrow idle compute based on their assigned FairShareWeight. When disabled, entities borrow idle compute based on a first-come first-serve basis. Default is Enabled. + idle_resource_sharing: Configuration for sharing idle compute resources across entities in the cluster. When enabled, unallocated resources are automatically calculated and made available for entities to borrow. + """ + + priority_classes: Optional[List[PriorityClass]] = Unassigned() + fair_share: Optional[StrPipeVar] = Unassigned() + idle_resource_sharing: Optional[StrPipeVar] = Unassigned() + + +class InputConfig(Base): + """ + InputConfig + Contains information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained. + + Attributes + ---------------------- + s3_uri: The S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). + data_input_config: Specifies the name and shape of the expected data inputs for your trained model with a JSON dictionary form. The data inputs are Framework specific. TensorFlow: You must specify the name and shape (NHWC format) of the expected data inputs using a dictionary format for your trained model. The dictionary formats required for the console and CLI are different. Examples for one input: If using the console, {"input":[1,1024,1024,3]} If using the CLI, {\"input\":[1,1024,1024,3]} Examples for two inputs: If using the console, {"data1": [1,28,28,1], "data2":[1,28,28,1]} If using the CLI, {\"data1\": [1,28,28,1], \"data2\":[1,28,28,1]} KERAS: You must specify the name and shape (NCHW format) of expected data inputs using a dictionary format for your trained model. Note that while Keras model artifacts should be uploaded in NHWC (channel-last) format, DataInputConfig should be specified in NCHW (channel-first) format. The dictionary formats required for the console and CLI are different. Examples for one input: If using the console, {"input_1":[1,3,224,224]} If using the CLI, {\"input_1\":[1,3,224,224]} Examples for two inputs: If using the console, {"input_1": [1,3,224,224], "input_2":[1,3,224,224]} If using the CLI, {\"input_1\": [1,3,224,224], \"input_2\":[1,3,224,224]} MXNET/ONNX/DARKNET: You must specify the name and shape (NCHW format) of the expected data inputs in order using a dictionary format for your trained model. The dictionary formats required for the console and CLI are different. Examples for one input: If using the console, {"data":[1,3,1024,1024]} If using the CLI, {\"data\":[1,3,1024,1024]} Examples for two inputs: If using the console, {"var1": [1,1,28,28], "var2":[1,1,28,28]} If using the CLI, {\"var1\": [1,1,28,28], \"var2\":[1,1,28,28]} PyTorch: You can either specify the name and shape (NCHW format) of expected data inputs in order using a dictionary format for your trained model or you can specify the shape only using a list format. The dictionary formats required for the console and CLI are different. The list formats for the console and CLI are the same. Examples for one input in dictionary format: If using the console, {"input0":[1,3,224,224]} If using the CLI, {\"input0\":[1,3,224,224]} Example for one input in list format: [[1,3,224,224]] Examples for two inputs in dictionary format: If using the console, {"input0":[1,3,224,224], "input1":[1,3,224,224]} If using the CLI, {\"input0\":[1,3,224,224], \"input1\":[1,3,224,224]} Example for two inputs in list format: [[1,3,224,224], [1,3,224,224]] XGBOOST: input data name and shape are not needed. DataInputConfig supports the following parameters for CoreML TargetDevice (ML Model format): shape: Input shape, for example {"input_1": {"shape": [1,224,224,3]}}. In addition to static input shapes, CoreML converter supports Flexible input shapes: Range Dimension. You can use the Range Dimension feature if you know the input shape will be within some specific interval in that dimension, for example: {"input_1": {"shape": ["1..10", 224, 224, 3]}} Enumerated shapes. Sometimes, the models are trained to work only on a select set of inputs. You can enumerate all supported input shapes, for example: {"input_1": {"shape": [[1, 224, 224, 3], [1, 160, 160, 3]]}} default_shape: Default input shape. You can set a default shape during conversion for both Range Dimension and Enumerated Shapes. For example {"input_1": {"shape": ["1..10", 224, 224, 3], "default_shape": [1, 224, 224, 3]}} type: Input type. Allowed values: Image and Tensor. By default, the converter generates an ML Model with inputs of type Tensor (MultiArray). User can set input type to be Image. Image input type requires additional input parameters such as bias and scale. bias: If the input type is an Image, you need to provide the bias vector. scale: If the input type is an Image, you need to provide a scale factor. CoreML ClassifierConfig parameters can be specified using OutputConfig CompilerOptions. CoreML converter supports Tensorflow and PyTorch models. CoreML conversion examples: Tensor type input: "DataInputConfig": {"input_1": {"shape": [[1,224,224,3], [1,160,160,3]], "default_shape": [1,224,224,3]}} Tensor type input without input name (PyTorch): "DataInputConfig": [{"shape": [[1,3,224,224], [1,3,160,160]], "default_shape": [1,3,224,224]}] Image type input: "DataInputConfig": {"input_1": {"shape": [[1,224,224,3], [1,160,160,3]], "default_shape": [1,224,224,3], "type": "Image", "bias": [-1,-1,-1], "scale": 0.007843137255}} "CompilerOptions": {"class_labels": "imagenet_labels_1000.txt"} Image type input without input name (PyTorch): "DataInputConfig": [{"shape": [[1,3,224,224], [1,3,160,160]], "default_shape": [1,3,224,224], "type": "Image", "bias": [-1,-1,-1], "scale": 0.007843137255}] "CompilerOptions": {"class_labels": "imagenet_labels_1000.txt"} Depending on the model format, DataInputConfig requires the following parameters for ml_eia2 OutputConfig:TargetDevice. For TensorFlow models saved in the SavedModel format, specify the input names from signature_def_key and the input model shapes for DataInputConfig. Specify the signature_def_key in OutputConfig:CompilerOptions if the model does not use TensorFlow's default signature def key. For example: "DataInputConfig": {"inputs": [1, 224, 224, 3]} "CompilerOptions": {"signature_def_key": "serving_custom"} For TensorFlow models saved as a frozen graph, specify the input tensor names and shapes in DataInputConfig and the output tensor names for output_names in OutputConfig:CompilerOptions . For example: "DataInputConfig": {"input_tensor:0": [1, 224, 224, 3]} "CompilerOptions": {"output_names": ["output_tensor:0"]} + framework: Identifies the framework in which the model was trained. For example: TENSORFLOW. + framework_version: Specifies the framework version to use. This API field is only supported for the MXNet, PyTorch, TensorFlow and TensorFlow Lite frameworks. For information about framework versions supported for cloud targets and edge devices, see Cloud Supported Instance Types and Frameworks and Edge Supported Frameworks. + """ + + s3_uri: StrPipeVar + framework: StrPipeVar + data_input_config: Optional[StrPipeVar] = Unassigned() + framework_version: Optional[StrPipeVar] = Unassigned() + + +class TargetPlatform(Base): + """ + TargetPlatform + Contains information about a target platform that you want your model to run on, such as OS, architecture, and accelerators. It is an alternative of TargetDevice. + + Attributes + ---------------------- + os: Specifies a target platform OS. LINUX: Linux-based operating systems. ANDROID: Android operating systems. Android API level can be specified using the ANDROID_PLATFORM compiler option. For example, "CompilerOptions": {'ANDROID_PLATFORM': 28} + arch: Specifies a target platform architecture. X86_64: 64-bit version of the x86 instruction set. X86: 32-bit version of the x86 instruction set. ARM64: ARMv8 64-bit CPU. ARM_EABIHF: ARMv7 32-bit, Hard Float. ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM platform. + accelerator: Specifies a target platform accelerator (optional). NVIDIA: Nvidia graphics processing unit. It also requires gpu-code, trt-ver, cuda-ver compiler options MALI: ARM Mali graphics processor INTEL_GRAPHICS: Integrated Intel graphics + """ + + os: StrPipeVar + arch: StrPipeVar + accelerator: Optional[StrPipeVar] = Unassigned() + + +class OutputConfig(Base): + """ + OutputConfig + Contains information about the output location for the compiled model and the target device that the model runs on. TargetDevice and TargetPlatform are mutually exclusive, so you need to choose one between the two to specify your target device or platform. If you cannot find your device you want to use from the TargetDevice list, use TargetPlatform to describe the platform of your edge device and CompilerOptions if there are specific settings that are required or recommended to use for particular TargetPlatform. + + Attributes + ---------------------- + s3_output_location: Identifies the S3 bucket where you want Amazon SageMaker AI to store the model artifacts. For example, s3://bucket-name/key-name-prefix. + target_device: Identifies the target device or the machine learning instance that you want to run your model on after the compilation has completed. Alternatively, you can specify OS, architecture, and accelerator using TargetPlatform fields. It can be used instead of TargetPlatform. Currently ml_trn1 is available only in US East (N. Virginia) Region, and ml_inf2 is available only in US East (Ohio) Region. + target_platform: Contains information about a target platform that you want your model to run on, such as OS, architecture, and accelerators. It is an alternative of TargetDevice. The following examples show how to configure the TargetPlatform and CompilerOptions JSON strings for popular target platforms: Raspberry Pi 3 Model B+ "TargetPlatform": {"Os": "LINUX", "Arch": "ARM_EABIHF"}, "CompilerOptions": {'mattr': ['+neon']} Jetson TX2 "TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "NVIDIA"}, "CompilerOptions": {'gpu-code': 'sm_62', 'trt-ver': '6.0.1', 'cuda-ver': '10.0'} EC2 m5.2xlarge instance OS "TargetPlatform": {"Os": "LINUX", "Arch": "X86_64", "Accelerator": "NVIDIA"}, "CompilerOptions": {'mcpu': 'skylake-avx512'} RK3399 "TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "MALI"} ARMv7 phone (CPU) "TargetPlatform": {"Os": "ANDROID", "Arch": "ARM_EABI"}, "CompilerOptions": {'ANDROID_PLATFORM': 25, 'mattr': ['+neon']} ARMv8 phone (CPU) "TargetPlatform": {"Os": "ANDROID", "Arch": "ARM64"}, "CompilerOptions": {'ANDROID_PLATFORM': 29} + compiler_options: Specifies additional parameters for compiler options in JSON format. The compiler options are TargetPlatform specific. It is required for NVIDIA accelerators and highly recommended for CPU compilations. For any other cases, it is optional to specify CompilerOptions. DTYPE: Specifies the data type for the input. When compiling for ml_* (except for ml_inf) instances using PyTorch framework, provide the data type (dtype) of the model's input. "float32" is used if "DTYPE" is not specified. Options for data type are: float32: Use either "float" or "float32". int64: Use either "int64" or "long". For example, {"dtype" : "float32"}. CPU: Compilation for CPU supports the following compiler options. mcpu: CPU micro-architecture. For example, {'mcpu': 'skylake-avx512'} mattr: CPU flags. For example, {'mattr': ['+neon', '+vfpv4']} ARM: Details of ARM CPU compilations. NEON: NEON is an implementation of the Advanced SIMD extension used in ARMv7 processors. For example, add {'mattr': ['+neon']} to the compiler options if compiling for ARM 32-bit platform with the NEON support. NVIDIA: Compilation for NVIDIA GPU supports the following compiler options. gpu_code: Specifies the targeted architecture. trt-ver: Specifies the TensorRT versions in x.y.z. format. cuda-ver: Specifies the CUDA version in x.y format. For example, {'gpu-code': 'sm_72', 'trt-ver': '6.0.1', 'cuda-ver': '10.1'} ANDROID: Compilation for the Android OS supports the following compiler options: ANDROID_PLATFORM: Specifies the Android API levels. Available levels range from 21 to 29. For example, {'ANDROID_PLATFORM': 28}. mattr: Add {'mattr': ['+neon']} to compiler options if compiling for ARM 32-bit platform with NEON support. INFERENTIA: Compilation for target ml_inf1 uses compiler options passed in as a JSON string. For example, "CompilerOptions": "\"--verbose 1 --num-neuroncores 2 -O2\"". For information about supported compiler options, see Neuron Compiler CLI Reference Guide. CoreML: Compilation for the CoreML OutputConfig TargetDevice supports the following compiler options: class_labels: Specifies the classification labels file name inside input tar.gz file. For example, {"class_labels": "imagenet_labels_1000.txt"}. Labels inside the txt file should be separated by newlines. + kms_key_id: The Amazon Web Services Key Management Service key (Amazon Web Services KMS) that Amazon SageMaker AI uses to encrypt your output models with Amazon S3 server-side encryption after compilation job. If you don't provide a KMS key ID, Amazon SageMaker AI uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias + """ + + s3_output_location: StrPipeVar + target_device: Optional[StrPipeVar] = Unassigned() + target_platform: Optional[TargetPlatform] = Unassigned() + compiler_options: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class NeoVpcConfig(Base): + """ + NeoVpcConfig + The VpcConfig configuration object that specifies the VPC that you want the compilation jobs to connect to. For more information on controlling access to your Amazon S3 buckets used for compilation job, see Give Amazon SageMaker AI Compilation Jobs Access to Resources in Your Amazon VPC. + + Attributes + ---------------------- + security_group_ids: The VPC security group IDs. IDs have the form of sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC that you want to connect the compilation job to for accessing the model in Amazon S3. + """ + + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] + + +class MonitoringConstraintsResource(Base): + """ + MonitoringConstraintsResource + The constraints resource for a monitoring job. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI for the constraints resource. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + +class MonitoringStatisticsResource(Base): + """ + MonitoringStatisticsResource + The statistics resource for a monitoring job. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI for the statistics resource. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + +class DataQualityBaselineConfig(Base): + """ + DataQualityBaselineConfig + Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically. + + Attributes + ---------------------- + baselining_job_name: The name of the job that performs baselining for the data quality monitoring job. + constraints_resource + statistics_resource + """ + + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + statistics_resource: Optional[MonitoringStatisticsResource] = Unassigned() + + +class DataQualityAppSpecification(Base): + """ + DataQualityAppSpecification + Information about the container that a data quality monitoring job runs. + + Attributes + ---------------------- + image_uri: The container image that the data quality monitoring job runs. + container_entrypoint: The entrypoint for a container used to run a monitoring job. + container_arguments: The arguments to send to the container that the monitoring job runs. + record_preprocessor_source_uri: An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers. + post_analytics_processor_source_uri: An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers. + environment: Sets the environment variables in the container that the monitoring job runs. + """ + + image_uri: StrPipeVar + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() + post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class EndpointInput(Base): + """ + EndpointInput + Input object for the endpoint + + Attributes + ---------------------- + endpoint_name: An endpoint in customer's account which has enabled DataCaptureConfig enabled. + local_path: Path to the filesystem where the endpoint data is available to the container. + s3_input_mode: Whether the Pipe or File is used as the input mode for transferring data for the monitoring job. Pipe mode is recommended for large datasets. File mode is useful for small files that fit in memory. Defaults to File. + s3_data_distribution_type: Whether input data distributed in Amazon S3 is fully replicated or sharded by an Amazon S3 key. Defaults to FullyReplicated + features_attribute: The attributes of the input data that are the input features. + inference_attribute: The attribute of the input data that represents the ground truth label. + probability_attribute: In a classification problem, the attribute that represents the class probability. + probability_threshold_attribute: The threshold for the class probability to be evaluated as a positive result. + start_time_offset: If specified, monitoring jobs substract this time from the start time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. + end_time_offset: If specified, monitoring jobs substract this time from the end time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. + exclude_features_attribute: The attributes of the input data to exclude from the analysis. + """ + + endpoint_name: Union[StrPipeVar, object] + local_path: StrPipeVar + s3_input_mode: Optional[StrPipeVar] = Unassigned() + s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() + features_attribute: Optional[StrPipeVar] = Unassigned() + inference_attribute: Optional[StrPipeVar] = Unassigned() + probability_attribute: Optional[StrPipeVar] = Unassigned() + probability_threshold_attribute: Optional[float] = Unassigned() + start_time_offset: Optional[StrPipeVar] = Unassigned() + end_time_offset: Optional[StrPipeVar] = Unassigned() + exclude_features_attribute: Optional[StrPipeVar] = Unassigned() + + +class DataQualityJobInput(Base): + """ + DataQualityJobInput + The input for the data quality monitoring job. Currently endpoints are supported for input. + + Attributes + ---------------------- + endpoint_input + batch_transform_input: Input object for the batch transform job. + """ + + endpoint_input: Optional[EndpointInput] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class MonitoringS3Output(Base): + """ + MonitoringS3Output + Information about where and how you want to store the results of a monitoring job. + + Attributes + ---------------------- + s3_uri: A URI that identifies the Amazon S3 storage location where Amazon SageMaker AI saves the results of a monitoring job. + local_path: The local path to the Amazon S3 storage location where Amazon SageMaker AI saves the results of a monitoring job. LocalPath is an absolute path for the output data. + s3_upload_mode: Whether to upload the results of the monitoring job continuously or after the job completes. + """ + + s3_uri: StrPipeVar + local_path: StrPipeVar + s3_upload_mode: Optional[StrPipeVar] = Unassigned() + + +class MonitoringOutput(Base): + """ + MonitoringOutput + The output object for a monitoring job. + + Attributes + ---------------------- + s3_output: The Amazon S3 storage location where the results of a monitoring job are saved. + """ + + s3_output: MonitoringS3Output + + +class MonitoringOutputConfig(Base): + """ + MonitoringOutputConfig + The output configuration for monitoring jobs. + + Attributes + ---------------------- + monitoring_outputs: Monitoring outputs for monitoring jobs. This is where the output of the periodic monitoring jobs is uploaded. + kms_key_id: The Key Management Service (KMS) key that Amazon SageMaker AI uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. + """ + + monitoring_outputs: List[MonitoringOutput] + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class MonitoringClusterConfig(Base): + """ + MonitoringClusterConfig + Configuration for the cluster used to run model monitoring jobs. + + Attributes + ---------------------- + instance_count: The number of ML compute instances to use in the model monitoring job. For distributed processing jobs, specify a value greater than 1. The default value is 1. + instance_type: The ML compute instance type for the processing job. + volume_size_in_gb: The size of the ML storage volume, in gigabytes, that you want to provision. You must specify sufficient ML storage for your scenario. + volume_kms_key_id: The Key Management Service (KMS) key that Amazon SageMaker AI uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the model monitoring job. + """ + + instance_count: int + instance_type: StrPipeVar + volume_size_in_gb: int + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class MonitoringResources(Base): + """ + MonitoringResources + Identifies the resources to deploy for a monitoring job. + + Attributes + ---------------------- + cluster_config: The configuration for the cluster resources used to run the processing job. + """ + + cluster_config: MonitoringClusterConfig + + +class MonitoringNetworkConfig(Base): + """ + MonitoringNetworkConfig + The networking configuration for the monitoring job. + + Attributes + ---------------------- + enable_inter_container_traffic_encryption: Whether to encrypt all communications between the instances used for the monitoring jobs. Choose True to encrypt communications. Encryption provides greater security for distributed jobs, but the processing might take longer. + enable_network_isolation: Whether to allow inbound and outbound network calls to and from the containers used for the monitoring job. + vpc_config + """ + + enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() + enable_network_isolation: Optional[bool] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + + +class MonitoringStoppingCondition(Base): + """ + MonitoringStoppingCondition + A time limit for how long the monitoring job is allowed to run before stopping. + + Attributes + ---------------------- + max_runtime_in_seconds: The maximum runtime allowed in seconds. The MaxRuntimeInSeconds cannot exceed the frequency of the job. For data quality and model explainability, this can be up to 3600 seconds for an hourly schedule. For model bias and model quality hourly schedules, this can be up to 1800 seconds. + """ + + max_runtime_in_seconds: int + + +class EdgeOutputConfig(Base): + """ + EdgeOutputConfig + The output configuration. + + Attributes + ---------------------- + s3_output_location: The Amazon Simple Storage (S3) bucker URI. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. + preset_deployment_type: The deployment type SageMaker Edge Manager will create. Currently only supports Amazon Web Services IoT Greengrass Version 2 components. + preset_deployment_config: The configuration used to create deployment artifacts. Specify configuration options with a JSON string. The available configuration options for each type are: ComponentName (optional) - Name of the GreenGrass V2 component. If not specified, the default name generated consists of "SagemakerEdgeManager" and the name of your SageMaker Edge Manager packaging job. ComponentDescription (optional) - Description of the component. ComponentVersion (optional) - The version of the component. Amazon Web Services IoT Greengrass uses semantic versions for components. Semantic versions follow a major.minor.patch number system. For example, version 1.0.0 represents the first major release for a component. For more information, see the semantic version specification. PlatformOS (optional) - The name of the operating system for the platform. Supported platforms include Windows and Linux. PlatformArchitecture (optional) - The processor architecture for the platform. Supported architectures Windows include: Windows32_x86, Windows64_x64. Supported architectures for Linux include: Linux x86_64, Linux ARMV8. + """ + + s3_output_location: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + preset_deployment_type: Optional[StrPipeVar] = Unassigned() + preset_deployment_config: Optional[StrPipeVar] = Unassigned() + + +class SharingSettings(Base): + """ + SharingSettings + Specifies options for sharing Amazon SageMaker AI Studio notebooks. These settings are specified as part of DefaultUserSettings when the CreateDomain API is called, and as part of UserSettings when the CreateUserProfile API is called. When SharingSettings is not specified, notebook sharing isn't allowed. + + Attributes + ---------------------- + notebook_output_option: Whether to include the notebook cell output when sharing the notebook. The default is Disabled. + s3_output_path: When NotebookOutputOption is Allowed, the Amazon S3 bucket used to store the shared notebook snapshots. + s3_kms_key_id: When NotebookOutputOption is Allowed, the Amazon Web Services Key Management Service (KMS) encryption key ID used to encrypt the notebook cell output in the Amazon S3 bucket. + """ + + notebook_output_option: Optional[StrPipeVar] = Unassigned() + s3_output_path: Optional[StrPipeVar] = Unassigned() + s3_kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class JupyterServerAppSettings(Base): + """ + JupyterServerAppSettings + The JupyterServer app settings. + + Attributes + ---------------------- + default_resource_spec: The default instance type and the Amazon Resource Name (ARN) of the default SageMaker AI image used by the JupyterServer app. If you use the LifecycleConfigArns parameter, then this parameter is also required. + lifecycle_config_arns: The Amazon Resource Name (ARN) of the Lifecycle Configurations attached to the JupyterServerApp. If you use this parameter, the DefaultResourceSpec parameter is also required. To remove a Lifecycle Config, you must set LifecycleConfigArns to an empty list. + code_repositories: A list of Git repositories that SageMaker AI automatically displays to users for cloning in the JupyterServer application. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() + code_repositories: Optional[List[CodeRepository]] = Unassigned() + + +class KernelGatewayAppSettings(Base): + """ + KernelGatewayAppSettings + The KernelGateway app settings. + + Attributes + ---------------------- + default_resource_spec: The default instance type and the Amazon Resource Name (ARN) of the default SageMaker AI image used by the KernelGateway app. The Amazon SageMaker AI Studio UI does not use the default instance type value set here. The default instance type set here is used when Apps are created using the CLI or CloudFormation and the instance type parameter value is not passed. + custom_images: A list of custom SageMaker AI images that are configured to run as a KernelGateway app. The maximum number of custom images are as follows. On a domain level: 200 On a space level: 5 On a user profile level: 5 + lifecycle_config_arns: The Amazon Resource Name (ARN) of the Lifecycle Configurations attached to the the user profile or domain. To remove a Lifecycle Config, you must set LifecycleConfigArns to an empty list. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + custom_images: Optional[List[CustomImage]] = Unassigned() + lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() + + +class TensorBoardAppSettings(Base): + """ + TensorBoardAppSettings + The TensorBoard app settings. + + Attributes + ---------------------- + default_resource_spec: The default instance type and the Amazon Resource Name (ARN) of the SageMaker AI image created on the instance. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + + +class RStudioServerProAppSettings(Base): + """ + RStudioServerProAppSettings + A collection of settings that configure user interaction with the RStudioServerPro app. + + Attributes + ---------------------- + access_status: Indicates whether the current user has access to the RStudioServerPro app. + user_group: The level of permissions that the user has within the RStudioServerPro app. This value defaults to `User`. The `Admin` value allows the user access to the RStudio Administrative Dashboard. + """ + + access_status: Optional[StrPipeVar] = Unassigned() + user_group: Optional[StrPipeVar] = Unassigned() + + +class RSessionAppSettings(Base): + """ + RSessionAppSettings + A collection of settings that apply to an RSessionGateway app. + + Attributes + ---------------------- + default_resource_spec + custom_images: A list of custom SageMaker AI images that are configured to run as a RSession app. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + custom_images: Optional[List[CustomImage]] = Unassigned() + + +class EmrSettings(Base): + """ + EmrSettings + The configuration parameters that specify the IAM roles assumed by the execution role of SageMaker (assumable roles) and the cluster instances or job execution environments (execution roles or runtime roles) to manage and access resources required for running Amazon EMR clusters or Amazon EMR Serverless applications. + + Attributes + ---------------------- + assumable_role_arns: An array of Amazon Resource Names (ARNs) of the IAM roles that the execution role of SageMaker can assume for performing operations or tasks related to Amazon EMR clusters or Amazon EMR Serverless applications. These roles define the permissions and access policies required when performing Amazon EMR-related operations, such as listing, connecting to, or terminating Amazon EMR clusters or Amazon EMR Serverless applications. They are typically used in cross-account access scenarios, where the Amazon EMR resources (clusters or serverless applications) are located in a different Amazon Web Services account than the SageMaker domain. + execution_role_arns: An array of Amazon Resource Names (ARNs) of the IAM roles used by the Amazon EMR cluster instances or job execution environments to access other Amazon Web Services services and resources needed during the runtime of your Amazon EMR or Amazon EMR Serverless workloads, such as Amazon S3 for data access, Amazon CloudWatch for logging, or other Amazon Web Services services based on the particular workload requirements. + """ + + assumable_role_arns: Optional[List[StrPipeVar]] = Unassigned() + execution_role_arns: Optional[List[StrPipeVar]] = Unassigned() + + +class JupyterLabAppSettings(Base): + """ + JupyterLabAppSettings + The settings for the JupyterLab application. + + Attributes + ---------------------- + default_resource_spec + custom_images: A list of custom SageMaker images that are configured to run as a JupyterLab app. + lifecycle_config_arns: The Amazon Resource Name (ARN) of the lifecycle configurations attached to the user profile or domain. To remove a lifecycle config, you must set LifecycleConfigArns to an empty list. + code_repositories: A list of Git repositories that SageMaker automatically displays to users for cloning in the JupyterLab application. + app_lifecycle_management: Indicates whether idle shutdown is activated for JupyterLab applications. + emr_settings: The configuration parameters that specify the IAM roles assumed by the execution role of SageMaker (assumable roles) and the cluster instances or job execution environments (execution roles or runtime roles) to manage and access resources required for running Amazon EMR clusters or Amazon EMR Serverless applications. + built_in_lifecycle_config_arn: The lifecycle configuration that runs before the default lifecycle configuration. It can override changes made in the default lifecycle configuration. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + custom_images: Optional[List[CustomImage]] = Unassigned() + lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() + code_repositories: Optional[List[CodeRepository]] = Unassigned() + app_lifecycle_management: Optional[AppLifecycleManagement] = Unassigned() + emr_settings: Optional[EmrSettings] = Unassigned() + built_in_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + + +class DefaultEbsStorageSettings(Base): + """ + DefaultEbsStorageSettings + A collection of default EBS storage settings that apply to spaces created within a domain or user profile. + + Attributes + ---------------------- + default_ebs_volume_size_in_gb: The default size of the EBS storage volume for a space. + maximum_ebs_volume_size_in_gb: The maximum size of the EBS storage volume for a space. + """ + + default_ebs_volume_size_in_gb: int + maximum_ebs_volume_size_in_gb: int + + +class DefaultSpaceStorageSettings(Base): + """ + DefaultSpaceStorageSettings + The default storage settings for a space. + + Attributes + ---------------------- + default_ebs_storage_settings: The default EBS storage settings for a space. + """ + + default_ebs_storage_settings: Optional[DefaultEbsStorageSettings] = Unassigned() + + +class CustomPosixUserConfig(Base): + """ + CustomPosixUserConfig + Details about the POSIX identity that is used for file system operations. + + Attributes + ---------------------- + uid: The POSIX user ID. + gid: The POSIX group ID. + """ + + uid: int + gid: int + + +class EFSFileSystemConfig(Base): + """ + EFSFileSystemConfig + The settings for assigning a custom Amazon EFS file system to a user profile or space for an Amazon SageMaker AI Domain. + + Attributes + ---------------------- + file_system_id: The ID of your Amazon EFS file system. + file_system_path: The path to the file system directory that is accessible in Amazon SageMaker AI Studio. Permitted users can access only this directory and below. + """ + + file_system_id: StrPipeVar + file_system_path: Optional[StrPipeVar] = Unassigned() + + +class FSxLustreFileSystemConfig(Base): + """ + FSxLustreFileSystemConfig + The settings for assigning a custom Amazon FSx for Lustre file system to a user profile or space for an Amazon SageMaker Domain. + + Attributes + ---------------------- + file_system_id: The globally unique, 17-digit, ID of the file system, assigned by Amazon FSx for Lustre. + file_system_path: The path to the file system directory that is accessible in Amazon SageMaker Studio. Permitted users can access only this directory and below. + """ + + file_system_id: StrPipeVar + file_system_path: Optional[StrPipeVar] = Unassigned() + + +class S3FileSystemConfig(Base): + """ + S3FileSystemConfig + Configuration for the custom Amazon S3 file system. + + Attributes + ---------------------- + mount_path: The file system path where the Amazon S3 storage location will be mounted within the Amazon SageMaker Studio environment. + s3_uri: The Amazon S3 URI of the S3 file system configuration. + """ + + s3_uri: StrPipeVar + mount_path: Optional[StrPipeVar] = Unassigned() + + +class CustomFileSystemConfig(Base): + """ + CustomFileSystemConfig + The settings for assigning a custom file system to a user profile or space for an Amazon SageMaker AI Domain. Permitted users can access this file system in Amazon SageMaker AI Studio. + + Attributes + ---------------------- + efs_file_system_config: The settings for a custom Amazon EFS file system. + f_sx_lustre_file_system_config: The settings for a custom Amazon FSx for Lustre file system. + s3_file_system_config: Configuration settings for a custom Amazon S3 file system. + """ + + efs_file_system_config: Optional[EFSFileSystemConfig] = Unassigned() + f_sx_lustre_file_system_config: Optional[FSxLustreFileSystemConfig] = Unassigned() + s3_file_system_config: Optional[S3FileSystemConfig] = Unassigned() + + +class HiddenSageMakerImage(Base): + """ + HiddenSageMakerImage + The SageMaker images that are hidden from the Studio user interface. You must specify the SageMaker image name and version aliases. + + Attributes + ---------------------- + sage_maker_image_name: The SageMaker image name that you are hiding from the Studio user interface. + version_aliases: The version aliases you are hiding from the Studio user interface. + """ + + sage_maker_image_name: Optional[StrPipeVar] = Unassigned() + version_aliases: Optional[List[StrPipeVar]] = Unassigned() + + +class StudioWebPortalSettings(Base): + """ + StudioWebPortalSettings + Studio settings. If these settings are applied on a user level, they take priority over the settings applied on a domain level. + + Attributes + ---------------------- + hidden_ml_tools: The machine learning tools that are hidden from the Studio left navigation pane. + hidden_app_types: The Applications supported in Studio that are hidden from the Studio left navigation pane. + hidden_instance_types: The instance types you are hiding from the Studio user interface. + hidden_sage_maker_image_version_aliases: The version aliases you are hiding from the Studio user interface. + """ + + hidden_ml_tools: Optional[List[StrPipeVar]] = Unassigned() + hidden_app_types: Optional[List[StrPipeVar]] = Unassigned() + hidden_instance_types: Optional[List[StrPipeVar]] = Unassigned() + hidden_sage_maker_image_version_aliases: Optional[List[HiddenSageMakerImage]] = Unassigned() + + +class UserSettings(Base): + """ + UserSettings + A collection of settings that apply to users in a domain. These settings are specified when the CreateUserProfile API is called, and as DefaultUserSettings when the CreateDomain API is called. 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. + + Attributes + ---------------------- + execution_role: The execution role for the user. SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces. + security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for communication. Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly. Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly, unless specified as part of the DefaultUserSettings for the domain. Amazon SageMaker AI adds a security group to allow NFS traffic from Amazon SageMaker AI Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + sharing_settings: Specifies options for sharing Amazon SageMaker AI Studio notebooks. + jupyter_server_app_settings: The Jupyter server's app settings. + kernel_gateway_app_settings: The kernel gateway app settings. + tensor_board_app_settings: The TensorBoard app settings. + r_studio_server_pro_app_settings: A collection of settings that configure user interaction with the RStudioServerPro app. + r_session_app_settings: A collection of settings that configure the RSessionGateway app. + canvas_app_settings: The Canvas app settings. SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas app. + code_editor_app_settings: The Code Editor application settings. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + jupyter_lab_app_settings: The settings for the JupyterLab application. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + space_storage_settings: The storage settings for a space. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + default_landing_uri: The default experience that the user is directed to when accessing the domain. The supported values are: studio::: Indicates that Studio is the default experience. This value can only be passed if StudioWebPortal is set to ENABLED. app:JupyterServer:: Indicates that Studio Classic is the default experience. + studio_web_portal: Whether the user can access Studio. If this value is set to DISABLED, the user cannot access Studio, even if that is the default experience for the domain. + custom_posix_user_config: Details about the POSIX identity that is used for file system operations. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + custom_file_system_configs: The settings for assigning a custom file system to a user profile. Permitted users can access this file system in Amazon SageMaker AI Studio. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. + studio_web_portal_settings: Studio settings. If these settings are applied on a user level, they take priority over the settings applied on a domain level. + auto_mount_home_efs: Indicates whether auto-mounting of an EFS volume is supported for the user profile. The DefaultAsDomain value is only supported for user profiles. Do not use the DefaultAsDomain value when setting this parameter for a domain. SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces. + """ + + execution_role: Optional[StrPipeVar] = Unassigned() + security_groups: Optional[List[StrPipeVar]] = Unassigned() + sharing_settings: Optional[SharingSettings] = Unassigned() + jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned() + kernel_gateway_app_settings: Optional[KernelGatewayAppSettings] = Unassigned() + tensor_board_app_settings: Optional[TensorBoardAppSettings] = Unassigned() + r_studio_server_pro_app_settings: Optional[RStudioServerProAppSettings] = Unassigned() + r_session_app_settings: Optional[RSessionAppSettings] = Unassigned() + canvas_app_settings: Optional[CanvasAppSettings] = Unassigned() + code_editor_app_settings: Optional[CodeEditorAppSettings] = Unassigned() + jupyter_lab_app_settings: Optional[JupyterLabAppSettings] = Unassigned() + space_storage_settings: Optional[DefaultSpaceStorageSettings] = Unassigned() + default_landing_uri: Optional[StrPipeVar] = Unassigned() + studio_web_portal: Optional[StrPipeVar] = Unassigned() + custom_posix_user_config: Optional[CustomPosixUserConfig] = Unassigned() + custom_file_system_configs: Optional[List[CustomFileSystemConfig]] = Unassigned() + studio_web_portal_settings: Optional[StudioWebPortalSettings] = Unassigned() + auto_mount_home_efs: Optional[StrPipeVar] = Unassigned() + + +class RStudioServerProDomainSettings(Base): + """ + RStudioServerProDomainSettings + A collection of settings that configure the RStudioServerPro Domain-level app. + + Attributes + ---------------------- + domain_execution_role_arn: The ARN of the execution role for the RStudioServerPro Domain-level app. + r_studio_connect_url: A URL pointing to an RStudio Connect server. + r_studio_package_manager_url: A URL pointing to an RStudio Package Manager server. + default_resource_spec + """ + + domain_execution_role_arn: StrPipeVar + r_studio_connect_url: Optional[StrPipeVar] = Unassigned() + r_studio_package_manager_url: Optional[StrPipeVar] = Unassigned() + default_resource_spec: Optional[ResourceSpec] = Unassigned() + + +class TrustedIdentityPropagationSettings(Base): + """ + TrustedIdentityPropagationSettings + The Trusted Identity Propagation (TIP) settings for the SageMaker domain. These settings determine how user identities from IAM Identity Center are propagated through the domain to TIP enabled Amazon Web Services services. + + Attributes + ---------------------- + status: The status of Trusted Identity Propagation (TIP) at the SageMaker domain level. When disabled, standard IAM role-based access is used. When enabled: User identities from IAM Identity Center are propagated through the application to TIP enabled Amazon Web Services services. New applications or existing applications that are automatically patched, will use the domain level configuration. + """ + + status: StrPipeVar + + +class DockerSettings(Base): + """ + DockerSettings + A collection of settings that configure the domain's Docker interaction. + + Attributes + ---------------------- + enable_docker_access: Indicates whether the domain can access Docker. + vpc_only_trusted_accounts: The list of Amazon Web Services accounts that are trusted when the domain is created in VPC-only mode. + rootless_docker: Indicates whether to use rootless Docker. + """ + + enable_docker_access: Optional[StrPipeVar] = Unassigned() + vpc_only_trusted_accounts: Optional[List[StrPipeVar]] = Unassigned() + rootless_docker: Optional[StrPipeVar] = Unassigned() + + +class UnifiedStudioSettings(Base): + """ + UnifiedStudioSettings + The settings that apply to an Amazon SageMaker AI domain when you use it in Amazon SageMaker Unified Studio. + + Attributes + ---------------------- + studio_web_portal_access: Sets whether you can access the domain in Amazon SageMaker Studio: ENABLED You can access the domain in Amazon SageMaker Studio. If you migrate the domain to Amazon SageMaker Unified Studio, you can access it in both studio interfaces. DISABLED You can't access the domain in Amazon SageMaker Studio. If you migrate the domain to Amazon SageMaker Unified Studio, you can access it only in that studio interface. To migrate a domain to Amazon SageMaker Unified Studio, you specify the UnifiedStudioSettings data type when you use the UpdateDomain action. + domain_account_id: The ID of the Amazon Web Services account that has the Amazon SageMaker Unified Studio domain. The default value, if you don't specify an ID, is the ID of the account that has the Amazon SageMaker AI domain. + domain_region: The Amazon Web Services Region where the domain is located in Amazon SageMaker Unified Studio. The default value, if you don't specify a Region, is the Region where the Amazon SageMaker AI domain is located. + domain_id: The ID of the Amazon SageMaker Unified Studio domain associated with this domain. + project_id: The ID of the Amazon SageMaker Unified Studio project that corresponds to the domain. + environment_id: The ID of the environment that Amazon SageMaker Unified Studio associates with the domain. + project_s3_path: The location where Amazon S3 stores temporary execution data and other artifacts for the project that corresponds to the domain. + single_sign_on_application_arn: The ARN of the Amazon DataZone application managed by Amazon SageMaker Unified Studio in the Amazon Web Services IAM Identity Center. + """ + + studio_web_portal_access: Optional[StrPipeVar] = Unassigned() + domain_account_id: Optional[StrPipeVar] = Unassigned() + domain_region: Optional[StrPipeVar] = Unassigned() + domain_id: Optional[StrPipeVar] = Unassigned() + project_id: Optional[StrPipeVar] = Unassigned() + environment_id: Optional[StrPipeVar] = Unassigned() + project_s3_path: Optional[StrPipeVar] = Unassigned() + single_sign_on_application_arn: Optional[StrPipeVar] = Unassigned() + + +class DomainSettings(Base): + """ + DomainSettings + A collection of settings that apply to the SageMaker Domain. These settings are specified through the CreateDomain API call. + + Attributes + ---------------------- + security_group_ids: The security groups for the Amazon Virtual Private Cloud that the Domain uses for communication between Domain-level apps and user apps. + r_studio_server_pro_domain_settings: A collection of settings that configure the RStudioServerPro Domain-level app. + execution_role_identity_config: The configuration for attaching a SageMaker AI user profile name to the execution role as a sts:SourceIdentity key. + trusted_identity_propagation_settings: The Trusted Identity Propagation (TIP) settings for the SageMaker domain. These settings determine how user identities from IAM Identity Center are propagated through the domain to TIP enabled Amazon Web Services services. + docker_settings: A collection of settings that configure the domain's Docker interaction. + amazon_q_settings: A collection of settings that configure the Amazon Q experience within the domain. The AuthMode that you use to create the domain must be SSO. + unified_studio_settings: The settings that apply to an SageMaker AI domain when you use it in Amazon SageMaker Unified Studio. + ip_address_type: The IP address type for the domain. 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. + """ + + security_group_ids: Optional[List[StrPipeVar]] = Unassigned() + r_studio_server_pro_domain_settings: Optional[RStudioServerProDomainSettings] = Unassigned() + execution_role_identity_config: Optional[StrPipeVar] = Unassigned() + trusted_identity_propagation_settings: Optional[TrustedIdentityPropagationSettings] = ( + Unassigned() + ) + docker_settings: Optional[DockerSettings] = Unassigned() + amazon_q_settings: Optional[AmazonQSettings] = Unassigned() + unified_studio_settings: Optional[UnifiedStudioSettings] = Unassigned() + ip_address_type: Optional[StrPipeVar] = Unassigned() + + +class DefaultSpaceSettings(Base): + """ + DefaultSpaceSettings + The default settings for shared spaces that users create in the domain. SageMaker applies these settings only to shared spaces. It doesn't apply them to private spaces. + + Attributes + ---------------------- + execution_role: The ARN of the execution role for the space. + security_groups: The security group IDs for the Amazon VPC that the space uses for communication. + jupyter_server_app_settings + kernel_gateway_app_settings + jupyter_lab_app_settings + space_storage_settings + custom_posix_user_config + custom_file_system_configs: The settings for assigning a custom file system to a domain. Permitted users can access this file system in Amazon SageMaker AI Studio. + """ + + execution_role: Optional[StrPipeVar] = Unassigned() + security_groups: Optional[List[StrPipeVar]] = Unassigned() + jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned() + kernel_gateway_app_settings: Optional[KernelGatewayAppSettings] = Unassigned() + jupyter_lab_app_settings: Optional[JupyterLabAppSettings] = Unassigned() + space_storage_settings: Optional[DefaultSpaceStorageSettings] = Unassigned() + custom_posix_user_config: Optional[CustomPosixUserConfig] = Unassigned() + custom_file_system_configs: Optional[List[CustomFileSystemConfig]] = Unassigned() + + +class EdgeDeploymentModelConfig(Base): + """ + EdgeDeploymentModelConfig + Contains information about the configuration of a model in a deployment. + + Attributes + ---------------------- + model_handle: The name the device application uses to reference this model. + edge_packaging_job_name: The edge packaging job associated with this deployment. + """ + + model_handle: StrPipeVar + edge_packaging_job_name: Union[StrPipeVar, object] + + +class DeviceSelectionConfig(Base): + """ + DeviceSelectionConfig + Contains information about the configurations of selected devices. + + Attributes + ---------------------- + device_subset_type: Type of device subsets to deploy to the current stage. + percentage: Percentage of devices in the fleet to deploy to the current stage. + device_names: List of devices chosen to deploy. + device_name_contains: A filter to select devices with names containing this name. + """ + + device_subset_type: StrPipeVar + percentage: Optional[int] = Unassigned() + device_names: Optional[List[StrPipeVar]] = Unassigned() + device_name_contains: Optional[StrPipeVar] = Unassigned() + + +class EdgeDeploymentConfig(Base): + """ + EdgeDeploymentConfig + Contains information about the configuration of a deployment. + + Attributes + ---------------------- + failure_handling_policy: Toggle that determines whether to rollback to previous configuration if the current deployment fails. By default this is turned on. You may turn this off if you want to investigate the errors yourself. + """ + + failure_handling_policy: StrPipeVar + + +class DeploymentStage(Base): + """ + DeploymentStage + Contains information about a stage in an edge deployment plan. + + Attributes + ---------------------- + stage_name: The name of the stage. + device_selection_config: Configuration of the devices in the stage. + deployment_config: Configuration of the deployment details. + """ + + stage_name: StrPipeVar + device_selection_config: DeviceSelectionConfig + deployment_config: Optional[EdgeDeploymentConfig] = Unassigned() + + +class ProductionVariantCoreDumpConfig(Base): + """ + ProductionVariantCoreDumpConfig + Specifies configuration for a core dump from the model container when the process crashes. + + Attributes + ---------------------- + destination_s3_uri: The Amazon S3 bucket to send the core dump to. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the core dump data at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" If you use a KMS key ID or an alias of your KMS key, the SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, SageMaker uses the default KMS key for Amazon S3 for your role's account. SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint and UpdateEndpoint requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. + """ + + destination_s3_uri: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ProductionVariantServerlessConfig(Base): + """ + ProductionVariantServerlessConfig + Specifies the serverless configuration for an endpoint variant. + + Attributes + ---------------------- + memory_size_in_mb: The memory size of your serverless endpoint. Valid values are in 1 GB increments: 1024 MB, 2048 MB, 3072 MB, 4096 MB, 5120 MB, or 6144 MB. + max_concurrency: The maximum number of concurrent invocations your serverless endpoint can process. + provisioned_concurrency: The amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency. This field is not supported for serverless endpoint recommendations for Inference Recommender jobs. For more information about creating an Inference Recommender job, see CreateInferenceRecommendationsJobs. + """ + + memory_size_in_mb: int + max_concurrency: int + provisioned_concurrency: Optional[int] = Unassigned() + + +class ProductionVariantManagedInstanceScalingScaleInPolicy(Base): + """ + ProductionVariantManagedInstanceScalingScaleInPolicy + Configures the scale-in behavior for managed instance scaling. + + Attributes + ---------------------- + strategy: The strategy for scaling in instances. IDLE_RELEASE Releases instances that have no hosted inference component copies. CONSOLIDATION Consolidates inference component copies onto fewer instances to release more instances. Consolidation honors the scheduling configuration of each inference component. For example, if an inference component specifies Availability Zone balance, consolidation only proceeds when the resulting distribution does not increase the imbalance. + maximum_step_size: The maximum number of instances that the endpoint can terminate at a time during a consolidation scale-in operation. Default value: 1. + cooldown_in_minutes: The cooldown period, in minutes, after the last endpoint operation before the endpoint evaluates consolidation scale-in opportunities. Default value: 20. + """ + + strategy: StrPipeVar + maximum_step_size: Optional[int] = Unassigned() + cooldown_in_minutes: Optional[int] = Unassigned() + + +class ProductionVariantManagedInstanceScaling(Base): + """ + ProductionVariantManagedInstanceScaling + Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. + + Attributes + ---------------------- + status: Indicates whether managed instance scaling is enabled. + min_instance_count: The minimum number of instances that the endpoint must retain when it scales down to accommodate a decrease in traffic. + max_instance_count: The maximum number of instances that the endpoint can provision when it scales up to accommodate an increase in traffic. + scale_in_policy: Configures the scale-in behavior for managed instance scaling. + """ + + status: Optional[StrPipeVar] = Unassigned() + min_instance_count: Optional[int] = Unassigned() + max_instance_count: Optional[int] = Unassigned() + scale_in_policy: Optional[ProductionVariantManagedInstanceScalingScaleInPolicy] = Unassigned() + + +class ProductionVariantRoutingConfig(Base): + """ + ProductionVariantRoutingConfig + Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. + + Attributes + ---------------------- + routing_strategy: Sets how the endpoint routes incoming traffic: LEAST_OUTSTANDING_REQUESTS: The endpoint routes requests to the specific instances that have more capacity to process them. RANDOM: The endpoint routes each request to a randomly chosen instance. + """ + + routing_strategy: StrPipeVar + + +class ProductionVariantCapacityReservationConfig(Base): + """ + ProductionVariantCapacityReservationConfig + Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. + + Attributes + ---------------------- + capacity_reservation_preference: Options that you can choose for the capacity reservation. SageMaker AI supports the following options: capacity-reservations-only SageMaker AI launches instances only into an ML capacity reservation. If no capacity is available, the instances fail to launch. + ml_reservation_arn: The Amazon Resource Name (ARN) that uniquely identifies the ML capacity reservation that SageMaker AI applies when it deploys the endpoint. + """ + + capacity_reservation_preference: Optional[StrPipeVar] = Unassigned() + ml_reservation_arn: Optional[StrPipeVar] = Unassigned() + + +class ProductionVariant(Base): + """ + ProductionVariant + Identifies a model that you want to host and the resources chosen to deploy for hosting it. If you are deploying multiple models, tell SageMaker how to distribute traffic among the models by specifying variant weights. For more information on production variants, check Production variants. + + Attributes + ---------------------- + variant_name: The name of the production variant. + model_name: The name of the model that you want to host. This is the name that you specified when creating the model. + initial_instance_count: Number of instances to launch initially. + instance_type: The ML compute instance type. + initial_variant_weight: Determines initial traffic distribution among all of the models that you specify in the endpoint configuration. The traffic to a production variant is determined by the ratio of the VariantWeight to the sum of all VariantWeight values across all ProductionVariants. If unspecified, it defaults to 1.0. + accelerator_type: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify the size of the EI instance to use for the production variant. + core_dump_config: Specifies configuration for a core dump from the model container when the process crashes. + serverless_config: The serverless configuration for an endpoint. Specifies a serverless endpoint configuration instead of an instance-based endpoint configuration. + volume_size_in_gb: The size, in GB, of the ML storage volume attached to individual inference instance associated with the production variant. Currently only Amazon EBS gp2 storage volumes are supported. + model_data_download_timeout_in_seconds: The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this production variant. + container_startup_health_check_timeout_in_seconds: The timeout value, in seconds, for your inference container to pass health check by SageMaker Hosting. For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests. + enable_ssm_access: You can use this parameter to turn on native Amazon Web Services Systems Manager (SSM) access for a production variant behind an endpoint. By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and calling UpdateEndpoint. + managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. + routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. + inference_ami_version: Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads. By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions. The AMI version names, and their configurations, are the following: al2-ami-sagemaker-inference-gpu-2 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 al2-ami-sagemaker-inference-gpu-2-1 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-gpu-3-1 Accelerator: GPU NVIDIA driver version: 550 CUDA version: 12.4 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2023-ami-sagemaker-inference-gpu-4-1 Accelerator: GPU NVIDIA driver version: 580 CUDA version: 13.0 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-neuron-2 Accelerator: Inferentia2 and Trainium Neuron driver version: 2.19 + capacity_reservation_config: Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. + """ + + variant_name: StrPipeVar + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + initial_instance_count: Optional[int] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + initial_variant_weight: Optional[float] = Unassigned() + accelerator_type: Optional[StrPipeVar] = Unassigned() + core_dump_config: Optional[ProductionVariantCoreDumpConfig] = Unassigned() + serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + volume_size_in_gb: Optional[int] = Unassigned() + model_data_download_timeout_in_seconds: Optional[int] = Unassigned() + container_startup_health_check_timeout_in_seconds: Optional[int] = Unassigned() + enable_ssm_access: Optional[bool] = Unassigned() + managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() + routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() + inference_ami_version: Optional[StrPipeVar] = Unassigned() + capacity_reservation_config: Optional[ProductionVariantCapacityReservationConfig] = Unassigned() + + +class DataCaptureConfig(Base): + """ + DataCaptureConfig + Configuration to control how SageMaker AI captures inference data. + + Attributes + ---------------------- + enable_capture: Whether data capture should be enabled or disabled (defaults to enabled). + initial_sampling_percentage: The percentage of requests SageMaker AI will capture. A lower value is recommended for Endpoints with high traffic. + destination_s3_uri: The Amazon S3 location used to capture the data. + kms_key_id: The Amazon Resource Name (ARN) of an Key Management Service key that SageMaker AI uses to encrypt the captured data at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias + capture_options: Specifies data Model Monitor will capture. You can configure whether to collect only input, only output, or both + capture_content_type_header: Configuration specifying how to treat different headers. If no headers are specified SageMaker AI will by default base64 encode when capturing the data. + """ + + initial_sampling_percentage: int + destination_s3_uri: StrPipeVar + capture_options: List[CaptureOption] + enable_capture: Optional[bool] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() + capture_content_type_header: Optional[CaptureContentTypeHeader] = Unassigned() + + +class ExplainerConfig(Base): + """ + ExplainerConfig + A parameter to activate explainers. + + Attributes + ---------------------- + clarify_explainer_config: A member of ExplainerConfig that contains configuration parameters for the SageMaker Clarify explainer. + """ + + clarify_explainer_config: Optional[ClarifyExplainerConfig] = Unassigned() + + +class MetricsConfig(Base): + """ + MetricsConfig + The configuration for Utilization metrics. + + Attributes + ---------------------- + enable_enhanced_metrics: Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization and invocation data at instance and container granularity. Container granularity is supported for Inference Components. The default is False. + metric_publish_frequency_in_seconds: The interval, in seconds, at which metrics are published to Amazon CloudWatch. Defaults to 60. Valid values: 10, 30, 60, 120, 180, 240, 300. When EnableEnhancedMetrics is set to False, this interval applies to utilization metrics only; invocation metrics continue to be published at the default 60-second interval. When EnableEnhancedMetrics is set to True, this interval applies to both utilization and invocation metrics. + """ + + enable_enhanced_metrics: Optional[bool] = Unassigned() + metric_publish_frequency_in_seconds: Optional[int] = Unassigned() + + +class RollingUpdatePolicy(Base): + """ + RollingUpdatePolicy + Specifies a rolling deployment strategy for updating a SageMaker endpoint. + + Attributes + ---------------------- + maximum_batch_size: Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant's total instance count. + wait_interval_in_seconds: The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet. + maximum_execution_timeout_in_seconds: The time limit for the total deployment. Exceeding this limit causes a timeout. + rollback_maximum_batch_size: Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback. + """ + + maximum_batch_size: CapacitySize + wait_interval_in_seconds: int + maximum_execution_timeout_in_seconds: Optional[int] = Unassigned() + rollback_maximum_batch_size: Optional[CapacitySize] = Unassigned() + + +class DeploymentConfig(Base): + """ + DeploymentConfig + The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations. + + Attributes + ---------------------- + blue_green_update_policy: Update policy for a blue/green deployment. If this update policy is specified, SageMaker creates a new fleet during the deployment while maintaining the old fleet. SageMaker flips traffic to the new fleet according to the specified traffic routing configuration. Only one update policy should be used in the deployment configuration. If no update policy is specified, SageMaker uses a blue/green deployment strategy with all at once traffic shifting by default. + rolling_update_policy: Specifies a rolling deployment strategy for updating a SageMaker endpoint. + auto_rollback_configuration: Automatic rollback configuration for handling endpoint deployment failures and recovery. + """ + + blue_green_update_policy: Optional[BlueGreenUpdatePolicy] = Unassigned() + rolling_update_policy: Optional[RollingUpdatePolicy] = Unassigned() + auto_rollback_configuration: Optional[AutoRollbackConfig] = Unassigned() + + +class FeatureDefinition(Base): + """ + FeatureDefinition + A list of features. You must include FeatureName and FeatureType. Valid feature FeatureTypes are Integral, Fractional and String. + + Attributes + ---------------------- + feature_name: The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted, write_time, api_invocation_time. The name: Must start with an alphanumeric character. Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed. + feature_type: The value type of a feature. Valid values are Integral, Fractional, or String. + collection_type: A grouping of elements where each element within the collection must have the same feature type (String, Integral, or Fractional). List: An ordered collection of elements. Set: An unordered collection of unique elements. Vector: A specialized list that represents a fixed-size array of elements. The vector dimension is determined by you. Must have elements with fractional feature types. + collection_config: Configuration for your collection. + """ + + feature_name: StrPipeVar + feature_type: StrPipeVar + collection_type: Optional[StrPipeVar] = Unassigned() + collection_config: Optional[CollectionConfig] = Unassigned() + + +class OnlineStoreSecurityConfig(Base): + """ + OnlineStoreSecurityConfig + The security configuration for OnlineStore. + + Attributes + ---------------------- + kms_key_id: The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption. The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId: "kms:Encrypt" "kms:Decrypt" "kms:DescribeKey" "kms:CreateGrant" "kms:RetireGrant" "kms:ReEncryptFrom" "kms:ReEncryptTo" "kms:GenerateDataKey" "kms:ListAliases" "kms:ListGrants" "kms:RevokeGrant" The caller (either user or IAM role) to all DataPlane operations (PutRecord, GetRecord, DeleteRecord) must have the following permissions to the KmsKeyId: "kms:Decrypt" + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class OnlineStoreConfig(Base): + """ + OnlineStoreConfig + Use this to specify the Amazon Web Services Key Management Service (KMS) Key ID, or KMSKeyId, for at rest data encryption. You can turn OnlineStore on or off by specifying the EnableOnlineStore flag at General Assembly. The default value is False. + + Attributes + ---------------------- + security_config: Use to specify KMS Key ID (KMSKeyId) for at-rest encryption of your OnlineStore. + enable_online_store: Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag. The default value is False. + ttl_duration: Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide. + storage_type: Option for different tiers of low latency storage for real-time data retrieval. Standard: A managed low latency data store for feature groups. InMemory: A managed data store for feature groups that supports very low latency retrieval. + """ + + security_config: Optional[OnlineStoreSecurityConfig] = Unassigned() + enable_online_store: Optional[bool] = Unassigned() + ttl_duration: Optional[TtlDuration] = Unassigned() + storage_type: Optional[StrPipeVar] = Unassigned() + + +class S3StorageConfig(Base): + """ + S3StorageConfig + The Amazon Simple Storage (Amazon S3) location and security configuration for OfflineStore. + + Attributes + ---------------------- + s3_uri: The S3 URI, or location in Amazon S3, of OfflineStore. S3 URIs have a format similar to the following: s3://example-bucket/prefix/. + kms_key_id: The Amazon Web Services Key Management Service (KMS) key ARN of the key used to encrypt any objects written into the OfflineStore S3 location. The IAM roleARN that is passed as a parameter to CreateFeatureGroup must have below permissions to the KmsKeyId: "kms:GenerateDataKey" + resolved_output_s3_uri: The S3 path where offline records are written. + """ + + s3_uri: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + resolved_output_s3_uri: Optional[StrPipeVar] = Unassigned() + + +class DataCatalogConfig(Base): + """ + DataCatalogConfig + The meta data of the Glue table which serves as data catalog for the OfflineStore. + + Attributes + ---------------------- + table_name: The name of the Glue table. + catalog: The name of the Glue table catalog. + database: The name of the Glue table database. + """ + + table_name: StrPipeVar + catalog: StrPipeVar + database: StrPipeVar + + +class OfflineStoreConfig(Base): + """ + OfflineStoreConfig + The configuration of an OfflineStore. Provide an OfflineStoreConfig in a request to CreateFeatureGroup to create an OfflineStore. To encrypt an OfflineStore using at rest data encryption, specify Amazon Web Services Key Management Service (KMS) key ID, or KMSKeyId, in S3StorageConfig. + + Attributes + ---------------------- + s3_storage_config: The Amazon Simple Storage (Amazon S3) location of OfflineStore. + disable_glue_table_creation: Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore. If set to True and DataCatalogConfig is provided, Feature Store associates the provided catalog configuration with the feature group without creating a table. In this case, you are responsible for creating and managing the Glue table. If set to True without DataCatalogConfig, no Glue table is created or associated with the feature group. The Iceberg table format is only supported when this is set to False. If set to False and DataCatalogConfig is provided, Feature Store creates the table using the specified names. If set to False without DataCatalogConfig, Feature Store auto-generates the table name following Athena's naming recommendations. This applies to both Glue and Apache Iceberg table formats. The default value is False. + data_catalog_config: The meta data of the Glue table for the OfflineStore. If not provided, Feature Store auto-generates the table name, database, and catalog when the OfflineStore is created. You can optionally provide this configuration to specify custom values. This applies to both Glue and Apache Iceberg table formats. + table_format: Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg. + """ + + s3_storage_config: S3StorageConfig + disable_glue_table_creation: Optional[bool] = Unassigned() + data_catalog_config: Optional[DataCatalogConfig] = Unassigned() + table_format: Optional[StrPipeVar] = Unassigned() + + +class ThroughputConfig(Base): + """ + ThroughputConfig + Used to set feature group throughput configuration. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the Standard tier online store. + + Attributes + ---------------------- + throughput_mode: The mode used for your feature group throughput: ON_DEMAND or PROVISIONED. + provisioned_read_capacity_units: For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + provisioned_write_capacity_units: For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + """ + + throughput_mode: StrPipeVar + provisioned_read_capacity_units: Optional[int] = Unassigned() + provisioned_write_capacity_units: Optional[int] = Unassigned() + + +class HumanLoopRequestSource(Base): + """ + HumanLoopRequestSource + Container for configuring the source of human task requests. + + Attributes + ---------------------- + aws_managed_human_loop_request_source: Specifies whether Amazon Rekognition or Amazon Textract are used as the integration source. The default field settings and JSON parsing rules are different based on the integration source. Valid values: + """ + + aws_managed_human_loop_request_source: StrPipeVar + + +class HumanLoopActivationConditionsConfig(Base): + """ + HumanLoopActivationConditionsConfig + Defines under what conditions SageMaker creates a human loop. Used within CreateFlowDefinition. See HumanLoopActivationConditionsConfig for the required format of activation conditions. + + Attributes + ---------------------- + human_loop_activation_conditions: JSON expressing use-case specific conditions declaratively. If any condition is matched, atomic tasks are created against the configured work team. The set of conditions is different for Rekognition and Textract. For more information about how to structure the JSON, see JSON Schema for Human Loop Activation Conditions in Amazon Augmented AI in the Amazon SageMaker Developer Guide. + """ + + human_loop_activation_conditions: StrPipeVar + + +class HumanLoopActivationConfig(Base): + """ + HumanLoopActivationConfig + Provides information about how and under what conditions SageMaker creates a human loop. If HumanLoopActivationConfig is not given, then all requests go to humans. + + Attributes + ---------------------- + human_loop_activation_conditions_config: Container structure for defining under what conditions SageMaker creates a human loop. + """ + + human_loop_activation_conditions_config: HumanLoopActivationConditionsConfig + + +class USD(Base): + """ + USD + Represents an amount of money in United States dollars. + + Attributes + ---------------------- + dollars: The whole number of dollars in the amount. + cents: The fractional portion, in cents, of the amount. + tenth_fractions_of_a_cent: Fractions of a cent, in tenths. + """ + + dollars: Optional[int] = Unassigned() + cents: Optional[int] = Unassigned() + tenth_fractions_of_a_cent: Optional[int] = Unassigned() + + +class PublicWorkforceTaskPrice(Base): + """ + PublicWorkforceTaskPrice + Defines the amount of money paid to an Amazon Mechanical Turk worker for each task performed. Use one of the following prices for bounding box tasks. Prices are in US dollars and should be based on the complexity of the task; the longer it takes in your initial testing, the more you should offer. 0.036 0.048 0.060 0.072 0.120 0.240 0.360 0.480 0.600 0.720 0.840 0.960 1.080 1.200 Use one of the following prices for image classification, text classification, and custom tasks. Prices are in US dollars. 0.012 0.024 0.036 0.048 0.060 0.072 0.120 0.240 0.360 0.480 0.600 0.720 0.840 0.960 1.080 1.200 Use one of the following prices for semantic segmentation tasks. Prices are in US dollars. 0.840 0.960 1.080 1.200 Use one of the following prices for Textract AnalyzeDocument Important Form Key Amazon Augmented AI review tasks. Prices are in US dollars. 2.400 2.280 2.160 2.040 1.920 1.800 1.680 1.560 1.440 1.320 1.200 1.080 0.960 0.840 0.720 0.600 0.480 0.360 0.240 0.120 0.072 0.060 0.048 0.036 0.024 0.012 Use one of the following prices for Rekognition DetectModerationLabels Amazon Augmented AI review tasks. Prices are in US dollars. 1.200 1.080 0.960 0.840 0.720 0.600 0.480 0.360 0.240 0.120 0.072 0.060 0.048 0.036 0.024 0.012 Use one of the following prices for Amazon Augmented AI custom human review tasks. Prices are in US dollars. 1.200 1.080 0.960 0.840 0.720 0.600 0.480 0.360 0.240 0.120 0.072 0.060 0.048 0.036 0.024 0.012 + + Attributes + ---------------------- + amount_in_usd: Defines the amount of money paid to an Amazon Mechanical Turk worker in United States dollars. + """ + + amount_in_usd: Optional[USD] = Unassigned() + + +class HumanLoopConfig(Base): + """ + HumanLoopConfig + Describes the work to be performed by human workers. + + Attributes + ---------------------- + workteam_arn: Amazon Resource Name (ARN) of a team of workers. To learn more about the types of workforces and work teams you can create and use with Amazon A2I, see Create and Manage Workforces. + human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface. You can use standard HTML and Crowd HTML Elements to create a custom worker task template. You use this template to create a human task UI. To learn how to create a custom HTML template, see Create Custom Worker Task Template. To learn how to create a human task UI, which is a worker task template that can be used in a flow definition, see Create and Delete a Worker Task Templates. + task_title: A title for the human worker task. + task_description: A description for the human worker task. + task_count: The number of distinct workers who will perform the same task on each object. For example, if TaskCount is set to 3 for an image classification labeling job, three workers will classify each input image. Increasing TaskCount can improve label accuracy. + task_availability_lifetime_in_seconds: The length of time that a task remains available for review by human workers. + task_time_limit_in_seconds: The amount of time that a worker has to complete a task. The default value is 3,600 seconds (1 hour). + task_keywords: Keywords used to describe the task so that workers can discover the task. + public_workforce_task_price + """ + + workteam_arn: StrPipeVar + human_task_ui_arn: StrPipeVar + task_title: StrPipeVar + task_description: StrPipeVar + task_count: int + task_availability_lifetime_in_seconds: Optional[int] = Unassigned() + task_time_limit_in_seconds: Optional[int] = Unassigned() + task_keywords: Optional[List[StrPipeVar]] = Unassigned() + public_workforce_task_price: Optional[PublicWorkforceTaskPrice] = Unassigned() + + +class FlowDefinitionOutputConfig(Base): + """ + FlowDefinitionOutputConfig + Contains information about where human output will be stored. + + Attributes + ---------------------- + s3_output_path: The Amazon S3 path where the object containing human output will be made available. To learn more about the format of Amazon A2I output data, see Amazon A2I Output Data. + kms_key_id: The Amazon Key Management Service (KMS) key ID for server-side encryption. + """ + + s3_output_path: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class PresignedUrlAccessConfig(Base): + """ + PresignedUrlAccessConfig + Configuration for accessing hub content through presigned URLs, including license agreement acceptance and URL validation settings. + + Attributes + ---------------------- + accept_eula: Indicates acceptance of the End User License Agreement (EULA) for gated models. Set to true to acknowledge acceptance of the license terms required for accessing gated content. + expected_s3_url: The expected S3 URL prefix for validation purposes. This parameter helps ensure consistency between the resolved S3 URIs and the deployment configuration, reducing potential compatibility issues. + """ + + accept_eula: Optional[bool] = Unassigned() + expected_s3_url: Optional[StrPipeVar] = Unassigned() + + +class HubS3StorageConfig(Base): + """ + HubS3StorageConfig + The Amazon S3 storage configuration of a hub. + + Attributes + ---------------------- + s3_output_path: The Amazon S3 bucket prefix for hosting hub content. + """ + + s3_output_path: Optional[StrPipeVar] = Unassigned() + + +class UiTemplate(Base): + """ + UiTemplate + The Liquid template for the worker user interface. + + Attributes + ---------------------- + content: The content of the Liquid template for the worker user interface. + """ + + content: StrPipeVar + + +class HyperbandStrategyConfig(Base): + """ + HyperbandStrategyConfig + The configuration for Hyperband, a multi-fidelity based hyperparameter tuning strategy. Hyperband uses the final and intermediate results of a training job to dynamically allocate resources to utilized hyperparameter configurations while automatically stopping under-performing configurations. This parameter should be provided only if Hyperband is selected as the StrategyConfig under the HyperParameterTuningJobConfig API. + + Attributes + ---------------------- + min_resource: The minimum number of resources (such as epochs) that can be used by a training job launched by a hyperparameter tuning job. If the value for MinResource has not been reached, the training job is not stopped by Hyperband. + max_resource: The maximum number of resources (such as epochs) that can be used by a training job launched by a hyperparameter tuning job. Once a job reaches the MaxResource value, it is stopped. If a value for MaxResource is not provided, and Hyperband is selected as the hyperparameter tuning strategy, HyperbandTraining attempts to infer MaxResource from the following keys (if present) in StaticsHyperParameters: epochs numepochs n-epochs n_epochs num_epochs If HyperbandStrategyConfig is unable to infer a value for MaxResource, it generates a validation error. The maximum value is 20,000 epochs. All metrics that correspond to an objective metric are used to derive early stopping decisions. For distributed training jobs, ensure that duplicate metrics are not printed in the logs across the individual nodes in a training job. If multiple nodes are publishing duplicate or incorrect metrics, training jobs may make an incorrect stopping decision and stop the job prematurely. + """ + + min_resource: Optional[int] = Unassigned() + max_resource: Optional[int] = Unassigned() + + +class HyperParameterTuningJobStrategyConfig(Base): + """ + HyperParameterTuningJobStrategyConfig + The configuration for a training job launched by a hyperparameter tuning job. Choose Bayesian for Bayesian optimization, and Random for random search optimization. For more advanced use cases, use Hyperband, which evaluates objective metrics for training jobs after every epoch. For more information about strategies, see How Hyperparameter Tuning Works. + + Attributes + ---------------------- + hyperband_strategy_config: The configuration for the object that specifies the Hyperband strategy. This parameter is only supported for the Hyperband selection for Strategy within the HyperParameterTuningJobConfig API. + """ + + hyperband_strategy_config: Optional[HyperbandStrategyConfig] = Unassigned() + + +class ResourceLimits(Base): + """ + ResourceLimits + Specifies the maximum number of training jobs and parallel training jobs that a hyperparameter tuning job can launch. + + Attributes + ---------------------- + max_number_of_training_jobs: The maximum number of training jobs that a hyperparameter tuning job can launch. + max_parallel_training_jobs: The maximum number of concurrent training jobs that a hyperparameter tuning job can launch. + max_runtime_in_seconds: The maximum time in seconds that a hyperparameter tuning job can run. + """ + + max_parallel_training_jobs: int + max_number_of_training_jobs: Optional[int] = Unassigned() + max_runtime_in_seconds: Optional[int] = Unassigned() + + +class IntegerParameterRange(Base): + """ + IntegerParameterRange + For a hyperparameter of the integer type, specifies the range that a hyperparameter tuning job searches. + + Attributes + ---------------------- + name: The name of the hyperparameter to search. + min_value: The minimum value of the hyperparameter to search. + max_value: The maximum value of the hyperparameter to search. + scaling_type: The scale that hyperparameter tuning uses to search the hyperparameter range. For information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values: Auto SageMaker hyperparameter tuning chooses the best scale for the hyperparameter. Linear Hyperparameter tuning searches the values in the hyperparameter range by using a linear scale. Logarithmic Hyperparameter tuning searches the values in the hyperparameter range by using a logarithmic scale. Logarithmic scaling works only for ranges that have only values greater than 0. + """ + + name: StrPipeVar + min_value: StrPipeVar + max_value: StrPipeVar + scaling_type: Optional[StrPipeVar] = Unassigned() + + +class ParameterRanges(Base): + """ + ParameterRanges + Specifies ranges of integer, continuous, and categorical hyperparameters that a hyperparameter tuning job searches. The hyperparameter tuning job launches training jobs with hyperparameter values within these ranges to find the combination of values that result in the training job with the best performance as measured by the objective metric of the hyperparameter tuning job. The maximum number of items specified for Array Members refers to the maximum number of hyperparameters for each range and also the maximum for the hyperparameter tuning job itself. That is, the sum of the number of hyperparameters for all the ranges can't exceed the maximum number specified. + + Attributes + ---------------------- + integer_parameter_ranges: The array of IntegerParameterRange objects that specify ranges of integer hyperparameters that a hyperparameter tuning job searches. + continuous_parameter_ranges: The array of ContinuousParameterRange objects that specify ranges of continuous hyperparameters that a hyperparameter tuning job searches. + categorical_parameter_ranges: The array of CategoricalParameterRange objects that specify ranges of categorical hyperparameters that a hyperparameter tuning job searches. + auto_parameters: A list containing hyperparameter names and example values to be used by Autotune to determine optimal ranges for your tuning job. + """ + + integer_parameter_ranges: Optional[List[IntegerParameterRange]] = Unassigned() + continuous_parameter_ranges: Optional[List[ContinuousParameterRange]] = Unassigned() + categorical_parameter_ranges: Optional[List[CategoricalParameterRange]] = Unassigned() + auto_parameters: Optional[List[AutoParameter]] = Unassigned() + + +class TuningJobCompletionCriteria(Base): + """ + TuningJobCompletionCriteria + The job completion criteria. + + Attributes + ---------------------- + target_objective_metric_value: The value of the objective metric. + best_objective_not_improving: A flag to stop your hyperparameter tuning job if model performance fails to improve as evaluated against an objective function. + convergence_detected: A flag to top your hyperparameter tuning job if automatic model tuning (AMT) has detected that your model has converged as evaluated against your objective function. + """ + + target_objective_metric_value: Optional[float] = Unassigned() + best_objective_not_improving: Optional[BestObjectiveNotImproving] = Unassigned() + convergence_detected: Optional[ConvergenceDetected] = Unassigned() + + +class HyperParameterTuningJobConfig(Base): + """ + HyperParameterTuningJobConfig + Configures a hyperparameter tuning job. + + Attributes + ---------------------- + strategy: Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. For information about search strategies, see How Hyperparameter Tuning Works. + strategy_config: The configuration for the Hyperband optimization strategy. This parameter should be provided only if Hyperband is selected as the strategy for HyperParameterTuningJobConfig. + hyper_parameter_tuning_job_objective: The HyperParameterTuningJobObjective specifies the objective metric used to evaluate the performance of training jobs launched by this tuning job. + resource_limits: The ResourceLimits object that specifies the maximum number of training and parallel training jobs that can be used for this hyperparameter tuning job. + parameter_ranges: The ParameterRanges object that specifies the ranges of hyperparameters that this tuning job searches over to find the optimal configuration for the highest model performance against your chosen objective metric. + training_job_early_stopping_type: Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF): OFF Training jobs launched by the hyperparameter tuning job do not use early stopping. AUTO SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early. + tuning_job_completion_criteria: The tuning job's completion criteria. + random_seed: A value used to initialize a pseudo-random number generator. Setting a random seed and using the same seed later for the same tuning job will allow hyperparameter optimization to find more a consistent hyperparameter configuration between the two runs. + """ + + strategy: StrPipeVar + resource_limits: ResourceLimits + strategy_config: Optional[HyperParameterTuningJobStrategyConfig] = Unassigned() + hyper_parameter_tuning_job_objective: Optional[HyperParameterTuningJobObjective] = Unassigned() + parameter_ranges: Optional[ParameterRanges] = Unassigned() + training_job_early_stopping_type: Optional[StrPipeVar] = Unassigned() + tuning_job_completion_criteria: Optional[TuningJobCompletionCriteria] = Unassigned() + random_seed: Optional[int] = Unassigned() + + +class HyperParameterAlgorithmSpecification(Base): + """ + HyperParameterAlgorithmSpecification + Specifies which training algorithm to use for training jobs that a hyperparameter tuning job launches and the metrics to monitor. + + Attributes + ---------------------- + training_image: The registry path of the Docker image that contains the training algorithm. For information about Docker registry paths for built-in algorithms, see Algorithms Provided by Amazon SageMaker: Common Parameters. SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker. + training_input_mode + algorithm_name: The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this parameter, do not specify a value for TrainingImage. + metric_definitions: An array of MetricDefinition objects that specify the metrics that the algorithm emits. + """ + + training_input_mode: StrPipeVar + training_image: Optional[StrPipeVar] = Unassigned() + algorithm_name: Optional[Union[StrPipeVar, object]] = Unassigned() + metric_definitions: Optional[List[MetricDefinition]] = Unassigned() + + +class HyperParameterTuningInstanceConfig(Base): + """ + HyperParameterTuningInstanceConfig + The configuration for hyperparameter tuning resources for use in training jobs launched by the tuning job. These resources include compute instances and storage volumes. Specify one or more compute instance configurations and allocation strategies to select resources (optional). + + Attributes + ---------------------- + instance_type: The instance type used for processing of hyperparameter optimization jobs. Choose from general purpose (no GPUs) instance types: ml.m5.xlarge, ml.m5.2xlarge, and ml.m5.4xlarge or compute optimized (no GPUs) instance types: ml.c5.xlarge and ml.c5.2xlarge. For more information about instance types, see instance type descriptions. + instance_count: The number of instances of the type specified by InstanceType. Choose an instance count larger than 1 for distributed training algorithms. See Step 2: Launch a SageMaker Distributed Training Job Using the SageMaker Python SDK for more information. + volume_size_in_gb: The volume size in GB of the data to be processed for hyperparameter optimization (optional). + """ + + instance_type: StrPipeVar + instance_count: int + volume_size_in_gb: int + + +class HyperParameterTuningResourceConfig(Base): + """ + HyperParameterTuningResourceConfig + The configuration of resources, including compute instances and storage volumes for use in training jobs launched by hyperparameter tuning jobs. HyperParameterTuningResourceConfig is similar to ResourceConfig, but has the additional InstanceConfigs and AllocationStrategy fields to allow for flexible instance management. Specify one or more instance types, count, and the allocation strategy for instance selection. HyperParameterTuningResourceConfig supports the capabilities of ResourceConfig with the exception of KeepAlivePeriodInSeconds. Hyperparameter tuning jobs use warm pools by default, which reuse clusters between training jobs. + + Attributes + ---------------------- + instance_type: The instance type used to run hyperparameter optimization tuning jobs. See descriptions of instance types for more information. + instance_count: The number of compute instances of type InstanceType to use. For distributed training, select a value greater than 1. + volume_size_in_gb: The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional). These volumes store model artifacts, incremental states and optionally, scratch space for training algorithms. Do not provide a value for this parameter if a value for InstanceConfigs is also specified. Some instance types have a fixed total local storage size. If you select one of these instances for training, VolumeSizeInGB cannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes. SageMaker supports only the General Purpose SSD (gp2) storage volume type. + volume_kms_key_id: A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached to the compute instances used to run the training job. You can use either of the following formats to specify a key. KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" Amazon Resource Name (ARN) of a KMS key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" Some instances use local storage, which use a hardware module to encrypt storage volumes. If you choose one of these instance types, you cannot request a VolumeKmsKeyId. For a list of instance types that use local storage, see instance store volumes. For more information about Amazon Web Services Key Management Service, see KMS encryption for more information. + allocation_strategy: The strategy that determines the order of preference for resources specified in InstanceConfigs used in hyperparameter optimization. + instance_configs: A list containing the configuration(s) for one or more resources for processing hyperparameter jobs. These resources include compute instances and storage volumes to use in model training jobs launched by hyperparameter tuning jobs. The AllocationStrategy controls the order in which multiple configurations provided in InstanceConfigs are used. If you only want to use a single instance configuration inside the HyperParameterTuningResourceConfig API, do not provide a value for InstanceConfigs. Instead, use InstanceType, VolumeSizeInGB and InstanceCount. If you use InstanceConfigs, do not provide values for InstanceType, VolumeSizeInGB or InstanceCount. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[int] = Unassigned() + volume_size_in_gb: Optional[int] = Unassigned() + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + allocation_strategy: Optional[StrPipeVar] = Unassigned() + instance_configs: Optional[List[HyperParameterTuningInstanceConfig]] = Unassigned() + + +class RetryStrategy(Base): + """ + RetryStrategy + The retry strategy to use when a training job fails due to an InternalServerError. RetryStrategy is specified as part of the CreateTrainingJob and CreateHyperParameterTuningJob requests. You can add the StoppingCondition parameter to the request to limit the training time for the complete job. + + Attributes + ---------------------- + maximum_retry_attempts: The number of times to retry the job. When the job is retried, it's SecondaryStatus is changed to STARTING. + """ + + maximum_retry_attempts: int + + +class HyperParameterTrainingJobDefinition(Base): + """ + HyperParameterTrainingJobDefinition + Defines the training jobs launched by a hyperparameter tuning job. + + Attributes + ---------------------- + definition_name: The job definition name. + tuning_objective + hyper_parameter_ranges + static_hyper_parameters: Specifies the values of hyperparameters that do not change for the tuning job. + algorithm_specification: The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches. + role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches. + input_data_config: An array of Channel objects that specify the input for the training jobs that the tuning job launches. + vpc_config: The VpcConfig object that specifies the VPC that you want the training jobs that this hyperparameter tuning job launches 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. + output_data_config: Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches. + resource_config: The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches. Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want SageMaker to use the 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. If you want to use hyperparameter optimization with instance type flexibility, use HyperParameterTuningResourceConfig instead. + hyper_parameter_tuning_resource_config: The configuration for the hyperparameter tuning resources, including the compute instances and storage volumes, used for training jobs launched by the tuning job. By default, storage volumes hold model artifacts and incremental states. Choose File for TrainingInputMode in the AlgorithmSpecification parameter to additionally store training data in the storage volume (optional). + stopping_condition: Specifies a limit to how long a model hyperparameter 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. + 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 network isolation is used 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. + enable_managed_spot_training: A Boolean indicating whether managed spot training is enabled (True) or not (False). + checkpoint_config + retry_strategy: The number of times to retry the job when the job fails due to an InternalServerError. + environment: An environment variable that you can pass into the SageMaker CreateTrainingJob API. You can use an existing environment variable from the training container or use your own. See Define metrics and variables for more information. The maximum number of items specified for Map Entries refers to the maximum number of environment variables for each TrainingJobDefinition and also the maximum for the hyperparameter tuning job itself. That is, the sum of the number of environment variables for all the training job definitions can't exceed the maximum number specified. + """ + + algorithm_specification: HyperParameterAlgorithmSpecification + role_arn: StrPipeVar + output_data_config: OutputDataConfig + stopping_condition: StoppingCondition + definition_name: Optional[StrPipeVar] = Unassigned() + tuning_objective: Optional[HyperParameterTuningJobObjective] = Unassigned() + hyper_parameter_ranges: Optional[ParameterRanges] = Unassigned() + static_hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + input_data_config: Optional[List[Channel]] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + resource_config: Optional[ResourceConfig] = Unassigned() + hyper_parameter_tuning_resource_config: Optional[HyperParameterTuningResourceConfig] = ( + Unassigned() + ) + enable_network_isolation: Optional[bool] = Unassigned() + enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() + enable_managed_spot_training: Optional[bool] = Unassigned() + checkpoint_config: Optional[CheckpointConfig] = Unassigned() + retry_strategy: Optional[RetryStrategy] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ParentHyperParameterTuningJob(Base): + """ + ParentHyperParameterTuningJob + A previously completed or stopped hyperparameter tuning job to be used as a starting point for a new hyperparameter tuning job. + + Attributes + ---------------------- + hyper_parameter_tuning_job_name: The name of the hyperparameter tuning job to be used as a starting point for a new hyperparameter tuning job. + """ + + hyper_parameter_tuning_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class HyperParameterTuningJobWarmStartConfig(Base): + """ + HyperParameterTuningJobWarmStartConfig + Specifies the configuration for a hyperparameter tuning job that uses one or more previous hyperparameter tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job. All training jobs launched by the new hyperparameter tuning job are evaluated by using the objective metric, and the training job that performs the best is compared to the best training jobs from the parent tuning jobs. From these, the training job that performs the best as measured by the objective metric is returned as the overall best training job. All training jobs launched by parent hyperparameter tuning jobs and the new hyperparameter tuning jobs count against the limit of training jobs for the tuning job. + + Attributes + ---------------------- + parent_hyper_parameter_tuning_jobs: An array of hyperparameter tuning jobs that are used as the starting point for the new hyperparameter tuning job. For more information about warm starting a hyperparameter tuning job, see Using a Previous Hyperparameter Tuning Job as a Starting Point. Hyperparameter tuning jobs created before October 1, 2018 cannot be used as parent jobs for warm start tuning jobs. + warm_start_type: Specifies one of the following: IDENTICAL_DATA_AND_ALGORITHM The new hyperparameter tuning job uses the same input data and training image as the parent tuning jobs. You can change the hyperparameter ranges to search and the maximum number of training jobs that the hyperparameter tuning job launches. You cannot use a new version of the training algorithm, unless the changes in the new version do not affect the algorithm itself. For example, changes that improve logging or adding support for a different data format are allowed. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs. TRANSFER_LEARNING The new hyperparameter tuning job can include input data, hyperparameter ranges, maximum number of concurrent training jobs, and maximum number of training jobs that are different than those of its parent hyperparameter tuning jobs. The training image can also be a different version from the version used in the parent hyperparameter tuning job. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs. + """ + + parent_hyper_parameter_tuning_jobs: List[ParentHyperParameterTuningJob] + warm_start_type: StrPipeVar + + +class InferenceComponentContainerSpecification(Base): + """ + InferenceComponentContainerSpecification + Defines a container that provides the runtime environment for a model that you deploy with an inference component. + + Attributes + ---------------------- + image: The Amazon Elastic Container Registry (Amazon ECR) path where the Docker image for the model is stored. + artifact_url: The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). + environment: The environment variables to set in the Docker container. Each key and value in the Environment string-to-string map can have length of up to 1024. We support up to 16 entries in the map. + """ + + image: Optional[StrPipeVar] = Unassigned() + artifact_url: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class InferenceComponentStartupParameters(Base): + """ + InferenceComponentStartupParameters + Settings that take effect while the model container starts up. + + Attributes + ---------------------- + model_data_download_timeout_in_seconds: The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this inference component. + container_startup_health_check_timeout_in_seconds: The timeout value, in seconds, for your inference container to pass health check by Amazon S3 Hosting. For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests. + """ + + model_data_download_timeout_in_seconds: Optional[int] = Unassigned() + container_startup_health_check_timeout_in_seconds: Optional[int] = Unassigned() + + +class InferenceComponentComputeResourceRequirements(Base): + """ + InferenceComponentComputeResourceRequirements + Defines the compute resources to allocate to run a model, plus any adapter models, that you assign to an inference component. These resources include CPU cores, accelerators, and memory. + + Attributes + ---------------------- + number_of_cpu_cores_required: The number of CPU cores to allocate to run a model that you assign to an inference component. + number_of_accelerator_devices_required: The number of accelerators to allocate to run a model that you assign to an inference component. Accelerators include GPUs and Amazon Web Services Inferentia. + min_memory_required_in_mb: The minimum MB of memory to allocate to run a model that you assign to an inference component. + max_memory_required_in_mb: The maximum MB of memory to allocate to run a model that you assign to an inference component. + """ + + number_of_cpu_cores_required: Optional[float] = Unassigned() + number_of_accelerator_devices_required: Optional[float] = Unassigned() + min_memory_required_in_mb: Optional[int] = Unassigned() + max_memory_required_in_mb: Optional[int] = Unassigned() + + +class InferenceComponentDataCacheConfig(Base): + """ + InferenceComponentDataCacheConfig + Settings that affect how the inference component caches data. + + Attributes + ---------------------- + enable_caching: Sets whether the endpoint that hosts the inference component caches the model artifacts and container image. With caching enabled, the endpoint caches this data in each instance that it provisions for the inference component. That way, the inference component deploys faster during the auto scaling process. If caching isn't enabled, the inference component takes longer to deploy because of the time it spends downloading the data. + """ + + enable_caching: bool + + +class InferenceComponentAvailabilityZoneBalance(Base): + """ + InferenceComponentAvailabilityZoneBalance + Configuration for balancing inference component copies across Availability Zones. + + Attributes + ---------------------- + enforcement_mode: Determines how strictly the Availability Zone balance constraint is enforced. PERMISSIVE The endpoint attempts to balance copies across Availability Zones but proceeds with scheduling even if balance can't be achieved due to available capacity or instance distribution across Availability Zones. + max_imbalance: The maximum allowed difference in the number of inference component copies between any two Availability Zones. This parameter applies only when the endpoint has instances across two or more Availability Zones. A copy placement is allowed if it reduces imbalance or the resulting imbalance is within this value. Default value: 0. + """ + + enforcement_mode: StrPipeVar + max_imbalance: Optional[int] = Unassigned() + + +class InferenceComponentSchedulingConfig(Base): + """ + InferenceComponentSchedulingConfig + The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. + + Attributes + ---------------------- + placement_strategy: The strategy for placing inference component copies across available instances. If you also set AvailabilityZoneBalance, this strategy applies to placement within each Availability Zone. SPREAD Distributes copies evenly across available instances for better resilience. BINPACK Packs copies onto fewer instances to optimize resource utilization. + availability_zone_balance: Configuration for balancing inference component copies across Availability Zones. + """ + + placement_strategy: StrPipeVar + availability_zone_balance: Optional[InferenceComponentAvailabilityZoneBalance] = Unassigned() + + +class InferenceComponentSpecification(Base): + """ + InferenceComponentSpecification + Details about the resources to deploy with this inference component, including the model, container, and compute resources. + + Attributes + ---------------------- + model_name: The name of an existing SageMaker AI model object in your account that you want to deploy with the inference component. + container: Defines a container that provides the runtime environment for a model that you deploy with an inference component. + startup_parameters: Settings that take effect while the model container starts up. + compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component. Omit this parameter if your request is meant to create an adapter inference component. An adapter inference component is loaded by a base inference component, and it uses the compute resources of the base inference component. + base_inference_component_name: The name of an existing inference component that is to contain the inference component that you're creating with your request. Specify this parameter only if your request is meant to create an adapter inference component. An adapter inference component contains the path to an adapter model. The purpose of the adapter model is to tailor the inference output of a base foundation model, which is hosted by the base inference component. The adapter inference component uses the compute resources that you assigned to the base inference component. When you create an adapter inference component, use the Container parameter to specify the location of the adapter artifacts. In the parameter value, use the ArtifactUrl parameter of the InferenceComponentContainerSpecification data type. Before you can create an adapter inference component, you must have an existing inference component that contains the foundation model that you want to adapt. + data_cache_config: Settings that affect how the inference component caches data. + scheduling_config: The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. + """ + + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + container: Optional[InferenceComponentContainerSpecification] = Unassigned() + startup_parameters: Optional[InferenceComponentStartupParameters] = Unassigned() + compute_resource_requirements: Optional[InferenceComponentComputeResourceRequirements] = ( + Unassigned() + ) + base_inference_component_name: Optional[StrPipeVar] = Unassigned() + data_cache_config: Optional[InferenceComponentDataCacheConfig] = Unassigned() + scheduling_config: Optional[InferenceComponentSchedulingConfig] = Unassigned() + + +class InferenceComponentRuntimeConfig(Base): + """ + InferenceComponentRuntimeConfig + Runtime settings for a model that is deployed with an inference component. + + Attributes + ---------------------- + copy_count: The number of runtime copies of the model container to deploy with the inference component. Each copy can serve inference requests. + """ + + copy_count: int + + +class InferenceExperimentSchedule(Base): + """ + InferenceExperimentSchedule + The start and end times of an inference experiment. The maximum duration that you can set for an inference experiment is 30 days. + + Attributes + ---------------------- + start_time: The timestamp at which the inference experiment started or will start. + end_time: The timestamp at which the inference experiment ended or will end. + """ + + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + + +class RealTimeInferenceConfig(Base): + """ + RealTimeInferenceConfig + The infrastructure configuration for deploying the model to a real-time inference endpoint. + + Attributes + ---------------------- + instance_type: The instance type the model is deployed to. + instance_count: The number of instances of the type specified by InstanceType. + """ + + instance_type: StrPipeVar + instance_count: int + + +class ModelInfrastructureConfig(Base): + """ + ModelInfrastructureConfig + The configuration for the infrastructure that the model will be deployed to. + + Attributes + ---------------------- + infrastructure_type: The inference option to which to deploy your model. Possible values are the following: RealTime: Deploy to real-time inference. + real_time_inference_config: The infrastructure configuration for deploying the model to real-time inference. + """ + + infrastructure_type: StrPipeVar + real_time_inference_config: RealTimeInferenceConfig + + +class ModelVariantConfig(Base): + """ + ModelVariantConfig + Contains information about the deployment options of a model. + + Attributes + ---------------------- + model_name: The name of the Amazon SageMaker Model entity. + variant_name: The name of the variant. + infrastructure_config: The configuration for the infrastructure that the model will be deployed to. + """ + + model_name: Union[StrPipeVar, object] + variant_name: StrPipeVar + infrastructure_config: ModelInfrastructureConfig + + +class InferenceExperimentDataStorageConfig(Base): + """ + InferenceExperimentDataStorageConfig + The Amazon S3 location and configuration for storing inference request and response data. + + Attributes + ---------------------- + destination: The Amazon S3 bucket where the inference request and response data is stored. + kms_key: The Amazon Web Services Key Management Service key that Amazon SageMaker uses to encrypt captured data at rest using Amazon S3 server-side encryption. + content_type + """ + + destination: StrPipeVar + kms_key: Optional[StrPipeVar] = Unassigned() + content_type: Optional[CaptureContentTypeHeader] = Unassigned() + + +class ShadowModelVariantConfig(Base): + """ + ShadowModelVariantConfig + The name and sampling percentage of a shadow variant. + + Attributes + ---------------------- + shadow_model_variant_name: The name of the shadow variant. + sampling_percentage: The percentage of inference requests that Amazon SageMaker replicates from the production variant to the shadow variant. + """ + + shadow_model_variant_name: StrPipeVar + sampling_percentage: int + + +class ShadowModeConfig(Base): + """ + ShadowModeConfig + The configuration of ShadowMode inference experiment type, which specifies a production variant to take all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant it also specifies the percentage of requests that Amazon SageMaker replicates. + + Attributes + ---------------------- + source_model_variant_name: The name of the production variant, which takes all the inference requests. + shadow_model_variants: List of shadow variant configurations. + """ + + source_model_variant_name: StrPipeVar + shadow_model_variants: List[ShadowModelVariantConfig] + + +class Phase(Base): + """ + Phase + Defines the traffic pattern. + + Attributes + ---------------------- + initial_number_of_users: Specifies how many concurrent users to start with. The value should be between 1 and 3. + spawn_rate: Specified how many new users to spawn in a minute. + duration_in_seconds: Specifies how long a traffic phase should be. For custom load tests, the value should be between 120 and 3600. This value should not exceed JobDurationInSeconds. + """ + + initial_number_of_users: Optional[int] = Unassigned() + spawn_rate: Optional[int] = Unassigned() + duration_in_seconds: Optional[int] = Unassigned() + + +class Stairs(Base): + """ + Stairs + Defines the stairs traffic pattern for an Inference Recommender load test. This pattern type consists of multiple steps where the number of users increases at each step. Specify either the stairs or phases traffic pattern. + + Attributes + ---------------------- + duration_in_seconds: Defines how long each traffic step should be. + number_of_steps: Specifies how many steps to perform during traffic. + users_per_step: Specifies how many new users to spawn in each step. + """ + + duration_in_seconds: Optional[int] = Unassigned() + number_of_steps: Optional[int] = Unassigned() + users_per_step: Optional[int] = Unassigned() + + +class TrafficPattern(Base): + """ + TrafficPattern + Defines the traffic pattern of the load test. + + Attributes + ---------------------- + traffic_type: Defines the traffic patterns. Choose either PHASES or STAIRS. + phases: Defines the phases traffic specification. + stairs: Defines the stairs traffic pattern. + """ + + traffic_type: Optional[StrPipeVar] = Unassigned() + phases: Optional[List[Phase]] = Unassigned() + stairs: Optional[Stairs] = Unassigned() + + +class RecommendationJobResourceLimit(Base): + """ + RecommendationJobResourceLimit + Specifies the maximum number of jobs that can run in parallel and the maximum number of jobs that can run. + + Attributes + ---------------------- + max_number_of_tests: Defines the maximum number of load tests. + max_parallel_of_tests: Defines the maximum number of parallel load tests. + """ + + max_number_of_tests: Optional[int] = Unassigned() + max_parallel_of_tests: Optional[int] = Unassigned() + + +class EnvironmentParameterRanges(Base): + """ + EnvironmentParameterRanges + Specifies the range of environment parameters + + Attributes + ---------------------- + categorical_parameter_ranges: Specified a list of parameters for each category. + """ + + categorical_parameter_ranges: Optional[List[CategoricalParameter]] = Unassigned() + + +class EndpointInputConfiguration(Base): + """ + EndpointInputConfiguration + The endpoint configuration for the load test. + + Attributes + ---------------------- + instance_type: The instance types to use for the load test. + serverless_config + inference_specification_name: The inference specification name in the model package version. + environment_parameter_ranges: The parameter you want to benchmark against. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + inference_specification_name: Optional[StrPipeVar] = Unassigned() + environment_parameter_ranges: Optional[EnvironmentParameterRanges] = Unassigned() + + +class RecommendationJobPayloadConfig(Base): + """ + RecommendationJobPayloadConfig + The configuration for the payload for a recommendation job. + + Attributes + ---------------------- + sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). + supported_content_types: The supported MIME types for the input data. + """ + + sample_payload_url: Optional[StrPipeVar] = Unassigned() + supported_content_types: Optional[List[StrPipeVar]] = Unassigned() + + +class RecommendationJobContainerConfig(Base): + """ + RecommendationJobContainerConfig + Specifies mandatory fields for running an Inference Recommender job directly in the CreateInferenceRecommendationsJob API. The fields specified in ContainerConfig override the corresponding fields in the model package. Use ContainerConfig if you want to specify these fields for the recommendation job but don't want to edit them in your model package. + + Attributes + ---------------------- + domain: The machine learning domain of the model and its components. Valid Values: COMPUTER_VISION \| NATURAL_LANGUAGE_PROCESSING \| MACHINE_LEARNING + task: The machine learning task that the model accomplishes. Valid Values: IMAGE_CLASSIFICATION \| OBJECT_DETECTION \| TEXT_GENERATION \| IMAGE_SEGMENTATION \| FILL_MASK \| CLASSIFICATION \| REGRESSION \| OTHER + framework: The machine learning framework of the container image. Valid Values: TENSORFLOW \| PYTORCH \| XGBOOST \| SAGEMAKER-SCIKIT-LEARN + framework_version: The framework version of the container image. + payload_config: Specifies the SamplePayloadUrl and all other sample payload-related fields. + nearest_model_name: The name of a pre-trained machine learning model benchmarked by Amazon SageMaker Inference Recommender that matches your model. Valid Values: efficientnetb7 \| unet \| xgboost \| faster-rcnn-resnet101 \| nasnetlarge \| vgg16 \| inception-v3 \| mask-rcnn \| sagemaker-scikit-learn \| densenet201-gluon \| resnet18v2-gluon \| xception \| densenet201 \| yolov4 \| resnet152 \| bert-base-cased \| xceptionV1-keras \| resnet50 \| retinanet + supported_instance_types: A list of the instance types that are used to generate inferences in real-time. + supported_endpoint_type: The endpoint type to receive recommendations for. By default this is null, and the results of the inference recommendation job return a combined list of both real-time and serverless benchmarks. By specifying a value for this field, you can receive a longer list of benchmarks for the desired endpoint type. + data_input_config: Specifies the name and shape of the expected data inputs for your trained model with a JSON dictionary form. This field is used for optimizing your model using SageMaker Neo. For more information, see DataInputConfig. + supported_response_mime_types: The supported MIME types for the output data. + """ + + domain: Optional[StrPipeVar] = Unassigned() + task: Optional[StrPipeVar] = Unassigned() + framework: Optional[StrPipeVar] = Unassigned() + framework_version: Optional[StrPipeVar] = Unassigned() + payload_config: Optional[RecommendationJobPayloadConfig] = Unassigned() + nearest_model_name: Optional[StrPipeVar] = Unassigned() + supported_instance_types: Optional[List[StrPipeVar]] = Unassigned() + supported_endpoint_type: Optional[StrPipeVar] = Unassigned() + data_input_config: Optional[StrPipeVar] = Unassigned() + supported_response_mime_types: Optional[List[StrPipeVar]] = Unassigned() + + +class EndpointInfo(Base): + """ + EndpointInfo + Details about a customer endpoint that was compared in an Inference Recommender job. + + Attributes + ---------------------- + endpoint_name: The name of a customer's endpoint. + """ + + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class RecommendationJobVpcConfig(Base): + """ + RecommendationJobVpcConfig + Inference Recommender provisions SageMaker endpoints with access to VPC in the inference recommendation job. + + Attributes + ---------------------- + security_group_ids: The VPC security group IDs. IDs have the form of sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC to which you want to connect your model. + """ + + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] + + +class RecommendationJobInputConfig(Base): + """ + RecommendationJobInputConfig + The input configuration of the recommendation job. + + Attributes + ---------------------- + model_package_version_arn: The Amazon Resource Name (ARN) of a versioned model package. + model_name: The name of the created model. + job_duration_in_seconds: Specifies the maximum duration of the job, in seconds. The maximum value is 18,000 seconds. + traffic_pattern: Specifies the traffic pattern of the job. + resource_limit: Defines the resource limit of the job. + endpoint_configurations: Specifies the endpoint configuration to use for a job. + volume_kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. This key will be passed to SageMaker Hosting for endpoint creation. The SageMaker execution role must have kms:CreateGrant permission in order to encrypt data on the storage volume of the endpoints created for inference recommendation. The inference recommendation job will fail asynchronously during endpoint configuration creation if the role passed does not have kms:CreateGrant permission. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:<region>:<account>:key/<key-id-12ab-34cd-56ef-1234567890ab>" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:<region>:<account>:alias/<ExampleAlias>" For more information about key identifiers, see Key identifiers (KeyID) in the Amazon Web Services Key Management Service (Amazon Web Services KMS) documentation. + container_config: Specifies mandatory fields for running an Inference Recommender job. The fields specified in ContainerConfig override the corresponding fields in the model package. + endpoints: Existing customer endpoints on which to run an Inference Recommender job. + vpc_config: Inference Recommender provisions SageMaker endpoints with access to VPC in the inference recommendation job. + """ + + model_package_version_arn: Optional[StrPipeVar] = Unassigned() + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + job_duration_in_seconds: Optional[int] = Unassigned() + traffic_pattern: Optional[TrafficPattern] = Unassigned() + resource_limit: Optional[RecommendationJobResourceLimit] = Unassigned() + endpoint_configurations: Optional[List[EndpointInputConfiguration]] = Unassigned() + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + container_config: Optional[RecommendationJobContainerConfig] = Unassigned() + endpoints: Optional[List[EndpointInfo]] = Unassigned() + vpc_config: Optional[RecommendationJobVpcConfig] = Unassigned() + + +class ModelLatencyThreshold(Base): + """ + ModelLatencyThreshold + The model latency threshold. + + Attributes + ---------------------- + percentile: The model latency percentile threshold. Acceptable values are P95 and P99. For custom load tests, specify the value as P95. + value_in_milliseconds: The model latency percentile value in milliseconds. + """ + + percentile: Optional[StrPipeVar] = Unassigned() + value_in_milliseconds: Optional[int] = Unassigned() + + +class RecommendationJobStoppingConditions(Base): + """ + RecommendationJobStoppingConditions + Specifies conditions for stopping a job. When a job reaches a stopping condition limit, SageMaker ends the job. + + Attributes + ---------------------- + max_invocations: The maximum number of requests per minute expected for the endpoint. + model_latency_thresholds: The interval of time taken by a model to respond as viewed from SageMaker. The interval includes the local communication time taken to send the request and to fetch the response from the container of a model and the time taken to complete the inference in the container. + flat_invocations: Stops a load test when the number of invocations (TPS) peaks and flattens, which means that the instance has reached capacity. The default value is Stop. If you want the load test to continue after invocations have flattened, set the value to Continue. + """ + + max_invocations: Optional[int] = Unassigned() + model_latency_thresholds: Optional[List[ModelLatencyThreshold]] = Unassigned() + flat_invocations: Optional[StrPipeVar] = Unassigned() + + +class RecommendationJobCompiledOutputConfig(Base): + """ + RecommendationJobCompiledOutputConfig + Provides information about the output configuration for the compiled model. + + Attributes + ---------------------- + s3_output_uri: Identifies the Amazon S3 bucket where you want SageMaker to store the compiled model artifacts. + """ + + s3_output_uri: Optional[StrPipeVar] = Unassigned() + + +class RecommendationJobOutputConfig(Base): + """ + RecommendationJobOutputConfig + Provides information about the output configuration for the compiled model. + + Attributes + ---------------------- + kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt your output artifacts with Amazon S3 server-side encryption. The SageMaker execution role must have kms:GenerateDataKey permission. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:<region>:<account>:key/<key-id-12ab-34cd-56ef-1234567890ab>" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:<region>:<account>:alias/<ExampleAlias>" For more information about key identifiers, see Key identifiers (KeyID) in the Amazon Web Services Key Management Service (Amazon Web Services KMS) documentation. + compiled_output_config: Provides information about the output configuration for the compiled model. + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + compiled_output_config: Optional[RecommendationJobCompiledOutputConfig] = Unassigned() + + +class LabelingJobS3DataSource(Base): + """ + LabelingJobS3DataSource + The Amazon S3 location of the input data objects. + + Attributes + ---------------------- + manifest_s3_uri: The Amazon S3 location of the manifest file that describes the input data objects. The input manifest file referenced in ManifestS3Uri must contain one of the following keys: source-ref or source. The value of the keys are interpreted as follows: source-ref: The source of the object is the Amazon S3 object specified in the value. Use this value when the object is a binary object, such as an image. source: The source of the object is the value. Use this value when the object is a text value. If you are a new user of Ground Truth, it is recommended you review Use an Input Manifest File in the Amazon SageMaker Developer Guide to learn how to create an input manifest file. + """ + + manifest_s3_uri: StrPipeVar + + +class LabelingJobSnsDataSource(Base): + """ + LabelingJobSnsDataSource + An Amazon SNS data source used for streaming labeling jobs. + + Attributes + ---------------------- + sns_topic_arn: The Amazon SNS input topic Amazon Resource Name (ARN). Specify the ARN of the input topic you will use to send new data objects to a streaming labeling job. + """ + + sns_topic_arn: StrPipeVar + + +class LabelingJobDataSource(Base): + """ + LabelingJobDataSource + Provides information about the location of input data. 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. 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. + + Attributes + ---------------------- + s3_data_source: The Amazon S3 location of the input data objects. + sns_data_source: An Amazon SNS data source used for streaming labeling jobs. To learn more, see Send Data to a Streaming Labeling Job. + """ + + s3_data_source: Optional[LabelingJobS3DataSource] = Unassigned() + sns_data_source: Optional[LabelingJobSnsDataSource] = Unassigned() + + +class LabelingJobDataAttributes(Base): + """ + LabelingJobDataAttributes + Attributes of the data specified by the customer. Use these to describe the data to be labeled. + + Attributes + ---------------------- + content_classifiers: Declares that your content is free of personally identifiable information or adult content. SageMaker may restrict the Amazon Mechanical Turk workers that can view your task based on this information. + """ + + content_classifiers: Optional[List[StrPipeVar]] = Unassigned() + + +class LabelingJobInputConfig(Base): + """ + LabelingJobInputConfig + Input configuration information for a labeling job. + + Attributes + ---------------------- + data_source: The location of the input data. + data_attributes: Attributes of the data specified by the customer. + """ + + data_source: LabelingJobDataSource + data_attributes: Optional[LabelingJobDataAttributes] = Unassigned() + + +class LabelingJobOutputConfig(Base): + """ + LabelingJobOutputConfig + Output configuration information for a labeling job. + + Attributes + ---------------------- + s3_output_path: The Amazon S3 location to write output data. + kms_key_id: The Amazon Web Services Key Management Service ID of the key used to encrypt the output data, if any. If you provide your own KMS key ID, you must add the required permissions to your KMS key described in Encrypt Output Data and Storage Volume with Amazon Web Services KMS. If you don't provide a KMS key ID, Amazon SageMaker uses the default Amazon Web Services KMS key for Amazon S3 for your role's account to encrypt your output data. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to "aws:kms". For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. + sns_topic_arn: An Amazon Simple Notification Service (Amazon SNS) output topic ARN. Provide a SnsTopicArn if you want to do real time chaining to another streaming job and receive an Amazon SNS notifications each time a data object is submitted by a worker. If you provide an SnsTopicArn in OutputConfig, when workers complete labeling tasks, Ground Truth will send labeling task output data to the SNS output topic you specify here. To learn more, see Receive Output Data from a Streaming Labeling Job. + """ + + s3_output_path: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + sns_topic_arn: Optional[StrPipeVar] = Unassigned() + + +class LabelingJobStoppingConditions(Base): + """ + LabelingJobStoppingConditions + A set of conditions for stopping a labeling job. If any of the conditions are met, the job is automatically stopped. You can use these conditions to control the cost of data labeling. Labeling jobs fail after 30 days with an appropriate client error message. + + Attributes + ---------------------- + max_human_labeled_object_count: The maximum number of objects that can be labeled by human workers. + max_percentage_of_input_dataset_labeled: The maximum number of input data objects that should be labeled. + """ + + max_human_labeled_object_count: Optional[int] = Unassigned() + max_percentage_of_input_dataset_labeled: Optional[int] = Unassigned() + + +class LabelingJobResourceConfig(Base): + """ + LabelingJobResourceConfig + Configure encryption on the storage volume attached to the ML compute instance used to run automated data labeling model training and inference. + + Attributes + ---------------------- + volume_kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training and inference jobs used for automated data labeling. You can only specify a VolumeKmsKeyId when you create a labeling job with automated data labeling enabled using the API operation CreateLabelingJob. You cannot specify an Amazon Web Services KMS key to encrypt the storage volume used for automated data labeling model training and inference when you create a labeling job using the console. To learn more, see Output Data and Storage Volume Encryption. The VolumeKmsKeyId can be any of the following formats: KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + vpc_config + """ + + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + + +class LabelingJobAlgorithmsConfig(Base): + """ + LabelingJobAlgorithmsConfig + Provides configuration information for auto-labeling of your data objects. A LabelingJobAlgorithmsConfig object must be supplied in order to use auto-labeling. + + Attributes + ---------------------- + labeling_job_algorithm_specification_arn: Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. You must select one of the following ARNs: Image classification arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification Text classification arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification Object detection arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection Semantic Segmentation arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/semantic-segmentation + initial_active_learning_model_arn: At the end of an auto-label job Ground Truth sends the Amazon Resource Name (ARN) of the final model used for auto-labeling. You can use this model as the starting point for subsequent similar jobs by providing the ARN of the model here. + labeling_job_resource_config: Provides configuration information for a labeling job. + """ + + labeling_job_algorithm_specification_arn: StrPipeVar + initial_active_learning_model_arn: Optional[StrPipeVar] = Unassigned() + labeling_job_resource_config: Optional[LabelingJobResourceConfig] = Unassigned() + + +class UiConfig(Base): + """ + UiConfig + Provided configuration information for the worker UI for a labeling job. Provide either HumanTaskUiArn or UiTemplateS3Uri. For named entity recognition, 3D point cloud and video frame labeling jobs, use HumanTaskUiArn. For all other Ground Truth built-in task types and custom task types, use UiTemplateS3Uri to specify the location of a worker task template in Amazon S3. + + Attributes + ---------------------- + ui_template_s3_uri: The Amazon S3 bucket location of the UI template, or worker task template. This is the template used to render the worker UI and tools for labeling job tasks. For more information about the contents of a UI template, see Creating Your Custom Labeling Task Template. + human_task_ui_arn: The ARN of the worker task template used to render the worker UI and tools for labeling job tasks. Use this parameter when you are creating a labeling job for named entity recognition, 3D point cloud and video frame labeling jobs. Use your labeling job task type to select one of the following ARNs and use it with this parameter when you create a labeling job. Replace aws-region with the Amazon Web Services Region you are creating your labeling job in. For example, replace aws-region with us-west-1 if you create a labeling job in US West (N. California). Named Entity Recognition Use the following HumanTaskUiArn for named entity recognition labeling jobs: arn:aws:sagemaker:aws-region:394669845002:human-task-ui/NamedEntityRecognition 3D Point Cloud HumanTaskUiArns Use this HumanTaskUiArn for 3D point cloud object detection and 3D point cloud object detection adjustment labeling jobs. arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudObjectDetection Use this HumanTaskUiArn for 3D point cloud object tracking and 3D point cloud object tracking adjustment labeling jobs. arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudObjectTracking Use this HumanTaskUiArn for 3D point cloud semantic segmentation and 3D point cloud semantic segmentation adjustment labeling jobs. arn:aws:sagemaker:aws-region:394669845002:human-task-ui/PointCloudSemanticSegmentation Video Frame HumanTaskUiArns Use this HumanTaskUiArn for video frame object detection and video frame object detection adjustment labeling jobs. arn:aws:sagemaker:region:394669845002:human-task-ui/VideoObjectDetection Use this HumanTaskUiArn for video frame object tracking and video frame object tracking adjustment labeling jobs. arn:aws:sagemaker:aws-region:394669845002:human-task-ui/VideoObjectTracking + """ + + ui_template_s3_uri: Optional[StrPipeVar] = Unassigned() + human_task_ui_arn: Optional[StrPipeVar] = Unassigned() + + +class HumanTaskConfig(Base): + """ + HumanTaskConfig + Information required for human workers to complete a labeling task. + + Attributes + ---------------------- + workteam_arn: The Amazon Resource Name (ARN) of the work team assigned to complete the tasks. + ui_config: Information about the user interface that workers use to complete the labeling task. + pre_human_task_lambda_arn: The Amazon Resource Name (ARN) of a Lambda function that is run before a data object is sent to a human worker. Use this function to provide input to a custom labeling job. For built-in task types, use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for PreHumanTaskLambdaArn. For custom labeling workflows, see Pre-annotation Lambda. Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes. arn:aws:lambda:us-east-1:432418664414:function:PRE-BoundingBox arn:aws:lambda:us-east-2:266458841044:function:PRE-BoundingBox arn:aws:lambda:us-west-2:081040173940:function:PRE-BoundingBox arn:aws:lambda:ca-central-1:918755190332:function:PRE-BoundingBox arn:aws:lambda:eu-west-1:568282634449:function:PRE-BoundingBox arn:aws:lambda:eu-west-2:487402164563:function:PRE-BoundingBox arn:aws:lambda:eu-central-1:203001061592:function:PRE-BoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-BoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-BoundingBox arn:aws:lambda:ap-south-1:565803892007:function:PRE-BoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-BoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-BoundingBox Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClass arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClass arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClass arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClass arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClass arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClass arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClass arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClass Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-ImageMultiClassMultiLabel Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:PRE-SemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:PRE-SemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:PRE-SemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:PRE-SemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:PRE-SemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:PRE-SemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:PRE-SemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-SemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-SemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:PRE-SemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-SemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-SemanticSegmentation Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClass arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClass arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClass arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClass arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClass arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClass arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClass Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-TextMultiClassMultiLabel Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label. arn:aws:lambda:us-east-1:432418664414:function:PRE-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:PRE-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:PRE-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:PRE-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:PRE-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:PRE-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:PRE-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:PRE-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-NamedEntityRecognition Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video. arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoMultiClass arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoMultiClass arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoMultiClass arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoMultiClass arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoMultiClass arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoMultiClass arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoMultiClass arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoMultiClass Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoObjectDetection Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:PRE-VideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:PRE-VideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:PRE-VideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:PRE-VideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:PRE-VideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:PRE-VideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:PRE-VideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:PRE-VideoObjectTracking 3D Point Cloud Modalities Use the following pre-annotation lambdas for 3D point cloud labeling modality tasks. See 3D Point Cloud Task types to learn more. 3D Point Cloud Object Detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudObjectDetection 3D Point Cloud Object Tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify. arn:aws:lambda:us-east-1:432418664414:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:PRE-3DPointCloudSemanticSegmentation Use the following ARNs for Label Verification and Adjustment Jobs Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels . Bounding box verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-VerificationBoundingBox arn:aws:lambda:us-east-2:266458841044:function:PRE-VerificationBoundingBox arn:aws:lambda:us-west-2:081040173940:function:PRE-VerificationBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:PRE-VerificationBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VerificationBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VerificationBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:PRE-VerificationBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:PRE-VerificationBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VerificationBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:PRE-VerificationBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VerificationBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:PRE-VerificationBoundingBox Bounding box adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations. arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentBoundingBox arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentBoundingBox arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentBoundingBox Semantic segmentation verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-VerificationSemanticSegmentation Semantic segmentation adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentSemanticSegmentation Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentVideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentVideoObjectDetection Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-AdjustmentVideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:PRE-AdjustmentVideoObjectTracking 3D point cloud object detection adjustment - Adjust 3D cuboids in a point cloud frame. arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudObjectDetection 3D point cloud object tracking adjustment - Adjust 3D cuboids across a sequence of point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudObjectTracking 3D point cloud semantic segmentation adjustment - Adjust semantic segmentation masks in a 3D point cloud. arn:aws:lambda:us-east-1:432418664414:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:PRE-Adjustment3DPointCloudSemanticSegmentation Generative AI/Custom - Direct passthrough of input data without any transformation. arn:aws:lambda:us-east-1:432418664414:function:PRE-PassThrough arn:aws:lambda:us-east-2:266458841044:function:PRE-PassThrough arn:aws:lambda:us-west-2:081040173940:function:PRE-PassThrough arn:aws:lambda:ca-central-1:918755190332:function:PRE-PassThrough arn:aws:lambda:eu-west-1:568282634449:function:PRE-PassThrough arn:aws:lambda:eu-west-2:487402164563:function:PRE-PassThrough arn:aws:lambda:eu-central-1:203001061592:function:PRE-PassThrough arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-PassThrough arn:aws:lambda:ap-northeast-2:845288260483:function:PRE-PassThrough arn:aws:lambda:ap-south-1:565803892007:function:PRE-PassThrough arn:aws:lambda:ap-southeast-1:377565633583:function:PRE-PassThrough arn:aws:lambda:ap-southeast-2:454466003867:function:PRE-PassThrough + task_keywords: Keywords used to describe the task so that workers on Amazon Mechanical Turk can discover the task. + task_title: A title for the task for your human workers. + task_description: A description of the task for your human workers. + number_of_human_workers_per_data_object: The number of human workers that will label an object. + task_time_limit_in_seconds: The amount of time that a worker has to complete a task. If you create a custom labeling job, the maximum value for this parameter is 8 hours (28,800 seconds). If you create a labeling job using a built-in task type the maximum for this parameter depends on the task type you use: For image and text labeling jobs, the maximum is 8 hours (28,800 seconds). For 3D point cloud and video frame labeling jobs, the maximum is 30 days (2952,000 seconds) for non-AL mode. For most users, the maximum is also 30 days. + task_availability_lifetime_in_seconds: The length of time that a task remains available for labeling by human workers. The default and maximum values for this parameter depend on the type of workforce you use. If you choose the Amazon Mechanical Turk workforce, the maximum is 12 hours (43,200 seconds). The default is 6 hours (21,600 seconds). If you choose a private or vendor workforce, the default value is 30 days (2592,000 seconds) for non-AL mode. For most users, the maximum is also 30 days. + max_concurrent_task_count: Defines the maximum number of data objects that can be labeled by human workers at the same time. Also referred to as batch size. Each object may have more than one worker at one time. The default value is 1000 objects. To increase the maximum value to 5000 objects, contact Amazon Web Services Support. + annotation_consolidation_config: Configures how labels are consolidated across human workers. + public_workforce_task_price: The price that you pay for each task performed by an Amazon Mechanical Turk worker. + """ + + workteam_arn: StrPipeVar + ui_config: UiConfig + task_title: StrPipeVar + task_description: StrPipeVar + number_of_human_workers_per_data_object: int + task_time_limit_in_seconds: int + pre_human_task_lambda_arn: Optional[StrPipeVar] = Unassigned() + task_keywords: Optional[List[StrPipeVar]] = Unassigned() + task_availability_lifetime_in_seconds: Optional[int] = Unassigned() + max_concurrent_task_count: Optional[int] = Unassigned() + annotation_consolidation_config: Optional[AnnotationConsolidationConfig] = Unassigned() + public_workforce_task_price: Optional[PublicWorkforceTaskPrice] = Unassigned() + + +class ModelBiasBaselineConfig(Base): + """ + ModelBiasBaselineConfig + The configuration for a baseline model bias job. + + Attributes + ---------------------- + baselining_job_name: The name of the baseline model bias job. + constraints_resource + """ + + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + + +class ModelBiasAppSpecification(Base): + """ + ModelBiasAppSpecification + Docker container image configuration object for the model bias job. + + Attributes + ---------------------- + image_uri: The container image to be run by the model bias job. + config_uri: JSON formatted S3 file that defines bias parameters. For more information on this JSON configuration file, see Configure bias parameters. + environment: Sets the environment variables in the Docker container. + """ + + image_uri: StrPipeVar + config_uri: StrPipeVar + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class MonitoringGroundTruthS3Input(Base): + """ + MonitoringGroundTruthS3Input + The ground truth labels for the dataset used for the monitoring job. + + Attributes + ---------------------- + s3_uri: The address of the Amazon S3 location of the ground truth labels. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + +class ModelBiasJobInput(Base): + """ + ModelBiasJobInput + Inputs for the model bias job. + + Attributes + ---------------------- + endpoint_input + batch_transform_input: Input object for the batch transform job. + ground_truth_s3_input: Location of ground truth labels to use in model bias job. + """ + + ground_truth_s3_input: MonitoringGroundTruthS3Input + endpoint_input: Optional[EndpointInput] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class ModelCardExportOutputConfig(Base): + """ + ModelCardExportOutputConfig + Configure the export output details for an Amazon SageMaker Model Card. + + Attributes + ---------------------- + s3_output_path: The Amazon S3 output path to export your model card PDF. + """ + + s3_output_path: StrPipeVar + + +class ModelCardSecurityConfig(Base): + """ + ModelCardSecurityConfig + Configure the security settings to protect model card data. + + Attributes + ---------------------- + kms_key_id: A Key Management Service key ID to use for encrypting a model card. + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ModelExplainabilityBaselineConfig(Base): + """ + ModelExplainabilityBaselineConfig + The configuration for a baseline model explainability job. + + Attributes + ---------------------- + baselining_job_name: The name of the baseline model explainability job. + constraints_resource + """ + + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + + +class ModelExplainabilityAppSpecification(Base): + """ + ModelExplainabilityAppSpecification + Docker container image configuration object for the model explainability job. + + Attributes + ---------------------- + image_uri: The container image to be run by the model explainability job. + config_uri: JSON formatted Amazon S3 file that defines explainability parameters. For more information on this JSON configuration file, see Configure model explainability parameters. + environment: Sets the environment variables in the Docker container. + """ + + image_uri: StrPipeVar + config_uri: StrPipeVar + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ModelExplainabilityJobInput(Base): + """ + ModelExplainabilityJobInput + Inputs for the model explainability job. + + Attributes + ---------------------- + endpoint_input + batch_transform_input: Input object for the batch transform job. + """ + + endpoint_input: Optional[EndpointInput] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class InferenceExecutionConfig(Base): + """ + InferenceExecutionConfig + Specifies details about how containers in a multi-container endpoint are run. + + Attributes + ---------------------- + mode: How containers in a multi-container are run. The following values are valid. SERIAL - Containers run as a serial pipeline. DIRECT - Only the individual container that you specify is run. + """ + + mode: StrPipeVar + + +class ModelPackageValidationProfile(Base): + """ + ModelPackageValidationProfile + Contains data, such as the inputs and targeted instance types that are used in the process of validating the model package. The data provided in the validation profile is made available to your buyers on Amazon Web Services Marketplace. + + Attributes + ---------------------- + profile_name: The name of the profile for the model package. + transform_job_definition: The TransformJobDefinition object that describes the transform job used for the validation of the model package. + """ + + profile_name: StrPipeVar + transform_job_definition: TransformJobDefinition + + +class ModelPackageValidationSpecification(Base): + """ + ModelPackageValidationSpecification + Specifies batch transform jobs that SageMaker runs to validate your model package. + + Attributes + ---------------------- + validation_role: The IAM roles to be used for the validation of the model package. + validation_profiles: An array of ModelPackageValidationProfile objects, each of which specifies a batch transform job that SageMaker runs to validate your model package. + """ + + validation_role: StrPipeVar + validation_profiles: List[ModelPackageValidationProfile] + + +class SourceAlgorithm(Base): + """ + SourceAlgorithm + Specifies an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in Amazon Web Services Marketplace that you are subscribed to. + + Attributes + ---------------------- + model_data_url: The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). The model artifacts must be in an S3 bucket that is in the same Amazon Web Services region as the algorithm. + model_data_source: Specifies the location of ML model data to deploy during endpoint creation. + model_data_e_tag: The ETag associated with Model Data URL. + algorithm_name: The name of an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in Amazon Web Services Marketplace that you are subscribed to. + """ + + algorithm_name: Union[StrPipeVar, object] + model_data_url: Optional[StrPipeVar] = Unassigned() + model_data_source: Optional[ModelDataSource] = Unassigned() + model_data_e_tag: Optional[StrPipeVar] = Unassigned() + + +class SourceAlgorithmSpecification(Base): + """ + SourceAlgorithmSpecification + A list of algorithms that were used to create a model package. + + Attributes + ---------------------- + source_algorithms: A list of the algorithms that were used to create a model package. + """ + + source_algorithms: List[SourceAlgorithm] + + +class ModelQuality(Base): + """ + ModelQuality + Model quality statistics and constraints. + + Attributes + ---------------------- + statistics: Model quality statistics. + constraints: Model quality constraints. + """ + + statistics: Optional[MetricsSource] = Unassigned() + constraints: Optional[MetricsSource] = Unassigned() + + +class ModelDataQuality(Base): + """ + ModelDataQuality + Data quality constraints and statistics for a model. + + Attributes + ---------------------- + statistics: Data quality statistics for a model. + constraints: Data quality constraints for a model. + """ + + statistics: Optional[MetricsSource] = Unassigned() + constraints: Optional[MetricsSource] = Unassigned() + + +class Explainability(Base): + """ + Explainability + Contains explainability metrics for a model. + + Attributes + ---------------------- + report: The explainability report for a model. + """ + + report: Optional[MetricsSource] = Unassigned() + + +class ModelMetrics(Base): + """ + ModelMetrics + Contains metrics captured from a model. + + Attributes + ---------------------- + model_quality: Metrics that measure the quality of a model. + model_data_quality: Metrics that measure the quality of the input data for a model. + bias: Metrics that measure bias in a model. + explainability: Metrics that help explain a model. + """ + + model_quality: Optional[ModelQuality] = Unassigned() + model_data_quality: Optional[ModelDataQuality] = Unassigned() + bias: Optional[Bias] = Unassigned() + explainability: Optional[Explainability] = Unassigned() + + +class FileSource(Base): + """ + FileSource + Contains details regarding the file source. + + Attributes + ---------------------- + content_type: The type of content stored in the file source. + content_digest: The digest of the file source. + s3_uri: The Amazon S3 URI for the file source. + """ + + s3_uri: StrPipeVar + content_type: Optional[StrPipeVar] = Unassigned() + content_digest: Optional[StrPipeVar] = Unassigned() + + +class DriftCheckBias(Base): + """ + DriftCheckBias + Represents the drift check bias baselines that can be used when the model monitor is set using the model package. + + Attributes + ---------------------- + config_file: The bias config file for a model. + pre_training_constraints: The pre-training constraints. + post_training_constraints: The post-training constraints. + """ + + config_file: Optional[FileSource] = Unassigned() + pre_training_constraints: Optional[MetricsSource] = Unassigned() + post_training_constraints: Optional[MetricsSource] = Unassigned() + + +class DriftCheckExplainability(Base): + """ + DriftCheckExplainability + Represents the drift check explainability baselines that can be used when the model monitor is set using the model package. + + Attributes + ---------------------- + constraints: The drift check explainability constraints. + config_file: The explainability config file for the model. + """ + + constraints: Optional[MetricsSource] = Unassigned() + config_file: Optional[FileSource] = Unassigned() + + +class DriftCheckModelQuality(Base): + """ + DriftCheckModelQuality + Represents the drift check model quality baselines that can be used when the model monitor is set using the model package. + + Attributes + ---------------------- + statistics: The drift check model quality statistics. + constraints: The drift check model quality constraints. + """ + + statistics: Optional[MetricsSource] = Unassigned() + constraints: Optional[MetricsSource] = Unassigned() + + +class DriftCheckModelDataQuality(Base): + """ + DriftCheckModelDataQuality + Represents the drift check data quality baselines that can be used when the model monitor is set using the model package. + + Attributes + ---------------------- + statistics: The drift check model data quality statistics. + constraints: The drift check model data quality constraints. + """ + + statistics: Optional[MetricsSource] = Unassigned() + constraints: Optional[MetricsSource] = Unassigned() + + +class DriftCheckBaselines(Base): + """ + DriftCheckBaselines + Represents the drift check baselines that can be used when the model monitor is set using the model package. + + Attributes + ---------------------- + bias: Represents the drift check bias baselines that can be used when the model monitor is set using the model package. + explainability: Represents the drift check explainability baselines that can be used when the model monitor is set using the model package. + model_quality: Represents the drift check model quality baselines that can be used when the model monitor is set using the model package. + model_data_quality: Represents the drift check model data quality baselines that can be used when the model monitor is set using the model package. + """ + + bias: Optional[DriftCheckBias] = Unassigned() + explainability: Optional[DriftCheckExplainability] = Unassigned() + model_quality: Optional[DriftCheckModelQuality] = Unassigned() + model_data_quality: Optional[DriftCheckModelDataQuality] = Unassigned() + + +class ModelPackageSecurityConfig(Base): + """ + ModelPackageSecurityConfig + An optional Key Management Service key to encrypt, decrypt, and re-encrypt model package information for regulated workloads with highly sensitive data. + + Attributes + ---------------------- + kms_key_id: The KMS Key ID (KMSKeyId) used for encryption of model package information. + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageModelCard(Base): + """ + ModelPackageModelCard + The model card associated with the model package. Since ModelPackageModelCard is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of ModelCard. The ModelPackageModelCard schema does not include model_package_details, and model_overview is composed of the model_creator and model_artifact properties. For more information about the model package model card schema, see Model package model card schema. For more information about the model card associated with the model package, see View the Details of a Model Version. + + Attributes + ---------------------- + model_card_content: The content of the model card. The content must follow the schema described in Model Package Model Card Schema. + model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates can be made to the model card content. If you try to update the model card content, you will receive the message Model Card is in Archived state. + """ + + model_card_content: Optional[StrPipeVar] = Unassigned() + model_card_status: Optional[StrPipeVar] = Unassigned() + + +class ModelLifeCycle(Base): + """ + ModelLifeCycle + A structure describing the current state of the model in its life cycle. + + Attributes + ---------------------- + stage: The current stage in the model life cycle. + stage_status: The current status of a stage in model life cycle. + stage_description: Describes the stage related details. + """ + + stage: StrPipeVar + stage_status: StrPipeVar + stage_description: Optional[StrPipeVar] = Unassigned() + + +class ModelQualityBaselineConfig(Base): + """ + ModelQualityBaselineConfig + Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically. + + Attributes + ---------------------- + baselining_job_name: The name of the job that performs baselining for the monitoring job. + constraints_resource + """ + + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + + +class ModelQualityAppSpecification(Base): + """ + ModelQualityAppSpecification + Container image configuration object for the monitoring job. + + Attributes + ---------------------- + image_uri: The address of the container image that the monitoring job runs. + container_entrypoint: Specifies the entrypoint for a container that the monitoring job runs. + container_arguments: An array of arguments for the container used to run the monitoring job. + record_preprocessor_source_uri: An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers. + post_analytics_processor_source_uri: An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers. + problem_type: The machine learning problem type of the model that the monitoring job monitors. + environment: Sets the environment variables in the container that the monitoring job runs. + """ + + image_uri: StrPipeVar + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() + post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() + problem_type: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ModelQualityJobInput(Base): + """ + ModelQualityJobInput + The input for the model quality monitoring job. Currently endpoints are supported for input for model quality monitoring jobs. + + Attributes + ---------------------- + endpoint_input + batch_transform_input: Input object for the batch transform job. + ground_truth_s3_input: The ground truth label provided for the model. + """ + + ground_truth_s3_input: MonitoringGroundTruthS3Input + endpoint_input: Optional[EndpointInput] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class ScheduleConfig(Base): + """ + ScheduleConfig + Configuration details about the monitoring schedule. + + Attributes + ---------------------- + schedule_expression: A cron expression that describes details about the monitoring schedule. The supported cron expressions are: If you want to set the job to start every hour, use the following: Hourly: cron(0 \* ? \* \* \*) If you want to start the job daily: cron(0 [00-23] ? \* \* \*) If you want to run the job one time, immediately, use the following keyword: NOW For example, the following are valid cron expressions: Daily at noon UTC: cron(0 12 ? \* \* \*) Daily at midnight UTC: cron(0 0 ? \* \* \*) To support running every 6, 12 hours, the following are also supported: cron(0 [00-23]/[01-24] ? \* \* \*) For example, the following are valid cron expressions: Every 12 hours, starting at 5pm UTC: cron(0 17/12 ? \* \* \*) Every two hours starting at midnight: cron(0 0/2 ? \* \* \*) Even though the cron expression is set to start at 5PM UTC, note that there could be a delay of 0-20 minutes from the actual requested time to run the execution. We recommend that if you would like a daily schedule, you do not provide this parameter. Amazon SageMaker AI will pick a time for running every day. You can also specify the keyword NOW to run the monitoring job immediately, one time, without recurring. + data_analysis_start_time: Sets the start time for a monitoring job window. Express this time as an offset to the times that you schedule your monitoring jobs to run. You schedule monitoring jobs with the ScheduleExpression parameter. Specify this offset in ISO 8601 duration format. For example, if you want to monitor the five hours of data in your dataset that precede the start of each monitoring job, you would specify: "-PT5H". The start time that you specify must not precede the end time that you specify by more than 24 hours. You specify the end time with the DataAnalysisEndTime parameter. If you set ScheduleExpression to NOW, this parameter is required. + data_analysis_end_time: Sets the end time for a monitoring job window. Express this time as an offset to the times that you schedule your monitoring jobs to run. You schedule monitoring jobs with the ScheduleExpression parameter. Specify this offset in ISO 8601 duration format. For example, if you want to end the window one hour before the start of each monitoring job, you would specify: "-PT1H". The end time that you specify must not follow the start time that you specify by more than 24 hours. You specify the start time with the DataAnalysisStartTime parameter. If you set ScheduleExpression to NOW, this parameter is required. + """ + + schedule_expression: StrPipeVar + data_analysis_start_time: Optional[StrPipeVar] = Unassigned() + data_analysis_end_time: Optional[StrPipeVar] = Unassigned() + + +class MonitoringBaselineConfig(Base): + """ + MonitoringBaselineConfig + Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically. + + Attributes + ---------------------- + baselining_job_name: The name of the job that performs baselining for the monitoring job. + constraints_resource: The baseline constraint file in Amazon S3 that the current monitoring job should validated against. + statistics_resource: The baseline statistics file in Amazon S3 that the current monitoring job should be validated against. + """ + + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + statistics_resource: Optional[MonitoringStatisticsResource] = Unassigned() + + +class MonitoringInput(Base): + """ + MonitoringInput + The inputs for a monitoring job. + + Attributes + ---------------------- + endpoint_input: The endpoint for a monitoring job. + batch_transform_input: Input object for the batch transform job. + """ + + endpoint_input: Optional[EndpointInput] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class MonitoringAppSpecification(Base): + """ + MonitoringAppSpecification + Container image configuration object for the monitoring job. + + Attributes + ---------------------- + image_uri: The container image to be run by the monitoring job. + container_entrypoint: Specifies the entrypoint for a container used to run the monitoring job. + container_arguments: An array of arguments for the container used to run the monitoring job. + record_preprocessor_source_uri: An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers. + post_analytics_processor_source_uri: An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers. + """ + + image_uri: StrPipeVar + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() + post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() + + +class NetworkConfig(Base): + """ + NetworkConfig + Networking options for a job, such as network traffic encryption between containers, whether to allow inbound and outbound network calls to and from containers, and the VPC subnets and security groups to use for VPC-enabled jobs. + + Attributes + ---------------------- + enable_inter_container_traffic_encryption: Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer. + enable_network_isolation: Whether to allow inbound and outbound network calls to and from the containers used for the processing job. + vpc_config + """ + + enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() + enable_network_isolation: Optional[bool] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + + +class MonitoringJobDefinition(Base): + """ + MonitoringJobDefinition + Defines the monitoring job. + + Attributes + ---------------------- + baseline_config: Baseline configuration used to validate that the data conforms to the specified constraints and statistics + monitoring_inputs: The array of inputs for the monitoring job. Currently we support monitoring an Amazon SageMaker AI Endpoint. + monitoring_output_config: The array of outputs from the monitoring job to be uploaded to Amazon S3. + monitoring_resources: Identifies the resources, ML compute instances, and ML storage volumes to deploy for a monitoring job. In distributed processing, you specify more than one instance. + monitoring_app_specification: Configures the monitoring job to run a specified Docker container image. + stopping_condition: Specifies a time limit for how long the monitoring job is allowed to run. + environment: Sets the environment variables in the Docker container. + network_config: Specifies networking options for an monitoring job. + role_arn: The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform tasks on your behalf. + """ + + monitoring_inputs: List[MonitoringInput] + monitoring_output_config: MonitoringOutputConfig + monitoring_resources: MonitoringResources + monitoring_app_specification: MonitoringAppSpecification + role_arn: StrPipeVar + baseline_config: Optional[MonitoringBaselineConfig] = Unassigned() + stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + network_config: Optional[NetworkConfig] = Unassigned() + + +class MonitoringScheduleConfig(Base): + """ + MonitoringScheduleConfig + Configures the monitoring schedule and defines the monitoring job. + + Attributes + ---------------------- + schedule_config: Configures the monitoring schedule. + monitoring_job_definition: Defines the monitoring job. + monitoring_job_definition_name: The name of the monitoring job definition to schedule. + monitoring_type: The type of the monitoring job definition to schedule. + """ + + schedule_config: Optional[ScheduleConfig] = Unassigned() + monitoring_job_definition: Optional[MonitoringJobDefinition] = Unassigned() + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + + +class InstanceMetadataServiceConfiguration(Base): + """ + InstanceMetadataServiceConfiguration + Information on the IMDS configuration of the notebook instance + + Attributes + ---------------------- + minimum_instance_metadata_service_version: Indicates the minimum IMDS version that the notebook instance supports. When passed as part of CreateNotebookInstance, if no value is selected, then it defaults to IMDSv1. This means that both IMDSv1 and IMDSv2 are supported. If passed as part of UpdateNotebookInstance, there is no default. + """ + + minimum_instance_metadata_service_version: StrPipeVar + + +class NotebookInstanceLifecycleHook(Base): + """ + NotebookInstanceLifecycleHook + Contains the notebook instance lifecycle configuration script. Each lifecycle configuration script has a limit of 16384 characters. The value of the $PATH environment variable that is available to both scripts is /sbin:bin:/usr/sbin:/usr/bin. View Amazon CloudWatch Logs for notebook instance lifecycle configurations in log group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. Lifecycle configuration scripts cannot run for longer than 5 minutes. If a script runs for longer than 5 minutes, it fails and the notebook instance is not created or started. For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance. + + Attributes + ---------------------- + content: A base64-encoded string that contains a shell script for a notebook instance lifecycle configuration. + """ + + content: Optional[StrPipeVar] = Unassigned() + + +class OptimizationModelAccessConfig(Base): + """ + OptimizationModelAccessConfig + The access configuration settings for the source ML model for an optimization job, where you can accept the model end-user license agreement (EULA). + + Attributes + ---------------------- + accept_eula: Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. + """ + + accept_eula: bool + + +class OptimizationJobModelSourceS3(Base): + """ + OptimizationJobModelSourceS3 + The Amazon S3 location of a source model to optimize with an optimization job. + + Attributes + ---------------------- + s3_uri: An Amazon S3 URI that locates a source model to optimize with an optimization job. + model_access_config: The access configuration settings for the source ML model for an optimization job, where you can accept the model end-user license agreement (EULA). + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + model_access_config: Optional[OptimizationModelAccessConfig] = Unassigned() + + +class OptimizationSageMakerModel(Base): + """ + OptimizationSageMakerModel + A SageMaker model to use as the source or destination for an optimization job. + + Attributes + ---------------------- + model_name: The name of a SageMaker model. + """ + + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class OptimizationJobModelSource(Base): + """ + OptimizationJobModelSource + The location of the source model to optimize with an optimization job. + + Attributes + ---------------------- + s3: The Amazon S3 location of a source model to optimize with an optimization job. + sage_maker_model: The name of an existing SageMaker model to optimize with an optimization job. + """ + + s3: Optional[OptimizationJobModelSourceS3] = Unassigned() + sage_maker_model: Optional[OptimizationSageMakerModel] = Unassigned() + + +class ModelQuantizationConfig(Base): + """ + ModelQuantizationConfig + Settings for the model quantization technique that's applied by a model optimization job. + + Attributes + ---------------------- + image: The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the optimization. + override_environment: Environment variables that override the default ones in the model container. + """ + + image: Optional[StrPipeVar] = Unassigned() + override_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ModelCompilationConfig(Base): + """ + ModelCompilationConfig + Settings for the model compilation technique that's applied by a model optimization job. + + Attributes + ---------------------- + image: The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the optimization. + override_environment: Environment variables that override the default ones in the model container. + """ + + image: Optional[StrPipeVar] = Unassigned() + override_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ModelShardingConfig(Base): + """ + ModelShardingConfig + Settings for the model sharding technique that's applied by a model optimization job. + + Attributes + ---------------------- + image: The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the optimization. + override_environment: Environment variables that override the default ones in the model container. + """ + + image: Optional[StrPipeVar] = Unassigned() + override_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class ModelSpeculativeDecodingTrainingDataSource(Base): + """ + ModelSpeculativeDecodingTrainingDataSource + Contains information about the training data source for speculative decoding. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI that points to the training data for speculative decoding. + s3_data_type: The type of data stored in the Amazon S3 location. Valid values are S3Prefix or ManifestFile. + """ + + s3_uri: StrPipeVar + s3_data_type: StrPipeVar + + +class ModelSpeculativeDecodingConfig(Base): + """ + ModelSpeculativeDecodingConfig + Settings for the model speculative decoding technique that's applied by a model optimization job. + + Attributes + ---------------------- + technique: The speculative decoding technique to apply during model optimization. + training_data_source: The location of the training data to use for speculative decoding. The data must be formatted as ShareGPT, OpenAI Completions or OpenAI Chat Completions. The input can also be unencrypted captured data from a SageMaker endpoint as long as the endpoint uses one of the above formats. + """ + + technique: StrPipeVar + training_data_source: Optional[ModelSpeculativeDecodingTrainingDataSource] = Unassigned() + + +class OptimizationConfig(Base): + """ + OptimizationConfig + Settings for an optimization technique that you apply with a model optimization job. + + Attributes + ---------------------- + model_quantization_config: Settings for the model quantization technique that's applied by a model optimization job. + model_compilation_config: Settings for the model compilation technique that's applied by a model optimization job. + model_sharding_config: Settings for the model sharding technique that's applied by a model optimization job. + model_speculative_decoding_config: Settings for the model speculative decoding technique that's applied by a model optimization job. + """ + + model_quantization_config: Optional[ModelQuantizationConfig] = Unassigned() + model_compilation_config: Optional[ModelCompilationConfig] = Unassigned() + model_sharding_config: Optional[ModelShardingConfig] = Unassigned() + model_speculative_decoding_config: Optional[ModelSpeculativeDecodingConfig] = Unassigned() + + +class OptimizationJobOutputConfig(Base): + """ + OptimizationJobOutputConfig + Details for where to store the optimized model that you create with the optimization job. + + Attributes + ---------------------- + kms_key_id: The Amazon Resource Name (ARN) of a key in Amazon Web Services KMS. SageMaker uses they key to encrypt the artifacts of the optimized model when SageMaker uploads the model to Amazon S3. + s3_output_location: The Amazon S3 URI for where to store the optimized model that you create with an optimization job. + sage_maker_model: The name of a SageMaker model to use as the output destination for an optimization job. + """ + + s3_output_location: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + sage_maker_model: Optional[OptimizationSageMakerModel] = Unassigned() + + +class OptimizationVpcConfig(Base): + """ + OptimizationVpcConfig + A VPC in Amazon VPC that's accessible to an optimized that you create with an optimization job. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. + + Attributes + ---------------------- + security_group_ids: The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC to which you want to connect your optimized model. + """ + + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] + + +class PartnerAppMaintenanceConfig(Base): + """ + PartnerAppMaintenanceConfig + Maintenance configuration settings for the SageMaker Partner AI App. + + Attributes + ---------------------- + maintenance_window_start: The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time that weekly maintenance updates are scheduled. This value must take the following format: 3-letter-day:24-h-hour:minute. For example: TUE:03:30. + """ + + maintenance_window_start: Optional[StrPipeVar] = Unassigned() + + +class RoleGroupAssignment(Base): + """ + RoleGroupAssignment + Defines the mapping between an in-app role and the Amazon Web Services IAM Identity Center group patterns that should be assigned to that role within the SageMaker Partner AI App. + + Attributes + ---------------------- + role_name: The name of the in-app role within the SageMaker Partner AI App. The specific roles available depend on the app type and version. + group_patterns: A list of Amazon Web Services IAM Identity Center group patterns that should be assigned to the specified role. Group patterns support wildcard matching using \*. + """ + + role_name: StrPipeVar + group_patterns: List[StrPipeVar] + + +class PartnerAppConfig(Base): + """ + PartnerAppConfig + Configuration settings for the SageMaker Partner AI App. + + Attributes + ---------------------- + admin_users: The list of users that are given admin access to the SageMaker Partner AI App. + arguments: This is a map of required inputs for a SageMaker Partner AI App. Based on the application type, the map is populated with a key and value pair that is specific to the user and application. + assigned_group_patterns: A list of Amazon Web Services IAM Identity Center group patterns that can access the SageMaker Partner AI App. Group names support wildcard matching using \*. An empty list indicates the app will not use Identity Center group features. All groups specified in RoleGroupAssignments must match patterns in this list. + role_group_assignments: A map of in-app roles to Amazon Web Services IAM Identity Center group patterns. Groups assigned to specific roles receive those permissions, while groups in AssignedGroupPatterns but not in this map receive default in-app role depending on app type. Group patterns support wildcard matching using \*. Currently supported by Fiddler version 1.3 and later with roles: ORG_MEMBER (default) and ORG_ADMIN. + """ + + admin_users: Optional[List[StrPipeVar]] = Unassigned() + arguments: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + assigned_group_patterns: Optional[List[StrPipeVar]] = Unassigned() + role_group_assignments: Optional[List[RoleGroupAssignment]] = Unassigned() + + +class PipelineDefinitionS3Location(Base): + """ + PipelineDefinitionS3Location + The location of the pipeline definition stored in Amazon S3. + + Attributes + ---------------------- + bucket: Name of the S3 bucket. + object_key: The object key (or key name) uniquely identifies the object in an S3 bucket. + version_id: Version Id of the pipeline definition file. If not specified, Amazon SageMaker will retrieve the latest version. + """ + + bucket: StrPipeVar + object_key: StrPipeVar + version_id: Optional[StrPipeVar] = Unassigned() + + +class ParallelismConfiguration(Base): + """ + ParallelismConfiguration + Configuration that controls the parallelism of the pipeline. By default, the parallelism configuration specified applies to all executions of the pipeline unless overridden. + + Attributes + ---------------------- + max_parallel_execution_steps: The max number of steps that can be executed in parallel. + """ + + max_parallel_execution_steps: int + + +class ProcessingS3Input(Base): + """ + ProcessingS3Input + Configuration for downloading input data from Amazon S3 into the processing container. + + Attributes + ---------------------- + s3_uri: The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job. + local_path: The local path in your container where you want Amazon SageMaker to write input data to. LocalPath is an absolute path to the input data and must begin with /opt/ml/processing/. LocalPath is a required parameter when AppManaged is False (default). + s3_data_type: Whether you use an S3Prefix or a ManifestFile for the data type. If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job. + s3_input_mode: Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume. + s3_data_distribution_type: Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is sharded by Amazon S3 key, downloading one shard of data to each processing instance. + s3_compression_type: Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. Gzip can only be used when Pipe mode is specified as the S3InputMode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume. + """ + + s3_uri: StrPipeVar + s3_data_type: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + s3_input_mode: Optional[StrPipeVar] = Unassigned() + s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() + s3_compression_type: Optional[StrPipeVar] = Unassigned() + + +class RedshiftDatasetDefinition(Base): + """ + RedshiftDatasetDefinition + Configuration for Redshift Dataset Definition input. + + Attributes + ---------------------- + cluster_id + database + db_user + query_string + cluster_role_arn: The IAM role attached to your Redshift cluster that Amazon SageMaker uses to generate datasets. + output_s3_uri: The location in Amazon S3 where the Redshift query results are stored. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data from a Redshift execution. + output_format + output_compression + """ + + cluster_id: StrPipeVar + database: StrPipeVar + db_user: StrPipeVar + query_string: StrPipeVar + cluster_role_arn: StrPipeVar + output_s3_uri: StrPipeVar + output_format: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + output_compression: Optional[StrPipeVar] = Unassigned() + + +class DatasetDefinition(Base): + """ + DatasetDefinition + Configuration for Dataset Definition inputs. The Dataset Definition input must specify exactly one of either AthenaDatasetDefinition or RedshiftDatasetDefinition types. + + Attributes + ---------------------- + athena_dataset_definition + redshift_dataset_definition + local_path: The local path where you want Amazon SageMaker to download the Dataset Definition inputs to run a processing job. LocalPath is an absolute path to the input data. This is a required parameter when AppManaged is False (default). + data_distribution_type: Whether the generated dataset is FullyReplicated or ShardedByS3Key (default). + input_mode: Whether to use File or Pipe input mode. In File (default) mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume. + """ + + athena_dataset_definition: Optional[AthenaDatasetDefinition] = Unassigned() + redshift_dataset_definition: Optional[RedshiftDatasetDefinition] = Unassigned() + local_path: Optional[StrPipeVar] = Unassigned() + data_distribution_type: Optional[StrPipeVar] = Unassigned() + input_mode: Optional[StrPipeVar] = Unassigned() + + +class ProcessingInput(Base): + """ + ProcessingInput + The inputs for a processing job. The processing input must specify exactly one of either S3Input or DatasetDefinition types. + + Attributes + ---------------------- + input_name: The name for the processing job input. + app_managed: When True, input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker. + s3_input: Configuration for downloading input data from Amazon S3 into the processing container. + dataset_definition: Configuration for a Dataset Definition input. + """ + + input_name: StrPipeVar + app_managed: Optional[bool] = Unassigned() + s3_input: Optional[ProcessingS3Input] = Unassigned() + dataset_definition: Optional[DatasetDefinition] = Unassigned() + + +class ProcessingS3Output(Base): + """ + ProcessingS3Output + Configuration for uploading output data to Amazon S3 from the processing container. + + Attributes + ---------------------- + s3_uri: A URI that identifies the Amazon S3 bucket where you want Amazon SageMaker to save the results of a processing job. + local_path: The local path of a directory where you want Amazon SageMaker to upload its contents to Amazon S3. LocalPath is an absolute path to a directory containing output files. This directory will be created by the platform and exist when your container's entrypoint is invoked. + s3_upload_mode: Whether to upload the results of the processing job continuously or after the job completes. + """ + + s3_uri: StrPipeVar + s3_upload_mode: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + + +class ProcessingFeatureStoreOutput(Base): + """ + ProcessingFeatureStoreOutput + Configuration for processing job outputs in Amazon SageMaker Feature Store. + + Attributes + ---------------------- + feature_group_name: The name of the Amazon SageMaker FeatureGroup to use as the destination for processing job output. Note that your processing script is responsible for putting records into your Feature Store. + """ + + feature_group_name: Union[StrPipeVar, object] + + +class ProcessingOutput(Base): + """ + ProcessingOutput + Describes the results of a processing job. The processing output must specify exactly one of either S3Output or FeatureStoreOutput types. + + Attributes + ---------------------- + output_name: The name for the processing job output. + s3_output: Configuration for processing job outputs in Amazon S3. + feature_store_output: Configuration for processing job outputs in Amazon SageMaker Feature Store. This processing output type is only supported when AppManaged is specified. + app_managed: When True, output operations such as data upload are managed natively by the processing job application. When False (default), output operations are managed by Amazon SageMaker. + """ + + output_name: StrPipeVar + s3_output: Optional[ProcessingS3Output] = Unassigned() + feature_store_output: Optional[ProcessingFeatureStoreOutput] = Unassigned() + app_managed: Optional[bool] = Unassigned() + + +class ProcessingOutputConfig(Base): + """ + ProcessingOutputConfig + Configuration for uploading output from the processing container. + + Attributes + ---------------------- + outputs: An array of outputs configuring the data to upload from the processing container. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the processing job output. KmsKeyId can be an ID of a KMS key, ARN of a KMS key, or alias of a KMS key. The KmsKeyId is applied to all outputs. + """ + + outputs: List[ProcessingOutput] + kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ProcessingClusterConfig(Base): + """ + ProcessingClusterConfig + Configuration for the cluster used to run a processing job. + + Attributes + ---------------------- + instance_count: The number of ML compute instances to use in the processing job. For distributed processing jobs, specify a value greater than 1. The default value is 1. + instance_type: The ML compute instance type for the processing job. + volume_size_in_gb: The size of the ML storage volume in gigabytes that you want to provision. You must specify sufficient ML storage for your scenario. Certain Nitro-based instances include local storage with a fixed total size, dependent on the instance type. When using these instances for processing, Amazon SageMaker mounts the local instance storage instead of Amazon EBS gp2 storage. You can't request a VolumeSizeInGB greater than the total size of the local instance storage. For a list of instance types that support local instance storage, including the total size per instance type, see Instance Store Volumes. + volume_kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the processing job. Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. + """ + + instance_count: int + instance_type: StrPipeVar + volume_size_in_gb: int + volume_kms_key_id: Optional[StrPipeVar] = Unassigned() + + +class ProcessingResources(Base): + """ + ProcessingResources + Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance. + + Attributes + ---------------------- + cluster_config: The configuration for the resources in a cluster used to run the processing job. + """ + + cluster_config: ProcessingClusterConfig + + +class ProcessingStoppingCondition(Base): + """ + ProcessingStoppingCondition + Configures conditions under which the processing job should be stopped, such as how long the processing job has been running. After the condition is met, the processing job is stopped. + + Attributes + ---------------------- + max_runtime_in_seconds: Specifies the maximum runtime in seconds. + """ + + max_runtime_in_seconds: int + + +class ExperimentConfig(Base): + """ + ExperimentConfig + Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs: CreateProcessingJob CreateTrainingJob CreateTransformJob + + Attributes + ---------------------- + experiment_name: The name of an existing experiment to associate with the trial component. + trial_name: The name of an existing trial to associate the trial component with. If not specified, a new trial is created. + trial_component_display_name: The display name for the trial component. If this key isn't specified, the display name is the trial component name. + run_name: The name of the experiment run to associate with the trial component. + """ + + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_component_display_name: Optional[StrPipeVar] = Unassigned() + run_name: Optional[StrPipeVar] = Unassigned() + + +class ProvisioningParameter(Base): + """ + ProvisioningParameter + A key value pair used when you provision a project as a service catalog product. For information, see What is Amazon Web Services Service Catalog. + + Attributes + ---------------------- + key: The key that identifies a provisioning parameter. + value: The value of the provisioning parameter. + """ + + key: Optional[StrPipeVar] = Unassigned() + value: Optional[StrPipeVar] = Unassigned() + + +class ServiceCatalogProvisioningDetails(Base): + """ + ServiceCatalogProvisioningDetails + Details that you specify to provision a service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog. + + Attributes + ---------------------- + product_id: The ID of the product to provision. + provisioning_artifact_id: The ID of the provisioning artifact. + path_id: The path identifier of the product. This value is optional if the product has a default path, and required if the product has more than one path. + provisioning_parameters: A list of key value pairs that you specify when you provision a product. + """ + + product_id: StrPipeVar + provisioning_artifact_id: Optional[StrPipeVar] = Unassigned() + path_id: Optional[StrPipeVar] = Unassigned() + provisioning_parameters: Optional[List[ProvisioningParameter]] = Unassigned() + + +class CreateTemplateProvider(Base): + """ + CreateTemplateProvider + Contains configuration details for a template provider. Only one type of template provider can be specified. + + Attributes + ---------------------- + cfn_template_provider: The CloudFormation template provider configuration for creating infrastructure resources. + """ + + cfn_template_provider: Optional[CfnCreateTemplateProvider] = Unassigned() + + +class SpaceIdleSettings(Base): + """ + SpaceIdleSettings + Settings related to idle shutdown of Studio applications in a space. + + Attributes + ---------------------- + idle_timeout_in_minutes: The time that SageMaker waits after the application becomes idle before shutting it down. + """ + + idle_timeout_in_minutes: Optional[int] = Unassigned() + + +class SpaceAppLifecycleManagement(Base): + """ + SpaceAppLifecycleManagement + Settings that are used to configure and manage the lifecycle of Amazon SageMaker Studio applications in a space. + + Attributes + ---------------------- + idle_settings: Settings related to idle shutdown of Studio applications. + """ + + idle_settings: Optional[SpaceIdleSettings] = Unassigned() + + +class SpaceCodeEditorAppSettings(Base): + """ + SpaceCodeEditorAppSettings + The application settings for a Code Editor space. + + Attributes + ---------------------- + default_resource_spec + app_lifecycle_management: Settings that are used to configure and manage the lifecycle of CodeEditor applications in a space. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + app_lifecycle_management: Optional[SpaceAppLifecycleManagement] = Unassigned() + + +class SpaceJupyterLabAppSettings(Base): + """ + SpaceJupyterLabAppSettings + The settings for the JupyterLab application within a space. + + Attributes + ---------------------- + default_resource_spec + code_repositories: A list of Git repositories that SageMaker automatically displays to users for cloning in the JupyterLab application. + app_lifecycle_management: Settings that are used to configure and manage the lifecycle of JupyterLab applications in a space. + """ + + default_resource_spec: Optional[ResourceSpec] = Unassigned() + code_repositories: Optional[List[CodeRepository]] = Unassigned() + app_lifecycle_management: Optional[SpaceAppLifecycleManagement] = Unassigned() + + +class EbsStorageSettings(Base): + """ + EbsStorageSettings + A collection of EBS storage settings that apply to both private and shared spaces. + + Attributes + ---------------------- + ebs_volume_size_in_gb: The size of an EBS storage volume for a space. + """ + + ebs_volume_size_in_gb: int + + +class SpaceStorageSettings(Base): + """ + SpaceStorageSettings + The storage settings for a space. + + Attributes + ---------------------- + ebs_storage_settings: A collection of EBS storage settings for a space. + """ + + ebs_storage_settings: Optional[EbsStorageSettings] = Unassigned() + + +class EFSFileSystem(Base): + """ + EFSFileSystem + A file system, created by you in Amazon EFS, that you assign to a user profile or space for an Amazon SageMaker AI Domain. Permitted users can access this file system in Amazon SageMaker AI Studio. + + Attributes + ---------------------- + file_system_id: The ID of your Amazon EFS file system. + """ + + file_system_id: StrPipeVar + + +class FSxLustreFileSystem(Base): + """ + FSxLustreFileSystem + A custom file system in Amazon FSx for Lustre. + + Attributes + ---------------------- + file_system_id: Amazon FSx for Lustre file system ID. + """ + + file_system_id: StrPipeVar + + +class S3FileSystem(Base): + """ + S3FileSystem + A custom file system in Amazon S3. This is only supported in Amazon SageMaker Unified Studio. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI that specifies the location in S3 where files are stored, which is mounted within the Studio environment. For example: s3://<bucket-name>/<prefix>/. + """ + + s3_uri: StrPipeVar + + +class CustomFileSystem(Base): + """ + CustomFileSystem + A file system, created by you, that you assign to a user profile or space for an Amazon SageMaker AI Domain. Permitted users can access this file system in Amazon SageMaker AI Studio. + + Attributes + ---------------------- + efs_file_system: A custom file system in Amazon EFS. + f_sx_lustre_file_system: A custom file system in Amazon FSx for Lustre. + s3_file_system: A custom file system in Amazon S3. This is only supported in Amazon SageMaker Unified Studio. + """ + + efs_file_system: Optional[EFSFileSystem] = Unassigned() + f_sx_lustre_file_system: Optional[FSxLustreFileSystem] = Unassigned() + s3_file_system: Optional[S3FileSystem] = Unassigned() + + +class SpaceSettings(Base): + """ + SpaceSettings + A collection of space settings. + + Attributes + ---------------------- + jupyter_server_app_settings + kernel_gateway_app_settings + code_editor_app_settings: The Code Editor application settings. + jupyter_lab_app_settings: The settings for the JupyterLab application. + app_type: The type of app created within the space. If using the UpdateSpace API, you can't change the app type of your space by specifying a different value for this field. + space_storage_settings: The storage settings for a space. + space_managed_resources: If you enable this option, SageMaker AI creates the following resources on your behalf when you create the space: The user profile that possesses the space. The app that the space contains. + custom_file_systems: A file system, created by you, that you assign to a space for an Amazon SageMaker AI Domain. Permitted users can access this file system in Amazon SageMaker AI Studio. + remote_access: A setting that enables or disables remote access for a SageMaker space. When enabled, this allows you to connect to the remote space from your local IDE. + """ + + jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned() + kernel_gateway_app_settings: Optional[KernelGatewayAppSettings] = Unassigned() + code_editor_app_settings: Optional[SpaceCodeEditorAppSettings] = Unassigned() + jupyter_lab_app_settings: Optional[SpaceJupyterLabAppSettings] = Unassigned() + app_type: Optional[StrPipeVar] = Unassigned() + space_storage_settings: Optional[SpaceStorageSettings] = Unassigned() + space_managed_resources: Optional[StrPipeVar] = Unassigned() + custom_file_systems: Optional[List[CustomFileSystem]] = Unassigned() + remote_access: Optional[StrPipeVar] = Unassigned() + + +class OwnershipSettings(Base): + """ + OwnershipSettings + The collection of ownership settings for a space. + + Attributes + ---------------------- + owner_user_profile_name: The user profile who is the owner of the space. + """ + + owner_user_profile_name: StrPipeVar + + +class SpaceSharingSettings(Base): + """ + SpaceSharingSettings + A collection of space sharing settings. + + Attributes + ---------------------- + sharing_type: Specifies the sharing type of the space. + """ + + sharing_type: StrPipeVar + + +class DebugHookConfig(Base): + """ + DebugHookConfig + Configuration information for the Amazon SageMaker Debugger hook parameters, metric and tensor collections, and storage paths. To learn more about how to configure the DebugHookConfig parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + + Attributes + ---------------------- + local_path: Path to local storage location for metrics and tensors. Defaults to /opt/ml/output/tensors/. + s3_output_path: Path to Amazon S3 storage location for metrics and tensors. + hook_parameters: Configuration information for the Amazon SageMaker Debugger hook parameters. + collection_configurations: Configuration information for Amazon SageMaker Debugger tensor collections. To learn more about how to configure the CollectionConfiguration parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + """ + + s3_output_path: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + hook_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + collection_configurations: Optional[List[CollectionConfiguration]] = Unassigned() + + +class DebugRuleConfiguration(Base): + """ + DebugRuleConfiguration + Configuration information for SageMaker Debugger rules for debugging. To learn more about how to configure the DebugRuleConfiguration parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + + Attributes + ---------------------- + rule_configuration_name: The name of the rule configuration. It must be unique relative to other rule configuration names. + local_path: Path to local storage location for output of rules. Defaults to /opt/ml/processing/output/rule/. + s3_output_path: Path to Amazon S3 storage location for rules. + rule_evaluator_image: The Amazon Elastic Container (ECR) Image for the managed rule evaluation. + instance_type: The instance type to deploy a custom rule for debugging a training job. + volume_size_in_gb: The size, in GB, of the ML storage volume attached to the processing instance. + rule_parameters: Runtime configuration for rule container. + """ + + rule_configuration_name: StrPipeVar + rule_evaluator_image: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + s3_output_path: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + volume_size_in_gb: Optional[int] = Unassigned() + rule_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class TensorBoardOutputConfig(Base): + """ + TensorBoardOutputConfig + Configuration of storage locations for the Amazon SageMaker Debugger TensorBoard output data. + + Attributes + ---------------------- + local_path: Path to local storage location for tensorBoard output. Defaults to /opt/ml/output/tensorboard. + s3_output_path: Path to Amazon S3 storage location for TensorBoard output. + """ + + s3_output_path: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + + +class ProfilerConfig(Base): + """ + ProfilerConfig + Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths. + + Attributes + ---------------------- + s3_output_path: Path to Amazon S3 storage location for system and framework metrics. + profiling_interval_in_milliseconds: A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. + profiling_parameters: Configuration information for capturing framework metrics. Available key strings for different profiling options are DetailedProfilingConfig, PythonProfilingConfig, and DataLoaderProfilingConfig. The following codes are configuration structures for the ProfilingParameters parameter. To learn more about how to configure the ProfilingParameters parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + disable_profiler: Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it off, set to True. + """ + + s3_output_path: Optional[StrPipeVar] = Unassigned() + profiling_interval_in_milliseconds: Optional[int] = Unassigned() + profiling_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + disable_profiler: Optional[bool] = Unassigned() + + +class ProfilerRuleConfiguration(Base): + """ + ProfilerRuleConfiguration + Configuration information for profiling rules. + + Attributes + ---------------------- + rule_configuration_name: The name of the rule configuration. It must be unique relative to other rule configuration names. + local_path: Path to local storage location for output of rules. Defaults to /opt/ml/processing/output/rule/. + s3_output_path: Path to Amazon S3 storage location for rules. + rule_evaluator_image: The Amazon Elastic Container Registry Image for the managed rule evaluation. + instance_type: The instance type to deploy a custom rule for profiling a training job. + volume_size_in_gb: The size, in GB, of the ML storage volume attached to the processing instance. + rule_parameters: Runtime configuration for rule container. + """ + + rule_configuration_name: StrPipeVar + rule_evaluator_image: StrPipeVar + local_path: Optional[StrPipeVar] = Unassigned() + s3_output_path: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + volume_size_in_gb: Optional[int] = Unassigned() + rule_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class RemoteDebugConfig(Base): + """ + RemoteDebugConfig + Configuration for remote debugging for the CreateTrainingJob API. 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. + + Attributes + ---------------------- + enable_remote_debug: If set to True, enables remote debugging. + """ + + enable_remote_debug: Optional[bool] = Unassigned() + + +class InfraCheckConfig(Base): + """ + InfraCheckConfig + Configuration information for the infrastructure health check of a training job. A SageMaker-provided health check tests the health of instance hardware and cluster network connectivity. + + Attributes + ---------------------- + enable_infra_check: Enables an infrastructure health check. + """ + + enable_infra_check: Optional[bool] = Unassigned() + + +class SessionChainingConfig(Base): + """ + SessionChainingConfig + Contains information about attribute-based access control (ABAC) for a training job. The session chaining configuration uses Amazon Security Token Service (STS) for your training job to request temporary, limited-privilege credentials to tenants. For more information, see Attribute-based access control (ABAC) for multi-tenancy training. + + Attributes + ---------------------- + enable_session_tag_chaining: Set to True to allow SageMaker to extract session tags from a training job creation role and reuse these tags when assuming the training job execution role. + """ + + enable_session_tag_chaining: Optional[bool] = Unassigned() + + +class ServerlessJobConfig(Base): + """ + ServerlessJobConfig + The configuration for the serverless training job. + + Attributes + ---------------------- + base_model_arn: The base model Amazon Resource Name (ARN) in SageMaker Public Hub. SageMaker always selects the latest version of the provided model. + accept_eula: Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. For more information, see End-user license agreements section for more details on accepting the EULA. + job_type: The serverless training job type. + customization_technique: The model customization technique. + peft: The parameter-efficient fine-tuning configuration. + evaluation_type: The evaluation job type. Required when serverless job type is Evaluation. + evaluator_arn: The evaluator Amazon Resource Name (ARN) used as reward function or reward prompt. + """ + + base_model_arn: StrPipeVar + job_type: StrPipeVar + accept_eula: Optional[bool] = Unassigned() + customization_technique: Optional[StrPipeVar] = Unassigned() + peft: Optional[StrPipeVar] = Unassigned() + evaluation_type: Optional[StrPipeVar] = Unassigned() + evaluator_arn: Optional[StrPipeVar] = Unassigned() + + +class MlflowConfig(Base): + """ + MlflowConfig + The MLflow configuration using SageMaker managed MLflow. + + Attributes + ---------------------- + mlflow_resource_arn: The Amazon Resource Name (ARN) of the MLflow resource. + mlflow_experiment_name: The MLflow experiment name used for this job. + mlflow_run_name: The MLflow run name used for this job. + """ + + mlflow_resource_arn: StrPipeVar + mlflow_experiment_name: Optional[StrPipeVar] = Unassigned() + mlflow_run_name: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageConfig(Base): + """ + ModelPackageConfig + The configuration for the Model package. + + Attributes + ---------------------- + model_package_group_arn: The Amazon Resource Name (ARN) of the model package group of output model package. + source_model_package_arn: The Amazon Resource Name (ARN) of the source model package used for continued fine-tuning and custom model evaluation. + """ + + model_package_group_arn: StrPipeVar + source_model_package_arn: Optional[StrPipeVar] = Unassigned() + + +class ModelClientConfig(Base): + """ + ModelClientConfig + Configures the timeout and maximum number of retries for processing a transform job invocation. + + Attributes + ---------------------- + invocations_timeout_in_seconds: The timeout value in seconds for an invocation request. The default value is 600. + invocations_max_retries: The maximum number of retries when invocation requests are failing. The default value is 3. + """ + + invocations_timeout_in_seconds: Optional[int] = Unassigned() + invocations_max_retries: Optional[int] = Unassigned() + + +class DataProcessing(Base): + """ + DataProcessing + The data structure used to specify the data to be used for inference in a batch transform job and to associate the data that is relevant to the prediction results in the output. The input filter provided allows you to exclude input data that is not needed for inference in a batch transform job. The output filter provided allows you to include input data relevant to interpreting the predictions in the output from the job. For more information, see Associate Prediction Results with their Corresponding Input Records. + + Attributes + ---------------------- + input_filter: A JSONPath expression used to select a portion of the input data to pass to the algorithm. Use the InputFilter parameter to exclude fields, such as an ID column, from the input. If you want SageMaker to pass the entire input dataset to the algorithm, accept the default value $. Examples: "$", "$[1:]", "$.features" + output_filter: A JSONPath expression used to select a portion of the joined dataset to save in the output file for a batch transform job. If you want SageMaker to store the entire input dataset in the output file, leave the default value, $. If you specify indexes that aren't within the dimension size of the joined dataset, you get an error. Examples: "$", "$[0,5:]", "$['id','SageMakerOutput']" + join_source: Specifies the source of the data to join with the transformed data. The valid values are None and Input. The default value is None, which specifies not to join the input with the transformed data. If you want the batch transform job to join the original input data with the transformed data, set JoinSource to Input. You can specify OutputFilter as an additional filter to select a portion of the joined dataset and store it in the output file. For JSON or JSONLines objects, such as a JSON array, SageMaker adds the transformed data to the input JSON object in an attribute called SageMakerOutput. The joined result for JSON must be a key-value pair object. If the input is not a key-value pair object, SageMaker creates a new JSON file. In the new JSON file, and the input data is stored under the SageMakerInput key and the results are stored in SageMakerOutput. For CSV data, SageMaker takes each row as a JSON array and joins the transformed data with the input by appending each transformed row to the end of the input. The joined data has the original input data followed by the transformed data and the output is a CSV file. For information on how joining in applied, see Workflow for Associating Inferences with Input Records. + """ + + input_filter: Optional[StrPipeVar] = Unassigned() + output_filter: Optional[StrPipeVar] = Unassigned() + join_source: Optional[StrPipeVar] = Unassigned() + + +class TrialComponentStatus(Base): + """ + TrialComponentStatus + The status of the trial component. + + Attributes + ---------------------- + primary_status: The status of the trial component. + message: If the component failed, a message describing why. + """ + + primary_status: Optional[StrPipeVar] = Unassigned() + message: Optional[StrPipeVar] = Unassigned() + + +class TrialComponentParameterValue(Base): + """ + TrialComponentParameterValue + The value of a hyperparameter. Only one of NumberValue or StringValue can be specified. This object is specified in the CreateTrialComponent request. + + Attributes + ---------------------- + string_value: The string value of a categorical hyperparameter. If you specify a value for this parameter, you can't specify the NumberValue parameter. + number_value: The numeric value of a numeric hyperparameter. If you specify a value for this parameter, you can't specify the StringValue parameter. + """ + + string_value: Optional[StrPipeVar] = Unassigned() + number_value: Optional[float] = Unassigned() + + +class TrialComponentArtifact(Base): + """ + TrialComponentArtifact + Represents an input or output artifact of a trial component. You specify TrialComponentArtifact as part of the InputArtifacts and OutputArtifacts parameters in the CreateTrialComponent request. Examples of input artifacts are datasets, algorithms, hyperparameters, source code, and instance types. Examples of output artifacts are metrics, snapshots, logs, and images. + + Attributes + ---------------------- + media_type: The media type of the artifact, which indicates the type of data in the artifact file. The media type consists of a type and a subtype concatenated with a slash (/) character, for example, text/csv, image/jpeg, and s3/uri. The type specifies the category of the media. The subtype specifies the kind of data. + value: The location of the artifact. + """ + + value: StrPipeVar + media_type: Optional[StrPipeVar] = Unassigned() + + +class OidcConfig(Base): + """ + OidcConfig + Use this parameter to configure your OIDC Identity Provider (IdP). + + Attributes + ---------------------- + client_id: The OIDC IdP client ID used to configure your private workforce. + client_secret: The OIDC IdP client secret used to configure your private workforce. + issuer: The OIDC IdP issuer used to configure your private workforce. + authorization_endpoint: The OIDC IdP authorization endpoint used to configure your private workforce. + token_endpoint: The OIDC IdP token endpoint used to configure your private workforce. + user_info_endpoint: The OIDC IdP user information endpoint used to configure your private workforce. + logout_endpoint: The OIDC IdP logout endpoint used to configure your private workforce. + jwks_uri: The OIDC IdP JSON Web Key Set (Jwks) URI used to configure your private workforce. + scope: An array of string identifiers used to refer to the specific pieces of user data or claims that the client application wants to access. + authentication_request_extra_params: A string to string map of identifiers specific to the custom identity provider (IdP) being used. + """ + + client_id: StrPipeVar + client_secret: StrPipeVar + issuer: StrPipeVar + authorization_endpoint: StrPipeVar + token_endpoint: StrPipeVar + user_info_endpoint: StrPipeVar + logout_endpoint: StrPipeVar + jwks_uri: StrPipeVar + scope: Optional[StrPipeVar] = Unassigned() + authentication_request_extra_params: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class SourceIpConfig(Base): + """ + SourceIpConfig + A list of IP address ranges (CIDRs). Used to create an allow list of IP addresses for a private workforce. Workers will only be able to log in to their worker portal from an IP address within this range. By default, a workforce isn't restricted to specific IP addresses. + + Attributes + ---------------------- + cidrs: A list of one to ten Classless Inter-Domain Routing (CIDR) values. Maximum: Ten CIDR values The following Length Constraints apply to individual CIDR values in the CIDR value list. + """ + + cidrs: List[StrPipeVar] + + +class WorkforceVpcConfigRequest(Base): + """ + WorkforceVpcConfigRequest + The VPC object you use to create or update a workforce. + + Attributes + ---------------------- + vpc_id: The ID of the VPC that the workforce uses for communication. + 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. + subnets: The ID of the subnets in the VPC that you want to connect. + """ + + vpc_id: Optional[StrPipeVar] = Unassigned() + security_group_ids: Optional[List[StrPipeVar]] = Unassigned() + subnets: Optional[List[StrPipeVar]] = Unassigned() + + +class OidcMemberDefinition(Base): + """ + OidcMemberDefinition + A list of user groups that exist in your OIDC Identity Provider (IdP). One to ten groups can be used to create a single private work team. When you add a user group to the list of Groups, you can add that user group to one or more private work teams. If you add a user group to a private work team, all workers in that user group are added to the work team. + + Attributes + ---------------------- + groups: A list of comma seperated strings that identifies user groups in your OIDC IdP. Each user group is made up of a group of private workers. + """ + + groups: Optional[List[StrPipeVar]] = Unassigned() + + +class MemberDefinition(Base): + """ + MemberDefinition + Defines an Amazon Cognito or your own OIDC IdP user group that is part of a work team. + + Attributes + ---------------------- + cognito_member_definition: The Amazon Cognito user group that is part of the work team. + oidc_member_definition: A list user groups that exist in your OIDC Identity Provider (IdP). One to ten groups can be used to create a single private work team. When you add a user group to the list of Groups, you can add that user group to one or more private work teams. If you add a user group to a private work team, all workers in that user group are added to the work team. + """ + + cognito_member_definition: Optional[CognitoMemberDefinition] = Unassigned() + oidc_member_definition: Optional[OidcMemberDefinition] = Unassigned() + + +class NotificationConfiguration(Base): + """ + NotificationConfiguration + Configures Amazon SNS notifications of available or expiring work items for work teams. + + Attributes + ---------------------- + notification_topic_arn: The ARN for the Amazon SNS topic to which notifications should be published. + """ + + notification_topic_arn: Optional[StrPipeVar] = Unassigned() + + +class IamPolicyConstraints(Base): + """ + IamPolicyConstraints + Use this parameter to specify a supported global condition key that is added to the IAM policy. + + Attributes + ---------------------- + source_ip: When SourceIp is Enabled the worker's IP address when a task is rendered in the worker portal is added to the IAM policy as a Condition used to generate the Amazon S3 presigned URL. This IP address is checked by Amazon S3 and must match in order for the Amazon S3 resource to be rendered in the worker portal. + vpc_source_ip: When VpcSourceIp is Enabled the worker's IP address when a task is rendered in private worker portal inside the VPC is added to the IAM policy as a Condition used to generate the Amazon S3 presigned URL. To render the task successfully Amazon S3 checks that the presigned URL is being accessed over an Amazon S3 VPC Endpoint, and that the worker's IP address matches the IP address in the IAM policy. To learn more about configuring private worker portal, see Use Amazon VPC mode from a private worker portal. + """ + + source_ip: Optional[StrPipeVar] = Unassigned() + vpc_source_ip: Optional[StrPipeVar] = Unassigned() + + +class S3Presign(Base): + """ + S3Presign + This object defines the access restrictions to Amazon S3 resources that are included in custom worker task templates using the Liquid filter, grant_read_access. To learn more about how custom templates are created, see Create custom worker task templates. + + Attributes + ---------------------- + iam_policy_constraints: Use this parameter to specify the allowed request source. Possible sources are either SourceIp or VpcSourceIp. + """ + + iam_policy_constraints: Optional[IamPolicyConstraints] = Unassigned() + + +class WorkerAccessConfiguration(Base): + """ + WorkerAccessConfiguration + Use this optional parameter to constrain access to an Amazon S3 resource based on the IP address using supported IAM global condition keys. The Amazon S3 resource is accessed in the worker portal using a Amazon S3 presigned URL. + + Attributes + ---------------------- + s3_presign: Defines any Amazon S3 resource constraints. + """ + + s3_presign: Optional[S3Presign] = Unassigned() + + +class CustomizedMetricSpecification(Base): + """ + CustomizedMetricSpecification + A customized metric. + + Attributes + ---------------------- + metric_name: The name of the customized metric. + namespace: The namespace of the customized metric. + statistic: The statistic of the customized metric. + """ + + metric_name: Optional[StrPipeVar] = Unassigned() + namespace: Optional[StrPipeVar] = Unassigned() + statistic: Optional[StrPipeVar] = Unassigned() + + +class DataCaptureConfigSummary(Base): + """ + DataCaptureConfigSummary + The currently active data capture configuration used by your Endpoint. + + Attributes + ---------------------- + enable_capture: Whether data capture is enabled or disabled. + capture_status: Whether data capture is currently functional. + current_sampling_percentage: The percentage of requests being captured by your Endpoint. + destination_s3_uri: The Amazon S3 location being used to capture the data. + kms_key_id: The KMS key being used to encrypt the data in Amazon S3. + """ + + enable_capture: bool + capture_status: StrPipeVar + current_sampling_percentage: int + destination_s3_uri: StrPipeVar + kms_key_id: StrPipeVar + + +class DebugRuleEvaluationStatus(Base): + """ + DebugRuleEvaluationStatus + Information about the status of the rule evaluation. + + Attributes + ---------------------- + rule_configuration_name: The name of the rule configuration. + rule_evaluation_job_arn: The Amazon Resource Name (ARN) of the rule evaluation job. + rule_evaluation_status: Status of the rule evaluation. + status_details: Details from the rule evaluation. + last_modified_time: Timestamp when the rule evaluation status was last modified. + """ + + rule_configuration_name: Optional[StrPipeVar] = Unassigned() + rule_evaluation_job_arn: Optional[StrPipeVar] = Unassigned() + rule_evaluation_status: Optional[StrPipeVar] = Unassigned() + status_details: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class RetentionPolicy(Base): + """ + RetentionPolicy + The retention policy for data stored on an Amazon Elastic File System volume. + + Attributes + ---------------------- + home_efs_file_system: The default is Retain, which specifies to keep the data stored on the Amazon EFS volume. Specify Delete to delete the data stored on the Amazon EFS volume. + """ + + home_efs_file_system: Optional[StrPipeVar] = Unassigned() + + +class DeployedImage(Base): + """ + DeployedImage + Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant. If you used the registry/repository[:tag] form to specify the image path of the primary container when you created the model hosted in this ProductionVariant, the path resolves to a path of the form registry/repository[@digest]. A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide. + + Attributes + ---------------------- + specified_image: The image path you specified when you created the model. + resolved_image: The specific digest path of the image hosted in this ProductionVariant. + resolution_time: The date and time when the image path for the model resolved to the ResolvedImage + """ + + specified_image: Optional[StrPipeVar] = Unassigned() + resolved_image: Optional[StrPipeVar] = Unassigned() + resolution_time: Optional[datetime.datetime] = Unassigned() + + +class RealTimeInferenceRecommendation(Base): + """ + RealTimeInferenceRecommendation + The recommended configuration to use for Real-Time Inference. + + Attributes + ---------------------- + recommendation_id: The recommendation ID which uniquely identifies each recommendation. + instance_type: The recommended instance type for Real-Time Inference. + environment: The recommended environment variables to set in the model container for Real-Time Inference. + """ + + recommendation_id: StrPipeVar + instance_type: StrPipeVar + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class DeploymentRecommendation(Base): + """ + DeploymentRecommendation + A set of recommended deployment configurations for the model. To get more advanced recommendations, see CreateInferenceRecommendationsJob to create an inference recommendation job. + + Attributes + ---------------------- + recommendation_status: Status of the deployment recommendation. The status NOT_APPLICABLE means that SageMaker is unable to provide a default recommendation for the model using the information provided. If the deployment status is IN_PROGRESS, retry your API call after a few seconds to get a COMPLETED deployment recommendation. + real_time_inference_recommendations: A list of RealTimeInferenceRecommendation items. + """ + + recommendation_status: StrPipeVar + real_time_inference_recommendations: Optional[List[RealTimeInferenceRecommendation]] = ( + Unassigned() + ) + + +class EdgeDeploymentStatus(Base): + """ + EdgeDeploymentStatus + Contains information summarizing the deployment stage results. + + Attributes + ---------------------- + stage_status: The general status of the current stage. + edge_deployment_success_in_stage: The number of edge devices with the successful deployment in the current stage. + edge_deployment_pending_in_stage: The number of edge devices yet to pick up the deployment in current stage, or in progress. + edge_deployment_failed_in_stage: The number of edge devices that failed the deployment in current stage. + edge_deployment_status_message: A detailed message about deployment status in current stage. + edge_deployment_stage_start_time: The time when the deployment API started. + """ + + stage_status: StrPipeVar + edge_deployment_success_in_stage: int + edge_deployment_pending_in_stage: int + edge_deployment_failed_in_stage: int + edge_deployment_status_message: Optional[StrPipeVar] = Unassigned() + edge_deployment_stage_start_time: Optional[datetime.datetime] = Unassigned() + + +class DeploymentStageStatusSummary(Base): + """ + DeploymentStageStatusSummary + Contains information summarizing the deployment stage results. + + Attributes + ---------------------- + stage_name: The name of the stage. + device_selection_config: Configuration of the devices in the stage. + deployment_config: Configuration of the deployment details. + deployment_status: General status of the current state. + """ + + stage_name: StrPipeVar + device_selection_config: DeviceSelectionConfig + deployment_config: EdgeDeploymentConfig + deployment_status: EdgeDeploymentStatus + + +class DerivedInformation(Base): + """ + DerivedInformation + Information that SageMaker Neo automatically derived about the model. + + Attributes + ---------------------- + derived_data_input_config: The data input configuration that SageMaker Neo automatically derived for the model. When SageMaker Neo derives this information, you don't need to specify the data input configuration when you create a compilation job. + """ + + derived_data_input_config: Optional[StrPipeVar] = Unassigned() + + +class ResolvedAttributes(Base): + """ + ResolvedAttributes + The resolved attributes. + + Attributes + ---------------------- + auto_ml_job_objective + problem_type: The problem type. + completion_criteria + """ + + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() + problem_type: Optional[StrPipeVar] = Unassigned() + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + + +class ModelDeployResult(Base): + """ + ModelDeployResult + Provides information about the endpoint of the model deployment. + + Attributes + ---------------------- + endpoint_name: The name of the endpoint to which the model has been deployed. If model deployment fails, this field is omitted from the response. + """ + + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class ModelArtifacts(Base): + """ + ModelArtifacts + Provides information about the location that is configured for storing model artifacts. Model artifacts are outputs that result from training a model. They typically consist of trained parameters, a model definition that describes how to compute inferences, and other metadata. A SageMaker container stores your trained model artifacts in the /opt/ml/model directory. After training has completed, by default, these artifacts are uploaded to your Amazon S3 bucket as compressed files. + + Attributes + ---------------------- + s3_model_artifacts: The path of the S3 object that contains the model artifacts. For example, s3://bucket-name/keynameprefix/model.tar.gz. + """ + + s3_model_artifacts: StrPipeVar + + +class ModelDigests(Base): + """ + ModelDigests + Provides information to verify the integrity of stored model artifacts. + + Attributes + ---------------------- + artifact_digest: Provides a hash value that uniquely identifies the stored model artifacts. + """ + + artifact_digest: Optional[StrPipeVar] = Unassigned() + + +class EdgeModel(Base): + """ + EdgeModel + The model on the edge device. + + Attributes + ---------------------- + model_name: The name of the model. + model_version: The model version. + latest_sample_time: The timestamp of the last data sample taken. + latest_inference: The timestamp of the last inference that was made. + """ + + model_name: Union[StrPipeVar, object] + model_version: StrPipeVar + latest_sample_time: Optional[datetime.datetime] = Unassigned() + latest_inference: Optional[datetime.datetime] = Unassigned() + + +class EdgePresetDeploymentOutput(Base): + """ + EdgePresetDeploymentOutput + The output of a SageMaker Edge Manager deployable resource. + + Attributes + ---------------------- + type: The deployment type created by SageMaker Edge Manager. Currently only supports Amazon Web Services IoT Greengrass Version 2 components. + artifact: The Amazon Resource Name (ARN) of the generated deployable resource. + status: The status of the deployable resource. + status_message: Returns a message describing the status of the deployed resource. + """ + + type: StrPipeVar + artifact: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + status_message: Optional[StrPipeVar] = Unassigned() + + +class ProductionVariantStatus(Base): + """ + ProductionVariantStatus + Describes the status of the production variant. + + Attributes + ---------------------- + status: The endpoint variant status which describes the current deployment stage status or operational status. Creating: Creating inference resources for the production variant. Deleting: Terminating inference resources for the production variant. Updating: Updating capacity for the production variant. ActivatingTraffic: Turning on traffic for the production variant. Baking: Waiting period to monitor the CloudWatch alarms in the automatic rollback configuration. + status_message: A message that describes the status of the production variant. + start_time: The start time of the current status change. + """ + + status: StrPipeVar + status_message: Optional[StrPipeVar] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + + +class Ec2CapacityReservation(Base): + """ + Ec2CapacityReservation + The EC2 capacity reservations that are shared to an ML capacity reservation. + + Attributes + ---------------------- + ec2_capacity_reservation_id: The unique identifier for an EC2 capacity reservation that's part of the ML capacity reservation. + total_instance_count: The number of instances that you allocated to the EC2 capacity reservation. + available_instance_count: The number of instances that are currently available in the EC2 capacity reservation. + used_by_current_endpoint: The number of instances from the EC2 capacity reservation that are being used by the endpoint. + """ + + ec2_capacity_reservation_id: Optional[StrPipeVar] = Unassigned() + total_instance_count: Optional[int] = Unassigned() + available_instance_count: Optional[int] = Unassigned() + used_by_current_endpoint: Optional[int] = Unassigned() + + +class ProductionVariantCapacityReservationSummary(Base): + """ + ProductionVariantCapacityReservationSummary + Details about an ML capacity reservation. + + Attributes + ---------------------- + ml_reservation_arn: The Amazon Resource Name (ARN) that uniquely identifies the ML capacity reservation that SageMaker AI applies when it deploys the endpoint. + capacity_reservation_preference: The option that you chose for the capacity reservation. SageMaker AI supports the following options: capacity-reservations-only SageMaker AI launches instances only into an ML capacity reservation. If no capacity is available, the instances fail to launch. + total_instance_count: The number of instances that you allocated to the ML capacity reservation. + available_instance_count: The number of instances that are currently available in the ML capacity reservation. + used_by_current_endpoint: The number of instances from the ML capacity reservation that are being used by the endpoint. + ec2_capacity_reservations: The EC2 capacity reservations that are shared to this ML capacity reservation, if any. + """ + + ml_reservation_arn: Optional[StrPipeVar] = Unassigned() + capacity_reservation_preference: Optional[StrPipeVar] = Unassigned() + total_instance_count: Optional[int] = Unassigned() + available_instance_count: Optional[int] = Unassigned() + used_by_current_endpoint: Optional[int] = Unassigned() + ec2_capacity_reservations: Optional[List[Ec2CapacityReservation]] = Unassigned() + + +class ProductionVariantSummary(Base): + """ + ProductionVariantSummary + Describes weight and capacities for a production variant associated with an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities API and the endpoint status is Updating, you get different desired and current values. + + Attributes + ---------------------- + variant_name: The name of the variant. + deployed_images: An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant. + current_weight: The weight associated with the variant. + desired_weight: The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request. + current_instance_count: The number of instances associated with the variant. + desired_instance_count: The number of instances requested in the UpdateEndpointWeightsAndCapacities request. + variant_status: The endpoint variant status which describes the current deployment stage status or operational status. + current_serverless_config: The serverless configuration for the endpoint. + desired_serverless_config: The serverless configuration requested for the endpoint update. + managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. + routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. + capacity_reservation_config: Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. + """ + + variant_name: StrPipeVar + deployed_images: Optional[List[DeployedImage]] = Unassigned() + current_weight: Optional[float] = Unassigned() + desired_weight: Optional[float] = Unassigned() + current_instance_count: Optional[int] = Unassigned() + desired_instance_count: Optional[int] = Unassigned() + variant_status: Optional[List[ProductionVariantStatus]] = Unassigned() + current_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + desired_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() + routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() + capacity_reservation_config: Optional[ProductionVariantCapacityReservationSummary] = ( + Unassigned() + ) + + +class PendingProductionVariantSummary(Base): + """ + PendingProductionVariantSummary + The production variant summary for a deployment when an endpoint is creating or updating with the CreateEndpoint or UpdateEndpoint operations. Describes the VariantStatus , weight and capacity for a production variant associated with an endpoint. + + Attributes + ---------------------- + variant_name: The name of the variant. + deployed_images: An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant. + current_weight: The weight associated with the variant. + desired_weight: The requested weight for the variant in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation. + current_instance_count: The number of instances associated with the variant. + desired_instance_count: The number of instances requested in this deployment, as specified in the endpoint configuration for the endpoint. The value is taken from the request to the CreateEndpointConfig operation. + instance_type: The type of instances associated with the variant. + accelerator_type: This parameter is no longer supported. Elastic Inference (EI) is no longer available. This parameter was used to specify the size of the EI instance to use for the production variant. + variant_status: The endpoint variant status which describes the current deployment stage status or operational status. + current_serverless_config: The serverless configuration for the endpoint. + desired_serverless_config: The serverless configuration requested for this deployment, as specified in the endpoint configuration for the endpoint. + managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. + routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. + """ + + variant_name: StrPipeVar + deployed_images: Optional[List[DeployedImage]] = Unassigned() + current_weight: Optional[float] = Unassigned() + desired_weight: Optional[float] = Unassigned() + current_instance_count: Optional[int] = Unassigned() + desired_instance_count: Optional[int] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + accelerator_type: Optional[StrPipeVar] = Unassigned() + variant_status: Optional[List[ProductionVariantStatus]] = Unassigned() + current_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + desired_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() + routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() + + +class PendingDeploymentSummary(Base): + """ + PendingDeploymentSummary + The summary of an in-progress deployment when an endpoint is creating or updating with a new endpoint configuration. + + Attributes + ---------------------- + endpoint_config_name: The name of the endpoint configuration used in the deployment. + production_variants: An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint for the in-progress deployment. + start_time: The start time of the deployment. + shadow_production_variants: An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants for the in-progress deployment. + """ + + endpoint_config_name: Union[StrPipeVar, object] + production_variants: Optional[List[PendingProductionVariantSummary]] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + shadow_production_variants: Optional[List[PendingProductionVariantSummary]] = Unassigned() + + +class ExperimentSource(Base): + """ + ExperimentSource + The source of the experiment. + + Attributes + ---------------------- + source_arn: The Amazon Resource Name (ARN) of the source. + source_type: The source type. + """ + + source_arn: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + + +class ThroughputConfigDescription(Base): + """ + ThroughputConfigDescription + Active throughput configuration of the feature group. There are two modes: ON_DEMAND and PROVISIONED. With on-demand mode, you are charged for data reads and writes that your application performs on your feature group. You do not need to specify read and write throughput because Feature Store accommodates your workloads as they ramp up and down. You can switch a feature group to on-demand only once in a 24 hour period. With provisioned throughput mode, you specify the read and write capacity per second that you expect your application to require, and you are billed based on those limits. Exceeding provisioned throughput will result in your requests being throttled. Note: PROVISIONED throughput mode is supported only for feature groups that are offline-only, or use the Standard tier online store. + + Attributes + ---------------------- + throughput_mode: The mode used for your feature group throughput: ON_DEMAND or PROVISIONED. + provisioned_read_capacity_units: For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + provisioned_write_capacity_units: For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. This field is not applicable for on-demand feature groups. + """ + + throughput_mode: StrPipeVar + provisioned_read_capacity_units: Optional[int] = Unassigned() + provisioned_write_capacity_units: Optional[int] = Unassigned() + + +class OfflineStoreStatus(Base): + """ + OfflineStoreStatus + The status of OfflineStore. + + Attributes + ---------------------- + status: An OfflineStore status. + blocked_reason: The justification for why the OfflineStoreStatus is Blocked (if applicable). + """ + + status: StrPipeVar + blocked_reason: Optional[StrPipeVar] = Unassigned() + + +class LastUpdateStatus(Base): + """ + LastUpdateStatus + A value that indicates whether the update was successful. + + Attributes + ---------------------- + status: A value that indicates whether the update was made successful. + failure_reason: If the update wasn't successful, indicates the reason why it failed. + """ + + status: StrPipeVar + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class FeatureParameter(Base): + """ + FeatureParameter + A key-value pair that you specify to describe the feature. + + Attributes + ---------------------- + key: A key that must contain a value to describe the feature. + value: The value that belongs to a key. + """ + + key: Optional[StrPipeVar] = Unassigned() + value: Optional[StrPipeVar] = Unassigned() + + +class HubContentDependency(Base): + """ + HubContentDependency + Any dependencies related to hub content, such as scripts, model artifacts, datasets, or notebooks. + + Attributes + ---------------------- + dependency_origin_path: The hub content dependency origin path. + dependency_copy_path: The hub content dependency copy path. + """ + + dependency_origin_path: Optional[StrPipeVar] = Unassigned() + dependency_copy_path: Optional[StrPipeVar] = Unassigned() + + +class UiTemplateInfo(Base): + """ + UiTemplateInfo + Container for user interface template information. + + Attributes + ---------------------- + url: The URL for the user interface template. + content_sha256: The SHA-256 digest of the contents of the template. + """ + + url: Optional[StrPipeVar] = Unassigned() + content_sha256: Optional[StrPipeVar] = Unassigned() + + +class TrainingJobStatusCounters(Base): + """ + TrainingJobStatusCounters + The numbers of training jobs launched by a hyperparameter tuning job, categorized by status. + + Attributes + ---------------------- + completed: The number of completed training jobs launched by the hyperparameter tuning job. + in_progress: The number of in-progress training jobs launched by a hyperparameter tuning job. + retryable_error: The number of training jobs that failed, but can be retried. A failed training job can be retried only if it failed because an internal service error occurred. + non_retryable_error: The number of training jobs that failed and can't be retried. A failed training job can't be retried if it failed because a client error occurred. + stopped: The number of training jobs launched by a hyperparameter tuning job that were manually stopped. + """ + + completed: Optional[int] = Unassigned() + in_progress: Optional[int] = Unassigned() + retryable_error: Optional[int] = Unassigned() + non_retryable_error: Optional[int] = Unassigned() + stopped: Optional[int] = Unassigned() + + +class ObjectiveStatusCounters(Base): + """ + ObjectiveStatusCounters + Specifies the number of training jobs that this hyperparameter tuning job launched, categorized by the status of their objective metric. The objective metric status shows whether the final objective metric for the training job has been evaluated by the tuning job and used in the hyperparameter tuning process. + + Attributes + ---------------------- + succeeded: The number of training jobs whose final objective metric was evaluated by the hyperparameter tuning job and used in the hyperparameter tuning process. + pending: The number of training jobs that are in progress and pending evaluation of their final objective metric. + failed: The number of training jobs whose final objective metric was not evaluated and used in the hyperparameter tuning process. This typically occurs when the training job failed or did not emit an objective metric. + """ + + succeeded: Optional[int] = Unassigned() + pending: Optional[int] = Unassigned() + failed: Optional[int] = Unassigned() + + +class FinalHyperParameterTuningJobObjectiveMetric(Base): + """ + FinalHyperParameterTuningJobObjectiveMetric + Shows the latest objective metric emitted by a training job that was launched by a hyperparameter tuning job. You define the objective metric in the HyperParameterTuningJobObjective parameter of HyperParameterTuningJobConfig. + + Attributes + ---------------------- + type: Select if you want to minimize or maximize the objective metric during hyperparameter tuning. + metric_name: The name of the objective metric. For SageMaker built-in algorithms, metrics are defined per algorithm. See the metrics for XGBoost as an example. You can also use a custom algorithm for training and define your own metrics. For more information, see Define metrics and environment variables. + value: The value of the objective metric. + """ + + metric_name: StrPipeVar + value: float + type: Optional[StrPipeVar] = Unassigned() + + +class HyperParameterTrainingJobSummary(Base): + """ + HyperParameterTrainingJobSummary + The container for the summary information about a training job. + + Attributes + ---------------------- + training_job_definition_name: The training job definition name. + training_job_name: The name of the training job. + training_job_arn: The Amazon Resource Name (ARN) of the training job. + tuning_job_name: The HyperParameter tuning job that launched the training job. + creation_time: The date and time that the training job was created. + training_start_time: The date and time that the training job started. + training_end_time: Specifies the time when the training job ends on training instances. You are billed for the time interval between the value of TrainingStartTime and this time. For successful jobs and stopped jobs, this is the time after model artifacts are uploaded. For failed jobs, this is the time when SageMaker detects a job failure. + training_job_status: The status of the training job. + tuned_hyper_parameters: A list of the hyperparameters for which you specified ranges to search. + failure_reason: The reason that the training job failed. + final_hyper_parameter_tuning_job_objective_metric: The FinalHyperParameterTuningJobObjectiveMetric object that specifies the value of the objective metric of the tuning job that launched this training job. + objective_status: The status of the objective metric for the training job: Succeeded: The final objective metric for the training job was evaluated by the hyperparameter tuning job and used in the hyperparameter tuning process. Pending: The training job is in progress and evaluation of its final objective metric is pending. Failed: The final objective metric for the training job was not evaluated, and was not used in the hyperparameter tuning process. This typically occurs when the training job failed or did not emit an objective metric. + """ + + training_job_name: Union[StrPipeVar, object] + training_job_arn: StrPipeVar + creation_time: datetime.datetime + training_job_status: StrPipeVar + tuned_hyper_parameters: Dict[StrPipeVar, StrPipeVar] + training_job_definition_name: Optional[StrPipeVar] = Unassigned() + tuning_job_name: Optional[StrPipeVar] = Unassigned() + training_start_time: Optional[datetime.datetime] = Unassigned() + training_end_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + final_hyper_parameter_tuning_job_objective_metric: Optional[ + FinalHyperParameterTuningJobObjectiveMetric + ] = Unassigned() + objective_status: Optional[StrPipeVar] = Unassigned() + + +class HyperParameterTuningJobCompletionDetails(Base): + """ + HyperParameterTuningJobCompletionDetails + A structure that contains runtime information about both current and completed hyperparameter tuning jobs. + + Attributes + ---------------------- + number_of_training_jobs_objective_not_improving: The number of training jobs launched by a tuning job that are not improving (1% or less) as measured by model performance evaluated against an objective function. + convergence_detected_time: The time in timestamp format that AMT detected model convergence, as defined by a lack of significant improvement over time based on criteria developed over a wide range of diverse benchmarking tests. + """ + + number_of_training_jobs_objective_not_improving: Optional[int] = Unassigned() + convergence_detected_time: Optional[datetime.datetime] = Unassigned() + + +class HyperParameterTuningJobConsumedResources(Base): + """ + HyperParameterTuningJobConsumedResources + The total resources consumed by your hyperparameter tuning job. + + Attributes + ---------------------- + runtime_in_seconds: The wall clock runtime in seconds used by your hyperparameter tuning job. + """ + + runtime_in_seconds: Optional[int] = Unassigned() + + +class InferenceComponentContainerSpecificationSummary(Base): + """ + InferenceComponentContainerSpecificationSummary + Details about the resources that are deployed with this inference component. + + Attributes + ---------------------- + deployed_image + artifact_url: The Amazon S3 path where the model artifacts are stored. + environment: The environment variables to set in the Docker container. + """ + + deployed_image: Optional[DeployedImage] = Unassigned() + artifact_url: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class InferenceComponentDataCacheConfigSummary(Base): + """ + InferenceComponentDataCacheConfigSummary + Settings that affect how the inference component caches data. + + Attributes + ---------------------- + enable_caching: Indicates whether the inference component caches model artifacts as part of the auto scaling process. + """ + + enable_caching: bool + + +class InferenceComponentSpecificationSummary(Base): + """ + InferenceComponentSpecificationSummary + Details about the resources that are deployed with this inference component. + + Attributes + ---------------------- + model_name: The name of the SageMaker AI model object that is deployed with the inference component. + container: Details about the container that provides the runtime environment for the model that is deployed with the inference component. + startup_parameters: Settings that take effect while the model container starts up. + compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component. + base_inference_component_name: The name of the base inference component that contains this inference component. + data_cache_config: Settings that affect how the inference component caches data. + scheduling_config: The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. + """ + + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + container: Optional[InferenceComponentContainerSpecificationSummary] = Unassigned() + startup_parameters: Optional[InferenceComponentStartupParameters] = Unassigned() + compute_resource_requirements: Optional[InferenceComponentComputeResourceRequirements] = ( + Unassigned() + ) + base_inference_component_name: Optional[StrPipeVar] = Unassigned() + data_cache_config: Optional[InferenceComponentDataCacheConfigSummary] = Unassigned() + scheduling_config: Optional[InferenceComponentSchedulingConfig] = Unassigned() + + +class InferenceComponentRuntimeConfigSummary(Base): + """ + InferenceComponentRuntimeConfigSummary + Details about the runtime settings for the model that is deployed with the inference component. + + Attributes + ---------------------- + desired_copy_count: The number of runtime copies of the model container that you requested to deploy with the inference component. + current_copy_count: The number of runtime copies of the model container that are currently deployed. + """ + + desired_copy_count: Optional[int] = Unassigned() + current_copy_count: Optional[int] = Unassigned() + + +class InferenceComponentCapacitySize(Base): + """ + InferenceComponentCapacitySize + Specifies the type and size of the endpoint capacity to activate for a rolling deployment or a rollback strategy. You can specify your batches as either of the following: A count of inference component copies 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 parameter to 100%, then SageMaker AI uses a blue/green rollback strategy and rolls all traffic back to the blue fleet. + + Attributes + ---------------------- + type: Specifies the endpoint capacity type. COPY_COUNT The endpoint activates based on the number of inference component copies. CAPACITY_PERCENT The endpoint activates based on the specified percentage of capacity. + value: Defines the capacity size, either as a number of inference component copies or a capacity percentage. + """ + + type: StrPipeVar + value: int + + +class InferenceComponentRollingUpdatePolicy(Base): + """ + InferenceComponentRollingUpdatePolicy + Specifies a rolling deployment strategy for updating a SageMaker AI inference component. + + Attributes + ---------------------- + maximum_batch_size: The batch size for each rolling step in the deployment process. For each step, SageMaker AI provisions capacity on the new endpoint fleet, routes traffic to that fleet, and terminates capacity on the old endpoint fleet. The value must be between 5% to 50% of the copy count of the inference component. + wait_interval_in_seconds: The length of the baking period, during which SageMaker AI monitors alarms for each batch on the new fleet. + maximum_execution_timeout_in_seconds: The time limit for the total deployment. Exceeding this limit causes a timeout. + rollback_maximum_batch_size: The batch size for a rollback to the old endpoint fleet. If this field is absent, the value is set to the default, which is 100% of the total capacity. When the default is used, SageMaker AI provisions the entire capacity of the old fleet at once during rollback. + """ + + maximum_batch_size: InferenceComponentCapacitySize + wait_interval_in_seconds: int + maximum_execution_timeout_in_seconds: Optional[int] = Unassigned() + rollback_maximum_batch_size: Optional[InferenceComponentCapacitySize] = Unassigned() + + +class InferenceComponentDeploymentConfig(Base): + """ + InferenceComponentDeploymentConfig + The deployment configuration for an endpoint that hosts inference components. The configuration includes the desired deployment strategy and rollback settings. + + Attributes + ---------------------- + rolling_update_policy: Specifies a rolling deployment strategy for updating a SageMaker AI endpoint. + auto_rollback_configuration + """ + + rolling_update_policy: InferenceComponentRollingUpdatePolicy + auto_rollback_configuration: Optional[AutoRollbackConfig] = Unassigned() + + +class EndpointMetadata(Base): + """ + EndpointMetadata + The metadata of the endpoint. + + Attributes + ---------------------- + endpoint_name: The name of the endpoint. + endpoint_config_name: The name of the endpoint configuration. + endpoint_status: The status of the endpoint. For possible values of the status of an endpoint, see EndpointSummary. + failure_reason: If the status of the endpoint is Failed, or the status is InService but update operation fails, this provides the reason why it failed. + """ + + endpoint_name: Union[StrPipeVar, object] + endpoint_config_name: Optional[Union[StrPipeVar, object]] = Unassigned() + endpoint_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class ModelVariantConfigSummary(Base): + """ + ModelVariantConfigSummary + Summary of the deployment configuration of a model. + + Attributes + ---------------------- + model_name: The name of the Amazon SageMaker Model entity. + variant_name: The name of the variant. + infrastructure_config: The configuration of the infrastructure that the model has been deployed to. + status: The status of deployment for the model variant on the hosted inference endpoint. Creating - Amazon SageMaker is preparing the model variant on the hosted inference endpoint. InService - The model variant is running on the hosted inference endpoint. Updating - Amazon SageMaker is updating the model variant on the hosted inference endpoint. Deleting - Amazon SageMaker is deleting the model variant on the hosted inference endpoint. Deleted - The model variant has been deleted on the hosted inference endpoint. This can only happen after stopping the experiment. + """ + + model_name: Union[StrPipeVar, object] + variant_name: StrPipeVar + infrastructure_config: ModelInfrastructureConfig + status: StrPipeVar + + +class RecommendationMetrics(Base): + """ + RecommendationMetrics + The metrics of recommendations. + + Attributes + ---------------------- + cost_per_hour: Defines the cost per hour for the instance. + cost_per_inference: Defines the cost per inference for the instance . + max_invocations: The expected maximum number of requests per minute for the instance. + model_latency: The expected model latency at maximum invocation per minute for the instance. + cpu_utilization: The expected CPU utilization at maximum invocations per minute for the instance. NaN indicates that the value is not available. + memory_utilization: The expected memory utilization at maximum invocations per minute for the instance. NaN indicates that the value is not available. + model_setup_time: The time it takes to launch new compute resources for a serverless endpoint. The time can vary depending on the model size, how long it takes to download the model, and the start-up time of the container. NaN indicates that the value is not available. + """ + + cost_per_hour: Optional[float] = Unassigned() + cost_per_inference: Optional[float] = Unassigned() + max_invocations: Optional[int] = Unassigned() + model_latency: Optional[int] = Unassigned() + cpu_utilization: Optional[float] = Unassigned() + memory_utilization: Optional[float] = Unassigned() + model_setup_time: Optional[int] = Unassigned() + + +class EndpointOutputConfiguration(Base): + """ + EndpointOutputConfiguration + The endpoint configuration made by Inference Recommender during a recommendation job. + + Attributes + ---------------------- + endpoint_name: The name of the endpoint made during a recommendation job. + variant_name: The name of the production variant (deployed model) made during a recommendation job. + instance_type: The instance type recommended by Amazon SageMaker Inference Recommender. + initial_instance_count: The number of instances recommended to launch initially. + serverless_config + """ + + endpoint_name: Union[StrPipeVar, object] + variant_name: StrPipeVar + instance_type: Optional[StrPipeVar] = Unassigned() + initial_instance_count: Optional[int] = Unassigned() + serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() + + +class EnvironmentParameter(Base): + """ + EnvironmentParameter + A list of environment parameters suggested by the Amazon SageMaker Inference Recommender. + + Attributes + ---------------------- + key: The environment key suggested by the Amazon SageMaker Inference Recommender. + value_type: The value type suggested by the Amazon SageMaker Inference Recommender. + value: The value suggested by the Amazon SageMaker Inference Recommender. + """ + + key: StrPipeVar + value_type: StrPipeVar + value: StrPipeVar + + +class ModelConfiguration(Base): + """ + ModelConfiguration + Defines the model configuration. Includes the specification name and environment parameters. + + Attributes + ---------------------- + inference_specification_name: The inference specification name in the model package version. + environment_parameters: Defines the environment parameters that includes key, value types, and values. + compilation_job_name: The name of the compilation job used to create the recommended model artifacts. + """ + + inference_specification_name: Optional[StrPipeVar] = Unassigned() + environment_parameters: Optional[List[EnvironmentParameter]] = Unassigned() + compilation_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class InferenceRecommendation(Base): + """ + InferenceRecommendation + A list of recommendations made by Amazon SageMaker Inference Recommender. + + Attributes + ---------------------- + recommendation_id: The recommendation ID which uniquely identifies each recommendation. + metrics: The metrics used to decide what recommendation to make. + endpoint_configuration: Defines the endpoint configuration parameters. + model_configuration: Defines the model configuration. + invocation_end_time: A timestamp that shows when the benchmark completed. + invocation_start_time: A timestamp that shows when the benchmark started. + """ + + endpoint_configuration: EndpointOutputConfiguration + model_configuration: ModelConfiguration + recommendation_id: Optional[StrPipeVar] = Unassigned() + metrics: Optional[RecommendationMetrics] = Unassigned() + invocation_end_time: Optional[datetime.datetime] = Unassigned() + invocation_start_time: Optional[datetime.datetime] = Unassigned() + + +class InferenceMetrics(Base): + """ + InferenceMetrics + The metrics for an existing endpoint compared in an Inference Recommender job. + + Attributes + ---------------------- + max_invocations: The expected maximum number of requests per minute for the instance. + model_latency: The expected model latency at maximum invocations per minute for the instance. + """ + + max_invocations: int + model_latency: int + + +class EndpointPerformance(Base): + """ + EndpointPerformance + The performance results from running an Inference Recommender job on an existing endpoint. + + Attributes + ---------------------- + metrics: The metrics for an existing endpoint. + endpoint_info + """ + + metrics: InferenceMetrics + endpoint_info: EndpointInfo + + +class LabelCounters(Base): + """ + LabelCounters + Provides a breakdown of the number of objects labeled. + + Attributes + ---------------------- + total_labeled: The total number of objects labeled. + human_labeled: The total number of objects labeled by a human worker. + machine_labeled: The total number of objects labeled by automated data labeling. + failed_non_retryable_error: The total number of objects that could not be labeled due to an error. + unlabeled: The total number of objects not yet labeled. + """ + + total_labeled: Optional[int] = Unassigned() + human_labeled: Optional[int] = Unassigned() + machine_labeled: Optional[int] = Unassigned() + failed_non_retryable_error: Optional[int] = Unassigned() + unlabeled: Optional[int] = Unassigned() + + +class LabelingJobOutput(Base): + """ + LabelingJobOutput + Specifies the location of the output produced by the labeling job. + + Attributes + ---------------------- + output_dataset_s3_uri: The Amazon S3 bucket location of the manifest file for labeled data. + final_active_learning_model_arn: The Amazon Resource Name (ARN) for the most recent SageMaker model trained as part of automated data labeling. + """ + + output_dataset_s3_uri: StrPipeVar + final_active_learning_model_arn: Optional[StrPipeVar] = Unassigned() + + +class ModelCardExportArtifacts(Base): + """ + ModelCardExportArtifacts + The artifacts of the model card export job. + + Attributes + ---------------------- + s3_export_artifacts: The Amazon S3 URI of the exported model artifacts. + """ + + s3_export_artifacts: StrPipeVar + + +class ModelPackageStatusItem(Base): + """ + ModelPackageStatusItem + Represents the overall status of a model package. + + Attributes + ---------------------- + name: The name of the model package for which the overall status is being reported. + status: The current status. + failure_reason: if the overall status is Failed, the reason for the failure. + """ + + name: StrPipeVar + status: StrPipeVar + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageStatusDetails(Base): + """ + ModelPackageStatusDetails + Specifies the validation and image scan statuses of the model package. + + Attributes + ---------------------- + validation_statuses: The validation status of the model package. + image_scan_statuses: The status of the scan of the Docker image container for the model package. + """ + + validation_statuses: List[ModelPackageStatusItem] + image_scan_statuses: Optional[List[ModelPackageStatusItem]] = Unassigned() + + +class MonitoringExecutionSummary(Base): + """ + MonitoringExecutionSummary + Summary of information about the last monitoring job to run. + + Attributes + ---------------------- + monitoring_schedule_name: The name of the monitoring schedule. + scheduled_time: The time the monitoring job was scheduled. + creation_time: The time at which the monitoring job was created. + last_modified_time: A timestamp that indicates the last time the monitoring job was modified. + monitoring_execution_status: The status of the monitoring job. + processing_job_arn: The Amazon Resource Name (ARN) of the monitoring job. + endpoint_name: The name of the endpoint used to run the monitoring job. + failure_reason: Contains the reason a monitoring job failed, if it failed. + monitoring_job_definition_name: The name of the monitoring job. + monitoring_type: The type of the monitoring job. + """ + + monitoring_schedule_name: Union[StrPipeVar, object] + scheduled_time: datetime.datetime + creation_time: datetime.datetime + last_modified_time: datetime.datetime + monitoring_execution_status: StrPipeVar + processing_job_arn: Optional[StrPipeVar] = Unassigned() + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + + +class OptimizationOutput(Base): + """ + OptimizationOutput + Output values produced by an optimization job. + + Attributes + ---------------------- + recommended_inference_image: The image that SageMaker recommends that you use to host the optimized model that you created with an optimization job. + """ + + recommended_inference_image: Optional[StrPipeVar] = Unassigned() + + +class ErrorInfo(Base): + """ + ErrorInfo + This is an error field object that contains the error code and the reason for an operation failure. + + Attributes + ---------------------- + code: The error code for an invalid or failed operation. + reason: The failure reason for the operation. + """ + + code: Optional[StrPipeVar] = Unassigned() + reason: Optional[StrPipeVar] = Unassigned() + + +class DescribePipelineDefinitionForExecutionResponse(Base): + """ + DescribePipelineDefinitionForExecutionResponse + + Attributes + ---------------------- + pipeline_definition: The JSON pipeline definition. + creation_time: The time when the pipeline was created. + """ + + pipeline_definition: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + + +class PipelineExperimentConfig(Base): + """ + PipelineExperimentConfig + Specifies the names of the experiment and trial created by a pipeline. + + Attributes + ---------------------- + experiment_name: The name of the experiment. + trial_name: The name of the trial. + """ + + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class SelectedStep(Base): + """ + SelectedStep + A step selected to run in selective execution mode. + + Attributes + ---------------------- + step_name: The name of the pipeline step. + """ + + step_name: StrPipeVar + + +class SelectiveExecutionConfig(Base): + """ + SelectiveExecutionConfig + The selective execution configuration applied to the pipeline run. + + Attributes + ---------------------- + source_pipeline_execution_arn: The ARN from a reference execution of the current pipeline. Used to copy input collaterals needed for the selected steps to run. The execution status of the pipeline can be either Failed or Success. This field is required if the steps you specify for SelectedSteps depend on output collaterals from any non-specified pipeline steps. For more information, see Selective Execution for Pipeline Steps. + selected_steps: A list of pipeline steps to run. All step(s) in all path(s) between two selected steps should be included. + """ + + selected_steps: List[SelectedStep] + source_pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + + +class MLflowConfiguration(Base): + """ + MLflowConfiguration + The MLflow configuration. + + Attributes + ---------------------- + mlflow_resource_arn: The Amazon Resource Name (ARN) of MLflow configuration resource. + mlflow_experiment_name: The name of the MLflow configuration. + """ + + mlflow_resource_arn: Optional[StrPipeVar] = Unassigned() + mlflow_experiment_name: Optional[StrPipeVar] = Unassigned() + + +class ServiceCatalogProvisionedProductDetails(Base): + """ + ServiceCatalogProvisionedProductDetails + Details of a provisioned service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog. + + Attributes + ---------------------- + provisioned_product_id: The ID of the provisioned product. + provisioned_product_status_message: The current status of the product. AVAILABLE - Stable state, ready to perform any operation. The most recent operation succeeded and completed. UNDER_CHANGE - Transitive state. Operations performed might not have valid results. Wait for an AVAILABLE status before performing operations. TAINTED - Stable state, ready to perform any operation. The stack has completed the requested operation but is not exactly what was requested. For example, a request to update to a new version failed and the stack rolled back to the current version. ERROR - An unexpected error occurred. The provisioned product exists but the stack is not running. For example, CloudFormation received a parameter value that was not valid and could not launch the stack. PLAN_IN_PROGRESS - Transitive state. The plan operations were performed to provision a new product, but resources have not yet been created. After reviewing the list of resources to be created, execute the plan. Wait for an AVAILABLE status before performing operations. + """ + + provisioned_product_id: Optional[StrPipeVar] = Unassigned() + provisioned_product_status_message: Optional[StrPipeVar] = Unassigned() + + +class TemplateProviderDetail(Base): + """ + TemplateProviderDetail + Details about a template provider configuration and associated provisioning information. + + Attributes + ---------------------- + cfn_template_provider_detail: Details about a CloudFormation template provider configuration and associated provisioning information. + """ + + cfn_template_provider_detail: Optional[CfnTemplateProviderDetail] = Unassigned() + + +class UltraServerSummary(Base): + """ + UltraServerSummary + A summary of UltraServer resources and their current status. + + Attributes + ---------------------- + ultra_server_type: The type of UltraServer, such as ml.u-p6e-gb200x72. + instance_type: The Amazon EC2 instance type used in the UltraServer. + ultra_server_count: The number of UltraServers of this type. + available_spare_instance_count: The number of available spare instances in the UltraServers. + unhealthy_instance_count: The total number of instances across all UltraServers of this type that are currently in an unhealthy state. + """ + + ultra_server_type: StrPipeVar + instance_type: StrPipeVar + ultra_server_count: Optional[int] = Unassigned() + available_spare_instance_count: Optional[int] = Unassigned() + unhealthy_instance_count: Optional[int] = Unassigned() + + +class SubscribedWorkteam(Base): + """ + SubscribedWorkteam + Describes a work team of a vendor that does the labelling job. + + Attributes + ---------------------- + workteam_arn: The Amazon Resource Name (ARN) of the vendor that you have subscribed. + marketplace_title: The title of the service provided by the vendor in the Amazon Marketplace. + seller_name: The name of the vendor in the Amazon Marketplace. + marketplace_description: The description of the vendor from the Amazon Marketplace. + listing_id: Marketplace product listing ID. + """ + + workteam_arn: StrPipeVar + marketplace_title: Optional[StrPipeVar] = Unassigned() + seller_name: Optional[StrPipeVar] = Unassigned() + marketplace_description: Optional[StrPipeVar] = Unassigned() + listing_id: Optional[StrPipeVar] = Unassigned() + + +class WarmPoolStatus(Base): + """ + WarmPoolStatus + Status and billing information about the warm pool. + + Attributes + ---------------------- + status: The status of the warm pool. InUse: The warm pool is in use for the training job. Available: The warm pool is available to reuse for a matching training job. Reused: The warm pool moved to a matching training job for reuse. Terminated: The warm pool is no longer available. Warm pools are unavailable if they are terminated by a user, terminated for a patch update, or terminated for exceeding the specified KeepAlivePeriodInSeconds. + resource_retained_billable_time_in_seconds: The billable time in seconds used by the warm pool. Billable time refers to the absolute wall-clock time. Multiply ResourceRetainedBillableTimeInSeconds by the number of instances (InstanceCount) in your training cluster to get the total compute time SageMaker bills you if you run warm pool training. The formula is as follows: ResourceRetainedBillableTimeInSeconds \* InstanceCount. + reused_by_job: The name of the matching training job that reused the warm pool. + """ + + status: StrPipeVar + resource_retained_billable_time_in_seconds: Optional[int] = Unassigned() + reused_by_job: Optional[StrPipeVar] = Unassigned() + + +class SecondaryStatusTransition(Base): + """ + SecondaryStatusTransition + An array element of SecondaryStatusTransitions for DescribeTrainingJob. It provides additional details about a status that the training job has transitioned through. A training job can be in one of several states, for example, starting, downloading, training, or uploading. Within each state, there are a number of intermediate states. For example, within the starting state, SageMaker could be starting the training job or launching the ML instances. These transitional states are referred to as the job's secondary status. + + Attributes + ---------------------- + status: Contains a secondary status information from a training job. Status might be one of the following secondary statuses: InProgress Starting - Starting the training job. Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes. Training - Training is in progress. Uploading - Training is complete and the model artifacts are being uploaded to the S3 location. Completed Completed - The training job has completed. Failed Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse. Stopped MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime. Stopped - The training job has stopped. Stopping Stopping - Stopping the training job. We no longer support the following secondary statuses: LaunchingMLInstances PreparingTrainingStack DownloadingTrainingImage + start_time: A timestamp that shows when the training job transitioned to the current secondary status state. + end_time: A timestamp that shows when the training job transitioned out of this secondary status state into another secondary status state or when the training job has ended. + status_message: A detailed description of the progress within a secondary status. SageMaker provides secondary statuses and status messages that apply to each of them: Starting Starting the training job. Launching requested ML instances. Insufficient capacity error from EC2 while launching instances, retrying! Launched instance was unhealthy, replacing it! Preparing the instances for training. Training Training image download completed. Training in progress. Status messages are subject to change. Therefore, we recommend not including them in code that programmatically initiates actions. For examples, don't use status messages in if statements. To have an overview of your training job's progress, view TrainingJobStatus and SecondaryStatus in DescribeTrainingJob, and StatusMessage together. For example, at the start of a training job, you might see the following: TrainingJobStatus - InProgress SecondaryStatus - Training StatusMessage - Downloading the training image + """ + + status: StrPipeVar + start_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + status_message: Optional[StrPipeVar] = Unassigned() + + +class MetricData(Base): + """ + MetricData + The name, value, and date and time of a metric that was emitted to Amazon CloudWatch. + + Attributes + ---------------------- + metric_name: The name of the metric. + value: The value of the metric. + timestamp: The date and time that the algorithm emitted the metric. + """ + + metric_name: Optional[StrPipeVar] = Unassigned() + value: Optional[float] = Unassigned() + timestamp: Optional[datetime.datetime] = Unassigned() + + +class ProfilerRuleEvaluationStatus(Base): + """ + ProfilerRuleEvaluationStatus + Information about the status of the rule evaluation. + + Attributes + ---------------------- + rule_configuration_name: The name of the rule configuration. + rule_evaluation_job_arn: The Amazon Resource Name (ARN) of the rule evaluation job. + rule_evaluation_status: Status of the rule evaluation. + status_details: Details from the rule evaluation. + last_modified_time: Timestamp when the rule evaluation status was last modified. + """ + + rule_configuration_name: Optional[StrPipeVar] = Unassigned() + rule_evaluation_job_arn: Optional[StrPipeVar] = Unassigned() + rule_evaluation_status: Optional[StrPipeVar] = Unassigned() + status_details: Optional[StrPipeVar] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class MlflowDetails(Base): + """ + MlflowDetails + The MLflow details of this job. + + Attributes + ---------------------- + mlflow_experiment_id: The MLflow experiment ID used for this job. + mlflow_run_id: The MLflow run ID used for this job. + """ + + mlflow_experiment_id: Optional[StrPipeVar] = Unassigned() + mlflow_run_id: Optional[StrPipeVar] = Unassigned() + + +class TrainingProgressInfo(Base): + """ + TrainingProgressInfo + The serverless training job progress information. + + Attributes + ---------------------- + total_step_count_per_epoch: The total step count per epoch. + current_step: The current step number. + current_epoch: The current epoch number. + max_epoch: The maximum number of epochs for this job. + """ + + total_step_count_per_epoch: Optional[int] = Unassigned() + current_step: Optional[int] = Unassigned() + current_epoch: Optional[int] = Unassigned() + max_epoch: Optional[int] = Unassigned() + + +class TrainingPlanExtension(Base): + """ + TrainingPlanExtension + Details about an extension to a training plan, including the offering ID, dates, status, and cost information. + + Attributes + ---------------------- + training_plan_extension_offering_id: The unique identifier of the extension offering that was used to create this extension. + extended_at: The timestamp when the extension was created. + start_date: The start date of the extension period. + end_date: The end date of the extension period. + status: The current status of the extension (e.g., Pending, Active, Scheduled, Failed, Expired). + payment_status: The payment processing status of the extension. + availability_zone: The Availability Zone of the extension. + availability_zone_id: The Availability Zone ID of the extension. + duration_hours: The duration of the extension in hours. + upfront_fee: The upfront fee for the extension. + currency_code: The currency code for the upfront fee (e.g., USD). + """ + + training_plan_extension_offering_id: StrPipeVar + extended_at: Optional[datetime.datetime] = Unassigned() + start_date: Optional[datetime.datetime] = Unassigned() + end_date: Optional[datetime.datetime] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + payment_status: Optional[StrPipeVar] = Unassigned() + availability_zone: Optional[StrPipeVar] = Unassigned() + availability_zone_id: Optional[StrPipeVar] = Unassigned() + duration_hours: Optional[int] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() + + +class ReservedCapacitySummary(Base): + """ + ReservedCapacitySummary + Details of a reserved capacity for the training plan. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + + Attributes + ---------------------- + reserved_capacity_arn: The Amazon Resource Name (ARN); of the reserved capacity. + reserved_capacity_type: The type of reserved capacity. + ultra_server_type: The type of UltraServer included in this reserved capacity, such as ml.u-p6e-gb200x72. + ultra_server_count: The number of UltraServers included in this reserved capacity. + instance_type: The instance type for the reserved capacity. + total_instance_count: The total number of instances in the reserved capacity. + status: The current status of the reserved capacity. + availability_zone: The availability zone for the reserved capacity. + duration_hours: The number of whole hours in the total duration for this reserved capacity. + duration_minutes: The additional minutes beyond whole hours in the total duration for this reserved capacity. + start_time: The start time of the reserved capacity. + end_time: The end time of the reserved capacity. + """ + + reserved_capacity_arn: StrPipeVar + instance_type: StrPipeVar + total_instance_count: int + status: StrPipeVar + reserved_capacity_type: Optional[StrPipeVar] = Unassigned() + ultra_server_type: Optional[StrPipeVar] = Unassigned() + ultra_server_count: Optional[int] = Unassigned() + availability_zone: Optional[StrPipeVar] = Unassigned() + duration_hours: Optional[int] = Unassigned() + duration_minutes: Optional[int] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + + +class TrialComponentSource(Base): + """ + TrialComponentSource + The Amazon Resource Name (ARN) and job type of the source of a trial component. + + Attributes + ---------------------- + source_arn: The source Amazon Resource Name (ARN). + source_type: The source job type. + """ + + source_arn: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + + +class TrialComponentMetricSummary(Base): + """ + TrialComponentMetricSummary + A summary of the metrics of a trial component. + + Attributes + ---------------------- + metric_name: The name of the metric. + source_arn: The Amazon Resource Name (ARN) of the source. + time_stamp: When the metric was last updated. + max: The maximum value of the metric. + min: The minimum value of the metric. + last: The most recent value of the metric. + count: The number of samples used to generate the metric. + avg: The average value of the metric. + std_dev: The standard deviation of the metric. + """ + + metric_name: Optional[StrPipeVar] = Unassigned() + source_arn: Optional[StrPipeVar] = Unassigned() + time_stamp: Optional[datetime.datetime] = Unassigned() + max: Optional[float] = Unassigned() + min: Optional[float] = Unassigned() + last: Optional[float] = Unassigned() + count: Optional[int] = Unassigned() + avg: Optional[float] = Unassigned() + std_dev: Optional[float] = Unassigned() + + +class TrialSource(Base): + """ + TrialSource + The source of the trial. + + Attributes + ---------------------- + source_arn: The Amazon Resource Name (ARN) of the source. + source_type: The source job type. + """ + + source_arn: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + + +class OidcConfigForResponse(Base): + """ + OidcConfigForResponse + Your OIDC IdP workforce configuration. + + Attributes + ---------------------- + client_id: The OIDC IdP client ID used to configure your private workforce. + issuer: The OIDC IdP issuer used to configure your private workforce. + authorization_endpoint: The OIDC IdP authorization endpoint used to configure your private workforce. + token_endpoint: The OIDC IdP token endpoint used to configure your private workforce. + user_info_endpoint: The OIDC IdP user information endpoint used to configure your private workforce. + logout_endpoint: The OIDC IdP logout endpoint used to configure your private workforce. + jwks_uri: The OIDC IdP JSON Web Key Set (Jwks) URI used to configure your private workforce. + scope: An array of string identifiers used to refer to the specific pieces of user data or claims that the client application wants to access. + authentication_request_extra_params: A string to string map of identifiers specific to the custom identity provider (IdP) being used. + """ + + client_id: Optional[StrPipeVar] = Unassigned() + issuer: Optional[StrPipeVar] = Unassigned() + authorization_endpoint: Optional[StrPipeVar] = Unassigned() + token_endpoint: Optional[StrPipeVar] = Unassigned() + user_info_endpoint: Optional[StrPipeVar] = Unassigned() + logout_endpoint: Optional[StrPipeVar] = Unassigned() + jwks_uri: Optional[StrPipeVar] = Unassigned() + scope: Optional[StrPipeVar] = Unassigned() + authentication_request_extra_params: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class WorkforceVpcConfigResponse(Base): + """ + WorkforceVpcConfigResponse + A VpcConfig object that specifies the VPC that you want your workforce to connect to. + + Attributes + ---------------------- + vpc_id: The ID of the VPC that the workforce uses for communication. + 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. + subnets: The ID of the subnets in the VPC that you want to connect. + vpc_endpoint_id: The IDs for the VPC service endpoints of your VPC workforce when it is created and updated. + """ + + vpc_id: StrPipeVar + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] + vpc_endpoint_id: Optional[StrPipeVar] = Unassigned() + + +class Workforce(Base): + """ + Workforce + A single private workforce, which is automatically created when you create your first private work team. You can create one private work force in each Amazon Web Services Region. By default, any workforce-related API operation used in a specific region will apply to the workforce created in that region. To learn how to create a private workforce, see Create a Private Workforce. + + Attributes + ---------------------- + workforce_name: The name of the private workforce. + workforce_arn: The Amazon Resource Name (ARN) of the private workforce. + last_updated_date: The most recent date that UpdateWorkforce was used to successfully add one or more IP address ranges (CIDRs) to a private workforce's allow list. + source_ip_config: A list of one to ten IP address ranges (CIDRs) to be added to the workforce allow list. By default, a workforce isn't restricted to specific IP addresses. + sub_domain: The subdomain for your OIDC Identity Provider. + cognito_config: The configuration of an Amazon Cognito workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool. + oidc_config: The configuration of an OIDC Identity Provider (IdP) private workforce. + create_date: The date that the workforce is created. + workforce_vpc_config: The configuration of a VPC workforce. + status: The status of your workforce. + failure_reason: The reason your workforce failed. + ip_address_type: The IP address type you specify - either IPv4 only or dualstack (IPv4 and IPv6) - to support your labeling workforce. + """ + + workforce_name: Union[StrPipeVar, object] + workforce_arn: StrPipeVar + last_updated_date: Optional[datetime.datetime] = Unassigned() + source_ip_config: Optional[SourceIpConfig] = Unassigned() + sub_domain: Optional[StrPipeVar] = Unassigned() + cognito_config: Optional[CognitoConfig] = Unassigned() + oidc_config: Optional[OidcConfigForResponse] = Unassigned() + create_date: Optional[datetime.datetime] = Unassigned() + workforce_vpc_config: Optional[WorkforceVpcConfigResponse] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + ip_address_type: Optional[StrPipeVar] = Unassigned() + + +class Workteam(Base): + """ + Workteam + Provides details about a labeling work team. + + Attributes + ---------------------- + workteam_name: The name of the work team. + member_definitions: A list of MemberDefinition objects that contains objects that identify the workers that make up the work team. Workforces can be created using Amazon Cognito or your own OIDC Identity Provider (IdP). For private workforces created using Amazon Cognito use CognitoMemberDefinition. For workforces created using your own OIDC identity provider (IdP) use OidcMemberDefinition. + workteam_arn: The Amazon Resource Name (ARN) that identifies the work team. + workforce_arn: The Amazon Resource Name (ARN) of the workforce. + product_listing_ids: The Amazon Marketplace identifier for a vendor's work team. + description: A description of the work team. + sub_domain: The URI of the labeling job's user interface. Workers open this URI to start labeling your data objects. + create_date: The date and time that the work team was created (timestamp). + last_updated_date: The date and time that the work team was last updated (timestamp). + notification_configuration: Configures SNS notifications of available or expiring work items for work teams. + worker_access_configuration: Describes any access constraints that have been defined for Amazon S3 resources. + """ + + workteam_name: Union[StrPipeVar, object] + member_definitions: List[MemberDefinition] + workteam_arn: StrPipeVar + description: StrPipeVar + workforce_arn: Optional[StrPipeVar] = Unassigned() + product_listing_ids: Optional[List[StrPipeVar]] = Unassigned() + sub_domain: Optional[StrPipeVar] = Unassigned() + create_date: Optional[datetime.datetime] = Unassigned() + last_updated_date: Optional[datetime.datetime] = Unassigned() + notification_configuration: Optional[NotificationConfiguration] = Unassigned() + worker_access_configuration: Optional[WorkerAccessConfiguration] = Unassigned() + + +class ProductionVariantServerlessUpdateConfig(Base): + """ + ProductionVariantServerlessUpdateConfig + Specifies the serverless update concurrency configuration for an endpoint variant. + + Attributes + ---------------------- + max_concurrency: The updated maximum number of concurrent invocations your serverless endpoint can process. + provisioned_concurrency: The updated amount of provisioned concurrency to allocate for the serverless endpoint. Should be less than or equal to MaxConcurrency. + """ + + max_concurrency: Optional[int] = Unassigned() + provisioned_concurrency: Optional[int] = Unassigned() + + +class DesiredWeightAndCapacity(Base): + """ + DesiredWeightAndCapacity + Specifies weight and capacity values for a production variant. + + Attributes + ---------------------- + variant_name: The name of the variant to update. + desired_weight: The variant's weight. + desired_instance_count: The variant's capacity. + serverless_update_config: Specifies the serverless update concurrency configuration for an endpoint variant. + """ + + variant_name: StrPipeVar + desired_weight: Optional[float] = Unassigned() + desired_instance_count: Optional[int] = Unassigned() + serverless_update_config: Optional[ProductionVariantServerlessUpdateConfig] = Unassigned() + + +class Device(Base): + """ + Device + Information of a particular device. + + Attributes + ---------------------- + device_name: The name of the device. + description: Description of the device. + iot_thing_name: Amazon Web Services Internet of Things (IoT) object name. + """ + + device_name: Union[StrPipeVar, object] + description: Optional[StrPipeVar] = Unassigned() + iot_thing_name: Optional[StrPipeVar] = Unassigned() + + +class DeviceDeploymentSummary(Base): + """ + DeviceDeploymentSummary + Contains information summarizing device details and deployment status. + + Attributes + ---------------------- + edge_deployment_plan_arn: The ARN of the edge deployment plan. + edge_deployment_plan_name: The name of the edge deployment plan. + stage_name: The name of the stage in the edge deployment plan. + deployed_stage_name: The name of the deployed stage. + device_fleet_name: The name of the fleet to which the device belongs to. + device_name: The name of the device. + device_arn: The ARN of the device. + device_deployment_status: The deployment status of the device. + device_deployment_status_message: The detailed error message for the deployoment status result. + description: The description of the device. + deployment_start_time: The time when the deployment on the device started. + """ + + edge_deployment_plan_arn: StrPipeVar + edge_deployment_plan_name: Union[StrPipeVar, object] + stage_name: StrPipeVar + device_name: Union[StrPipeVar, object] + device_arn: StrPipeVar + deployed_stage_name: Optional[StrPipeVar] = Unassigned() + device_fleet_name: Optional[Union[StrPipeVar, object]] = Unassigned() + device_deployment_status: Optional[StrPipeVar] = Unassigned() + device_deployment_status_message: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + deployment_start_time: Optional[datetime.datetime] = Unassigned() + + +class DeviceFleetSummary(Base): + """ + DeviceFleetSummary + Summary of the device fleet. + + Attributes + ---------------------- + device_fleet_arn: Amazon Resource Name (ARN) of the device fleet. + device_fleet_name: Name of the device fleet. + creation_time: Timestamp of when the device fleet was created. + last_modified_time: Timestamp of when the device fleet was last updated. + """ + + device_fleet_arn: StrPipeVar + device_fleet_name: Union[StrPipeVar, object] + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class DeviceStats(Base): + """ + DeviceStats + Status of devices. + + Attributes + ---------------------- + connected_device_count: The number of devices connected with a heartbeat. + registered_device_count: The number of registered devices. + """ + + connected_device_count: int + registered_device_count: int + + +class EdgeModelSummary(Base): + """ + EdgeModelSummary + Summary of model on edge device. + + Attributes + ---------------------- + model_name: The name of the model. + model_version: The version model. + """ + + model_name: Union[StrPipeVar, object] + model_version: StrPipeVar + + +class DeviceSummary(Base): + """ + DeviceSummary + Summary of the device. + + Attributes + ---------------------- + device_name: The unique identifier of the device. + device_arn: Amazon Resource Name (ARN) of the device. + description: A description of the device. + device_fleet_name: The name of the fleet the device belongs to. + iot_thing_name: The Amazon Web Services Internet of Things (IoT) object thing name associated with the device.. + registration_time: The timestamp of the last registration or de-reregistration. + latest_heartbeat: The last heartbeat received from the device. + models: Models on the device. + agent_version: Edge Manager agent version. + """ + + device_name: Union[StrPipeVar, object] + device_arn: StrPipeVar + description: Optional[StrPipeVar] = Unassigned() + device_fleet_name: Optional[Union[StrPipeVar, object]] = Unassigned() + iot_thing_name: Optional[StrPipeVar] = Unassigned() + registration_time: Optional[datetime.datetime] = Unassigned() + latest_heartbeat: Optional[datetime.datetime] = Unassigned() + models: Optional[List[EdgeModelSummary]] = Unassigned() + agent_version: Optional[StrPipeVar] = Unassigned() + + +class DomainDetails(Base): + """ + DomainDetails + The domain's details. + + Attributes + ---------------------- + domain_arn: The domain's Amazon Resource Name (ARN). + domain_id: The domain ID. + domain_name: The domain name. + status: The status. + creation_time: The creation time. + last_modified_time: The last modified time. + url: The domain's URL. + """ + + domain_arn: Optional[StrPipeVar] = Unassigned() + domain_id: Optional[StrPipeVar] = Unassigned() + domain_name: Optional[Union[StrPipeVar, object]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + url: Optional[StrPipeVar] = Unassigned() + + +class RStudioServerProDomainSettingsForUpdate(Base): + """ + RStudioServerProDomainSettingsForUpdate + A collection of settings that update the current configuration for the RStudioServerPro Domain-level app. + + Attributes + ---------------------- + domain_execution_role_arn: The execution role for the RStudioServerPro Domain-level app. + default_resource_spec + r_studio_connect_url: A URL pointing to an RStudio Connect server. + r_studio_package_manager_url: A URL pointing to an RStudio Package Manager server. + """ + + domain_execution_role_arn: StrPipeVar + default_resource_spec: Optional[ResourceSpec] = Unassigned() + r_studio_connect_url: Optional[StrPipeVar] = Unassigned() + r_studio_package_manager_url: Optional[StrPipeVar] = Unassigned() + + +class DomainSettingsForUpdate(Base): + """ + DomainSettingsForUpdate + A collection of Domain configuration settings to update. + + Attributes + ---------------------- + r_studio_server_pro_domain_settings_for_update: A collection of RStudioServerPro Domain-level app settings to update. A single RStudioServerPro application is created for a domain. + execution_role_identity_config: The configuration for attaching a SageMaker AI user profile name to the execution role as a sts:SourceIdentity key. This configuration can only be modified if there are no apps in the InService or Pending state. + security_group_ids: The security groups for the Amazon Virtual Private Cloud that the Domain uses for communication between Domain-level apps and user apps. + trusted_identity_propagation_settings: The Trusted Identity Propagation (TIP) settings for the SageMaker domain. These settings determine how user identities from IAM Identity Center are propagated through the domain to TIP enabled Amazon Web Services services. + docker_settings: A collection of settings that configure the domain's Docker interaction. + amazon_q_settings: A collection of settings that configure the Amazon Q experience within the domain. + unified_studio_settings: The settings that apply to an SageMaker AI domain when you use it in Amazon SageMaker Unified Studio. + ip_address_type: The IP address type for the domain. 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. + """ + + r_studio_server_pro_domain_settings_for_update: Optional[ + RStudioServerProDomainSettingsForUpdate + ] = Unassigned() + execution_role_identity_config: Optional[StrPipeVar] = Unassigned() + security_group_ids: Optional[List[StrPipeVar]] = Unassigned() + trusted_identity_propagation_settings: Optional[TrustedIdentityPropagationSettings] = ( + Unassigned() + ) + docker_settings: Optional[DockerSettings] = Unassigned() + amazon_q_settings: Optional[AmazonQSettings] = Unassigned() + unified_studio_settings: Optional[UnifiedStudioSettings] = Unassigned() + ip_address_type: Optional[StrPipeVar] = Unassigned() + + +class PredefinedMetricSpecification(Base): + """ + PredefinedMetricSpecification + A specification for a predefined metric. + + Attributes + ---------------------- + predefined_metric_type: The metric type. You can only apply SageMaker metric types to SageMaker endpoints. + """ + + predefined_metric_type: Optional[StrPipeVar] = Unassigned() + + +class MetricSpecification(Base): + """ + MetricSpecification + An object containing information about a metric. + + Attributes + ---------------------- + predefined: Information about a predefined metric. + customized: Information about a customized metric. + """ + + predefined: Optional[PredefinedMetricSpecification] = Unassigned() + customized: Optional[CustomizedMetricSpecification] = Unassigned() + + +class TargetTrackingScalingPolicyConfiguration(Base): + """ + TargetTrackingScalingPolicyConfiguration + A target tracking scaling policy. Includes support for predefined or customized metrics. When using the PutScalingPolicy API, this parameter is required when you are creating a policy with the policy type TargetTrackingScaling. + + Attributes + ---------------------- + metric_specification: An object containing information about a metric. + target_value: The recommended target value to specify for the metric when creating a scaling policy. + """ + + metric_specification: Optional[MetricSpecification] = Unassigned() + target_value: Optional[float] = Unassigned() + + +class ScalingPolicy(Base): + """ + ScalingPolicy + An object containing a recommended scaling policy. + + Attributes + ---------------------- + target_tracking: A target tracking scaling policy. Includes support for predefined or customized metrics. + """ + + target_tracking: Optional[TargetTrackingScalingPolicyConfiguration] = Unassigned() + + +class DynamicScalingConfiguration(Base): + """ + DynamicScalingConfiguration + An object with the recommended values for you to specify when creating an autoscaling policy. + + Attributes + ---------------------- + min_capacity: The recommended minimum capacity to specify for your autoscaling policy. + max_capacity: The recommended maximum capacity to specify for your autoscaling policy. + scale_in_cooldown: The recommended scale in cooldown time for your autoscaling policy. + scale_out_cooldown: The recommended scale out cooldown time for your autoscaling policy. + scaling_policies: An object of the scaling policies for each metric. + """ + + min_capacity: Optional[int] = Unassigned() + max_capacity: Optional[int] = Unassigned() + scale_in_cooldown: Optional[int] = Unassigned() + scale_out_cooldown: Optional[int] = Unassigned() + scaling_policies: Optional[List[ScalingPolicy]] = Unassigned() + + +class EMRStepMetadata(Base): + """ + EMRStepMetadata + The configurations and outcomes of an Amazon EMR step execution. + + Attributes + ---------------------- + cluster_id: The identifier of the EMR cluster. + step_id: The identifier of the EMR cluster step. + step_name: The name of the EMR cluster step. + log_file_path: The path to the log file where the cluster step's failure root cause is recorded. + """ + + cluster_id: Optional[StrPipeVar] = Unassigned() + step_id: Optional[StrPipeVar] = Unassigned() + step_name: Optional[StrPipeVar] = Unassigned() + log_file_path: Optional[StrPipeVar] = Unassigned() + + +class Edge(Base): + """ + Edge + A directed edge connecting two lineage entities. + + Attributes + ---------------------- + source_arn: The Amazon Resource Name (ARN) of the source lineage entity of the directed edge. + destination_arn: The Amazon Resource Name (ARN) of the destination lineage entity of the directed edge. + association_type: The type of the Association(Edge) between the source and destination. For example ContributedTo, Produced, or DerivedFrom. + """ + + source_arn: Optional[StrPipeVar] = Unassigned() + destination_arn: Optional[StrPipeVar] = Unassigned() + association_type: Optional[StrPipeVar] = Unassigned() + + +class EdgeDeploymentPlanSummary(Base): + """ + EdgeDeploymentPlanSummary + Contains information summarizing an edge deployment plan. + + Attributes + ---------------------- + edge_deployment_plan_arn: The ARN of the edge deployment plan. + edge_deployment_plan_name: The name of the edge deployment plan. + device_fleet_name: The name of the device fleet used for the deployment. + edge_deployment_success: The number of edge devices with the successful deployment. + edge_deployment_pending: The number of edge devices yet to pick up the deployment, or in progress. + edge_deployment_failed: The number of edge devices that failed the deployment. + creation_time: The time when the edge deployment plan was created. + last_modified_time: The time when the edge deployment plan was last updated. + """ + + edge_deployment_plan_arn: StrPipeVar + edge_deployment_plan_name: Union[StrPipeVar, object] + device_fleet_name: Union[StrPipeVar, object] + edge_deployment_success: int + edge_deployment_pending: int + edge_deployment_failed: int + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class EdgeModelStat(Base): + """ + EdgeModelStat + Status of edge devices with this model. + + Attributes + ---------------------- + model_name: The name of the model. + model_version: The model version. + offline_device_count: The number of devices that have this model version and do not have a heart beat. + connected_device_count: The number of devices that have this model version and have a heart beat. + active_device_count: The number of devices that have this model version, a heart beat, and are currently running. + sampling_device_count: The number of devices with this model version and are producing sample data. + """ + + model_name: Union[StrPipeVar, object] + model_version: StrPipeVar + offline_device_count: int + connected_device_count: int + active_device_count: int + sampling_device_count: int + + +class EdgePackagingJobSummary(Base): + """ + EdgePackagingJobSummary + Summary of edge packaging job. + + Attributes + ---------------------- + edge_packaging_job_arn: The Amazon Resource Name (ARN) of the edge packaging job. + edge_packaging_job_name: The name of the edge packaging job. + edge_packaging_job_status: The status of the edge packaging job. + compilation_job_name: The name of the SageMaker Neo compilation job. + model_name: The name of the model. + model_version: The version of the model. + creation_time: The timestamp of when the job was created. + last_modified_time: The timestamp of when the edge packaging job was last updated. + """ + + edge_packaging_job_arn: StrPipeVar + edge_packaging_job_name: Union[StrPipeVar, object] + edge_packaging_job_status: StrPipeVar + compilation_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_version: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class MonitoringSchedule(Base): + """ + MonitoringSchedule + A schedule for a model monitoring job. For information about model monitor, see Amazon SageMaker Model Monitor. + + Attributes + ---------------------- + monitoring_schedule_arn: The Amazon Resource Name (ARN) of the monitoring schedule. + monitoring_schedule_name: The name of the monitoring schedule. + monitoring_schedule_status: The status of the monitoring schedule. This can be one of the following values. PENDING - The schedule is pending being created. FAILED - The schedule failed. SCHEDULED - The schedule was successfully created. STOPPED - The schedule was stopped. + monitoring_type: The type of the monitoring job definition to schedule. + failure_reason: If the monitoring schedule failed, the reason it failed. + creation_time: The time that the monitoring schedule was created. + last_modified_time: The last time the monitoring schedule was changed. + monitoring_schedule_config + endpoint_name: The endpoint that hosts the model being monitored. + last_monitoring_execution_summary + tags: A list of the tags associated with the monitoring schedlue. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + """ + + monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() + monitoring_schedule_name: Optional[Union[StrPipeVar, object]] = Unassigned() + monitoring_schedule_status: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + monitoring_schedule_config: Optional[MonitoringScheduleConfig] = Unassigned() + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class Endpoint(Base): + """ + Endpoint + A hosted endpoint for real-time inference. + + Attributes + ---------------------- + endpoint_name: The name of the endpoint. + endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. + endpoint_config_name: The endpoint configuration associated with the endpoint. + production_variants: A list of the production variants hosted on the endpoint. Each production variant is a model. + data_capture_config + endpoint_status: The status of the endpoint. + failure_reason: If the endpoint failed, the reason it failed. + creation_time: The time that the endpoint was created. + last_modified_time: The last time the endpoint was modified. + monitoring_schedules: A list of monitoring schedules for the endpoint. For information about model monitoring, see Amazon SageMaker Model Monitor. + tags: A list of the tags associated with the endpoint. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + shadow_production_variants: A list of the shadow variants hosted on the endpoint. Each shadow variant is a model in shadow mode with production traffic replicated from the production variant. + """ + + endpoint_name: Union[StrPipeVar, object] + endpoint_arn: StrPipeVar + endpoint_config_name: Union[StrPipeVar, object] + endpoint_status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + production_variants: Optional[List[ProductionVariantSummary]] = Unassigned() + data_capture_config: Optional[DataCaptureConfigSummary] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + monitoring_schedules: Optional[List[MonitoringSchedule]] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + shadow_production_variants: Optional[List[ProductionVariantSummary]] = Unassigned() + + +class EndpointConfigStepMetadata(Base): + """ + EndpointConfigStepMetadata + Metadata for an endpoint configuration step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the endpoint configuration used in the step. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class EndpointConfigSummary(Base): + """ + EndpointConfigSummary + Provides summary information for an endpoint configuration. + + Attributes + ---------------------- + endpoint_config_name: The name of the endpoint configuration. + endpoint_config_arn: The Amazon Resource Name (ARN) of the endpoint configuration. + creation_time: A timestamp that shows when the endpoint configuration was created. + """ + + endpoint_config_name: Union[StrPipeVar, object] + endpoint_config_arn: StrPipeVar + creation_time: datetime.datetime + + +class EndpointStepMetadata(Base): + """ + EndpointStepMetadata + Metadata for an endpoint step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the endpoint in the step. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class EndpointSummary(Base): + """ + EndpointSummary + Provides summary information for an endpoint. + + Attributes + ---------------------- + endpoint_name: The name of the endpoint. + endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. + creation_time: A timestamp that shows when the endpoint was created. + last_modified_time: A timestamp that shows when the endpoint was last modified. + endpoint_status: The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. To get a list of endpoints with a specified status, use the StatusEquals filter with a call to ListEndpoints. + """ + + endpoint_name: Union[StrPipeVar, object] + endpoint_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + endpoint_status: StrPipeVar + + +class Experiment(Base): + """ + Experiment + The properties of an experiment as returned by the Search API. For information about experiments, see the CreateExperiment API. + + Attributes + ---------------------- + experiment_name: The name of the experiment. + experiment_arn: The Amazon Resource Name (ARN) of the experiment. + display_name: The name of the experiment as displayed. If DisplayName isn't specified, ExperimentName is displayed. + source + description: The description of the experiment. + creation_time: When the experiment was created. + created_by: Who created the experiment. + last_modified_time: When the experiment was last modified. + last_modified_by + tags: The list of tags that are associated with the experiment. You can use Search API to search on the tags. + """ + + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + experiment_arn: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + source: Optional[ExperimentSource] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class ExperimentSummary(Base): + """ + ExperimentSummary + A summary of the properties of an experiment. To get the complete set of properties, call the DescribeExperiment API and provide the ExperimentName. + + Attributes + ---------------------- + experiment_arn: The Amazon Resource Name (ARN) of the experiment. + experiment_name: The name of the experiment. + display_name: The name of the experiment as displayed. If DisplayName isn't specified, ExperimentName is displayed. + experiment_source + creation_time: When the experiment was created. + last_modified_time: When the experiment was last modified. + """ + + experiment_arn: Optional[StrPipeVar] = Unassigned() + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + experiment_source: Optional[ExperimentSource] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class FailStepMetadata(Base): + """ + FailStepMetadata + The container for the metadata for Fail step. + + Attributes + ---------------------- + error_message: A message that you define and then is processed and rendered by the Fail step when the error occurs. + """ + + error_message: Optional[StrPipeVar] = Unassigned() + + +class FeatureGroup(Base): + """ + FeatureGroup + Amazon SageMaker Feature Store stores features in a collection called Feature Group. A Feature Group can be visualized as a table which has rows, with a unique identifier for each row where each column in the table is a feature. In principle, a Feature Group is composed of features and values per features. + + Attributes + ---------------------- + feature_group_arn: The Amazon Resource Name (ARN) of a FeatureGroup. + feature_group_name: The name of the FeatureGroup. + record_identifier_feature_name: The name of the Feature whose value uniquely identifies a Record defined in the FeatureGroup FeatureDefinitions. + event_time_feature_name: The name of the feature that stores the EventTime of a Record in a FeatureGroup. A EventTime is point in time when a new event occurs that corresponds to the creation or update of a Record in FeatureGroup. All Records in the FeatureGroup must have a corresponding EventTime. + feature_definitions: A list of Features. Each Feature must include a FeatureName and a FeatureType. Valid FeatureTypes are Integral, Fractional and String. FeatureNames cannot be any of the following: is_deleted, write_time, api_invocation_time. You can create up to 2,500 FeatureDefinitions per FeatureGroup. + creation_time: The time a FeatureGroup was created. + last_modified_time: A timestamp indicating the last time you updated the feature group. + online_store_config + offline_store_config + role_arn: The Amazon Resource Name (ARN) of the IAM execution role used to create the feature group. + feature_group_status: A FeatureGroup status. + offline_store_status + last_update_status: A value that indicates whether the feature group was updated successfully. + failure_reason: The reason that the FeatureGroup failed to be replicated in the OfflineStore. This is failure may be due to a failure to create a FeatureGroup in or delete a FeatureGroup from the OfflineStore. + description: A free form description of a FeatureGroup. + tags: Tags used to define a FeatureGroup. + """ + + feature_group_arn: Optional[StrPipeVar] = Unassigned() + feature_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + record_identifier_feature_name: Optional[StrPipeVar] = Unassigned() + event_time_feature_name: Optional[StrPipeVar] = Unassigned() + feature_definitions: Optional[List[FeatureDefinition]] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + online_store_config: Optional[OnlineStoreConfig] = Unassigned() + offline_store_config: Optional[OfflineStoreConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + feature_group_status: Optional[StrPipeVar] = Unassigned() + offline_store_status: Optional[OfflineStoreStatus] = Unassigned() + last_update_status: Optional[LastUpdateStatus] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class FeatureGroupSummary(Base): + """ + FeatureGroupSummary + The name, ARN, CreationTime, FeatureGroup values, LastUpdatedTime and EnableOnlineStorage status of a FeatureGroup. + + Attributes + ---------------------- + feature_group_name: The name of FeatureGroup. + feature_group_arn: Unique identifier for the FeatureGroup. + creation_time: A timestamp indicating the time of creation time of the FeatureGroup. + feature_group_status: The status of a FeatureGroup. The status can be any of the following: Creating, Created, CreateFail, Deleting or DetailFail. + offline_store_status: Notifies you if replicating data into the OfflineStore has failed. Returns either: Active or Blocked. + """ + + feature_group_name: Union[StrPipeVar, object] + feature_group_arn: StrPipeVar + creation_time: datetime.datetime + feature_group_status: Optional[StrPipeVar] = Unassigned() + offline_store_status: Optional[OfflineStoreStatus] = Unassigned() + + +class FeatureMetadata(Base): + """ + FeatureMetadata + The metadata for a feature. It can either be metadata that you specify, or metadata that is updated automatically. + + Attributes + ---------------------- + feature_group_arn: The Amazon Resource Number (ARN) of the feature group. + feature_group_name: The name of the feature group containing the feature. + feature_name: The name of feature. + feature_type: The data type of the feature. + creation_time: A timestamp indicating when the feature was created. + last_modified_time: A timestamp indicating when the feature was last modified. + description: An optional description that you specify to better describe the feature. + parameters: Optional key-value pairs that you specify to better describe the feature. + """ + + feature_group_arn: Optional[StrPipeVar] = Unassigned() + feature_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + feature_name: Optional[StrPipeVar] = Unassigned() + feature_type: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + parameters: Optional[List[FeatureParameter]] = Unassigned() + + +class Filter(Base): + """ + Filter + A conditional statement for a search expression that includes a resource property, a Boolean operator, and a value. Resources that match the statement are returned in the results from the Search API. If you specify a Value, but not an Operator, SageMaker uses the equals operator. In search, there are several property types: Metrics To define a metric filter, enter a value using the form "Metrics.<name>", where <name> is a metric name. For example, the following filter searches for training jobs with an "accuracy" metric greater than "0.9": { "Name": "Metrics.accuracy", "Operator": "GreaterThan", "Value": "0.9" } HyperParameters To define a hyperparameter filter, enter a value with the form "HyperParameters.<name>". Decimal hyperparameter values are treated as a decimal in a comparison if the specified Value is also a decimal value. If the specified Value is an integer, the decimal hyperparameter values are treated as integers. For example, the following filter is satisfied by training jobs with a "learning_rate" hyperparameter that is less than "0.5": { "Name": "HyperParameters.learning_rate", "Operator": "LessThan", "Value": "0.5" } Tags To define a tag filter, enter a value with the form Tags.<key>. + + Attributes + ---------------------- + name: A resource property name. For example, TrainingJobName. For valid property names, see SearchRecord. You must specify a valid property for the resource. + operator: A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the following values: Equals The value of Name equals Value. NotEquals The value of Name doesn't equal Value. Exists The Name property exists. NotExists The Name property does not exist. GreaterThan The value of Name is greater than Value. Not supported for text properties. GreaterThanOrEqualTo The value of Name is greater than or equal to Value. Not supported for text properties. LessThan The value of Name is less than Value. Not supported for text properties. LessThanOrEqualTo The value of Name is less than or equal to Value. Not supported for text properties. In The value of Name is one of the comma delimited strings in Value. Only supported for text properties. Contains The value of Name contains the string Value. Only supported for text properties. A SearchExpression can include the Contains operator multiple times when the value of Name is one of the following: Experiment.DisplayName Experiment.ExperimentName Experiment.Tags Trial.DisplayName Trial.TrialName Trial.Tags TrialComponent.DisplayName TrialComponent.TrialComponentName TrialComponent.Tags TrialComponent.InputArtifacts TrialComponent.OutputArtifacts A SearchExpression can include only one Contains operator for all other values of Name. In these cases, if you include multiple Contains operators in the SearchExpression, the result is the following error message: "'CONTAINS' operator usage limit of 1 exceeded." + value: A value used with Name and Operator to determine which resources satisfy the filter's condition. For numerical properties, Value must be an integer or floating-point decimal. For timestamp properties, Value must be an ISO 8601 date-time string of the following format: YYYY-mm-dd'T'HH:MM:SS. + """ + + name: StrPipeVar + operator: Optional[StrPipeVar] = Unassigned() + value: Optional[StrPipeVar] = Unassigned() + + +class FlowDefinitionSummary(Base): + """ + FlowDefinitionSummary + Contains summary information about the flow definition. + + Attributes + ---------------------- + flow_definition_name: The name of the flow definition. + flow_definition_arn: The Amazon Resource Name (ARN) of the flow definition. + flow_definition_status: The status of the flow definition. Valid values: + creation_time: The timestamp when SageMaker created the flow definition. + failure_reason: The reason why the flow definition creation failed. A failure reason is returned only when the flow definition status is Failed. + """ + + flow_definition_name: Union[StrPipeVar, object] + flow_definition_arn: StrPipeVar + flow_definition_status: StrPipeVar + creation_time: datetime.datetime + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class GetDeviceFleetReportResponse(Base): + """ + GetDeviceFleetReportResponse + + Attributes + ---------------------- + device_fleet_arn: The Amazon Resource Name (ARN) of the device. + device_fleet_name: The name of the fleet. + output_config: The output configuration for storing sample data collected by the fleet. + description: Description of the fleet. + report_generated: Timestamp of when the report was generated. + device_stats: Status of devices. + agent_versions: The versions of Edge Manager agent deployed on the fleet. + model_stats: Status of model on device. + """ + + device_fleet_arn: StrPipeVar + device_fleet_name: Union[StrPipeVar, object] + output_config: Optional[EdgeOutputConfig] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + report_generated: Optional[datetime.datetime] = Unassigned() + device_stats: Optional[DeviceStats] = Unassigned() + agent_versions: Optional[List[AgentVersion]] = Unassigned() + model_stats: Optional[List[EdgeModelStat]] = Unassigned() + + +class GetLineageGroupPolicyResponse(Base): + """ + GetLineageGroupPolicyResponse + + Attributes + ---------------------- + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group. + resource_policy: The resource policy that gives access to the lineage group in another account. + """ + + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + resource_policy: Optional[StrPipeVar] = Unassigned() + + +class ScalingPolicyObjective(Base): + """ + ScalingPolicyObjective + An object where you specify the anticipated traffic pattern for an endpoint. + + Attributes + ---------------------- + min_invocations_per_minute: The minimum number of expected requests to your endpoint per minute. + max_invocations_per_minute: The maximum number of expected requests to your endpoint per minute. + """ + + min_invocations_per_minute: Optional[int] = Unassigned() + max_invocations_per_minute: Optional[int] = Unassigned() + + +class ScalingPolicyMetric(Base): + """ + ScalingPolicyMetric + The metric for a scaling policy. + + Attributes + ---------------------- + invocations_per_instance: The number of invocations sent to a model, normalized by InstanceCount in each ProductionVariant. 1/numberOfInstances is sent as the value on each request, where numberOfInstances is the number of active instances for the ProductionVariant behind the endpoint at the time of the request. + model_latency: The interval of time taken by a model to respond as viewed from SageMaker. This interval includes the local communication times taken to send the request and to fetch the response from the container of a model and the time taken to complete the inference in the container. + """ + + invocations_per_instance: Optional[int] = Unassigned() + model_latency: Optional[int] = Unassigned() + + +class PropertyNameQuery(Base): + """ + PropertyNameQuery + Part of the SuggestionQuery type. Specifies a hint for retrieving property names that begin with the specified text. + + Attributes + ---------------------- + property_name_hint: Text that begins a property's name. + """ + + property_name_hint: StrPipeVar + + +class SuggestionQuery(Base): + """ + SuggestionQuery + Specified in the GetSearchSuggestions request. Limits the property names that are included in the response. + + Attributes + ---------------------- + property_name_query: Defines a property name hint. Only property names that begin with the specified hint are included in the response. + """ + + property_name_query: Optional[PropertyNameQuery] = Unassigned() + + +class PropertyNameSuggestion(Base): + """ + PropertyNameSuggestion + A property name returned from a GetSearchSuggestions call that specifies a value in the PropertyNameQuery field. + + Attributes + ---------------------- + property_name: A suggested property name based on what you entered in the search textbox in the SageMaker console. + """ + + property_name: Optional[StrPipeVar] = Unassigned() + + +class GitConfigForUpdate(Base): + """ + GitConfigForUpdate + Specifies configuration details for a Git repository when the repository is updated. + + Attributes + ---------------------- + secret_arn: The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of AWSCURRENT and must be in the following format: {"username": UserName, "password": Password} + """ + + secret_arn: Optional[StrPipeVar] = Unassigned() + + +class HubContentInfo(Base): + """ + HubContentInfo + Information about hub content. + + Attributes + ---------------------- + hub_content_name: The name of the hub content. + hub_content_arn: The Amazon Resource Name (ARN) of the hub content. + sage_maker_public_hub_content_arn: The ARN of the public hub content. + hub_content_version: The version of the hub content. + hub_content_type: The type of hub content. + document_schema_version: The version of the hub content document schema. + hub_content_display_name: The display name of the hub content. + hub_content_description: A description of the hub content. + support_status: The support status of the hub content. + hub_content_search_keywords: The searchable keywords for the hub content. + hub_content_status: The status of the hub content. + creation_time: The date and time that the hub content was created. + original_creation_time: The date and time when the hub content was originally created, before any updates or revisions. + """ + + hub_content_name: Union[StrPipeVar, object] + hub_content_arn: StrPipeVar + hub_content_version: StrPipeVar + hub_content_type: StrPipeVar + document_schema_version: StrPipeVar + hub_content_status: StrPipeVar + creation_time: datetime.datetime + sage_maker_public_hub_content_arn: Optional[StrPipeVar] = Unassigned() + hub_content_display_name: Optional[StrPipeVar] = Unassigned() + hub_content_description: Optional[StrPipeVar] = Unassigned() + support_status: Optional[StrPipeVar] = Unassigned() + hub_content_search_keywords: Optional[List[StrPipeVar]] = Unassigned() + original_creation_time: Optional[datetime.datetime] = Unassigned() + + +class HubInfo(Base): + """ + HubInfo + Information about a hub. + + Attributes + ---------------------- + hub_name: The name of the hub. + hub_arn: The Amazon Resource Name (ARN) of the hub. + hub_display_name: The display name of the hub. + hub_description: A description of the hub. + hub_search_keywords: The searchable keywords for the hub. + hub_status: The status of the hub. + creation_time: The date and time that the hub was created. + last_modified_time: The date and time that the hub was last modified. + """ + + hub_name: Union[StrPipeVar, object] + hub_arn: StrPipeVar + hub_status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + hub_display_name: Optional[StrPipeVar] = Unassigned() + hub_description: Optional[StrPipeVar] = Unassigned() + hub_search_keywords: Optional[List[StrPipeVar]] = Unassigned() + + +class HumanTaskUiSummary(Base): + """ + HumanTaskUiSummary + Container for human task user interface information. + + Attributes + ---------------------- + human_task_ui_name: The name of the human task user interface. + human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface. + creation_time: A timestamp when SageMaker created the human task user interface. + """ + + human_task_ui_name: Union[StrPipeVar, object] + human_task_ui_arn: StrPipeVar + creation_time: datetime.datetime + + +class HyperParameterTuningJobSearchEntity(Base): + """ + HyperParameterTuningJobSearchEntity + An entity returned by the SearchRecord API containing the properties of a hyperparameter tuning job. + + Attributes + ---------------------- + hyper_parameter_tuning_job_name: The name of a hyperparameter tuning job. + hyper_parameter_tuning_job_arn: The Amazon Resource Name (ARN) of a hyperparameter tuning job. + hyper_parameter_tuning_job_config + training_job_definition + training_job_definitions: The job definitions included in a hyperparameter tuning job. + hyper_parameter_tuning_job_status: The status of a hyperparameter tuning job. + creation_time: The time that a hyperparameter tuning job was created. + hyper_parameter_tuning_end_time: The time that a hyperparameter tuning job ended. + last_modified_time: The time that a hyperparameter tuning job was last modified. + training_job_status_counters + objective_status_counters + best_training_job + overall_best_training_job + warm_start_config + failure_reason: The error that was created when a hyperparameter tuning job failed. + tuning_job_completion_details: Information about either a current or completed hyperparameter tuning job. + consumed_resources: The total amount of resources consumed by a hyperparameter tuning job. + tags: The tags associated with a hyperparameter tuning job. For more information see Tagging Amazon Web Services resources. + """ + + hyper_parameter_tuning_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + hyper_parameter_tuning_job_arn: Optional[StrPipeVar] = Unassigned() + hyper_parameter_tuning_job_config: Optional[HyperParameterTuningJobConfig] = Unassigned() + training_job_definition: Optional[HyperParameterTrainingJobDefinition] = Unassigned() + training_job_definitions: Optional[List[HyperParameterTrainingJobDefinition]] = Unassigned() + hyper_parameter_tuning_job_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + hyper_parameter_tuning_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + training_job_status_counters: Optional[TrainingJobStatusCounters] = Unassigned() + objective_status_counters: Optional[ObjectiveStatusCounters] = Unassigned() + best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() + overall_best_training_job: Optional[HyperParameterTrainingJobSummary] = Unassigned() + warm_start_config: Optional[HyperParameterTuningJobWarmStartConfig] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + tuning_job_completion_details: Optional[HyperParameterTuningJobCompletionDetails] = Unassigned() + consumed_resources: Optional[HyperParameterTuningJobConsumedResources] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class HyperParameterTuningJobSummary(Base): + """ + HyperParameterTuningJobSummary + Provides summary information about a hyperparameter tuning job. + + Attributes + ---------------------- + hyper_parameter_tuning_job_name: The name of the tuning job. + hyper_parameter_tuning_job_arn: The Amazon Resource Name (ARN) of the tuning job. + hyper_parameter_tuning_job_status: The status of the tuning job. + strategy: Specifies the search strategy hyperparameter tuning uses to choose which hyperparameters to evaluate at each iteration. + creation_time: The date and time that the tuning job was created. + hyper_parameter_tuning_end_time: The date and time that the tuning job ended. + last_modified_time: The date and time that the tuning job was modified. + training_job_status_counters: The TrainingJobStatusCounters object that specifies the numbers of training jobs, categorized by status, that this tuning job launched. + objective_status_counters: The ObjectiveStatusCounters object that specifies the numbers of training jobs, categorized by objective metric status, that this tuning job launched. + resource_limits: The ResourceLimits object that specifies the maximum number of training jobs and parallel training jobs allowed for this tuning job. + """ + + hyper_parameter_tuning_job_name: Union[StrPipeVar, object] + hyper_parameter_tuning_job_arn: StrPipeVar + hyper_parameter_tuning_job_status: StrPipeVar + strategy: StrPipeVar + creation_time: datetime.datetime + training_job_status_counters: TrainingJobStatusCounters + objective_status_counters: ObjectiveStatusCounters + hyper_parameter_tuning_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + resource_limits: Optional[ResourceLimits] = Unassigned() + + +class Image(Base): + """ + Image + A SageMaker AI image. A SageMaker AI image represents a set of container images that are derived from a common base container image. Each of these container images is represented by a SageMaker AI ImageVersion. + + Attributes + ---------------------- + creation_time: When the image was created. + description: The description of the image. + display_name: The name of the image as displayed. + failure_reason: When a create, update, or delete operation fails, the reason for the failure. + image_arn: The ARN of the image. + image_name: The name of the image. + image_status: The status of the image. + last_modified_time: When the image was last modified. + """ + + creation_time: datetime.datetime + image_arn: StrPipeVar + image_name: Union[StrPipeVar, object] + image_status: StrPipeVar + last_modified_time: datetime.datetime + description: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class ImageVersion(Base): + """ + ImageVersion + A version of a SageMaker AI Image. A version represents an existing container image. + + Attributes + ---------------------- + creation_time: When the version was created. + failure_reason: When a create or delete operation fails, the reason for the failure. + image_arn: The ARN of the image the version is based on. + image_version_arn: The ARN of the version. + image_version_status: The status of the version. + last_modified_time: When the version was last modified. + version: The version number. + """ + + creation_time: datetime.datetime + image_arn: StrPipeVar + image_version_arn: StrPipeVar + image_version_status: StrPipeVar + last_modified_time: datetime.datetime + version: int + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class InferenceComponentMetadata(Base): + """ + InferenceComponentMetadata + The metadata of the inference component. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the inference component. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class InferenceComponentSummary(Base): + """ + InferenceComponentSummary + A summary of the properties of an inference component. + + Attributes + ---------------------- + creation_time: The time when the inference component was created. + inference_component_arn: The Amazon Resource Name (ARN) of the inference component. + inference_component_name: The name of the inference component. + endpoint_arn: The Amazon Resource Name (ARN) of the endpoint that hosts the inference component. + endpoint_name: The name of the endpoint that hosts the inference component. + variant_name: The name of the production variant that hosts the inference component. + inference_component_status: The status of the inference component. + last_modified_time: The time when the inference component was last updated. + """ + + creation_time: datetime.datetime + inference_component_arn: StrPipeVar + inference_component_name: Union[StrPipeVar, object] + endpoint_arn: StrPipeVar + endpoint_name: Union[StrPipeVar, object] + variant_name: StrPipeVar + last_modified_time: datetime.datetime + inference_component_status: Optional[StrPipeVar] = Unassigned() + + +class InferenceExperimentSummary(Base): + """ + InferenceExperimentSummary + Lists a summary of properties of an inference experiment. + + Attributes + ---------------------- + name: The name of the inference experiment. + type: The type of the inference experiment. + schedule: The duration for which the inference experiment ran or will run. The maximum duration that you can set for an inference experiment is 30 days. + status: The status of the inference experiment. + status_reason: The error message for the inference experiment status result. + description: The description of the inference experiment. + creation_time: The timestamp at which the inference experiment was created. + completion_time: The timestamp at which the inference experiment was completed. + last_modified_time: The timestamp when you last modified the inference experiment. + role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. + """ + + name: StrPipeVar + type: StrPipeVar + status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + schedule: Optional[InferenceExperimentSchedule] = Unassigned() + status_reason: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + completion_time: Optional[datetime.datetime] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + + +class InferenceRecommendationsJob(Base): + """ + InferenceRecommendationsJob + A structure that contains a list of recommendation jobs. + + Attributes + ---------------------- + job_name: The name of the job. + job_description: The job description. + job_type: The recommendation job type. + job_arn: The Amazon Resource Name (ARN) of the recommendation job. + status: The status of the job. + creation_time: A timestamp that shows when the job was created. + completion_time: A timestamp that shows when the job completed. + role_arn: The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf. + last_modified_time: A timestamp that shows when the job was last modified. + failure_reason: If the job fails, provides information why the job failed. + model_name: The name of the created model. + sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). + model_package_version_arn: The Amazon Resource Name (ARN) of a versioned model package. + """ + + job_name: StrPipeVar + job_description: StrPipeVar + job_type: StrPipeVar + job_arn: StrPipeVar + status: StrPipeVar + creation_time: datetime.datetime + role_arn: StrPipeVar + last_modified_time: datetime.datetime + completion_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + sample_payload_url: Optional[StrPipeVar] = Unassigned() + model_package_version_arn: Optional[StrPipeVar] = Unassigned() + + +class RecommendationJobInferenceBenchmark(Base): + """ + RecommendationJobInferenceBenchmark + The details for a specific benchmark from an Inference Recommender job. + + Attributes + ---------------------- + metrics + endpoint_metrics + endpoint_configuration + model_configuration + failure_reason: The reason why a benchmark failed. + invocation_end_time: A timestamp that shows when the benchmark completed. + invocation_start_time: A timestamp that shows when the benchmark started. + """ + + model_configuration: ModelConfiguration + metrics: Optional[RecommendationMetrics] = Unassigned() + endpoint_metrics: Optional[InferenceMetrics] = Unassigned() + endpoint_configuration: Optional[EndpointOutputConfiguration] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + invocation_end_time: Optional[datetime.datetime] = Unassigned() + invocation_start_time: Optional[datetime.datetime] = Unassigned() + + +class InferenceRecommendationsJobStep(Base): + """ + InferenceRecommendationsJobStep + A returned array object for the Steps response field in the ListInferenceRecommendationsJobSteps API command. + + Attributes + ---------------------- + step_type: The type of the subtask. BENCHMARK: Evaluate the performance of your model on different instance types. + job_name: The name of the Inference Recommender job. + status: The current status of the benchmark. + inference_benchmark: The details for a specific benchmark. + """ + + step_type: StrPipeVar + job_name: StrPipeVar + status: StrPipeVar + inference_benchmark: Optional[RecommendationJobInferenceBenchmark] = Unassigned() + + +class InstanceGroupHealthCheckConfiguration(Base): + """ + InstanceGroupHealthCheckConfiguration + The configuration of deep health checks for an instance group. Overlapping deep health check configurations will be merged into a single operation. + + Attributes + ---------------------- + instance_group_name: The name of the instance group. + instance_ids: A list of Amazon Elastic Compute Cloud (EC2) instance IDs on which to perform deep health checks. Leave this field blank to perform deep health checks on the entire instance group. + deep_health_checks: A list of deep health checks to be performed. + """ + + instance_group_name: StrPipeVar + deep_health_checks: List[StrPipeVar] + instance_ids: Optional[List[StrPipeVar]] = Unassigned() + + +class LabelCountersForWorkteam(Base): + """ + LabelCountersForWorkteam + Provides counts for human-labeled tasks in the labeling job. + + Attributes + ---------------------- + human_labeled: The total number of data objects labeled by a human worker. + pending_human: The total number of data objects that need to be labeled by a human worker. + total: The total number of tasks in the labeling job. + """ + + human_labeled: Optional[int] = Unassigned() + pending_human: Optional[int] = Unassigned() + total: Optional[int] = Unassigned() + + +class LabelingJobForWorkteamSummary(Base): + """ + LabelingJobForWorkteamSummary + Provides summary information for a work team. + + Attributes + ---------------------- + labeling_job_name: The name of the labeling job that the work team is assigned to. + job_reference_code: A unique identifier for a labeling job. You can use this to refer to a specific labeling job. + work_requester_account_id: The Amazon Web Services account ID of the account used to start the labeling job. + creation_time: The date and time that the labeling job was created. + label_counters: Provides information about the progress of a labeling job. + number_of_human_workers_per_data_object: The configured number of workers per data object. + """ + + job_reference_code: StrPipeVar + work_requester_account_id: StrPipeVar + creation_time: datetime.datetime + labeling_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + label_counters: Optional[LabelCountersForWorkteam] = Unassigned() + number_of_human_workers_per_data_object: Optional[int] = Unassigned() + + +class LabelingJobSummary(Base): + """ + LabelingJobSummary + Provides summary information about a labeling job. + + Attributes + ---------------------- + labeling_job_name: The name of the labeling job. + labeling_job_arn: The Amazon Resource Name (ARN) assigned to the labeling job when it was created. + creation_time: The date and time that the job was created (timestamp). + last_modified_time: The date and time that the job was last modified (timestamp). + labeling_job_status: The current status of the labeling job. + label_counters: Counts showing the progress of the labeling job. + workteam_arn: The Amazon Resource Name (ARN) of the work team assigned to the job. + pre_human_task_lambda_arn: The Amazon Resource Name (ARN) of a Lambda function. The function is run before each data object is sent to a worker. + annotation_consolidation_lambda_arn: The Amazon Resource Name (ARN) of the Lambda function used to consolidate the annotations from individual workers into a label for a data object. For more information, see Annotation Consolidation. + failure_reason: If the LabelingJobStatus field is Failed, this field contains a description of the error. + labeling_job_output: The location of the output produced by the labeling job. + input_config: Input configuration for the labeling job. + """ + + labeling_job_name: Union[StrPipeVar, object] + labeling_job_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + labeling_job_status: StrPipeVar + label_counters: LabelCounters + workteam_arn: StrPipeVar + pre_human_task_lambda_arn: Optional[StrPipeVar] = Unassigned() + annotation_consolidation_lambda_arn: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + labeling_job_output: Optional[LabelingJobOutput] = Unassigned() + input_config: Optional[LabelingJobInputConfig] = Unassigned() + + +class LambdaStepMetadata(Base): + """ + LambdaStepMetadata + Metadata for a Lambda step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the Lambda function that was run by this step execution. + output_parameters: A list of the output parameters of the Lambda step. + """ + + arn: Optional[StrPipeVar] = Unassigned() + output_parameters: Optional[List[OutputParameter]] = Unassigned() + + +class LineageGroupSummary(Base): + """ + LineageGroupSummary + Lists a summary of the properties of a lineage group. A lineage group provides a group of shareable lineage entity resources. + + Attributes + ---------------------- + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group resource. + lineage_group_name: The name or Amazon Resource Name (ARN) of the lineage group. + display_name: The display name of the lineage group summary. + creation_time: The creation time of the lineage group summary. + last_modified_time: The last modified time of the lineage group summary. + """ + + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + lineage_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class LineageMetadata(Base): + """ + LineageMetadata + The metadata that tracks relationships between ML artifacts, actions, and contexts. + + Attributes + ---------------------- + action_arns: The Amazon Resource Name (ARN) of the lineage action. + artifact_arns: The Amazon Resource Name (ARN) of the lineage artifact. + context_arns: The Amazon Resource Name (ARN) of the lineage context. + associations: The lineage associations. + """ + + action_arns: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + artifact_arns: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + context_arns: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + associations: Optional[List[AssociationInfo]] = Unassigned() + + +class MonitoringJobDefinitionSummary(Base): + """ + MonitoringJobDefinitionSummary + Summary information about a monitoring job. + + Attributes + ---------------------- + monitoring_job_definition_name: The name of the monitoring job. + monitoring_job_definition_arn: The Amazon Resource Name (ARN) of the monitoring job. + creation_time: The time that the monitoring job was created. + endpoint_name: The name of the endpoint that the job monitors. + """ + + monitoring_job_definition_name: StrPipeVar + monitoring_job_definition_arn: StrPipeVar + creation_time: datetime.datetime + endpoint_name: Union[StrPipeVar, object] + + +class MlflowAppSummary(Base): + """ + MlflowAppSummary + The summary of the Mlflow App to list. + + Attributes + ---------------------- + arn: The ARN of a listed MLflow App. + name: The name of the MLflow App. + status: The status of the MLflow App. + creation_time: The creation time of a listed MLflow App. + last_modified_time: The last modified time of a listed MLflow App. + mlflow_version: The version of a listed MLflow App. + """ + + arn: Optional[StrPipeVar] = Unassigned() + name: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + mlflow_version: Optional[StrPipeVar] = Unassigned() + + +class TrackingServerSummary(Base): + """ + TrackingServerSummary + The summary of the tracking server to list. + + Attributes + ---------------------- + tracking_server_arn: The ARN of a listed tracking server. + tracking_server_name: The name of a listed tracking server. + creation_time: The creation time of a listed tracking server. + last_modified_time: The last modified time of a listed tracking server. + tracking_server_status: The creation status of a listed tracking server. + is_active: The activity status of a listed tracking server. + mlflow_version: The MLflow version used for a listed tracking server. + """ + + tracking_server_arn: Optional[StrPipeVar] = Unassigned() + tracking_server_name: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + tracking_server_status: Optional[StrPipeVar] = Unassigned() + is_active: Optional[StrPipeVar] = Unassigned() + mlflow_version: Optional[StrPipeVar] = Unassigned() + + +class ModelCardExportJobSummary(Base): + """ + ModelCardExportJobSummary + The summary of the Amazon SageMaker Model Card export job. + + Attributes + ---------------------- + model_card_export_job_name: The name of the model card export job. + model_card_export_job_arn: The Amazon Resource Name (ARN) of the model card export job. + status: The completion status of the model card export job. + model_card_name: The name of the model card that the export job exports. + model_card_version: The version of the model card that the export job exports. + created_at: The date and time that the model card export job was created. + last_modified_at: The date and time that the model card export job was last modified.. + """ + + model_card_export_job_name: Union[StrPipeVar, object] + model_card_export_job_arn: StrPipeVar + status: StrPipeVar + model_card_name: Union[StrPipeVar, object] + model_card_version: int + created_at: datetime.datetime + last_modified_at: datetime.datetime + + +class ModelCardVersionSummary(Base): + """ + ModelCardVersionSummary + A summary of a specific version of the model card. + + Attributes + ---------------------- + model_card_name: The name of the model card. + model_card_arn: The Amazon Resource Name (ARN) of the model card. + model_card_status: The approval status of the model card version within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. + model_card_version: A version of the model card. + creation_time: The date and time that the model card version was created. + last_modified_time: The time date and time that the model card version was last modified. + """ + + model_card_name: Union[StrPipeVar, object] + model_card_arn: StrPipeVar + model_card_status: StrPipeVar + model_card_version: int + creation_time: datetime.datetime + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class ModelCardSummary(Base): + """ + ModelCardSummary + A summary of the model card. + + Attributes + ---------------------- + model_card_name: The name of the model card. + model_card_arn: The Amazon Resource Name (ARN) of the model card. + model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. + creation_time: The date and time that the model card was created. + last_modified_time: The date and time that the model card was last modified. + """ + + model_card_name: Union[StrPipeVar, object] + model_card_arn: StrPipeVar + model_card_status: StrPipeVar + creation_time: datetime.datetime + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class ModelMetadataFilter(Base): + """ + ModelMetadataFilter + Part of the search expression. You can specify the name and value (domain, task, framework, framework version, task, and model). + + Attributes + ---------------------- + name: The name of the of the model to filter by. + value: The value to filter the model metadata. + """ + + name: StrPipeVar + value: StrPipeVar + + +class ModelMetadataSearchExpression(Base): + """ + ModelMetadataSearchExpression + One or more filters that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results + + Attributes + ---------------------- + filters: A list of filter objects. + """ + + filters: Optional[List[ModelMetadataFilter]] = Unassigned() + + +class ModelMetadataSummary(Base): + """ + ModelMetadataSummary + A summary of the model metadata. + + Attributes + ---------------------- + domain: The machine learning domain of the model. + framework: The machine learning framework of the model. + task: The machine learning task of the model. + model: The name of the model. + framework_version: The framework version of the model. + """ + + domain: StrPipeVar + framework: StrPipeVar + task: StrPipeVar + model: StrPipeVar + framework_version: StrPipeVar + + +class ModelPackageGroupSummary(Base): + """ + ModelPackageGroupSummary + Summary information about a model group. + + Attributes + ---------------------- + model_package_group_name: The name of the model group. + model_package_group_arn: The Amazon Resource Name (ARN) of the model group. + model_package_group_description: A description of the model group. + creation_time: The time that the model group was created. + model_package_group_status: The status of the model group. + """ + + model_package_group_name: Union[StrPipeVar, object] + model_package_group_arn: StrPipeVar + creation_time: datetime.datetime + model_package_group_status: StrPipeVar + model_package_group_description: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageSummary(Base): + """ + ModelPackageSummary + Provides summary information about a model package. + + Attributes + ---------------------- + model_package_name: The name of the model package. + model_package_group_name: If the model package is a versioned model, the model group that the versioned model belongs to. + model_package_version: If the model package is a versioned model, the version of the model. + model_package_arn: The Amazon Resource Name (ARN) of the model package. + model_package_description: A brief description of the model package. + creation_time: A timestamp that shows when the model package was created. + model_package_status: The overall status of the model package. + model_approval_status: The approval status of the model. This can be one of the following values. APPROVED - The model is approved REJECTED - The model is rejected. PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. + model_life_cycle + model_package_registration_type: The package registration type of the model package summary. + """ + + model_package_arn: StrPipeVar + creation_time: datetime.datetime + model_package_status: StrPipeVar + model_package_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_package_version: Optional[int] = Unassigned() + model_package_description: Optional[StrPipeVar] = Unassigned() + model_approval_status: Optional[StrPipeVar] = Unassigned() + model_life_cycle: Optional[ModelLifeCycle] = Unassigned() + model_package_registration_type: Optional[StrPipeVar] = Unassigned() + + +class ModelSummary(Base): + """ + ModelSummary + Provides summary information about a model. + + Attributes + ---------------------- + model_name: The name of the model that you want a summary for. + model_arn: The Amazon Resource Name (ARN) of the model. + creation_time: A timestamp that indicates when the model was created. + """ + + model_name: Union[StrPipeVar, object] + model_arn: StrPipeVar + creation_time: datetime.datetime + + +class MonitoringAlertHistorySummary(Base): + """ + MonitoringAlertHistorySummary + Provides summary information of an alert's history. + + Attributes + ---------------------- + monitoring_schedule_name: The name of a monitoring schedule. + monitoring_alert_name: The name of a monitoring alert. + creation_time: A timestamp that indicates when the first alert transition occurred in an alert history. An alert transition can be from status InAlert to OK, or from OK to InAlert. + alert_status: The current alert status of an alert. + """ + + monitoring_schedule_name: Union[StrPipeVar, object] + monitoring_alert_name: Union[StrPipeVar, object] + creation_time: datetime.datetime + alert_status: StrPipeVar + + +class ModelDashboardIndicatorAction(Base): + """ + ModelDashboardIndicatorAction + An alert action taken to light up an icon on the Amazon SageMaker Model Dashboard when an alert goes into InAlert status. + + Attributes + ---------------------- + enabled: Indicates whether the alert action is turned on. + """ + + enabled: Optional[bool] = Unassigned() + + +class MonitoringAlertActions(Base): + """ + MonitoringAlertActions + A list of alert actions taken in response to an alert going into InAlert status. + + Attributes + ---------------------- + model_dashboard_indicator: An alert action taken to light up an icon on the Model Dashboard when an alert goes into InAlert status. + """ + + model_dashboard_indicator: Optional[ModelDashboardIndicatorAction] = Unassigned() + + +class MonitoringAlertSummary(Base): + """ + MonitoringAlertSummary + Provides summary information about a monitor alert. + + Attributes + ---------------------- + monitoring_alert_name: The name of a monitoring alert. + creation_time: A timestamp that indicates when a monitor alert was created. + last_modified_time: A timestamp that indicates when a monitor alert was last updated. + alert_status: The current status of an alert. + datapoints_to_alert: Within EvaluationPeriod, how many execution failures will raise an alert. + evaluation_period: The number of most recent monitoring executions to consider when evaluating alert status. + actions: A list of alert actions taken in response to an alert going into InAlert status. + """ + + monitoring_alert_name: Union[StrPipeVar, object] + creation_time: datetime.datetime + last_modified_time: datetime.datetime + alert_status: StrPipeVar + datapoints_to_alert: int + evaluation_period: int + actions: MonitoringAlertActions + + +class MonitoringScheduleSummary(Base): + """ + MonitoringScheduleSummary + Summarizes the monitoring schedule. + + Attributes + ---------------------- + monitoring_schedule_name: The name of the monitoring schedule. + monitoring_schedule_arn: The Amazon Resource Name (ARN) of the monitoring schedule. + creation_time: The creation time of the monitoring schedule. + last_modified_time: The last time the monitoring schedule was modified. + monitoring_schedule_status: The status of the monitoring schedule. + endpoint_name: The name of the endpoint using the monitoring schedule. + monitoring_job_definition_name: The name of the monitoring job definition that the schedule is for. + monitoring_type: The type of the monitoring job definition that the schedule is for. + """ + + monitoring_schedule_name: Union[StrPipeVar, object] + monitoring_schedule_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + monitoring_schedule_status: StrPipeVar + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + + +class NotebookInstanceLifecycleConfigSummary(Base): + """ + NotebookInstanceLifecycleConfigSummary + Provides a summary of a notebook instance lifecycle configuration. + + Attributes + ---------------------- + notebook_instance_lifecycle_config_name: The name of the lifecycle configuration. + notebook_instance_lifecycle_config_arn: The Amazon Resource Name (ARN) of the lifecycle configuration. + creation_time: A timestamp that tells when the lifecycle configuration was created. + last_modified_time: A timestamp that tells when the lifecycle configuration was last modified. + """ + + notebook_instance_lifecycle_config_name: Union[StrPipeVar, object] + notebook_instance_lifecycle_config_arn: StrPipeVar + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class NotebookInstanceSummary(Base): + """ + NotebookInstanceSummary + Provides summary information for an SageMaker AI notebook instance. + + Attributes + ---------------------- + notebook_instance_name: The name of the notebook instance that you want a summary for. + notebook_instance_arn: The Amazon Resource Name (ARN) of the notebook instance. + notebook_instance_status: The status of the notebook instance. + url: The URL that you use to connect to the Jupyter notebook running in your notebook instance. + instance_type: The type of ML compute instance that the notebook instance is running on. + creation_time: A timestamp that shows when the notebook instance was created. + last_modified_time: A timestamp that shows when the notebook instance was last modified. + notebook_instance_lifecycle_config_name: The name of a notebook instance lifecycle configuration associated with this notebook instance. For information about notebook instance lifestyle configurations, see Step 2.1: (Optional) Customize a Notebook Instance. + default_code_repository: The Git repository associated 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. + additional_code_repositories: An array of up to three Git repositories associated 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. + """ + + notebook_instance_name: Union[StrPipeVar, object] + notebook_instance_arn: StrPipeVar + notebook_instance_status: Optional[StrPipeVar] = Unassigned() + url: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + notebook_instance_lifecycle_config_name: Optional[Union[StrPipeVar, object]] = Unassigned() + default_code_repository: Optional[StrPipeVar] = Unassigned() + additional_code_repositories: Optional[List[StrPipeVar]] = Unassigned() + + +class OptimizationJobSummary(Base): + """ + OptimizationJobSummary + Summarizes an optimization job by providing some of its key properties. + + Attributes + ---------------------- + optimization_job_name: The name that you assigned to the optimization job. + optimization_job_arn: The Amazon Resource Name (ARN) of the optimization job. + creation_time: The time when you created the optimization job. + optimization_job_status: The current status of the optimization job. + optimization_start_time: The time when the optimization job started. + optimization_end_time: The time when the optimization job finished processing. + last_modified_time: The time when the optimization job was last updated. + deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. + max_instance_count: The maximum number of instances to use for the optimization job. + optimization_types: The optimization techniques that are applied by the optimization job. + """ + + optimization_job_name: Union[StrPipeVar, object] + optimization_job_arn: StrPipeVar + creation_time: datetime.datetime + optimization_job_status: StrPipeVar + deployment_instance_type: StrPipeVar + optimization_types: List[StrPipeVar] + optimization_start_time: Optional[datetime.datetime] = Unassigned() + optimization_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + max_instance_count: Optional[int] = Unassigned() + + +class PartnerAppSummary(Base): + """ + PartnerAppSummary + A subset of information related to a SageMaker Partner AI App. This information is used as part of the ListPartnerApps API response. + + Attributes + ---------------------- + arn: The ARN of the SageMaker Partner AI App. + name: The name of the SageMaker Partner AI App. + type: The type of SageMaker Partner AI App to create. Must be one of the following: lakera-guard, comet, deepchecks-llm-evaluation, or fiddler. + status: The status of the SageMaker Partner AI App. + creation_time: The creation time of the SageMaker Partner AI App. + """ + + arn: Optional[StrPipeVar] = Unassigned() + name: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + + +class TrainingJobStepMetadata(Base): + """ + TrainingJobStepMetadata + Metadata for a training job step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the training job that was run by this step execution. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class ProcessingJobStepMetadata(Base): + """ + ProcessingJobStepMetadata + Metadata for a processing job step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the processing job. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class TransformJobStepMetadata(Base): + """ + TransformJobStepMetadata + Metadata for a transform job step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the transform job that was run by this step execution. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class TuningJobStepMetaData(Base): + """ + TuningJobStepMetaData + Metadata for a tuning step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the tuning job that was run by this step execution. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class ModelStepMetadata(Base): + """ + ModelStepMetadata + Metadata for Model steps. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the created model. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class RegisterModelStepMetadata(Base): + """ + RegisterModelStepMetadata + Metadata for a register model job step. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the model package. + """ + + arn: Optional[StrPipeVar] = Unassigned() + + +class QualityCheckStepMetadata(Base): + """ + QualityCheckStepMetadata + Container for the metadata for a Quality check step. For more information, see the topic on QualityCheck step in the Amazon SageMaker Developer Guide. + + Attributes + ---------------------- + check_type: The type of the Quality check step. + baseline_used_for_drift_check_statistics: The Amazon S3 URI of the baseline statistics file used for the drift check. + baseline_used_for_drift_check_constraints: The Amazon S3 URI of the baseline constraints file used for the drift check. + calculated_baseline_statistics: The Amazon S3 URI of the newly calculated baseline statistics file. + calculated_baseline_constraints: The Amazon S3 URI of the newly calculated baseline constraints file. + model_package_group_name: The model package group name. + violation_report: The Amazon S3 URI of violation report if violations are detected. + check_job_arn: The Amazon Resource Name (ARN) of the Quality check processing job that was run by this step execution. + skip_check: This flag indicates if the drift check against the previous baseline will be skipped or not. If it is set to False, the previous baseline of the configured check type must be available. + register_new_baseline: This flag indicates if a newly calculated baseline can be accessed through step properties BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics. If it is set to False, the previous baseline of the configured check type must also be available. These can be accessed through the BaselineUsedForDriftCheckConstraints and BaselineUsedForDriftCheckStatistics properties. + """ + + check_type: Optional[StrPipeVar] = Unassigned() + baseline_used_for_drift_check_statistics: Optional[StrPipeVar] = Unassigned() + baseline_used_for_drift_check_constraints: Optional[StrPipeVar] = Unassigned() + calculated_baseline_statistics: Optional[StrPipeVar] = Unassigned() + calculated_baseline_constraints: Optional[StrPipeVar] = Unassigned() + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + violation_report: Optional[StrPipeVar] = Unassigned() + check_job_arn: Optional[StrPipeVar] = Unassigned() + skip_check: Optional[bool] = Unassigned() + register_new_baseline: Optional[bool] = Unassigned() + + +class PipelineExecutionStepMetadata(Base): + """ + PipelineExecutionStepMetadata + Metadata for a step execution. + + Attributes + ---------------------- + training_job: The Amazon Resource Name (ARN) of the training job that was run by this step execution. + processing_job: The Amazon Resource Name (ARN) of the processing job that was run by this step execution. + transform_job: The Amazon Resource Name (ARN) of the transform job that was run by this step execution. + tuning_job: The Amazon Resource Name (ARN) of the tuning job that was run by this step execution. + model: The Amazon Resource Name (ARN) of the model that was created by this step execution. + register_model: The Amazon Resource Name (ARN) of the model package that the model was registered to by this step execution. + condition: The outcome of the condition evaluation that was run by this step execution. + callback: The URL of the Amazon SQS queue used by this step execution, the pipeline generated token, and a list of output parameters. + lambda: The Amazon Resource Name (ARN) of the Lambda function that was run by this step execution and a list of output parameters. + emr: The configurations and outcomes of an Amazon EMR step execution. + quality_check: The configurations and outcomes of the check step execution. This includes: The type of the check conducted. The Amazon S3 URIs of baseline constraints and statistics files to be used for the drift check. The Amazon S3 URIs of newly calculated baseline constraints and statistics. The model package group name provided. The Amazon S3 URI of the violation report if violations detected. The Amazon Resource Name (ARN) of check processing job initiated by the step execution. The Boolean flags indicating if the drift check is skipped. If step property BaselineUsedForDriftCheck is set the same as CalculatedBaseline. + clarify_check: Container for the metadata for a Clarify check step. The configurations and outcomes of the check step execution. This includes: The type of the check conducted, The Amazon S3 URIs of baseline constraints and statistics files to be used for the drift check. The Amazon S3 URIs of newly calculated baseline constraints and statistics. The model package group name provided. The Amazon S3 URI of the violation report if violations detected. The Amazon Resource Name (ARN) of check processing job initiated by the step execution. The boolean flags indicating if the drift check is skipped. If step property BaselineUsedForDriftCheck is set the same as CalculatedBaseline. + fail: The configurations and outcomes of a Fail step execution. + auto_ml_job: The Amazon Resource Name (ARN) of the AutoML job that was run by this step. + endpoint: The endpoint that was invoked during this step execution. + endpoint_config: The endpoint configuration used to create an endpoint during this step execution. + bedrock_custom_model: The metadata of the Amazon Bedrock custom model used in the pipeline execution step. + bedrock_custom_model_deployment: The metadata of the Amazon Bedrock custom model deployment used in pipeline execution step. + bedrock_provisioned_model_throughput: The metadata of the Amazon Bedrock provisioned model throughput used in the pipeline execution step. + bedrock_model_import: The metadata of Amazon Bedrock model import used in pipeline execution step. + inference_component: The metadata of the inference component used in pipeline execution step. + lineage: The metadata of the lineage used in pipeline execution step. + """ + + training_job: Optional[TrainingJobStepMetadata] = Unassigned() + processing_job: Optional[ProcessingJobStepMetadata] = Unassigned() + transform_job: Optional[TransformJobStepMetadata] = Unassigned() + tuning_job: Optional[TuningJobStepMetaData] = Unassigned() + model: Optional[ModelStepMetadata] = Unassigned() + register_model: Optional[RegisterModelStepMetadata] = Unassigned() + condition: Optional[ConditionStepMetadata] = Unassigned() + callback: Optional[CallbackStepMetadata] = Unassigned() + # lambda: Optional[LambdaStepMetadata] = Unassigned() + emr: Optional[EMRStepMetadata] = Unassigned() + quality_check: Optional[QualityCheckStepMetadata] = Unassigned() + clarify_check: Optional[ClarifyCheckStepMetadata] = Unassigned() + fail: Optional[FailStepMetadata] = Unassigned() + auto_ml_job: Optional[AutoMLJobStepMetadata] = Unassigned() + endpoint: Optional[EndpointStepMetadata] = Unassigned() + endpoint_config: Optional[EndpointConfigStepMetadata] = Unassigned() + bedrock_custom_model: Optional[BedrockCustomModelMetadata] = Unassigned() + bedrock_custom_model_deployment: Optional[BedrockCustomModelDeploymentMetadata] = Unassigned() + bedrock_provisioned_model_throughput: Optional[BedrockProvisionedModelThroughputMetadata] = ( + Unassigned() + ) + bedrock_model_import: Optional[BedrockModelImportMetadata] = Unassigned() + inference_component: Optional[InferenceComponentMetadata] = Unassigned() + lineage: Optional[LineageMetadata] = Unassigned() + + +class SelectiveExecutionResult(Base): + """ + SelectiveExecutionResult + The ARN from an execution of the current pipeline. + + Attributes + ---------------------- + source_pipeline_execution_arn: The ARN from an execution of the current pipeline. + """ + + source_pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + + +class PipelineExecutionStep(Base): + """ + PipelineExecutionStep + An execution of a step in a pipeline. + + Attributes + ---------------------- + step_name: The name of the step that is executed. + step_display_name: The display name of the step. + step_description: The description of the step. + start_time: The time that the step started executing. + end_time: The time that the step stopped executing. + step_status: The status of the step execution. + cache_hit_result: If this pipeline execution step was cached, details on the cache hit. + failure_reason: The reason why the step failed execution. This is only returned if the step failed its execution. + metadata: Metadata to run the pipeline step. + attempt_count: The current attempt of the execution step. For more information, see Retry Policy for SageMaker Pipelines steps. + selective_execution_result: The ARN from an execution of the current pipeline from which results are reused for this step. + """ + + step_name: Optional[StrPipeVar] = Unassigned() + step_display_name: Optional[StrPipeVar] = Unassigned() + step_description: Optional[StrPipeVar] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + step_status: Optional[StrPipeVar] = Unassigned() + cache_hit_result: Optional[CacheHitResult] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + metadata: Optional[PipelineExecutionStepMetadata] = Unassigned() + attempt_count: Optional[int] = Unassigned() + selective_execution_result: Optional[SelectiveExecutionResult] = Unassigned() + + +class PipelineExecutionSummary(Base): + """ + PipelineExecutionSummary + A pipeline execution summary. + + Attributes + ---------------------- + pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. + start_time: The start time of the pipeline execution. + pipeline_execution_status: The status of the pipeline execution. + pipeline_execution_description: The description of the pipeline execution. + pipeline_execution_display_name: The display name of the pipeline execution. + pipeline_execution_failure_reason: A message generated by SageMaker Pipelines describing why the pipeline execution failed. + """ + + pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + pipeline_execution_status: Optional[StrPipeVar] = Unassigned() + pipeline_execution_description: Optional[StrPipeVar] = Unassigned() + pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_execution_failure_reason: Optional[StrPipeVar] = Unassigned() + + +class Parameter(Base): + """ + Parameter + Assigns a value to a named Pipeline parameter. + + Attributes + ---------------------- + name: The name of the parameter to assign a value to. This parameter name must match a named parameter in the pipeline definition. + value: The literal value for the parameter. + """ + + name: StrPipeVar + value: StrPipeVar + + +class PipelineVersionSummary(Base): + """ + PipelineVersionSummary + The summary of the pipeline version. + + Attributes + ---------------------- + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_version_id: The ID of the pipeline version. + creation_time: The creation time of the pipeline version. + pipeline_version_description: The description of the pipeline version. + pipeline_version_display_name: The display name of the pipeline version. + last_execution_pipeline_execution_arn: The Amazon Resource Name (ARN) of the most recent pipeline execution created from this pipeline version. + """ + + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_version_id: Optional[int] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + pipeline_version_description: Optional[StrPipeVar] = Unassigned() + pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() + last_execution_pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + + +class PipelineSummary(Base): + """ + PipelineSummary + A summary of a pipeline. + + Attributes + ---------------------- + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_name: The name of the pipeline. + pipeline_display_name: The display name of the pipeline. + pipeline_description: The description of the pipeline. + role_arn: The Amazon Resource Name (ARN) that the pipeline used to execute. + creation_time: The creation time of the pipeline. + last_modified_time: The time that the pipeline was last modified. + last_execution_time: The last time that a pipeline execution began. + """ + + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_name: Optional[Union[StrPipeVar, object]] = Unassigned() + pipeline_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_description: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_execution_time: Optional[datetime.datetime] = Unassigned() + + +class ProcessingJobSummary(Base): + """ + ProcessingJobSummary + Summary of information about a processing job. + + Attributes + ---------------------- + processing_job_name: The name of the processing job. + processing_job_arn: The Amazon Resource Name (ARN) of the processing job.. + creation_time: The time at which the processing job was created. + processing_end_time: The time at which the processing job completed. + last_modified_time: A timestamp that indicates the last time the processing job was modified. + processing_job_status: The status of the processing job. + failure_reason: A string, up to one KB in size, that contains the reason a processing job failed, if it failed. + exit_message: An optional string, up to one KB in size, that contains metadata from the processing container when the processing job exits. + """ + + processing_job_name: Union[StrPipeVar, object] + processing_job_arn: StrPipeVar + creation_time: datetime.datetime + processing_job_status: StrPipeVar + processing_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + exit_message: Optional[StrPipeVar] = Unassigned() + + +class ProjectSummary(Base): + """ + ProjectSummary + Information about a project. + + Attributes + ---------------------- + project_name: The name of the project. + project_description: The description of the project. + project_arn: The Amazon Resource Name (ARN) of the project. + project_id: The ID of the project. + creation_time: The time that the project was created. + project_status: The status of the project. + """ + + project_name: Union[StrPipeVar, object] + project_arn: StrPipeVar + project_id: StrPipeVar + creation_time: datetime.datetime + project_status: StrPipeVar + project_description: Optional[StrPipeVar] = Unassigned() + + +class ResourceCatalog(Base): + """ + ResourceCatalog + A resource catalog containing all of the resources of a specific resource type within a resource owner account. For an example on sharing the Amazon SageMaker Feature Store DefaultFeatureGroupCatalog, see Share Amazon SageMaker Catalog resource type in the Amazon SageMaker Developer Guide. + + Attributes + ---------------------- + resource_catalog_arn: The Amazon Resource Name (ARN) of the ResourceCatalog. + resource_catalog_name: The name of the ResourceCatalog. + description: A free form description of the ResourceCatalog. + creation_time: The time the ResourceCatalog was created. + """ + + resource_catalog_arn: StrPipeVar + resource_catalog_name: Union[StrPipeVar, object] + description: StrPipeVar + creation_time: datetime.datetime + + +class SpaceSettingsSummary(Base): + """ + SpaceSettingsSummary + Specifies summary information about the space settings. + + Attributes + ---------------------- + app_type: The type of app created within the space. + remote_access: A setting that enables or disables remote access for a SageMaker space. When enabled, this allows you to connect to the remote space from your local IDE. + space_storage_settings: The storage settings for a space. + """ + + app_type: Optional[StrPipeVar] = Unassigned() + remote_access: Optional[StrPipeVar] = Unassigned() + space_storage_settings: Optional[SpaceStorageSettings] = Unassigned() + + +class SpaceSharingSettingsSummary(Base): + """ + SpaceSharingSettingsSummary + Specifies summary information about the space sharing settings. + + Attributes + ---------------------- + sharing_type: Specifies the sharing type of the space. + """ + + sharing_type: Optional[StrPipeVar] = Unassigned() + + +class OwnershipSettingsSummary(Base): + """ + OwnershipSettingsSummary + Specifies summary information about the ownership settings. + + Attributes + ---------------------- + owner_user_profile_name: The user profile who is the owner of the space. + """ + + owner_user_profile_name: Optional[StrPipeVar] = Unassigned() + + +class SpaceDetails(Base): + """ + SpaceDetails + The space's details. + + Attributes + ---------------------- + domain_id: The ID of the associated domain. + space_name: The name of the space. + status: The status. + creation_time: The creation time. + last_modified_time: The last modified time. + space_settings_summary: Specifies summary information about the space settings. + space_sharing_settings_summary: Specifies summary information about the space sharing settings. + ownership_settings_summary: Specifies summary information about the ownership settings. + space_display_name: The name of the space that appears in the Studio UI. + """ + + domain_id: Optional[StrPipeVar] = Unassigned() + space_name: Optional[Union[StrPipeVar, object]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + space_settings_summary: Optional[SpaceSettingsSummary] = Unassigned() + space_sharing_settings_summary: Optional[SpaceSharingSettingsSummary] = Unassigned() + ownership_settings_summary: Optional[OwnershipSettingsSummary] = Unassigned() + space_display_name: Optional[StrPipeVar] = Unassigned() + + +class StudioLifecycleConfigDetails(Base): + """ + StudioLifecycleConfigDetails + Details of the Amazon SageMaker AI Studio Lifecycle Configuration. + + Attributes + ---------------------- + studio_lifecycle_config_arn: The Amazon Resource Name (ARN) of the Lifecycle Configuration. + studio_lifecycle_config_name: The name of the Amazon SageMaker AI Studio Lifecycle Configuration. + creation_time: The creation time of the Amazon SageMaker AI Studio Lifecycle Configuration. + last_modified_time: This value is equivalent to CreationTime because Amazon SageMaker AI Studio Lifecycle Configurations are immutable. + studio_lifecycle_config_app_type: The App type to which the Lifecycle Configuration is attached. + """ + + studio_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() + studio_lifecycle_config_name: Optional[Union[StrPipeVar, object]] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + studio_lifecycle_config_app_type: Optional[StrPipeVar] = Unassigned() + + +class TrainingJobSummary(Base): + """ + TrainingJobSummary + Provides summary information about a training job. + + Attributes + ---------------------- + training_job_name: The name of the training job that you want a summary for. + training_job_arn: The Amazon Resource Name (ARN) of the training job. + creation_time: A timestamp that shows when the training job was created. + training_end_time: A timestamp that shows when the training job ended. This field is set only if the training job has one of the terminal statuses (Completed, Failed, or Stopped). + last_modified_time: Timestamp when the training job was last modified. + training_job_status: The status of the training job. + secondary_status: The secondary status of the training job. + warm_pool_status: The status of the warm pool associated with the training job. + training_plan_arn: The Amazon Resource Name (ARN); of the training plan associated with this training job. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + """ + + training_job_name: Union[StrPipeVar, object] + training_job_arn: StrPipeVar + creation_time: datetime.datetime + training_job_status: StrPipeVar + training_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + secondary_status: Optional[StrPipeVar] = Unassigned() + warm_pool_status: Optional[WarmPoolStatus] = Unassigned() + training_plan_arn: Optional[StrPipeVar] = Unassigned() + + +class TrainingPlanFilter(Base): + """ + TrainingPlanFilter + A filter to apply when listing or searching for training plans. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + + Attributes + ---------------------- + name: The name of the filter field (e.g., Status, InstanceType). + value: The value to filter by for the specified field. + """ + + name: StrPipeVar + value: StrPipeVar + + +class TrainingPlanSummary(Base): + """ + TrainingPlanSummary + Details of the training plan. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + + Attributes + ---------------------- + training_plan_arn: The Amazon Resource Name (ARN); of the training plan. + training_plan_name: The name of the training plan. + status: The current status of the training plan (e.g., Pending, Active, Expired). To see the complete list of status values available for a training plan, refer to the Status attribute within the TrainingPlanSummary object. + status_message: A message providing additional information about the current status of the training plan. + duration_hours: The number of whole hours in the total duration for this training plan. + duration_minutes: The additional minutes beyond whole hours in the total duration for this training plan. + start_time: The start time of the training plan. + end_time: The end time of the training plan. + upfront_fee: The upfront fee for the training plan. + currency_code: The currency code for the upfront fee (e.g., USD). + total_instance_count: The total number of instances reserved in this training plan. + available_instance_count: The number of instances currently available for use in this training plan. + in_use_instance_count: The number of instances currently in use from this training plan. + total_ultra_server_count: The total number of UltraServers allocated to this training plan. + target_resources: The target resources (e.g., training jobs, HyperPod clusters, Endpoints) 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. A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment. + reserved_capacity_summaries: A list of reserved capacities associated with this training plan, including details such as instance types, counts, and availability zones. + """ + + training_plan_arn: StrPipeVar + training_plan_name: Union[StrPipeVar, object] + status: StrPipeVar + status_message: Optional[StrPipeVar] = Unassigned() + duration_hours: Optional[int] = Unassigned() + duration_minutes: Optional[int] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() + total_instance_count: Optional[int] = Unassigned() + available_instance_count: Optional[int] = Unassigned() + in_use_instance_count: Optional[int] = Unassigned() + total_ultra_server_count: Optional[int] = Unassigned() + target_resources: Optional[List[StrPipeVar]] = Unassigned() + reserved_capacity_summaries: Optional[List[ReservedCapacitySummary]] = Unassigned() + + +class TransformJobSummary(Base): + """ + TransformJobSummary + Provides a summary of a transform job. Multiple TransformJobSummary objects are returned as a list after in response to a ListTransformJobs call. + + Attributes + ---------------------- + transform_job_name: The name of the transform job. + transform_job_arn: The Amazon Resource Name (ARN) of the transform job. + creation_time: A timestamp that shows when the transform Job was created. + transform_end_time: Indicates when the transform job ends on compute instances. For successful jobs and stopped jobs, this is the exact time recorded after the results are uploaded. For failed jobs, this is when Amazon SageMaker detected that the job failed. + last_modified_time: Indicates when the transform job was last modified. + transform_job_status: The status of the transform job. + failure_reason: If the transform job failed, the reason it failed. + """ + + transform_job_name: Union[StrPipeVar, object] + transform_job_arn: StrPipeVar + creation_time: datetime.datetime + transform_job_status: StrPipeVar + transform_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + + +class TrialComponentSummary(Base): + """ + TrialComponentSummary + A summary of the properties of a trial component. To get all the properties, call the DescribeTrialComponent API and provide the TrialComponentName. + + Attributes + ---------------------- + trial_component_name: The name of the trial component. + trial_component_arn: The Amazon Resource Name (ARN) of the trial component. + display_name: The name of the component as displayed. If DisplayName isn't specified, TrialComponentName is displayed. + trial_component_source + status: The status of the component. States include: InProgress Completed Failed + start_time: When the component started. + end_time: When the component ended. + creation_time: When the component was created. + created_by: Who created the trial component. + last_modified_time: When the component was last modified. + last_modified_by: Who last modified the component. + """ + + trial_component_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_component_arn: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + trial_component_source: Optional[TrialComponentSource] = Unassigned() + status: Optional[TrialComponentStatus] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + + +class TrialSummary(Base): + """ + TrialSummary + A summary of the properties of a trial. To get the complete set of properties, call the DescribeTrial API and provide the TrialName. + + Attributes + ---------------------- + trial_arn: The Amazon Resource Name (ARN) of the trial. + trial_name: The name of the trial. + display_name: The name of the trial as displayed. If DisplayName isn't specified, TrialName is displayed. + trial_source + creation_time: When the trial was created. + last_modified_time: When the trial was last modified. + """ + + trial_arn: Optional[StrPipeVar] = Unassigned() + trial_name: Optional[Union[StrPipeVar, object]] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + trial_source: Optional[TrialSource] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class UltraServer(Base): + """ + UltraServer + Represents a high-performance compute server used for distributed training in SageMaker AI. An UltraServer consists of multiple instances within a shared NVLink interconnect domain. + + Attributes + ---------------------- + ultra_server_id: The unique identifier for the UltraServer. + ultra_server_type: The type of UltraServer, such as ml.u-p6e-gb200x72. + availability_zone: The name of the Availability Zone where the UltraServer is provisioned. + instance_type: The Amazon EC2 instance type used in the UltraServer. + total_instance_count: The total number of instances in this UltraServer. + configured_spare_instance_count: The number of spare instances configured for this UltraServer to provide enhanced resiliency. + available_instance_count: The number of instances currently available for use in this UltraServer. + in_use_instance_count: The number of instances currently in use in this UltraServer. + available_spare_instance_count: The number of available spare instances in the UltraServer. + unhealthy_instance_count: The number of instances in this UltraServer that are currently in an unhealthy state. + health_status: The overall health status of the UltraServer. + """ + + ultra_server_id: StrPipeVar + ultra_server_type: StrPipeVar + availability_zone: StrPipeVar + instance_type: StrPipeVar + total_instance_count: int + configured_spare_instance_count: Optional[int] = Unassigned() + available_instance_count: Optional[int] = Unassigned() + in_use_instance_count: Optional[int] = Unassigned() + available_spare_instance_count: Optional[int] = Unassigned() + unhealthy_instance_count: Optional[int] = Unassigned() + health_status: Optional[StrPipeVar] = Unassigned() + + +class UserProfileDetails(Base): + """ + UserProfileDetails + The user profile details. + + Attributes + ---------------------- + domain_id: The domain ID. + user_profile_name: The user profile name. + status: The status. + creation_time: The creation time. + last_modified_time: The last modified time. + """ + + domain_id: Optional[StrPipeVar] = Unassigned() + user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class Model(Base): + """ + Model + The properties of a model as returned by the Search API. + + Attributes + ---------------------- + model_name: The name of the model. + primary_container + containers: The containers in the inference pipeline. + inference_execution_config + execution_role_arn: The Amazon Resource Name (ARN) of the IAM role that you specified for the model. + vpc_config + creation_time: A timestamp that indicates when the model was created. + model_arn: The Amazon Resource Name (ARN) of the model. + enable_network_isolation: Isolates the model container. No inbound or outbound network calls can be made to or from the model container. + tags: A list of key-value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + deployment_recommendation: A set of recommended deployment configurations for the model. + """ + + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + primary_container: Optional[ContainerDefinition] = Unassigned() + containers: Optional[List[ContainerDefinition]] = Unassigned() + inference_execution_config: Optional[InferenceExecutionConfig] = Unassigned() + execution_role_arn: Optional[StrPipeVar] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + model_arn: Optional[StrPipeVar] = Unassigned() + enable_network_isolation: Optional[bool] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + deployment_recommendation: Optional[DeploymentRecommendation] = Unassigned() + + +class ModelCard(Base): + """ + ModelCard + An Amazon SageMaker Model Card. + + Attributes + ---------------------- + model_card_arn: The Amazon Resource Name (ARN) of the model card. + model_card_name: The unique name of the model card. + model_card_version: The version of the model card. + content: The content of the model card. Content uses the model card JSON schema and provided as a string. + model_card_status: The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. + security_config: The security configuration used to protect model card data. + creation_time: The date and time that the model card was created. + created_by + last_modified_time: The date and time that the model card was last modified. + last_modified_by + tags: Key-value pairs used to manage metadata for the model card. + model_id: The unique name (ID) of the model. + risk_rating: The risk rating of the model. Different organizations might have different criteria for model card risk ratings. For more information, see Risk ratings. + model_package_group_name: The model package group that contains the model package. Only relevant for model cards created for model packages in the Amazon SageMaker Model Registry. + """ + + model_card_arn: Optional[StrPipeVar] = Unassigned() + model_card_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_card_version: Optional[int] = Unassigned() + content: Optional[StrPipeVar] = Unassigned() + model_card_status: Optional[StrPipeVar] = Unassigned() + security_config: Optional[ModelCardSecurityConfig] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + model_id: Optional[StrPipeVar] = Unassigned() + risk_rating: Optional[StrPipeVar] = Unassigned() + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class ModelDashboardEndpoint(Base): + """ + ModelDashboardEndpoint + An endpoint that hosts a model displayed in the Amazon SageMaker Model Dashboard. + + Attributes + ---------------------- + endpoint_name: The endpoint name. + endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. + creation_time: A timestamp that indicates when the endpoint was created. + last_modified_time: The last time the endpoint was modified. + endpoint_status: The endpoint status. + """ + + endpoint_name: Union[StrPipeVar, object] + endpoint_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + endpoint_status: StrPipeVar + + +class TransformJob(Base): + """ + TransformJob + A batch transform job. For information about SageMaker batch transform, see Use Batch Transform. + + Attributes + ---------------------- + transform_job_name: The name of the transform job. + transform_job_arn: The Amazon Resource Name (ARN) of the transform job. + transform_job_status: The status of the transform job. Transform job statuses are: InProgress - The job is in progress. Completed - The job has completed. Failed - The transform job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTransformJob call. Stopping - The transform job is stopping. Stopped - The transform job has stopped. + failure_reason: If the transform job failed, the reason it failed. + model_name: The name of the model associated with the transform job. + max_concurrent_transforms: The maximum number of parallel requests that can be sent to each instance in a transform job. If MaxConcurrentTransforms is set to 0 or left unset, SageMaker checks the optional execution-parameters to determine the settings for your chosen algorithm. If the execution-parameters endpoint is not enabled, the default value is 1. For built-in algorithms, you don't need to set a value for MaxConcurrentTransforms. + model_client_config + max_payload_in_mb: The maximum allowed size of the payload, in MB. A payload is the data portion of a record (without metadata). The value in MaxPayloadInMB must be greater than, or equal to, the size of a single record. To estimate the size of a record in MB, divide the size of your dataset by the number of records. To ensure that the records fit within the maximum payload size, we recommend using a slightly larger value. The default value is 6 MB. For cases where the payload might be arbitrarily large and is transmitted using HTTP chunked encoding, set the value to 0. This feature works only in supported algorithms. Currently, SageMaker built-in algorithms do not support HTTP chunked encoding. + batch_strategy: Specifies the number of records to include in a mini-batch for an HTTP inference request. A record is a single unit of input data that inference can be made on. For example, a single line in a CSV file is a record. + environment: The environment variables to set in the Docker container. We support up to 16 key and values entries in the map. + transform_input + transform_output + data_capture_config + transform_resources + creation_time: A timestamp that shows when the transform Job was created. + transform_start_time: Indicates when the transform job starts on ML instances. You are billed for the time interval between this time and the value of TransformEndTime. + transform_end_time: Indicates when the transform job has been completed, or has stopped or failed. You are billed for the time interval between this time and the value of TransformStartTime. + labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job that created the transform job. + auto_ml_job_arn: The Amazon Resource Name (ARN) of the AutoML job that created the transform job. + data_processing + experiment_config + tags: A list of tags associated with the transform job. + """ + + transform_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + transform_job_arn: Optional[StrPipeVar] = Unassigned() + transform_job_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + model_name: Optional[Union[StrPipeVar, object]] = Unassigned() + max_concurrent_transforms: Optional[int] = Unassigned() + model_client_config: Optional[ModelClientConfig] = Unassigned() + max_payload_in_mb: Optional[int] = Unassigned() + batch_strategy: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + transform_input: Optional[TransformInput] = Unassigned() + transform_output: Optional[TransformOutput] = Unassigned() + data_capture_config: Optional[BatchDataCaptureConfig] = Unassigned() + transform_resources: Optional[TransformResources] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + transform_start_time: Optional[datetime.datetime] = Unassigned() + transform_end_time: Optional[datetime.datetime] = Unassigned() + labeling_job_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + data_processing: Optional[DataProcessing] = Unassigned() + experiment_config: Optional[ExperimentConfig] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class ModelDashboardMonitoringSchedule(Base): + """ + ModelDashboardMonitoringSchedule + A monitoring schedule for a model displayed in the Amazon SageMaker Model Dashboard. + + Attributes + ---------------------- + monitoring_schedule_arn: The Amazon Resource Name (ARN) of a monitoring schedule. + monitoring_schedule_name: The name of a monitoring schedule. + monitoring_schedule_status: The status of the monitoring schedule. + monitoring_type: The monitor type of a model monitor. + failure_reason: If a monitoring job failed, provides the reason. + creation_time: A timestamp that indicates when the monitoring schedule was created. + last_modified_time: A timestamp that indicates when the monitoring schedule was last updated. + monitoring_schedule_config + endpoint_name: The endpoint which is monitored. + monitoring_alert_summaries: A JSON array where each element is a summary for a monitoring alert. + last_monitoring_execution_summary + batch_transform_input + """ + + monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() + monitoring_schedule_name: Optional[Union[StrPipeVar, object]] = Unassigned() + monitoring_schedule_status: Optional[StrPipeVar] = Unassigned() + monitoring_type: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + monitoring_schedule_config: Optional[MonitoringScheduleConfig] = Unassigned() + endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() + monitoring_alert_summaries: Optional[List[MonitoringAlertSummary]] = Unassigned() + last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() + batch_transform_input: Optional[BatchTransformInput] = Unassigned() + + +class ModelDashboardModelCard(Base): + """ + ModelDashboardModelCard + The model card for a model displayed in the Amazon SageMaker Model Dashboard. + + Attributes + ---------------------- + model_card_arn: The Amazon Resource Name (ARN) for a model card. + model_card_name: The name of a model card. + model_card_version: The model card version. + model_card_status: The model card status. + security_config: The KMS Key ID (KMSKeyId) for encryption of model card information. + creation_time: A timestamp that indicates when the model card was created. + created_by + last_modified_time: A timestamp that indicates when the model card was last updated. + last_modified_by + tags: The tags associated with a model card. + model_id: For models created in SageMaker, this is the model ARN. For models created outside of SageMaker, this is a user-customized string. + risk_rating: A model card's risk rating. Can be low, medium, or high. + """ + + model_card_arn: Optional[StrPipeVar] = Unassigned() + model_card_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_card_version: Optional[int] = Unassigned() + model_card_status: Optional[StrPipeVar] = Unassigned() + security_config: Optional[ModelCardSecurityConfig] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + model_id: Optional[StrPipeVar] = Unassigned() + risk_rating: Optional[StrPipeVar] = Unassigned() + + +class ModelDashboardModel(Base): + """ + ModelDashboardModel + A model displayed in the Amazon SageMaker Model Dashboard. + + Attributes + ---------------------- + model: A model displayed in the Model Dashboard. + endpoints: The endpoints that host a model. + last_batch_transform_job + monitoring_schedules: The monitoring schedules for a model. + model_card: The model card for a model. + """ + + model: Optional[Model] = Unassigned() + endpoints: Optional[List[ModelDashboardEndpoint]] = Unassigned() + last_batch_transform_job: Optional[TransformJob] = Unassigned() + monitoring_schedules: Optional[List[ModelDashboardMonitoringSchedule]] = Unassigned() + model_card: Optional[ModelDashboardModelCard] = Unassigned() + + +class ModelPackage(Base): + """ + ModelPackage + A container for your trained model that can be deployed for SageMaker inference. This can include inference code, artifacts, and metadata. The model package type can be one of the following. Versioned model: A part of a model package group in Model Registry. Unversioned model: Not part of a model package group and used in Amazon Web Services Marketplace. For more information, see CreateModelPackage . + + Attributes + ---------------------- + model_package_name: The name of the model package. The name can be as follows: For a versioned model, the name is automatically generated by SageMaker Model Registry and follows the format 'ModelPackageGroupName/ModelPackageVersion'. For an unversioned model, you must provide the name. + model_package_group_name: The model group to which the model belongs. + model_package_version: The version number of a versioned model. + model_package_registration_type: The package registration type of the model package. + model_package_arn: The Amazon Resource Name (ARN) of the model package. + model_package_description: The description of the model package. + creation_time: The time that the model package was created. + inference_specification: Defines how to perform inference generation after a training job is run. + source_algorithm_specification: A list of algorithms that were used to create a model package. + validation_specification: Specifies batch transform jobs that SageMaker runs to validate your model package. + model_package_status: The status of the model package. This can be one of the following values. PENDING - The model package is pending being created. IN_PROGRESS - The model package is in the process of being created. COMPLETED - The model package was successfully created. FAILED - The model package failed. DELETING - The model package is in the process of being deleted. + model_package_status_details: Specifies the validation and image scan statuses of the model package. + certify_for_marketplace: Whether the model package is to be certified to be listed on Amazon Web Services Marketplace. For information about listing model packages on Amazon Web Services Marketplace, see List Your Algorithm or Model Package on Amazon Web Services Marketplace. + model_approval_status: The approval status of the model. This can be one of the following values. APPROVED - The model is approved REJECTED - The model is rejected. PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. + created_by: Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. + metadata_properties: Metadata properties of the tracking entity, trial, or trial component. + model_metrics: Metrics for the model. + last_modified_time: The last time the model package was modified. + last_modified_by: Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. + approval_description: A description provided when the model approval is set. + domain: The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing. + task: The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. + sample_payload_url: The Amazon Simple Storage Service path where the sample payload are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). + additional_inference_specifications: An array of additional Inference Specification objects. + source_uri: The URI of the source for the model package. + security_config + model_card + model_life_cycle: A structure describing the current state of the model in its life cycle. + tags: A list of the tags associated with the model package. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + customer_metadata_properties: The metadata properties for the model package. + drift_check_baselines: Represents the drift check baselines that can be used when the model monitor is set using the model package. + skip_model_validation: Indicates if you want to skip model validation. + """ + + model_package_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_package_version: Optional[int] = Unassigned() + model_package_registration_type: Optional[StrPipeVar] = Unassigned() + model_package_arn: Optional[StrPipeVar] = Unassigned() + model_package_description: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + inference_specification: Optional[InferenceSpecification] = Unassigned() + source_algorithm_specification: Optional[SourceAlgorithmSpecification] = Unassigned() + validation_specification: Optional[ModelPackageValidationSpecification] = Unassigned() + model_package_status: Optional[StrPipeVar] = Unassigned() + model_package_status_details: Optional[ModelPackageStatusDetails] = Unassigned() + certify_for_marketplace: Optional[bool] = Unassigned() + model_approval_status: Optional[StrPipeVar] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + model_metrics: Optional[ModelMetrics] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + approval_description: Optional[StrPipeVar] = Unassigned() + domain: Optional[StrPipeVar] = Unassigned() + task: Optional[StrPipeVar] = Unassigned() + sample_payload_url: Optional[StrPipeVar] = Unassigned() + additional_inference_specifications: Optional[ + List[AdditionalInferenceSpecificationDefinition] + ] = Unassigned() + source_uri: Optional[StrPipeVar] = Unassigned() + security_config: Optional[ModelPackageSecurityConfig] = Unassigned() + model_card: Optional[ModelPackageModelCard] = Unassigned() + model_life_cycle: Optional[ModelLifeCycle] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + customer_metadata_properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + drift_check_baselines: Optional[DriftCheckBaselines] = Unassigned() + skip_model_validation: Optional[StrPipeVar] = Unassigned() + + +class ModelPackageGroup(Base): + """ + ModelPackageGroup + A group of versioned models in the Model Registry. + + Attributes + ---------------------- + model_package_group_name: The name of the model group. + model_package_group_arn: The Amazon Resource Name (ARN) of the model group. + model_package_group_description: The description for the model group. + creation_time: The time that the model group was created. + created_by + model_package_group_status: The status of the model group. This can be one of the following values. PENDING - The model group is pending being created. IN_PROGRESS - The model group is in the process of being created. COMPLETED - The model group was successfully created. FAILED - The model group failed. DELETING - The model group is in the process of being deleted. DELETE_FAILED - SageMaker failed to delete the model group. + tags: A list of the tags associated with the model group. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. + """ + + model_package_group_name: Optional[Union[StrPipeVar, object]] = Unassigned() + model_package_group_arn: Optional[StrPipeVar] = Unassigned() + model_package_group_description: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + model_package_group_status: Optional[StrPipeVar] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class NestedFilters(Base): + """ + NestedFilters + A list of nested Filter objects. A resource must satisfy the conditions of all filters to be included in the results returned from the Search API. For example, to filter on a training job's InputDataConfig property with a specific channel name and S3Uri prefix, define the following filters: '{Name:"InputDataConfig.ChannelName", "Operator":"Equals", "Value":"train"}', '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"Contains", "Value":"mybucket/catdata"}' + + Attributes + ---------------------- + nested_property_name: The name of the property to use in the nested filters. The value must match a listed property name, such as InputDataConfig. + filters: A list of filters. Each filter acts on a property. Filters must contain at least one Filters value. For example, a NestedFilters call might include a filter on the PropertyName parameter of the InputDataConfig property: InputDataConfig.DataSource.S3DataSource.S3Uri. + """ + + nested_property_name: StrPipeVar + filters: List[Filter] + + +class OnlineStoreConfigUpdate(Base): + """ + OnlineStoreConfigUpdate + Updates the feature group online store configuration. + + Attributes + ---------------------- + ttl_duration: Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide. + """ + + ttl_duration: Optional[TtlDuration] = Unassigned() + + +class Parent(Base): + """ + Parent + The trial that a trial component is associated with and the experiment the trial is part of. A component might not be associated with a trial. A component can be associated with multiple trials. + + Attributes + ---------------------- + trial_name: The name of the trial. + experiment_name: The name of the experiment. + """ + + trial_name: Optional[Union[StrPipeVar, object]] = Unassigned() + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + + +class Pipeline(Base): + """ + Pipeline + A SageMaker Model Building Pipeline instance. + + Attributes + ---------------------- + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_name: The name of the pipeline. + pipeline_display_name: The display name of the pipeline. + pipeline_description: The description of the pipeline. + role_arn: The Amazon Resource Name (ARN) of the role that created the pipeline. + pipeline_status: The status of the pipeline. + creation_time: The creation time of the pipeline. + last_modified_time: The time that the pipeline was last modified. + last_run_time: The time when the pipeline was last run. + created_by + last_modified_by + parallelism_configuration: The parallelism configuration applied to the pipeline. + tags: A list of tags that apply to the pipeline. + """ + + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_name: Optional[Union[StrPipeVar, object]] = Unassigned() + pipeline_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_description: Optional[StrPipeVar] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + pipeline_status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_run_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class PipelineExecution(Base): + """ + PipelineExecution + An execution of a pipeline. + + Attributes + ---------------------- + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline that was executed. + pipeline_execution_arn: The Amazon Resource Name (ARN) of the pipeline execution. + pipeline_execution_display_name: The display name of the pipeline execution. + pipeline_execution_status: The status of the pipeline status. + pipeline_execution_description: The description of the pipeline execution. + pipeline_experiment_config + failure_reason: If the execution failed, a message describing why. + creation_time: The creation time of the pipeline execution. + last_modified_time: The time that the pipeline execution was last modified. + created_by + last_modified_by + parallelism_configuration: The parallelism configuration applied to the pipeline execution. + selective_execution_config: The selective execution configuration applied to the pipeline run. + pipeline_parameters: Contains a list of pipeline parameters. This list can be empty. + pipeline_version_id: The ID of the pipeline version that started this execution. + pipeline_version_display_name: The display name of the pipeline version that started this execution. + """ + + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_execution_status: Optional[StrPipeVar] = Unassigned() + pipeline_execution_description: Optional[StrPipeVar] = Unassigned() + pipeline_experiment_config: Optional[PipelineExperimentConfig] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + parallelism_configuration: Optional[ParallelismConfiguration] = Unassigned() + selective_execution_config: Optional[SelectiveExecutionConfig] = Unassigned() + pipeline_parameters: Optional[List[Parameter]] = Unassigned() + pipeline_version_id: Optional[int] = Unassigned() + pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() + + +class PipelineVersion(Base): + """ + PipelineVersion + The version of the pipeline. + + Attributes + ---------------------- + pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. + pipeline_version_id: The ID of the pipeline version. + pipeline_version_display_name: The display name of the pipeline version. + pipeline_version_description: The description of the pipeline version. + creation_time: The creation time of the pipeline version. + last_modified_time: The time when the pipeline version was last modified. + created_by + last_modified_by + last_executed_pipeline_execution_arn: The Amazon Resource Name (ARN) of the most recent pipeline execution created from this pipeline version. + last_executed_pipeline_execution_display_name: The display name of the most recent pipeline execution created from this pipeline version. + last_executed_pipeline_execution_status: The status of the most recent pipeline execution created from this pipeline version. + """ + + pipeline_arn: Optional[StrPipeVar] = Unassigned() + pipeline_version_id: Optional[int] = Unassigned() + pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() + pipeline_version_description: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + last_executed_pipeline_execution_arn: Optional[StrPipeVar] = Unassigned() + last_executed_pipeline_execution_display_name: Optional[StrPipeVar] = Unassigned() + last_executed_pipeline_execution_status: Optional[StrPipeVar] = Unassigned() + + +class ProcessingJob(Base): + """ + ProcessingJob + An Amazon SageMaker processing job that is used to analyze data and evaluate models. For more information, see Process Data and Evaluate Models. + + Attributes + ---------------------- + processing_inputs: List of input configurations for the processing job. + processing_output_config + processing_job_name: The name of the processing job. + processing_resources + stopping_condition + app_specification + environment: Sets the environment variables in the Docker container. + network_config + role_arn: The ARN of the role used to create the processing job. + experiment_config + processing_job_arn: The ARN of the processing job. + processing_job_status: The status of the processing job. + exit_message: A string, up to one KB in size, that contains metadata from the processing container when the processing job exits. + failure_reason: A string, up to one KB in size, that contains the reason a processing job failed, if it failed. + processing_end_time: The time that the processing job ended. + processing_start_time: The time that the processing job started. + last_modified_time: The time the processing job was last modified. + creation_time: The time the processing job was created. + monitoring_schedule_arn: The ARN of a monitoring schedule for an endpoint associated with this processing job. + auto_ml_job_arn: The Amazon Resource Name (ARN) of the AutoML job associated with this processing job. + training_job_arn: The ARN of the training job associated with this processing job. + tags: 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. + """ + + processing_inputs: Optional[List[ProcessingInput]] = Unassigned() + processing_output_config: Optional[ProcessingOutputConfig] = Unassigned() + processing_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + processing_resources: Optional[ProcessingResources] = Unassigned() + stopping_condition: Optional[ProcessingStoppingCondition] = Unassigned() + app_specification: Optional[AppSpecification] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + network_config: Optional[NetworkConfig] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + experiment_config: Optional[ExperimentConfig] = Unassigned() + processing_job_arn: Optional[StrPipeVar] = Unassigned() + processing_job_status: Optional[StrPipeVar] = Unassigned() + exit_message: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + processing_end_time: Optional[datetime.datetime] = Unassigned() + processing_start_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + training_job_arn: Optional[StrPipeVar] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class ProfilerConfigForUpdate(Base): + """ + ProfilerConfigForUpdate + Configuration information for updating the Amazon SageMaker Debugger profile parameters, system and framework metrics configurations, and storage paths. + + Attributes + ---------------------- + s3_output_path: Path to Amazon S3 storage location for system and framework metrics. + profiling_interval_in_milliseconds: A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. + profiling_parameters: Configuration information for capturing framework metrics. Available key strings for different profiling options are DetailedProfilingConfig, PythonProfilingConfig, and DataLoaderProfilingConfig. The following codes are configuration structures for the ProfilingParameters parameter. To learn more about how to configure the ProfilingParameters parameter, see Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job. + disable_profiler: To turn off Amazon SageMaker Debugger monitoring and profiling while a training job is in progress, set to True. + """ + + s3_output_path: Optional[StrPipeVar] = Unassigned() + profiling_interval_in_milliseconds: Optional[int] = Unassigned() + profiling_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + disable_profiler: Optional[bool] = Unassigned() + + +class Project(Base): + """ + Project + The properties of a project as returned by the Search API. + + Attributes + ---------------------- + project_arn: The Amazon Resource Name (ARN) of the project. + project_name: The name of the project. + project_id: The ID of the project. + project_description: The description of the project. + service_catalog_provisioning_details + service_catalog_provisioned_product_details + project_status: The status of the project. + created_by: Who created the project. + creation_time: A timestamp specifying when the project was created. + template_provider_details: An array of template providers associated with the project. + 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. + last_modified_time: A timestamp container for when the project was last modified. + last_modified_by + """ + + project_arn: Optional[StrPipeVar] = Unassigned() + project_name: Optional[Union[StrPipeVar, object]] = Unassigned() + project_id: Optional[StrPipeVar] = Unassigned() + project_description: Optional[StrPipeVar] = Unassigned() + service_catalog_provisioning_details: Optional[ServiceCatalogProvisioningDetails] = Unassigned() + service_catalog_provisioned_product_details: Optional[ + ServiceCatalogProvisionedProductDetails + ] = Unassigned() + project_status: Optional[StrPipeVar] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + template_provider_details: Optional[List[TemplateProviderDetail]] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + + +class QueryFilters(Base): + """ + QueryFilters + A set of filters to narrow the set of lineage entities connected to the StartArn(s) returned by the QueryLineage API action. + + Attributes + ---------------------- + types: Filter the lineage entities connected to the StartArn by type. For example: DataSet, Model, Endpoint, or ModelDeployment. + lineage_types: Filter the lineage entities connected to the StartArn(s) by the type of the lineage entity. + created_before: Filter the lineage entities connected to the StartArn(s) by created date. + created_after: Filter the lineage entities connected to the StartArn(s) after the create date. + modified_before: Filter the lineage entities connected to the StartArn(s) before the last modified date. + modified_after: Filter the lineage entities connected to the StartArn(s) after the last modified date. + properties: Filter the lineage entities connected to the StartArn(s) by a set if property key value pairs. If multiple pairs are provided, an entity is included in the results if it matches any of the provided pairs. + """ + + types: Optional[List[StrPipeVar]] = Unassigned() + lineage_types: Optional[List[StrPipeVar]] = Unassigned() + created_before: Optional[datetime.datetime] = Unassigned() + created_after: Optional[datetime.datetime] = Unassigned() + modified_before: Optional[datetime.datetime] = Unassigned() + modified_after: Optional[datetime.datetime] = Unassigned() + properties: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class Vertex(Base): + """ + Vertex + A lineage entity connected to the starting entity(ies). + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the lineage entity resource. + type: The type of the lineage entity resource. For example: DataSet, Model, Endpoint, etc... + lineage_type: The type of resource of the lineage entity. + """ + + arn: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() + lineage_type: Optional[StrPipeVar] = Unassigned() + + +class RemoteDebugConfigForUpdate(Base): + """ + RemoteDebugConfigForUpdate + Configuration for remote debugging for the UpdateTrainingJob API. 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. + + Attributes + ---------------------- + enable_remote_debug: If set to True, enables remote debugging. + """ + + enable_remote_debug: Optional[bool] = Unassigned() + + +class RenderableTask(Base): + """ + RenderableTask + Contains input values for a task. + + Attributes + ---------------------- + input: A JSON object that contains values for the variables defined in the template. It is made available to the template under the substitution variable task.input. For example, if you define a variable task.input.text in your template, you can supply the variable in the JSON object as "text": "sample text". + """ + + input: StrPipeVar + + +class RenderingError(Base): + """ + RenderingError + A description of an error that occurred while rendering the template. + + Attributes + ---------------------- + code: A unique identifier for a specific class of errors. + message: A human-readable message describing the error. + """ + + code: StrPipeVar + message: StrPipeVar + + +class ReservedCapacityOffering(Base): + """ + ReservedCapacityOffering + Details about a reserved capacity offering for a training plan offering. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + + Attributes + ---------------------- + reserved_capacity_type: The type of reserved capacity offering. + ultra_server_type: The type of UltraServer included in this reserved capacity offering, such as ml.u-p6e-gb200x72. + ultra_server_count: The number of UltraServers included in this reserved capacity offering. + instance_type: The instance type for the reserved capacity offering. + instance_count: The number of instances in the reserved capacity offering. + availability_zone: The availability zone for the reserved capacity offering. + duration_hours: The number of whole hours in the total duration for this reserved capacity offering. + duration_minutes: The additional minutes beyond whole hours in the total duration for this reserved capacity offering. + start_time: The start time of the reserved capacity offering. + end_time: The end time of the reserved capacity offering. + extension_start_time: The start time of the extension for the reserved capacity offering. + extension_end_time: The end time of the extension for the reserved capacity offering. + """ + + instance_type: StrPipeVar + instance_count: int + reserved_capacity_type: Optional[StrPipeVar] = Unassigned() + ultra_server_type: Optional[StrPipeVar] = Unassigned() + ultra_server_count: Optional[int] = Unassigned() + availability_zone: Optional[StrPipeVar] = Unassigned() + duration_hours: Optional[int] = Unassigned() + duration_minutes: Optional[int] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + extension_start_time: Optional[datetime.datetime] = Unassigned() + extension_end_time: Optional[datetime.datetime] = Unassigned() + + +class ResourceConfigForUpdate(Base): + """ + ResourceConfigForUpdate + The ResourceConfig to update KeepAlivePeriodInSeconds. Other fields in the ResourceConfig cannot be updated. + + Attributes + ---------------------- + keep_alive_period_in_seconds: The KeepAlivePeriodInSeconds value specified in the ResourceConfig to update. + """ + + keep_alive_period_in_seconds: int + + +class ResourceInUse(Base): + """ + ResourceInUse + Resource being accessed is in use. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class ResourceLimitExceeded(Base): + """ + ResourceLimitExceeded + You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. + + Attributes + ---------------------- + message + """ + + message: Optional[StrPipeVar] = Unassigned() + + +class SearchExpression(Base): + """ + SearchExpression + A multi-expression that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. You must specify at least one subexpression, filter, or nested filter. A SearchExpression can contain up to twenty elements. A SearchExpression contains the following components: A list of Filter objects. Each filter defines a simple Boolean expression comprised of a resource property name, Boolean operator, and value. A list of NestedFilter objects. Each nested filter defines a list of Boolean expressions using a list of resource properties. A nested filter is satisfied if a single object in the list satisfies all Boolean expressions. A list of SearchExpression objects. A search expression object can be nested in a list of search expression objects. A Boolean operator: And or Or. + + Attributes + ---------------------- + filters: A list of filter objects. + nested_filters: A list of nested filter objects. + sub_expressions: A list of search expression objects. + operator: A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists to be satisfied for the entire search expression to be true, specify And. If only a single conditional statement needs to be true for the entire search expression to be true, specify Or. The default value is And. + """ + + filters: Optional[List[Filter]] = Unassigned() + nested_filters: Optional[List[NestedFilters]] = Unassigned() + sub_expressions: Optional[List["SearchExpression"]] = Unassigned() + operator: Optional[StrPipeVar] = Unassigned() + + +class TrainingJob(Base): + """ + TrainingJob + Contains information about a training job. + + Attributes + ---------------------- + training_job_name: The name of the training job. + training_job_arn: The Amazon Resource Name (ARN) of the training job. + tuning_job_arn: The Amazon Resource Name (ARN) of the associated hyperparameter tuning job if the training job was launched by a hyperparameter tuning job. + labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job. + auto_ml_job_arn: The Amazon Resource Name (ARN) of the job. + model_artifacts: Information about the Amazon S3 location that is configured for storing model artifacts. + training_job_status: The status of the training job. Training job statuses are: InProgress - The training is in progress. Completed - The training job has completed. Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call. Stopping - The training job is stopping. Stopped - The training job has stopped. For more detailed information, see SecondaryStatus. + secondary_status: Provides detailed information about the state of the training job. For detailed information about the secondary status of the training job, see StatusMessage under SecondaryStatusTransition. SageMaker provides primary statuses and secondary statuses that apply to each of them: InProgress Starting - Starting the training job. Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes. Training - Training is in progress. Uploading - Training is complete and the model artifacts are being uploaded to the S3 location. Completed Completed - The training job has completed. Failed Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse. Stopped MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime. Stopped - The training job has stopped. Stopping Stopping - Stopping the training job. Valid values for SecondaryStatus are subject to change. We no longer support the following secondary statuses: LaunchingMLInstances PreparingTrainingStack DownloadingTrainingImage + failure_reason: If the training job failed, the reason it failed. + hyper_parameters: Algorithm-specific parameters. + algorithm_specification: Information about the algorithm used for training, and algorithm metadata. + role_arn: The Amazon Web Services Identity and Access Management (IAM) role configured for the training job. + input_data_config: An array of Channel objects that describes each data input channel. Your input must be in the same Amazon Web Services region as your training job. + output_data_config: The S3 path where model artifacts that you configured when creating the job are stored. SageMaker creates subfolders for model artifacts. + resource_config: Resources, including ML compute instances and ML storage volumes, that are configured for model training. + vpc_config: A VpcConfig object that specifies the VPC that this training job has access to. For more information, see Protect Training Jobs by Using an Amazon Virtual Private Cloud. + 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. + creation_time: A timestamp that indicates when the training job was created. + training_start_time: Indicates the time when the training job starts on training instances. You are billed for the time interval between this time and the value of TrainingEndTime. The start time in CloudWatch Logs might be later than this time. The difference is due to the time it takes to download the training data and to the size of the training container. + training_end_time: Indicates the time when the training job ends on training instances. You are billed for the time interval between the value of TrainingStartTime and this time. For successful jobs and stopped jobs, this is the time after model artifacts are uploaded. For failed jobs, this is the time when SageMaker detects a job failure. + last_modified_time: A timestamp that indicates when the status of the training job was last modified. + secondary_status_transitions: A history of all of the secondary statuses that the training job has transitioned through. + final_metric_data_list: A list of final metric values that are set when the training job completes. Used only if the training job was configured to use metrics. + enable_network_isolation: If the TrainingJob was created with network isolation, the value is set to true. If network isolation is enabled, nodes can't communicate beyond the VPC they run in. + 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. + enable_managed_spot_training: When true, enables managed spot training using Amazon EC2 Spot instances to run training jobs instead of on-demand instances. For more information, see Managed Spot Training. + checkpoint_config + training_time_in_seconds: The training time in seconds. + billable_time_in_seconds: The billable time in seconds. + debug_hook_config + experiment_config + debug_rule_configurations: Information about the debug rule configuration. + tensor_board_output_config + debug_rule_evaluation_statuses: Information about the evaluation status of the rules for the training job. + output_model_package_arn: The output model package Amazon Resource Name (ARN) that contains model weights or checkpoint. + model_package_config: The model package configuration. + profiler_config + environment: The environment variables to set in the Docker container. + retry_strategy: The number of times to retry the job when the job fails due to an InternalServerError. + 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. + """ + + training_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() + training_job_arn: Optional[StrPipeVar] = Unassigned() + tuning_job_arn: Optional[StrPipeVar] = Unassigned() + labeling_job_arn: Optional[StrPipeVar] = Unassigned() + auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() + model_artifacts: Optional[ModelArtifacts] = Unassigned() + training_job_status: Optional[StrPipeVar] = Unassigned() + secondary_status: Optional[StrPipeVar] = Unassigned() + failure_reason: Optional[StrPipeVar] = Unassigned() + hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + algorithm_specification: Optional[AlgorithmSpecification] = Unassigned() + role_arn: Optional[StrPipeVar] = Unassigned() + input_data_config: Optional[List[Channel]] = Unassigned() + output_data_config: Optional[OutputDataConfig] = Unassigned() + resource_config: Optional[ResourceConfig] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() + stopping_condition: Optional[StoppingCondition] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + training_start_time: Optional[datetime.datetime] = Unassigned() + training_end_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + secondary_status_transitions: Optional[List[SecondaryStatusTransition]] = Unassigned() + final_metric_data_list: Optional[List[MetricData]] = Unassigned() + enable_network_isolation: Optional[bool] = Unassigned() + enable_inter_container_traffic_encryption: Optional[bool] = Unassigned() + enable_managed_spot_training: Optional[bool] = Unassigned() + checkpoint_config: Optional[CheckpointConfig] = Unassigned() + training_time_in_seconds: Optional[int] = Unassigned() + billable_time_in_seconds: Optional[int] = Unassigned() + debug_hook_config: Optional[DebugHookConfig] = Unassigned() + experiment_config: Optional[ExperimentConfig] = Unassigned() + debug_rule_configurations: Optional[List[DebugRuleConfiguration]] = Unassigned() + tensor_board_output_config: Optional[TensorBoardOutputConfig] = Unassigned() + debug_rule_evaluation_statuses: Optional[List[DebugRuleEvaluationStatus]] = Unassigned() + output_model_package_arn: Optional[StrPipeVar] = Unassigned() + model_package_config: Optional[ModelPackageConfig] = Unassigned() + profiler_config: Optional[ProfilerConfig] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + retry_strategy: Optional[RetryStrategy] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + + +class TrialComponentSimpleSummary(Base): + """ + TrialComponentSimpleSummary + A short summary of a trial component. + + Attributes + ---------------------- + trial_component_name: The name of the trial component. + trial_component_arn: The Amazon Resource Name (ARN) of the trial component. + trial_component_source + creation_time: When the component was created. + created_by + """ + + trial_component_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_component_arn: Optional[StrPipeVar] = Unassigned() + trial_component_source: Optional[TrialComponentSource] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + + +class Trial(Base): + """ + Trial + The properties of a trial as returned by the Search API. + + Attributes + ---------------------- + trial_name: The name of the trial. + trial_arn: The Amazon Resource Name (ARN) of the trial. + display_name: The name of the trial as displayed. If DisplayName isn't specified, TrialName is displayed. + experiment_name: The name of the experiment the trial is part of. + source + creation_time: When the trial was created. + created_by: Who created the trial. + last_modified_time: Who last modified the trial. + last_modified_by + metadata_properties + tags: The list of tags that are associated with the trial. You can use Search API to search on the tags. + trial_component_summaries: A list of the components associated with the trial. For each component, a summary of the component's properties is included. + """ + + trial_name: Optional[Union[StrPipeVar, object]] = Unassigned() + trial_arn: Optional[StrPipeVar] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + experiment_name: Optional[Union[StrPipeVar, object]] = Unassigned() + source: Optional[TrialSource] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + trial_component_summaries: Optional[List[TrialComponentSimpleSummary]] = Unassigned() + + +class TrialComponentSourceDetail(Base): + """ + TrialComponentSourceDetail + Detailed information about the source of a trial component. Either ProcessingJob or TrainingJob is returned. + + Attributes + ---------------------- + source_arn: The Amazon Resource Name (ARN) of the source. + training_job: Information about a training job that's the source of a trial component. + processing_job: Information about a processing job that's the source of a trial component. + transform_job: Information about a transform job that's the source of a trial component. + """ + + source_arn: Optional[StrPipeVar] = Unassigned() + training_job: Optional[TrainingJob] = Unassigned() + processing_job: Optional[ProcessingJob] = Unassigned() + transform_job: Optional[TransformJob] = Unassigned() + + +class TrialComponent(Base): + """ + TrialComponent + The properties of a trial component as returned by the Search API. + + Attributes + ---------------------- + trial_component_name: The name of the trial component. + display_name: The name of the component as displayed. If DisplayName isn't specified, TrialComponentName is displayed. + trial_component_arn: The Amazon Resource Name (ARN) of the trial component. + source: The Amazon Resource Name (ARN) and job type of the source of the component. + status + start_time: When the component started. + end_time: When the component ended. + creation_time: When the component was created. + created_by: Who created the trial component. + last_modified_time: When the component was last modified. + last_modified_by + parameters: The hyperparameters of the component. + input_artifacts: The input artifacts of the component. + output_artifacts: The output artifacts of the component. + metrics: The metrics for the component. + metadata_properties + source_detail: Details of the source of the component. + lineage_group_arn: The Amazon Resource Name (ARN) of the lineage group resource. + tags: The list of tags that are associated with the component. You can use Search API to search on the tags. + parents: An array of the parents of the component. A parent is a trial the component is associated with and the experiment the trial is part of. A component might not have any parents. + run_name: The name of the experiment run. + """ + + trial_component_name: Optional[Union[StrPipeVar, object]] = Unassigned() + display_name: Optional[StrPipeVar] = Unassigned() + trial_component_arn: Optional[StrPipeVar] = Unassigned() + source: Optional[TrialComponentSource] = Unassigned() + status: Optional[TrialComponentStatus] = Unassigned() + start_time: Optional[datetime.datetime] = Unassigned() + end_time: Optional[datetime.datetime] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + created_by: Optional[UserContext] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + last_modified_by: Optional[UserContext] = Unassigned() + parameters: Optional[Dict[StrPipeVar, TrialComponentParameterValue]] = Unassigned() + input_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned() + output_artifacts: Optional[Dict[StrPipeVar, TrialComponentArtifact]] = Unassigned() + metrics: Optional[List[TrialComponentMetricSummary]] = Unassigned() + metadata_properties: Optional[MetadataProperties] = Unassigned() + source_detail: Optional[TrialComponentSourceDetail] = Unassigned() + lineage_group_arn: Optional[StrPipeVar] = Unassigned() + tags: Optional[List[Tag]] = Unassigned() + parents: Optional[List[Parent]] = Unassigned() + run_name: Optional[StrPipeVar] = Unassigned() + + +class SearchRecord(Base): + """ + SearchRecord + A single resource returned as part of the Search API response. + + Attributes + ---------------------- + training_job: The properties of a training job. + experiment: The properties of an experiment. + trial: The properties of a trial. + trial_component: The properties of a trial component. + endpoint + model_package + model_package_group + pipeline + pipeline_execution + pipeline_version: The version of the pipeline. + feature_group + feature_metadata: The feature metadata used to search through the features. + project: The properties of a project. + hyper_parameter_tuning_job: The properties of a hyperparameter tuning job. + model_card: An Amazon SageMaker Model Card that documents details about a machine learning model. + model + """ + + training_job: Optional[TrainingJob] = Unassigned() + experiment: Optional[Experiment] = Unassigned() + trial: Optional[Trial] = Unassigned() + trial_component: Optional[TrialComponent] = Unassigned() + endpoint: Optional[Endpoint] = Unassigned() + model_package: Optional[ModelPackage] = Unassigned() + model_package_group: Optional[ModelPackageGroup] = Unassigned() + pipeline: Optional[Pipeline] = Unassigned() + pipeline_execution: Optional[PipelineExecution] = Unassigned() + pipeline_version: Optional[PipelineVersion] = Unassigned() + feature_group: Optional[FeatureGroup] = Unassigned() + feature_metadata: Optional[FeatureMetadata] = Unassigned() + project: Optional[Project] = Unassigned() + hyper_parameter_tuning_job: Optional[HyperParameterTuningJobSearchEntity] = Unassigned() + model_card: Optional[ModelCard] = Unassigned() + model: Optional[ModelDashboardModel] = Unassigned() + + +class VisibilityConditions(Base): + """ + VisibilityConditions + The list of key-value pairs used to filter your search results. If a search result contains a key from your list, it is included in the final search response if the value associated with the key in the result matches the value you specified. If the value doesn't match, the result is excluded from the search response. Any resources that don't have a key from the list that you've provided will also be included in the search response. + + Attributes + ---------------------- + key: The key that specifies the tag that you're using to filter the search results. It must be in the following format: Tags.<key>. + value: The value for the tag that you're using to filter the search results. + """ + + key: Optional[StrPipeVar] = Unassigned() + value: Optional[StrPipeVar] = Unassigned() + + +class TotalHits(Base): + """ + TotalHits + Represents the total number of matching results and indicates how accurate that count is. The Value field provides the count, which may be exact or estimated. The Relation field indicates whether it's an exact figure or a lower bound. This helps understand the full scope of search results, especially when dealing with large result sets. + + Attributes + ---------------------- + value: The total number of matching results. This value may be exact or an estimate, depending on the Relation field. + relation: Indicates the relationship between the returned Value and the actual total number of matching results. Possible values are: EqualTo: The Value is the exact count of matching results. GreaterThanOrEqualTo: The Value is a lower bound of the actual count of matching results. + """ + + value: Optional[int] = Unassigned() + relation: Optional[StrPipeVar] = Unassigned() + + +class TrainingPlanOffering(Base): + """ + TrainingPlanOffering + Details about a training plan offering. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . + + Attributes + ---------------------- + training_plan_offering_id: The unique identifier for this training plan offering. + target_resources: The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) for this training plan offering. 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. A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment. + requested_start_time_after: The requested start time that the user specified when searching for the training plan offering. + requested_end_time_before: The requested end time that the user specified when searching for the training plan offering. + duration_hours: The number of whole hours in the total duration for this training plan offering. + duration_minutes: The additional minutes beyond whole hours in the total duration for this training plan offering. + upfront_fee: The upfront fee for this training plan offering. + currency_code: The currency code for the upfront fee (e.g., USD). + reserved_capacity_offerings: A list of reserved capacity offerings associated with this training plan offering. + """ + + training_plan_offering_id: StrPipeVar + target_resources: List[StrPipeVar] + requested_start_time_after: Optional[datetime.datetime] = Unassigned() + requested_end_time_before: Optional[datetime.datetime] = Unassigned() + duration_hours: Optional[int] = Unassigned() + duration_minutes: Optional[int] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() + reserved_capacity_offerings: Optional[List[ReservedCapacityOffering]] = Unassigned() + + +class TrainingPlanExtensionOffering(Base): + """ + TrainingPlanExtensionOffering + Details about an available extension offering for a training plan. Use the offering ID with the ExtendTrainingPlan API to extend a training plan. + + Attributes + ---------------------- + training_plan_extension_offering_id: The unique identifier for this extension offering. + availability_zone: The Availability Zone for this extension offering. + start_date: The start date of this extension offering. + end_date: The end date of this extension offering. + duration_hours: The duration of this extension offering in hours. + upfront_fee: The upfront fee for this extension offering. + currency_code: The currency code for the upfront fee (e.g., USD). + """ + + training_plan_extension_offering_id: StrPipeVar + availability_zone: Optional[StrPipeVar] = Unassigned() + start_date: Optional[datetime.datetime] = Unassigned() + end_date: Optional[datetime.datetime] = Unassigned() + duration_hours: Optional[int] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() + + +class ServiceCatalogProvisioningUpdateDetails(Base): + """ + ServiceCatalogProvisioningUpdateDetails + Details that you specify to provision a service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog. + + Attributes + ---------------------- + provisioning_artifact_id: The ID of the provisioning artifact. + provisioning_parameters: A list of key value pairs that you specify when you provision a product. + """ + + provisioning_artifact_id: Optional[StrPipeVar] = Unassigned() + provisioning_parameters: Optional[List[ProvisioningParameter]] = Unassigned() + + +class ThroughputConfigUpdate(Base): + """ + ThroughputConfigUpdate + The new throughput configuration for the feature group. You can switch between on-demand and provisioned modes or update the read / write capacity of provisioned feature groups. You can switch a feature group to on-demand only once in a 24 hour period. + + Attributes + ---------------------- + throughput_mode: Target throughput mode of the feature group. Throughput update is an asynchronous operation, and the outcome should be monitored by polling LastUpdateStatus field in DescribeFeatureGroup response. You cannot update a feature group's throughput while another update is in progress. + provisioned_read_capacity_units: For provisioned feature groups with online store enabled, this indicates the read throughput you are billed for and can consume without throttling. + provisioned_write_capacity_units: For provisioned feature groups, this indicates the write throughput you are billed for and can consume without throttling. + """ + + throughput_mode: Optional[StrPipeVar] = Unassigned() + provisioned_read_capacity_units: Optional[int] = Unassigned() + 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: StrPipeVar + + +class VariantProperty(Base): + """ + VariantProperty + Specifies a production variant property type for an Endpoint. If you are updating an endpoint with the RetainAllVariantProperties option of UpdateEndpointInput set to true, the VariantProperty objects listed in the ExcludeRetainedVariantProperties parameter of UpdateEndpointInput override the existing variant properties of the endpoint. + + Attributes + ---------------------- + variant_property_type: The type of variant property. The supported values are: DesiredInstanceCount: Overrides the existing variant instance counts using the InitialInstanceCount values in the ProductionVariants of CreateEndpointConfig. DesiredWeight: Overrides the existing variant weights using the InitialVariantWeight values in the ProductionVariants of CreateEndpointConfig. DataCaptureConfig: (Not currently supported.) + """ + + variant_property_type: StrPipeVar + + +class UpdateTemplateProvider(Base): + """ + UpdateTemplateProvider + Contains configuration details for updating an existing template provider in the project. + + Attributes + ---------------------- + cfn_template_provider: The CloudFormation template provider configuration to update. + """ + + cfn_template_provider: Optional[CfnUpdateTemplateProvider] = Unassigned() diff --git a/sagemaker-core/src/sagemaker/core/shapes/shapes.py b/sagemaker-core/src/sagemaker/core/shapes/shapes.py index adbcf6ec67..8f99bcba8c 100644 --- a/sagemaker-core/src/sagemaker/core/shapes/shapes.py +++ b/sagemaker-core/src/sagemaker/core/shapes/shapes.py @@ -13,10 +13,10 @@ import datetime import warnings -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict from typing import List, Dict, Optional, Any, Union from sagemaker.core.utils.utils import Unassigned -from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar, BoolPipeVar +from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar # Suppress Pydantic warnings about field names shadowing parent attributes warnings.filterwarnings("ignore", message=".*shadows an attribute.*") @@ -370,18 +370,17 @@ class ResourceNotFound(Base): class MetricQuery(Base): """ MetricQuery + Specifies a query to retrieve training metrics from SageMaker. Attributes ---------------------- - metric_name - resource_arn - metric_stat - period - x_axis_type - start - end - start_iteration_number - end_iteration_number + metric_name: The name of the metric to retrieve. + resource_arn: The ARN of the SageMaker resource to retrieve metrics for. + metric_stat: The metrics stat type of metrics to retrieve. + period: The time period of metrics to retrieve. + x_axis_type: The x-axis type of metrics to retrieve. + start: The start time of metrics to retrieve. + end: The end time of metrics to retrieve. """ metric_name: StrPipeVar @@ -389,30 +388,27 @@ class MetricQuery(Base): metric_stat: StrPipeVar period: StrPipeVar x_axis_type: StrPipeVar - start: Optional[datetime.datetime] = Unassigned() - end: Optional[datetime.datetime] = Unassigned() - start_iteration_number: Optional[int] = Unassigned() - end_iteration_number: Optional[int] = Unassigned() + start: Optional[int] = Unassigned() + end: Optional[int] = Unassigned() class MetricQueryResult(Base): """ MetricQueryResult + The result of a query to retrieve training metrics from SageMaker. Attributes ---------------------- - status - message - iteration_numbers - timestamps - metric_values + status: The status of the metric query. + message: A message describing the status of the metric query. + x_axis_values: The values for the x-axis of the metrics. + metric_values: The metric values retrieved by the query. """ status: StrPipeVar + x_axis_values: List[int] metric_values: List[float] message: Optional[StrPipeVar] = Unassigned() - iteration_numbers: Optional[List[int]] = Unassigned() - timestamps: Optional[List[datetime.datetime]] = Unassigned() class BatchGetMetricsResponse(Base): @@ -421,7 +417,7 @@ class BatchGetMetricsResponse(Base): Attributes ---------------------- - metric_query_results + metric_query_results: The results of a query to retrieve training metrics from SageMaker. """ metric_query_results: Optional[List[MetricQueryResult]] = Unassigned() @@ -430,240 +426,635 @@ class BatchGetMetricsResponse(Base): class BatchPutMetricsError(Base): """ BatchPutMetricsError + An error that occured when putting the metric data. Attributes ---------------------- - code - message - metric_index + code: The error code of an error that occured when attempting to put metrics. METRIC_LIMIT_EXCEEDED: The maximum amount of metrics per resource is exceeded. INTERNAL_ERROR: An internal error occured. VALIDATION_ERROR: The metric data failed validation. CONFLICT_ERROR: Multiple requests attempted to modify the same data simultaneously. + metric_index: An index that corresponds to the metric in the request. """ - code: StrPipeVar - message: StrPipeVar - metric_index: int + code: Optional[StrPipeVar] = Unassigned() + metric_index: Optional[int] = Unassigned() class RawMetricData(Base): """ RawMetricData + The raw metric data to associate with the resource. Attributes ---------------------- - metric_name - timestamp - iteration_number - value + metric_name: The name of the metric. + timestamp: The time that the metric was recorded. + step: The metric step (epoch). + value: The metric value. """ metric_name: StrPipeVar timestamp: datetime.datetime value: float - iteration_number: Optional[int] = Unassigned() + step: Optional[int] = Unassigned() -class AcceleratorPartitionConfig(Base): +class AIBenchmarkInferenceComponent(Base): """ - AcceleratorPartitionConfig + AIBenchmarkInferenceComponent + An inference component to benchmark. Attributes ---------------------- - type - count + identifier: The name or Amazon Resource Name (ARN) of the inference component. """ - type: StrPipeVar - count: int + identifier: StrPipeVar -class AccessDeniedException(Base): +class AIBenchmarkEndpoint(Base): """ - AccessDeniedException + AIBenchmarkEndpoint + The SageMaker endpoint configuration for benchmarking. Attributes ---------------------- - message + identifier: The name or Amazon Resource Name (ARN) of the SageMaker endpoint to benchmark. + target_container_hostname: The hostname of the specific container to target within a multi-container endpoint. + inference_components: The list of inference components to benchmark on the endpoint. """ - message: Optional[StrPipeVar] = Unassigned() + identifier: StrPipeVar + target_container_hostname: Optional[StrPipeVar] = Unassigned() + inference_components: Optional[List[AIBenchmarkInferenceComponent]] = Unassigned() -class ActionSource(Base): +class AIBenchmarkJobSummary(Base): """ - ActionSource - A structure describing the source of an action. + AIBenchmarkJobSummary + Summary information about an AI benchmark job. Attributes ---------------------- - source_uri: The URI of the source. - source_type: The type of the source. - source_id: The ID of the source. + ai_benchmark_job_name: The name of the benchmark job. + ai_benchmark_job_arn: The Amazon Resource Name (ARN) of the benchmark job. + ai_benchmark_job_status: The status of the benchmark job. + creation_time: A timestamp that indicates when the benchmark job was created. + end_time: A timestamp that indicates when the benchmark job completed. + ai_workload_config_name: The name of the AI workload configuration used by the benchmark job. """ - source_uri: StrPipeVar - source_type: Optional[StrPipeVar] = Unassigned() - source_id: Optional[StrPipeVar] = Unassigned() + ai_benchmark_job_name: StrPipeVar + ai_benchmark_job_arn: StrPipeVar + ai_benchmark_job_status: StrPipeVar + creation_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + ai_workload_config_name: Optional[StrPipeVar] = Unassigned() -class ActionSummary(Base): +class VpcConfig(Base): """ - ActionSummary - Lists the properties of an action. An action represents an action or activity. Some examples are a workflow step and a model deployment. Generally, an action involves at least one input artifact or output artifact. + VpcConfig + Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. Attributes ---------------------- - action_arn: The Amazon Resource Name (ARN) of the action. - action_name: The name of the action. - source: The source of the action. - action_type: The type of the action. - status: The status of the action. - creation_time: When the action was created. - last_modified_time: When the action was last modified. + security_group_ids: The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones. """ - action_arn: Optional[StrPipeVar] = Unassigned() - action_name: Optional[Union[StrPipeVar, object]] = Unassigned() - source: Optional[ActionSource] = Unassigned() - action_type: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] -class ActivationStateV1(Base): +class AIBenchmarkNetworkConfig(Base): """ - ActivationStateV1 + AIBenchmarkNetworkConfig + The network configuration for an AI benchmark job. Attributes ---------------------- - enabled + vpc_config: The VPC configuration, including security group IDs and subnet IDs. """ - enabled: Optional[bool] = Unassigned() + vpc_config: Optional[VpcConfig] = Unassigned() -class IamIdentity(Base): +class AIBenchmarkOutputConfig(Base): """ - IamIdentity - The IAM Identity details associated with the user. These details are associated with model package groups, model packages and project entities only. + AIBenchmarkOutputConfig + The output configuration for an AI benchmark job. Attributes ---------------------- - arn: The Amazon Resource Name (ARN) of the IAM identity. - principal_id: The ID of the principal that assumes the IAM identity. - source_identity: The person or application which assumes the IAM identity. + s3_output_location: The Amazon S3 URI where benchmark results are stored. """ - arn: Optional[StrPipeVar] = Unassigned() - principal_id: Optional[StrPipeVar] = Unassigned() - source_identity: Optional[StrPipeVar] = Unassigned() + s3_output_location: StrPipeVar -class UserContext(Base): +class AICloudWatchLogs(Base): """ - UserContext - Information about the user who created or modified a SageMaker resource. + AICloudWatchLogs + CloudWatch log information for an AI benchmark or recommendation job. Attributes ---------------------- - user_profile_arn: The Amazon Resource Name (ARN) of the user's profile. - user_profile_name: The name of the user's profile. - domain_id: The domain associated with the user. - iam_identity: The IAM Identity details associated with the user. These details are associated with model package groups, model packages, and project entities only. + log_group_arn: The Amazon Resource Name (ARN) of the CloudWatch log group. + log_stream_name: The name of the CloudWatch log stream. """ - user_profile_arn: Optional[StrPipeVar] = Unassigned() - user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() - domain_id: Optional[StrPipeVar] = Unassigned() - iam_identity: Optional[IamIdentity] = Unassigned() + log_group_arn: Optional[StrPipeVar] = Unassigned() + log_stream_name: Optional[StrPipeVar] = Unassigned() -class CustomerDetails(Base): +class AIBenchmarkOutputResult(Base): """ - CustomerDetails + AIBenchmarkOutputResult + The output result of an AI benchmark job, including the Amazon S3 location and CloudWatch log information. Attributes ---------------------- - account_id - user_context - organization_id + s3_output_location: The Amazon S3 URI where benchmark results are stored. + cloud_watch_logs: The CloudWatch log information for the benchmark job. """ - account_id: StrPipeVar - user_context: Optional[UserContext] = Unassigned() - organization_id: Optional[StrPipeVar] = Unassigned() + s3_output_location: StrPipeVar + cloud_watch_logs: Optional[List[AICloudWatchLogs]] = Unassigned() -class AddClusterNodeSpecification(Base): +class AIBenchmarkTarget(Base): """ - AddClusterNodeSpecification - Specifies an instance group and the number of nodes to add to it. + AIBenchmarkTarget + The target for an AI benchmark job. This is a union type — specify one of the members. Attributes ---------------------- - instance_group_name: The name of the instance group to which you want to add nodes. - increment_target_count_by: The number of nodes to add to the specified instance group. The total number of nodes across all instance groups in a single request cannot exceed 50. + endpoint: The SageMaker endpoint to benchmark. """ - instance_group_name: StrPipeVar - increment_target_count_by: int + endpoint: Optional[AIBenchmarkEndpoint] = Unassigned() -class OnlineStoreSecurityConfig(Base): +class AICapacityReservationConfig(Base): """ - OnlineStoreSecurityConfig - The security configuration for OnlineStore. + AICapacityReservationConfig + The capacity reservation configuration for an AI recommendation job. Attributes ---------------------- - kms_key_id: The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption. The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId: "kms:Encrypt" "kms:Decrypt" "kms:DescribeKey" "kms:CreateGrant" "kms:RetireGrant" "kms:ReEncryptFrom" "kms:ReEncryptTo" "kms:GenerateDataKey" "kms:ListAliases" "kms:ListGrants" "kms:RevokeGrant" The caller (either user or IAM role) to all DataPlane operations (PutRecord, GetRecord, DeleteRecord) must have the following permissions to the KmsKeyId: "kms:Decrypt" + capacity_reservation_preference: The capacity reservation preference. The only valid value is capacity-reservations-only. + ml_reservation_arns: The list of ML reservation ARNs to use. """ - kms_key_id: Optional[StrPipeVar] = Unassigned() + capacity_reservation_preference: Optional[StrPipeVar] = Unassigned() + ml_reservation_arns: Optional[List[StrPipeVar]] = Unassigned() -class OnlineStoreReplicaConfig(Base): +class AIWorkloadS3DataSource(Base): """ - OnlineStoreReplicaConfig + AIWorkloadS3DataSource + The Amazon S3 data source for an AI workload. Attributes ---------------------- - security_config + s3_uri: The Amazon S3 URI of the data. """ - security_config: Optional[OnlineStoreSecurityConfig] = Unassigned() + s3_uri: StrPipeVar -class Tag(Base): +class AIWorkloadDataSource(Base): """ - Tag - A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags. For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy. + AIWorkloadDataSource + The data source for an AI workload input data channel. Attributes ---------------------- - key: The tag key. Tag keys must be unique per resource. - value: The tag value. + s3_data_source: The Amazon S3 data source configuration. """ - key: StrPipeVar + s3_data_source: Optional[AIWorkloadS3DataSource] = Unassigned() + + +class AIWorkloadInputDataConfig(Base): + """ + AIWorkloadInputDataConfig + A channel of input data for an AI workload configuration. Each channel has a name and a data source. + + Attributes + ---------------------- + channel_name: The logical name for the data channel. + data_source: The data source for this channel. + """ + + channel_name: StrPipeVar + data_source: AIWorkloadDataSource + + +class AIDatasetConfig(Base): + """ + AIDatasetConfig + The dataset configuration for an AI workload. This is a union type — specify one of the members. + + Attributes + ---------------------- + input_data_config: An array of input data channel configurations for the workload. + """ + + input_data_config: Optional[List[AIWorkloadInputDataConfig]] = Unassigned() + + +class AIModelSourceS3(Base): + """ + AIModelSourceS3 + The Amazon S3 model source configuration. + + Attributes + ---------------------- + s3_uri: The Amazon S3 URI of the model artifacts. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + +class AIModelSource(Base): + """ + AIModelSource + The source of the model for an AI recommendation job. This is a union type. + + Attributes + ---------------------- + s3: The Amazon S3 location of the model artifacts. + """ + + s3: Optional[AIModelSourceS3] = Unassigned() + + +class AIRecommendationOptimizationDetail(Base): + """ + AIRecommendationOptimizationDetail + Details about an optimization technique applied in a recommendation. + + Attributes + ---------------------- + optimization_type: The type of optimization. Valid values are SpeculativeDecoding and KernelTuning. + optimization_config: A map of configuration parameters for the optimization technique. + """ + + optimization_type: StrPipeVar + optimization_config: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class AIRecommendationInstanceDetail(Base): + """ + AIRecommendationInstanceDetail + Instance details for a recommendation. + + Attributes + ---------------------- + instance_type: The recommended instance type. + instance_count: The recommended number of instances. + copy_count_per_instance: The number of model copies per instance. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[int] = Unassigned() + copy_count_per_instance: Optional[int] = Unassigned() + + +class AIRecommendationModelDetails(Base): + """ + AIRecommendationModelDetails + Details about the model package in a recommendation. + + Attributes + ---------------------- + model_package_arn: The Amazon Resource Name (ARN) of the model package. + inference_specification_name: The name of the inference specification within the model package. + instance_details: The instance details for this recommendation, including instance type, count, and model copies per instance. + """ + + model_package_arn: Optional[StrPipeVar] = Unassigned() + inference_specification_name: Optional[StrPipeVar] = Unassigned() + instance_details: Optional[List[AIRecommendationInstanceDetail]] = Unassigned() + + +class AIRecommendationDeploymentS3Channel(Base): + """ + AIRecommendationDeploymentS3Channel + An Amazon S3 data channel for a recommended deployment configuration, containing model artifacts or optimized model outputs. + + Attributes + ---------------------- + channel_name: A custom name for this Amazon S3 data channel. + uri: The Amazon S3 URI of the data for this channel. + """ + + channel_name: Optional[StrPipeVar] = Unassigned() + uri: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationDeploymentConfiguration(Base): + """ + AIRecommendationDeploymentConfiguration + The deployment configuration for a recommendation. + + Attributes + ---------------------- + s3: The Amazon S3 data channels for the deployment. + image_uri: The URI of the container image for the deployment. + instance_type: The recommended instance type for the deployment. + instance_count: The recommended number of instances for the deployment. + copy_count_per_instance: The number of model copies per instance. + environment_variables: The environment variables for the deployment. + """ + + s3: Optional[List[AIRecommendationDeploymentS3Channel]] = Unassigned() + image_uri: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + instance_count: Optional[int] = Unassigned() + copy_count_per_instance: Optional[int] = Unassigned() + environment_variables: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + + +class AIRecommendationPerformanceMetric(Base): + """ + AIRecommendationPerformanceMetric + An expected performance metric for a recommendation. + + Attributes + ---------------------- + metric: The name of the performance metric. + stat: The statistical measure for the metric. + value: The value of the metric. + unit: The unit of the metric value. + """ + + metric: StrPipeVar value: StrPipeVar + stat: Optional[StrPipeVar] = Unassigned() + unit: Optional[StrPipeVar] = Unassigned() -class AddOnlineStoreReplicaAction(Base): +class AIRecommendation(Base): """ - AddOnlineStoreReplicaAction + AIRecommendation + An optimization recommendation generated by an AI recommendation job. Attributes ---------------------- - region_name - online_store_config - description - tags + recommendation_description: A description of the recommendation. + optimization_details: The optimization techniques applied in this recommendation. + model_details: Details about the model package associated with this recommendation. + deployment_configuration: The deployment configuration for this recommendation, including the container image, instance type, instance count, and environment variables. + ai_benchmark_job_arn: The Amazon Resource Name (ARN) of the benchmark job associated with this recommendation. + expected_performance: The expected performance metrics for this recommendation. """ - region_name: StrPipeVar - online_store_config: Optional[OnlineStoreReplicaConfig] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() + recommendation_description: Optional[StrPipeVar] = Unassigned() + optimization_details: Optional[List[AIRecommendationOptimizationDetail]] = Unassigned() + model_details: Optional[AIRecommendationModelDetails] = Unassigned() + deployment_configuration: Optional[AIRecommendationDeploymentConfiguration] = Unassigned() + ai_benchmark_job_arn: Optional[StrPipeVar] = Unassigned() + expected_performance: Optional[List[AIRecommendationPerformanceMetric]] = Unassigned() + + +class AIRecommendationComputeSpec(Base): + """ + AIRecommendationComputeSpec + The compute resource specification for an AI recommendation job. + + Attributes + ---------------------- + instance_types: The list of instance types to consider for recommendations. You can specify up to 3 instance types. + capacity_reservation_config: The capacity reservation configuration. + """ + + instance_types: Optional[List[StrPipeVar]] = Unassigned() + capacity_reservation_config: Optional[AICapacityReservationConfig] = Unassigned() + + +class AIRecommendationConstraint(Base): + """ + AIRecommendationConstraint + A performance constraint for an AI recommendation job. + + Attributes + ---------------------- + metric: The performance metric. Valid values are ttft-ms (time to first token in milliseconds), throughput, and cost. + """ + + metric: StrPipeVar + + +class AIRecommendationInferenceSpecification(Base): + """ + AIRecommendationInferenceSpecification + The inference framework for an AI recommendation job. + + Attributes + ---------------------- + framework: The inference framework. Valid values are LMI and VLLM. + """ + + framework: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationJobSummary(Base): + """ + AIRecommendationJobSummary + Summary information about an AI recommendation job. + + Attributes + ---------------------- + ai_recommendation_job_name: The name of the recommendation job. + ai_recommendation_job_arn: The Amazon Resource Name (ARN) of the recommendation job. + ai_recommendation_job_status: The status of the recommendation job. + creation_time: A timestamp that indicates when the recommendation job was created. + end_time: A timestamp that indicates when the recommendation job completed. + """ + + ai_recommendation_job_name: StrPipeVar + ai_recommendation_job_arn: StrPipeVar + ai_recommendation_job_status: StrPipeVar + creation_time: datetime.datetime + end_time: Optional[datetime.datetime] = Unassigned() + + +class AIRecommendationOutputConfig(Base): + """ + AIRecommendationOutputConfig + The output configuration for an AI recommendation job. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where recommendation results are stored. + model_package_group_identifier: The name or Amazon Resource Name (ARN) of the model package group where the optimized model is registered as a new model package version. + """ + + s3_output_location: Optional[StrPipeVar] = Unassigned() + model_package_group_identifier: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationOutputResult(Base): + """ + AIRecommendationOutputResult + The output configuration for an AI recommendation job, including the S3 location for results and the model package group for deployment. + + Attributes + ---------------------- + s3_output_location: The Amazon S3 URI where the recommendation job writes its output results. + model_package_group_identifier: The name or Amazon Resource Name (ARN) of the model package group where deployment-ready model packages are registered. + """ + + s3_output_location: StrPipeVar + model_package_group_identifier: Optional[StrPipeVar] = Unassigned() + + +class AIRecommendationPerformanceTarget(Base): + """ + AIRecommendationPerformanceTarget + The performance targets for an AI recommendation job. + + Attributes + ---------------------- + constraints: An array of performance constraints that define the optimization objectives. + """ + + constraints: List[AIRecommendationConstraint] + + +class AIWorkloadConfigSummary(Base): + """ + AIWorkloadConfigSummary + Summary information about an AI workload configuration. + + Attributes + ---------------------- + ai_workload_config_name: The name of the AI workload configuration. + ai_workload_config_arn: The Amazon Resource Name (ARN) of the AI workload configuration. + creation_time: A timestamp that indicates when the configuration was created. + """ + + ai_workload_config_name: StrPipeVar + ai_workload_config_arn: StrPipeVar + creation_time: datetime.datetime + + +class WorkloadSpec(Base): + """ + WorkloadSpec + The workload specification for benchmark tool configuration. Provide an inline YAML or JSON string. + + Attributes + ---------------------- + inline: An inline YAML or JSON string that defines benchmark parameters. + """ + + inline: Optional[StrPipeVar] = Unassigned() + + +class AIWorkloadConfigs(Base): + """ + AIWorkloadConfigs + The benchmark tool configuration for an AI workload. + + Attributes + ---------------------- + workload_spec: The workload specification that defines benchmark parameters. + """ + + workload_spec: WorkloadSpec + + +class AcceleratorPartitionConfig(Base): + """ + AcceleratorPartitionConfig + Configuration for allocating accelerator partitions. + + Attributes + ---------------------- + type: The Multi-Instance GPU (MIG) profile type that defines the partition configuration. The profile specifies the compute and memory allocation for each partition instance. The available profile types depend on the instance type specified in the compute quota configuration. + count: The number of accelerator partitions to allocate with the specified partition type. If you don't specify a value for vCPU and MemoryInGiB, SageMaker AI automatically allocates ratio-based values for those parameters based on the accelerator partition count you provide. + """ + + type: StrPipeVar + count: int + + +class ActionSource(Base): + """ + ActionSource + A structure describing the source of an action. + + Attributes + ---------------------- + source_uri: The URI of the source. + source_type: The type of the source. + source_id: The ID of the source. + """ + + source_uri: StrPipeVar + source_type: Optional[StrPipeVar] = Unassigned() + source_id: Optional[StrPipeVar] = Unassigned() + + +class ActionSummary(Base): + """ + ActionSummary + Lists the properties of an action. An action represents an action or activity. Some examples are a workflow step and a model deployment. Generally, an action involves at least one input artifact or output artifact. + + Attributes + ---------------------- + action_arn: The Amazon Resource Name (ARN) of the action. + action_name: The name of the action. + source: The source of the action. + action_type: The type of the action. + status: The status of the action. + creation_time: When the action was created. + last_modified_time: When the action was last modified. + """ + + action_arn: Optional[StrPipeVar] = Unassigned() + action_name: Optional[Union[StrPipeVar, object]] = Unassigned() + source: Optional[ActionSource] = Unassigned() + action_type: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + creation_time: Optional[datetime.datetime] = Unassigned() + last_modified_time: Optional[datetime.datetime] = Unassigned() + + +class AddClusterNodeSpecification(Base): + """ + AddClusterNodeSpecification + Specifies an instance group and the number of nodes to add to it. + + Attributes + ---------------------- + instance_group_name: The name of the instance group to which you want to add nodes. + increment_target_count_by: The number of nodes to add to the specified instance group. The total number of nodes across all instance groups in a single request cannot exceed 50. + availability_zones: The availability zones in which to add nodes. Use this to target node placement in specific availability zones within a flexible instance group. + instance_types: The instance types to use when adding nodes. Use this to target specific instance types within a flexible instance group. + """ + + instance_group_name: StrPipeVar + increment_target_count_by: int + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() + + +class Tag(Base): + """ + Tag + A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources. You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags. For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy. + + Attributes + ---------------------- + key: The tag key. Tag keys must be unique per resource. + value: The tag value. + """ + + key: StrPipeVar + value: StrPipeVar class AdditionalEnis(Base): @@ -758,6 +1149,21 @@ class ModelInput(Base): data_input_config: StrPipeVar +class AdditionalModelDataSource(Base): + """ + AdditionalModelDataSource + Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModel action. + + Attributes + ---------------------- + channel_name: A custom name for this AdditionalModelDataSource object. + s3_data_source + """ + + channel_name: StrPipeVar + s3_data_source: S3ModelDataSource + + class AdditionalS3DataSource(Base): """ AdditionalS3DataSource @@ -768,28 +1174,25 @@ class AdditionalS3DataSource(Base): s3_data_type: The data type of the additional data source that you specify for use in inference or training. s3_uri: The uniform resource identifier (URI) used to identify an additional data source used in inference or training. compression_type: The type of compression used for an additional data source used in inference or training. Specify None if your additional data source is not compressed. - manifest_s3_uri e_tag: The ETag associated with S3 URI. - manifest_etag """ s3_data_type: StrPipeVar s3_uri: StrPipeVar compression_type: Optional[StrPipeVar] = Unassigned() - manifest_s3_uri: Optional[StrPipeVar] = Unassigned() e_tag: Optional[StrPipeVar] = Unassigned() - manifest_etag: Optional[StrPipeVar] = Unassigned() class BaseModel(Base): """ BaseModel + Identifies the foundation model that was used as the starting point for model customization. Attributes ---------------------- - hub_content_name - hub_content_version - recipe_name + hub_content_name: The hub content name of the base model. + hub_content_version: The hub content version of the base model. + recipe_name: The recipe name of the base model. """ hub_content_name: Optional[Union[StrPipeVar, object]] = Unassigned() @@ -815,15 +1218,15 @@ class ModelPackageContainerDefinition(Base): framework: The machine learning framework of the model package container image. framework_version: The framework version of the Model Package Container Image. nearest_model_name: The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model. You can find a list of benchmarked models by calling ListModelMetadata. - sample_payload_url + additional_model_data_sources: Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModelPackage action. additional_s3_data_source: The additional data source that is used during inference in the Docker container for your model package. model_data_e_tag: The ETag associated with Model Data URL. - is_checkpoint - base_model + is_checkpoint: Specifies whether the model data is a training checkpoint. + base_model: Identifies the foundation model that was used as the starting point for model customization. """ container_hostname: Optional[StrPipeVar] = Unassigned() - image: Optional[StrPipeVar] = Unassigned() # Revert back to autogen version + image: Optional[StrPipeVar] = Unassigned() image_digest: Optional[StrPipeVar] = Unassigned() model_data_url: Optional[StrPipeVar] = Unassigned() model_data_source: Optional[ModelDataSource] = Unassigned() @@ -833,7 +1236,7 @@ class ModelPackageContainerDefinition(Base): framework: Optional[StrPipeVar] = Unassigned() framework_version: Optional[StrPipeVar] = Unassigned() nearest_model_name: Optional[StrPipeVar] = Unassigned() - sample_payload_url: Optional[StrPipeVar] = Unassigned() + additional_model_data_sources: Optional[List[AdditionalModelDataSource]] = Unassigned() additional_s3_data_source: Optional[AdditionalS3DataSource] = Unassigned() model_data_e_tag: Optional[StrPipeVar] = Unassigned() is_checkpoint: Optional[bool] = Unassigned() @@ -865,21 +1268,6 @@ class AdditionalInferenceSpecificationDefinition(Base): supported_response_mime_types: Optional[List[StrPipeVar]] = Unassigned() -class AdditionalModelDataSource(Base): - """ - AdditionalModelDataSource - Data sources that are available to your model in addition to the one that you specify for ModelDataSource when you use the CreateModel action. - - Attributes - ---------------------- - channel_name: A custom name for this AdditionalModelDataSource object. - s3_data_source - """ - - channel_name: StrPipeVar - s3_data_source: S3ModelDataSource - - class AgentVersion(Base): """ AgentVersion @@ -895,22 +1283,6 @@ class AgentVersion(Base): agent_count: int -class AgentsCredentialProvider(Base): - """ - AgentsCredentialProvider - - Attributes - ---------------------- - algorithm_container_credential_provider - algorithm_container_secondary_credential_provider - training_image_credential_provider - """ - - training_image_credential_provider: StrPipeVar - algorithm_container_credential_provider: Optional[StrPipeVar] = Unassigned() - algorithm_container_secondary_credential_provider: Optional[StrPipeVar] = Unassigned() - - class Alarm(Base): """ Alarm @@ -1120,10 +1492,11 @@ class FileSystemDataSource(Base): class DatasetSource(Base): """ DatasetSource + Specifies a dataset source for a channel. Attributes ---------------------- - dataset_arn + dataset_arn: The Amazon Resource Name (ARN) of the dataset resource. """ dataset_arn: StrPipeVar @@ -1138,7 +1511,7 @@ class DataSource(Base): ---------------------- s3_data_source: The S3 location of the data source that is associated with a channel. file_system_data_source: The file system that is associated with a channel. - dataset_source + dataset_source: The dataset resource that's associated with a channel. """ s3_data_source: Optional[S3DataSource] = Unassigned() @@ -1173,7 +1546,6 @@ class Channel(Base): record_wrapper_type: Specify RecordIO as the value when input data is in raw format but the training algorithm requires the RecordIO format. In this case, SageMaker wraps each individual S3 object in a RecordIO record. If the input data is already in RecordIO format, you don't need to set this attribute. For more information, see Create a Dataset Using RecordIO. In File mode, leave this field unset or set it to None. input_mode: (Optional) The input mode to use for the data channel in a training job. If you don't set a value for InputMode, SageMaker uses the value set for TrainingInputMode. Use this parameter to override the TrainingInputMode setting in a AlgorithmSpecification request when you have a channel that needs a different input mode from the training job's general setting. To download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned ML storage volume, and mount the directory to a Docker volume, use File input mode. To stream data directly from Amazon S3 to the container, choose Pipe input mode. To use a model for incremental training, choose File input model. shuffle_config: A configuration for a shuffle option for input data in a channel. If you use S3Prefix for S3DataType, this shuffles the results of the S3 key prefix matches. If you use ManifestFile, the order of the S3 object references in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling order is determined using the Seed value. For Pipe input mode, shuffling is done at the start of every epoch. With large datasets this ensures that the order of the training data is different for each epoch, it helps reduce bias and possible overfitting. In a multi-node training job when ShuffleConfig is combined with S3DataDistributionType of ShardedByS3Key, the data is shuffled across nodes so that the content sent to a particular node on the first epoch might be sent to a different node on the second epoch. - enable_ffm """ channel_name: StrPipeVar @@ -1183,29 +1555,6 @@ class Channel(Base): record_wrapper_type: Optional[StrPipeVar] = Unassigned() input_mode: Optional[StrPipeVar] = Unassigned() shuffle_config: Optional[ShuffleConfig] = Unassigned() - enable_ffm: Optional[bool] = Unassigned() - - -class OutputChannel(Base): - """ - OutputChannel - - Attributes - ---------------------- - channel_name - local_path - s3_output_path - continuous_upload - kms_key_id - kms_encryption_context - """ - - channel_name: StrPipeVar - s3_output_path: StrPipeVar - local_path: Optional[StrPipeVar] = Unassigned() - continuous_upload: Optional[bool] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - kms_encryption_context: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() class OutputDataConfig(Base): @@ -1218,17 +1567,11 @@ class OutputDataConfig(Base): kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" If you use a KMS key ID or an alias of your KMS key, the SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. If the output data is stored in Amazon S3 Express One Zone, it is encrypted with server-side encryption with Amazon S3 managed keys (SSE-S3). KMS key is not supported for Amazon S3 Express One Zone The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. s3_output_path: Identifies the S3 path where you want SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix. compression_type: The model output compression type. Select None to output an uncompressed model, recommended for large model outputs. Defaults to gzip. - remove_job_name_from_s3_output_path - disable_model_upload - channels """ s3_output_path: StrPipeVar kms_key_id: Optional[StrPipeVar] = Unassigned() compression_type: Optional[StrPipeVar] = Unassigned() - remove_job_name_from_s3_output_path: Optional[bool] = Unassigned() - disable_model_upload: Optional[bool] = Unassigned() - channels: Optional[List[OutputChannel]] = Unassigned() class InstanceGroup(Base): @@ -1248,32 +1591,6 @@ class InstanceGroup(Base): instance_group_name: StrPipeVar -class CapacitySchedule(Base): - """ - CapacitySchedule - - Attributes - ---------------------- - capacity_schedule_arn - """ - - capacity_schedule_arn: StrPipeVar - - -class CapacitySchedulesConfig(Base): - """ - CapacitySchedulesConfig - - Attributes - ---------------------- - capacity_fallback_strategy - capacity_schedules - """ - - capacity_schedules: List[CapacitySchedule] - capacity_fallback_strategy: Optional[StrPipeVar] = Unassigned() - - class PlacementSpecification(Base): """ PlacementSpecification @@ -1313,12 +1630,10 @@ class ResourceConfig(Base): ---------------------- instance_type: The ML compute instance type. instance_count: The number of ML compute instances to use. For distributed training, provide a value greater than 1. - volume_size_in_gb: The size of the ML storage volume that you want to provision. ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification. When using an ML instance with NVMe SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5. When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML instance families that use EBS volumes include ml.c5 and ml.p2. To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. + volume_size_in_gb: The size of the ML storage volume that you want to provision. SageMaker automatically selects the volume size for serverless training jobs. You cannot customize this setting. ML storage volumes store model artifacts and incremental states. Training algorithms might also use the ML storage volume for scratch space. If you want to store the training data in the ML storage volume, choose File as the TrainingInputMode in the algorithm specification. When using an ML instance with NVMe SSD volumes, SageMaker doesn't provision Amazon EBS General Purpose SSD (gp2) storage. Available storage is fixed to the NVMe-type instance's storage capacity. SageMaker configures storage paths for training datasets, checkpoints, model artifacts, and outputs to use the entire capacity of the instance storage. For example, ML instance families with the NVMe-type instance storage include ml.p4d, ml.g4dn, and ml.g5. When using an ML instance with the EBS-only storage option and without instance storage, you must define the size of EBS volume through VolumeSizeInGB in the ResourceConfig API. For example, ML instance families that use EBS volumes include ml.c5 and ml.p2. To look up instance types and their instance storage types and volumes, see Amazon EC2 Instance Types. To find the default local paths defined by the SageMaker training platform, see Amazon SageMaker Training Storage Folders for Training Datasets, Checkpoints, Model Artifacts, and Outputs. volume_kms_key_id: The Amazon Web Services KMS key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training job. Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a VolumeKmsKeyId when using an instance type with local storage. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes. The VolumeKmsKeyId can be in any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" keep_alive_period_in_seconds: The duration of time in seconds to retain configured resources in a warm pool for subsequent training jobs. - capacity_reservation_ids instance_groups: The configuration of a heterogeneous cluster in JSON format. - capacity_schedules_config training_plan_arn: The Amazon Resource Name (ARN); of the training plan to use for this resource configuration. instance_placement_config: Configuration for how training job instances are placed and allocated within UltraServers. Only applicable for UltraServer capacity. """ @@ -1328,9 +1643,7 @@ class ResourceConfig(Base): volume_size_in_gb: Optional[IntPipeVar] = Unassigned() volume_kms_key_id: Optional[StrPipeVar] = Unassigned() keep_alive_period_in_seconds: Optional[IntPipeVar] = Unassigned() - capacity_reservation_ids: Optional[List[StrPipeVar]] = Unassigned() instance_groups: Optional[List[InstanceGroup]] = Unassigned() - capacity_schedules_config: Optional[CapacitySchedulesConfig] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() instance_placement_config: Optional[InstancePlacementConfig] = Unassigned() @@ -1433,16 +1746,12 @@ class TransformOutput(Base): accept: The MIME type used to specify the output data. Amazon SageMaker uses the MIME type with each http call to transfer data from the transform job. assemble_with: Defines how to assemble the results of the transform job as a single S3 object. Choose a format that is most convenient to you. To concatenate the results in binary format, specify None. To add a newline character at the end of every transformed record, specify Line. kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateModel request. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide. - output_prefix - output_suffix """ s3_output_path: StrPipeVar accept: Optional[StrPipeVar] = Unassigned() assemble_with: Optional[StrPipeVar] = Unassigned() kms_key_id: Optional[StrPipeVar] = Unassigned() - output_prefix: Optional[StrPipeVar] = Unassigned() - output_suffix: Optional[StrPipeVar] = Unassigned() class TransformResources(Base): @@ -1521,149 +1830,53 @@ class AlgorithmValidationSpecification(Base): validation_profiles: List[AlgorithmValidationProfile] -class AmazonQSettings(Base): - """ - AmazonQSettings - A collection of settings that configure the Amazon Q experience within the domain. - - Attributes - ---------------------- - status: Whether Amazon Q has been enabled within the domain. - q_profile_arn: The ARN of the Amazon Q profile used within the domain. - """ - - status: Optional[StrPipeVar] = Unassigned() - q_profile_arn: Optional[StrPipeVar] = Unassigned() - - -class AnnotationConsolidationConfig(Base): - """ - AnnotationConsolidationConfig - Configures how labels are consolidated across human workers and processes output data. - - Attributes - ---------------------- - annotation_consolidation_lambda_arn: The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data. For built-in task types, use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for AnnotationConsolidationLambdaArn. For custom labeling workflows, see Post-annotation Lambda. Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes. arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-BoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-BoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-BoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-BoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-BoundingBox Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClass Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClassMultiLabel Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-SemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-SemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-SemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-SemanticSegmentation Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClass Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClassMultiLabel Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label. arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:ACS-NamedEntityRecognition Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoMultiClass Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectDetection Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectTracking 3D Point Cloud Object Detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectDetection 3D Point Cloud Object Tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudSemanticSegmentation Use the following ARNs for Label Verification and Adjustment Jobs Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels . Semantic Segmentation Adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentSemanticSegmentation Semantic Segmentation Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationSemanticSegmentation Bounding Box Adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentBoundingBox Bounding Box Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationBoundingBox Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectDetection Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectTracking 3D Point Cloud Object Detection Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectDetection 3D Point Cloud Object Tracking Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects that appear in a sequence of 3D point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation Adjustment - Use this task type when you want workers to adjust a point-level semantic segmentation masks using a paint tool. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudSemanticSegmentation Generative AI/Custom - Direct passthrough of output data without any transformation. arn:aws:lambda:us-east-1:432418664414:function:ACS-PassThrough arn:aws:lambda:us-east-2:266458841044:function:ACS-PassThrough arn:aws:lambda:us-west-2:081040173940:function:ACS-PassThrough arn:aws:lambda:eu-west-1:568282634449:function:ACS-PassThrough arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-PassThrough arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-PassThrough arn:aws:lambda:ap-south-1:565803892007:function:ACS-PassThrough arn:aws:lambda:eu-central-1:203001061592:function:ACS-PassThrough arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-PassThrough arn:aws:lambda:eu-west-2:487402164563:function:ACS-PassThrough arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-PassThrough arn:aws:lambda:ca-central-1:918755190332:function:ACS-PassThrough - """ - - annotation_consolidation_lambda_arn: StrPipeVar - - -class ResourceSpec(Base): - """ - ResourceSpec - Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on. When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value. - - Attributes - ---------------------- - environment_arn - environment_version_arn - sage_maker_image_arn: The ARN of the SageMaker AI image that the image version belongs to. - sage_maker_image_version_arn: The ARN of the image version created on the instance. To clear the value set for SageMakerImageVersionArn, pass None as the value. - sage_maker_image_version_alias: The SageMakerImageVersionAlias of the image to launch with. This value is in SemVer 2.0.0 versioning format. - instance_type: The instance type that the image version runs on. JupyterServer apps only support the system value. For KernelGateway apps, the system value is translated to ml.t3.medium. KernelGateway apps also support all other values for available instance types. - lifecycle_config_arn: The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource. - """ - - environment_arn: Optional[StrPipeVar] = Unassigned() - environment_version_arn: Optional[StrPipeVar] = Unassigned() - sage_maker_image_arn: Optional[StrPipeVar] = Unassigned() - sage_maker_image_version_arn: Optional[StrPipeVar] = Unassigned() - sage_maker_image_version_alias: Optional[StrPipeVar] = Unassigned() - instance_type: Optional[StrPipeVar] = Unassigned() - lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() - - -class Service(Base): - """ - Service - - Attributes - ---------------------- - environment - image_uri - volumes - entrypoint - command - """ - - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - image_uri: Optional[StrPipeVar] = Unassigned() - volumes: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - entrypoint: Optional[List[StrPipeVar]] = Unassigned() - command: Optional[List[StrPipeVar]] = Unassigned() - - -class LocalAppLaunchConfiguration(Base): +class AmazonQSettings(Base): """ - LocalAppLaunchConfiguration + AmazonQSettings + A collection of settings that configure the Amazon Q experience within the domain. Attributes ---------------------- - parent_app_arn - services + status: Whether Amazon Q has been enabled within the domain. + q_profile_arn: The ARN of the Amazon Q profile used within the domain. """ - parent_app_arn: Optional[StrPipeVar] = Unassigned() - services: Optional[List[Service]] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + q_profile_arn: Optional[StrPipeVar] = Unassigned() -class AppLaunchConfiguration(Base): +class AnnotationConsolidationConfig(Base): """ - AppLaunchConfiguration + AnnotationConsolidationConfig + Configures how labels are consolidated across human workers and processes output data. Attributes ---------------------- - local_app_launch_configuration + annotation_consolidation_lambda_arn: The Amazon Resource Name (ARN) of a Lambda function implements the logic for annotation consolidation and to process output data. For built-in task types, use one of the following Amazon SageMaker Ground Truth Lambda function ARNs for AnnotationConsolidationLambdaArn. For custom labeling workflows, see Post-annotation Lambda. Bounding box - Finds the most similar boxes from different workers based on the Jaccard index of the boxes. arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-BoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-BoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-BoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-BoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-BoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-BoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-BoundingBox Image classification - Uses a variant of the Expectation Maximization approach to estimate the true class of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClass Multi-label image classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of an image based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-ImageMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-ImageMultiClassMultiLabel Semantic segmentation - Treats each pixel in an image as a multi-class classification and treats pixel annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-SemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-SemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-SemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-SemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-SemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-SemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-SemanticSegmentation Text classification - Uses a variant of the Expectation Maximization approach to estimate the true class of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClass Multi-label text classification - Uses a variant of the Expectation Maximization approach to estimate the true classes of text based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-south-1:565803892007:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-central-1:203001061592:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:eu-west-2:487402164563:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-TextMultiClassMultiLabel arn:aws:lambda:ca-central-1:918755190332:function:ACS-TextMultiClassMultiLabel Named entity recognition - Groups similar selections and calculates aggregate boundaries, resolving to most-assigned label. arn:aws:lambda:us-east-1:432418664414:function:ACS-NamedEntityRecognition arn:aws:lambda:us-east-2:266458841044:function:ACS-NamedEntityRecognition arn:aws:lambda:us-west-2:081040173940:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-1:568282634449:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-south-1:565803892007:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-central-1:203001061592:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-NamedEntityRecognition arn:aws:lambda:eu-west-2:487402164563:function:ACS-NamedEntityRecognition arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-NamedEntityRecognition arn:aws:lambda:ca-central-1:918755190332:function:ACS-NamedEntityRecognition Video Classification - Use this task type when you need workers to classify videos using predefined labels that you specify. Workers are shown videos and are asked to choose one label for each video. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoMultiClass arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoMultiClass arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoMultiClass arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoMultiClass arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoMultiClass arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoMultiClass arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoMultiClass arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoMultiClass arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoMultiClass Video Frame Object Detection - Use this task type to have workers identify and locate objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to identify and localize various objects in a series of video frames, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectDetection Video Frame Object Tracking - Use this task type to have workers track the movement of objects in a sequence of video frames (images extracted from a video) using bounding boxes. For example, you can use this task to ask workers to track the movement of objects, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-VideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-VideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-VideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-VideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-VideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-VideoObjectTracking 3D Point Cloud Object Detection - Use this task type when you want workers to classify objects in a 3D point cloud by drawing 3D cuboids around objects. For example, you can use this task type to ask workers to identify different types of objects in a point cloud, such as cars, bikes, and pedestrians. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectDetection 3D Point Cloud Object Tracking - Use this task type when you want workers to draw 3D cuboids around objects that appear in a sequence of 3D point cloud frames. For example, you can use this task type to ask workers to track the movement of vehicles across multiple point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation - Use this task type when you want workers to create a point-level semantic segmentation masks by painting objects in a 3D point cloud using different colors where each color is assigned to one of the classes you specify. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-3DPointCloudSemanticSegmentation Use the following ARNs for Label Verification and Adjustment Jobs Use label verification and adjustment jobs to review and adjust labels. To learn more, see Verify and Adjust Labels . Semantic Segmentation Adjustment - Treats each pixel in an image as a multi-class classification and treats pixel adjusted annotations from workers as "votes" for the correct label. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentSemanticSegmentation Semantic Segmentation Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgment for semantic segmentation labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationSemanticSegmentation Bounding Box Adjustment - Finds the most similar boxes from different workers based on the Jaccard index of the adjusted annotations. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentBoundingBox Bounding Box Verification - Uses a variant of the Expectation Maximization approach to estimate the true class of verification judgement for bounding box labels based on annotations from individual workers. arn:aws:lambda:us-east-1:432418664414:function:ACS-VerificationBoundingBox arn:aws:lambda:us-east-2:266458841044:function:ACS-VerificationBoundingBox arn:aws:lambda:us-west-2:081040173940:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-1:568282634449:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-south-1:565803892007:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-central-1:203001061592:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-VerificationBoundingBox arn:aws:lambda:eu-west-2:487402164563:function:ACS-VerificationBoundingBox arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-VerificationBoundingBox arn:aws:lambda:ca-central-1:918755190332:function:ACS-VerificationBoundingBox Video Frame Object Detection Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to classify and localize objects in a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectDetection Video Frame Object Tracking Adjustment - Use this task type when you want workers to adjust bounding boxes that workers have added to video frames to track object movement across a sequence of video frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-AdjustmentVideoObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-AdjustmentVideoObjectTracking 3D Point Cloud Object Detection Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects in a 3D point cloud. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectDetection arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectDetection 3D Point Cloud Object Tracking Adjustment - Use this task type when you want workers to adjust 3D cuboids around objects that appear in a sequence of 3D point cloud frames. arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudObjectTracking arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudObjectTracking 3D Point Cloud Semantic Segmentation Adjustment - Use this task type when you want workers to adjust a point-level semantic segmentation masks using a paint tool. arn:aws:lambda:us-east-1:432418664414:function:ACS-3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-1:432418664414:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-east-2:266458841044:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:us-west-2:081040173940:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-1:568282634449:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-south-1:565803892007:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-central-1:203001061592:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:eu-west-2:487402164563:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-Adjustment3DPointCloudSemanticSegmentation arn:aws:lambda:ca-central-1:918755190332:function:ACS-Adjustment3DPointCloudSemanticSegmentation Generative AI/Custom - Direct passthrough of output data without any transformation. arn:aws:lambda:us-east-1:432418664414:function:ACS-PassThrough arn:aws:lambda:us-east-2:266458841044:function:ACS-PassThrough arn:aws:lambda:us-west-2:081040173940:function:ACS-PassThrough arn:aws:lambda:eu-west-1:568282634449:function:ACS-PassThrough arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-PassThrough arn:aws:lambda:ap-southeast-2:454466003867:function:ACS-PassThrough arn:aws:lambda:ap-south-1:565803892007:function:ACS-PassThrough arn:aws:lambda:eu-central-1:203001061592:function:ACS-PassThrough arn:aws:lambda:ap-northeast-2:845288260483:function:ACS-PassThrough arn:aws:lambda:eu-west-2:487402164563:function:ACS-PassThrough arn:aws:lambda:ap-southeast-1:377565633583:function:ACS-PassThrough arn:aws:lambda:ca-central-1:918755190332:function:ACS-PassThrough """ - local_app_launch_configuration: Optional[LocalAppLaunchConfiguration] = Unassigned() + annotation_consolidation_lambda_arn: StrPipeVar -class App(Base): +class ResourceSpec(Base): """ - App + ResourceSpec + Specifies the ARN's of a SageMaker AI image and SageMaker AI image version, and the instance type that the version runs on. When both SageMakerImageVersionArn and SageMakerImageArn are passed, SageMakerImageVersionArn is used. Any updates to SageMakerImageArn will not take effect if SageMakerImageVersionArn already exists in the ResourceSpec because SageMakerImageVersionArn always takes precedence. To clear the value set for SageMakerImageVersionArn, pass None as the value. Attributes ---------------------- - app_arn - app_type - app_name - domain_id - user_profile_name - space_name - status - effective_trusted_identity_propagation_status - recovery_mode - last_health_check_timestamp - last_user_activity_timestamp - creation_time - restart_time - failure_reason - resource_spec - built_in_lifecycle_config_arn - app_launch_configuration - tags + sage_maker_image_arn: The ARN of the SageMaker AI image that the image version belongs to. + sage_maker_image_version_arn: The ARN of the image version created on the instance. To clear the value set for SageMakerImageVersionArn, pass None as the value. + sage_maker_image_version_alias: The SageMakerImageVersionAlias of the image to launch with. This value is in SemVer 2.0.0 versioning format. + instance_type: The instance type that the image version runs on. JupyterServer apps only support the system value. For KernelGateway apps, the system value is translated to ml.t3.medium. KernelGateway apps also support all other values for available instance types. + lifecycle_config_arn: The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource. """ - app_arn: Optional[StrPipeVar] = Unassigned() - app_type: Optional[StrPipeVar] = Unassigned() - app_name: Optional[Union[StrPipeVar, object]] = Unassigned() - domain_id: Optional[StrPipeVar] = Unassigned() - user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() - space_name: Optional[Union[StrPipeVar, object]] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - effective_trusted_identity_propagation_status: Optional[StrPipeVar] = Unassigned() - recovery_mode: Optional[bool] = Unassigned() - last_health_check_timestamp: Optional[datetime.datetime] = Unassigned() - last_user_activity_timestamp: Optional[datetime.datetime] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - restart_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - resource_spec: Optional[ResourceSpec] = Unassigned() - built_in_lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() - app_launch_configuration: Optional[AppLaunchConfiguration] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() + sage_maker_image_arn: Optional[StrPipeVar] = Unassigned() + sage_maker_image_version_arn: Optional[StrPipeVar] = Unassigned() + sage_maker_image_version_alias: Optional[StrPipeVar] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + lifecycle_config_arn: Optional[StrPipeVar] = Unassigned() class AppDetails(Base): @@ -1757,20 +1970,6 @@ class ContainerConfig(Base): container_environment_variables: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() -class SaviturAppImageConfig(Base): - """ - SaviturAppImageConfig - - Attributes - ---------------------- - file_system_config - container_config - """ - - file_system_config: Optional[FileSystemConfig] = Unassigned() - container_config: Optional[ContainerConfig] = Unassigned() - - class JupyterLabAppImageConfig(Base): """ JupyterLabAppImageConfig @@ -1813,7 +2012,6 @@ class AppImageConfigDetails(Base): creation_time: When the AppImageConfig was created. last_modified_time: When the AppImageConfig was last modified. kernel_gateway_image_config: The configuration for the file system and kernels in the SageMaker AI image. - savitur_app_image_config jupyter_lab_app_image_config: The configuration for the file system and the runtime, such as the environment variables and entry point. code_editor_app_image_config: The configuration for the file system and the runtime, such as the environment variables and entry point. """ @@ -1823,7 +2021,6 @@ class AppImageConfigDetails(Base): creation_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() kernel_gateway_image_config: Optional[KernelGatewayImageConfig] = Unassigned() - savitur_app_image_config: Optional[SaviturAppImageConfig] = Unassigned() jupyter_lab_app_image_config: Optional[JupyterLabAppImageConfig] = Unassigned() code_editor_app_image_config: Optional[CodeEditorAppImageConfig] = Unassigned() @@ -1933,17 +2130,54 @@ class ArtifactSummary(Base): class AssociationInfo(Base): """ AssociationInfo + The data type used to describe the relationship between different sources. Attributes ---------------------- - source_arn - destination_arn + source_arn: The Amazon Resource Name (ARN) of the AssociationInfo source. + destination_arn: The Amazon Resource Name (ARN) of the AssociationInfo destination. """ source_arn: StrPipeVar destination_arn: StrPipeVar +class IamIdentity(Base): + """ + IamIdentity + The IAM Identity details associated with the user. These details are associated with model package groups, model packages and project entities only. + + Attributes + ---------------------- + arn: The Amazon Resource Name (ARN) of the IAM identity. + principal_id: The ID of the principal that assumes the IAM identity. + source_identity: The person or application which assumes the IAM identity. + """ + + arn: Optional[StrPipeVar] = Unassigned() + principal_id: Optional[StrPipeVar] = Unassigned() + source_identity: Optional[StrPipeVar] = Unassigned() + + +class UserContext(Base): + """ + UserContext + Information about the user who created or modified a SageMaker resource. + + Attributes + ---------------------- + user_profile_arn: The Amazon Resource Name (ARN) of the user's profile. + user_profile_name: The name of the user's profile. + domain_id: The domain associated with the user. + iam_identity: The IAM Identity details associated with the user. These details are associated with model package groups, model packages, and project entities only. + """ + + user_profile_arn: Optional[StrPipeVar] = Unassigned() + user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() + domain_id: Optional[StrPipeVar] = Unassigned() + iam_identity: Optional[IamIdentity] = Unassigned() + + class AssociationSummary(Base): """ AssociationSummary @@ -1981,11 +2215,9 @@ class AsyncInferenceClientConfig(Base): Attributes ---------------------- max_concurrent_invocations_per_instance: The maximum number of concurrent requests sent by the SageMaker client to the model container. If no value is provided, SageMaker chooses an optimal value. - invocation_timeout_in_seconds """ max_concurrent_invocations_per_instance: Optional[int] = Unassigned() - invocation_timeout_in_seconds: Optional[int] = Unassigned() class AsyncInferenceNotificationConfig(Base): @@ -2051,7 +2283,6 @@ class AthenaDatasetDefinition(Base): query_string work_group output_s3_uri: The location in Amazon S3 where Athena query results are stored. - output_dataset_s3_uri kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data generated from an Athena query execution. output_format output_compression @@ -2063,7 +2294,6 @@ class AthenaDatasetDefinition(Base): output_s3_uri: StrPipeVar output_format: StrPipeVar work_group: Optional[StrPipeVar] = Unassigned() - output_dataset_s3_uri: Optional[StrPipeVar] = Unassigned() kms_key_id: Optional[StrPipeVar] = Unassigned() output_compression: Optional[StrPipeVar] = Unassigned() @@ -2218,7 +2448,6 @@ class AutoMLCandidate(Base): last_modified_time: The last modified time. failure_reason: The failure reason. candidate_properties: The properties of an AutoML candidate job. - local_mode_enabled inference_container_definitions: The mapping of all supported processing unit (CPU, GPU, etc...) to inference container definitions for the candidate. This field is populated for the AutoML jobs V2 (for example, for jobs created by calling CreateAutoMLJobV2) related to image or text classification problem types only. """ @@ -2233,54 +2462,11 @@ class AutoMLCandidate(Base): end_time: Optional[datetime.datetime] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() candidate_properties: Optional[CandidateProperties] = Unassigned() - local_mode_enabled: Optional[bool] = Unassigned() inference_container_definitions: Optional[Dict[StrPipeVar, List[AutoMLContainerDefinition]]] = ( Unassigned() ) -class Transformer(Base): - """ - Transformer - - Attributes - ---------------------- - name - """ - - name: StrPipeVar - - -class ColumnConfig(Base): - """ - ColumnConfig - - Attributes - ---------------------- - column_type - column_names - transformers - """ - - transformers: List[Transformer] - column_type: Optional[StrPipeVar] = Unassigned() - column_names: Optional[List[StrPipeVar]] = Unassigned() - - -class CandidateSpecification(Base): - """ - CandidateSpecification - - Attributes - ---------------------- - algorithm - columns_config - """ - - columns_config: List[ColumnConfig] - algorithm: Optional[StrPipeVar] = Unassigned() - - class AutoMLCandidateGenerationConfig(Base): """ AutoMLCandidateGenerationConfig @@ -2288,19 +2474,11 @@ class AutoMLCandidateGenerationConfig(Base): Attributes ---------------------- - generate_candidates_mode - algorithms - transformers feature_specification_s3_uri: A URL to the Amazon S3 data source containing selected features from the input data source to run an Autopilot job. You can input FeatureAttributeNames (optional) in JSON format as shown below: { "FeatureAttributeNames":["col1", "col2", ...] }. You can also specify the data type of the feature (optional) in the format shown below: { "FeatureDataTypes":{"col1":"numeric", "col2":"categorical" ... } } These column keys may not include the target column. In ensembling mode, Autopilot only supports the following data types: numeric, categorical, text, and datetime. In HPO mode, Autopilot can support numeric, categorical, text, datetime, and sequence. If only FeatureDataTypes is provided, the column keys (col1, col2,..) should be a subset of the column names in the input data. If both FeatureDataTypes and FeatureAttributeNames are provided, then the column keys should be a subset of the column names provided in FeatureAttributeNames. The key name FeatureAttributeNames is fixed. The values listed in ["col1", "col2", ...] are case sensitive and should be a list of strings containing unique values that are a subset of the column names in the input data. The list of columns provided must not include the target column. - candidates_specification algorithms_config: Stores the configuration information for the selection of algorithms trained on tabular data. The list of available algorithms to choose from depends on the training mode set in TabularJobConfig.Mode . AlgorithmsConfig should not be set if the training mode is set on AUTO. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode. For the list of all algorithms per problem type and training mode, see AutoMLAlgorithmConfig. For more information on each algorithm, see the Algorithm support section in Autopilot developer guide. """ - generate_candidates_mode: Optional[StrPipeVar] = Unassigned() - algorithms: Optional[List[StrPipeVar]] = Unassigned() - transformers: Optional[List[StrPipeVar]] = Unassigned() feature_specification_s3_uri: Optional[StrPipeVar] = Unassigned() - candidates_specification: Optional[List[CandidateSpecification]] = Unassigned() algorithms_config: Optional[List[AutoMLAlgorithmConfig]] = Unassigned() @@ -2319,24 +2497,6 @@ class AutoMLS3DataSource(Base): s3_uri: StrPipeVar -class AutoMLFileSystemDataSource(Base): - """ - AutoMLFileSystemDataSource - - Attributes - ---------------------- - file_system_id - file_system_access_mode - file_system_type - directory_path - """ - - file_system_id: StrPipeVar - file_system_access_mode: StrPipeVar - file_system_type: StrPipeVar - directory_path: StrPipeVar - - class AutoMLDataSource(Base): """ AutoMLDataSource @@ -2345,51 +2505,9 @@ class AutoMLDataSource(Base): Attributes ---------------------- s3_data_source: The Amazon S3 location of the input data. - file_system_data_source """ s3_data_source: AutoMLS3DataSource - file_system_data_source: Optional[AutoMLFileSystemDataSource] = Unassigned() - - -class AutoMLSnowflakeDatasetDefinition(Base): - """ - AutoMLSnowflakeDatasetDefinition - - Attributes - ---------------------- - warehouse - database - schema - table_name - snowflake_role - secret_arn - output_s3_uri - storage_integration - kms_key_id - """ - - warehouse: StrPipeVar - database: StrPipeVar - schema: StrPipeVar - table_name: StrPipeVar - secret_arn: StrPipeVar - output_s3_uri: StrPipeVar - storage_integration: StrPipeVar - snowflake_role: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class AutoMLDatasetDefinition(Base): - """ - AutoMLDatasetDefinition - - Attributes - ---------------------- - auto_ml_snowflake_dataset_definition - """ - - auto_ml_snowflake_dataset_definition: Optional[AutoMLSnowflakeDatasetDefinition] = Unassigned() class AutoMLChannel(Base): @@ -2402,8 +2520,6 @@ class AutoMLChannel(Base): data_source: The data source for an AutoML channel. compression_type: You can use Gzip or None. The default value is None. target_attribute_name: The name of the target variable in supervised learning, usually represented by 'y'. - feature_attribute_s3_uri - auto_ml_dataset_definition content_type: The content type of the data from the input source. You can use text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. channel_type: The channel type (optional) is an enum string. The default value is training. Channels for training and validation must share the same ContentType and TargetAttributeName. For information on specifying training and validation channel types, see How to specify training and validation datasets. sample_weight_attribute_name: If specified, this column name indicates which column of the dataset should be treated as sample weights for use by the objective metric during the training, evaluation, and the selection of the best model. This column is not considered as a predictive feature. For more information on Autopilot metrics, see Metrics and validation. Sample weights should be numeric, non-negative, with larger values indicating which rows are more important than others. Data points that have invalid or no weight value are excluded. Support for sample weights is available in Ensembling mode only. @@ -2412,8 +2528,6 @@ class AutoMLChannel(Base): target_attribute_name: StrPipeVar data_source: Optional[AutoMLDataSource] = Unassigned() compression_type: Optional[StrPipeVar] = Unassigned() - feature_attribute_s3_uri: Optional[StrPipeVar] = Unassigned() - auto_ml_dataset_definition: Optional[AutoMLDatasetDefinition] = Unassigned() content_type: Optional[StrPipeVar] = Unassigned() channel_type: Optional[StrPipeVar] = Unassigned() sample_weight_attribute_name: Optional[StrPipeVar] = Unassigned() @@ -2458,62 +2572,6 @@ class AutoMLDataSplitConfig(Base): validation_fraction: Optional[float] = Unassigned() -class AutoMLEndpointConfigDefinition(Base): - """ - AutoMLEndpointConfigDefinition - - Attributes - ---------------------- - endpoint_config_name - initial_instance_count - instance_type - """ - - endpoint_config_name: Union[StrPipeVar, object] - initial_instance_count: int - instance_type: StrPipeVar - - -class AutoMLEndpointDeletionCondition(Base): - """ - AutoMLEndpointDeletionCondition - - Attributes - ---------------------- - max_runtime_in_seconds - """ - - max_runtime_in_seconds: int - - -class AutoMLEndpointDefinition(Base): - """ - AutoMLEndpointDefinition - - Attributes - ---------------------- - endpoint_name - endpoint_config_name - deletion_condition - """ - - endpoint_name: Union[StrPipeVar, object] - endpoint_config_name: Union[StrPipeVar, object] - deletion_condition: Optional[AutoMLEndpointDeletionCondition] = Unassigned() - - -class AutoMLExternalFeatureTransformers(Base): - """ - AutoMLExternalFeatureTransformers - - Attributes - ---------------------- - pre_feature_transformers - """ - - pre_feature_transformers: Optional[List[AutoMLContainerDefinition]] = Unassigned() - - class AutoMLJobArtifacts(Base): """ AutoMLJobArtifacts @@ -2540,14 +2598,12 @@ class AutoMLJobChannel(Base): content_type: The content type of the data from the input source. The following are the allowed content types for different problems: For tabular problem types: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For image classification: image/png, image/jpeg, or image/*. The default value is image/*. For text classification: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For time-series forecasting: text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. For text generation (LLMs fine-tuning): text/csv;header=present or x-application/vnd.amazon+parquet. The default value is text/csv;header=present. compression_type: The allowed compression types depend on the input format and problem type. We allow the compression type Gzip for S3Prefix inputs on tabular data only. For all other inputs, the compression type should be None. If no compression type is provided, we default to None. data_source: The data source for an AutoML channel (Required). - dataset_definition """ channel_type: Optional[StrPipeVar] = Unassigned() content_type: Optional[StrPipeVar] = Unassigned() compression_type: Optional[StrPipeVar] = Unassigned() data_source: Optional[AutoMLDataSource] = Unassigned() - dataset_definition: Optional[AutoMLDatasetDefinition] = Unassigned() class AutoMLJobCompletionCriteria(Base): @@ -2567,21 +2623,6 @@ class AutoMLJobCompletionCriteria(Base): max_auto_ml_job_runtime_in_seconds: Optional[int] = Unassigned() -class VpcConfig(Base): - """ - VpcConfig - Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. - - Attributes - ---------------------- - security_group_ids: The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. - subnets: The ID of the subnets in the VPC to which you want to connect your training job or model. For information about the availability of specific instance types, see Supported Instance Types and Availability Zones. - """ - - security_group_ids: List[StrPipeVar] - subnets: List[StrPipeVar] - - class AutoMLSecurityConfig(Base): """ AutoMLSecurityConfig @@ -2610,20 +2651,14 @@ class AutoMLJobConfig(Base): security_config: The security configuration for traffic encryption or Amazon VPC settings. candidate_generation_config: The configuration for generating a candidate for an AutoML job (optional). data_split_config: The configuration for splitting the input training dataset. Type: AutoMLDataSplitConfig - engine mode: The method that Autopilot uses to train the data. You can either specify the mode manually or let Autopilot choose for you based on the dataset size by selecting AUTO. In AUTO mode, Autopilot chooses ENSEMBLING for datasets smaller than 100 MB, and HYPERPARAMETER_TUNING for larger ones. The ENSEMBLING mode uses a multi-stack ensemble model to predict classification and regression tasks directly from your dataset. This machine learning mode combines several base models to produce an optimal predictive model. It then uses a stacking ensemble method to combine predictions from contributing members. A multi-stack ensemble model can provide better performance over a single model by combining the predictive capabilities of multiple models. See Autopilot algorithm support for a list of algorithms supported by ENSEMBLING mode. The HYPERPARAMETER_TUNING (HPO) mode uses the best hyperparameters to train the best version of a model. HPO automatically selects an algorithm for the type of problem you want to solve. Then HPO finds the best hyperparameters according to your objective metric. See Autopilot algorithm support for a list of algorithms supported by HYPERPARAMETER_TUNING mode. - local_mode_enabled - external_feature_transformers """ completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() security_config: Optional[AutoMLSecurityConfig] = Unassigned() candidate_generation_config: Optional[AutoMLCandidateGenerationConfig] = Unassigned() data_split_config: Optional[AutoMLDataSplitConfig] = Unassigned() - engine: Optional[StrPipeVar] = Unassigned() mode: Optional[StrPipeVar] = Unassigned() - local_mode_enabled: Optional[bool] = Unassigned() - external_feature_transformers: Optional[AutoMLExternalFeatureTransformers] = Unassigned() class AutoMLJobObjective(Base): @@ -2717,11 +2752,9 @@ class ImageClassificationJobConfig(Base): Attributes ---------------------- completion_criteria: How long a job is allowed to run, or how many candidates a job is allowed to generate. - multi_label_enabled """ completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() - multi_label_enabled: Optional[bool] = Unassigned() class TextClassificationJobConfig(Base): @@ -2796,15 +2829,9 @@ class CandidateGenerationConfig(Base): Attributes ---------------------- algorithms_config: Your Autopilot job trains a default set of algorithms on your dataset. For tabular and time-series data, you can customize the algorithm list by selecting a subset of algorithms for your problem type. AlgorithmsConfig stores the customized selection of algorithms to train on your data. For the tabular problem type TabularJobConfig, the list of available algorithms to choose from depends on the training mode set in AutoMLJobConfig.Mode . AlgorithmsConfig should not be set when the training mode AutoMLJobConfig.Mode is set to AUTO. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for the given training mode. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for the given training mode. For the list of all algorithms per training mode, see AlgorithmConfig. For more information on each algorithm, see the Algorithm support section in the Autopilot developer guide. For the time-series forecasting problem type TimeSeriesForecastingJobConfig, choose your algorithms from the list provided in AlgorithmConfig. For more information on each algorithm, see the Algorithms support for time-series forecasting section in the Autopilot developer guide. When AlgorithmsConfig is provided, one AutoMLAlgorithms attribute must be set and one only. If the list of algorithms provided as values for AutoMLAlgorithms is empty, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting. When AlgorithmsConfig is not provided, CandidateGenerationConfig uses the full set of algorithms for time-series forecasting. - generate_candidates_mode - transformers - candidates_specification """ algorithms_config: Optional[List[AutoMLAlgorithmConfig]] = Unassigned() - generate_candidates_mode: Optional[StrPipeVar] = Unassigned() - transformers: Optional[List[StrPipeVar]] = Unassigned() - candidates_specification: Optional[List[CandidateSpecification]] = Unassigned() class TimeSeriesForecastingJobConfig(Base): @@ -2911,126 +2938,56 @@ class TabularResolvedAttributes(Base): Attributes ---------------------- problem_type: The type of supervised learning problem available for the model candidates of the AutoML job V2 (Binary Classification, Multiclass Classification, Regression). For more information, see SageMaker Autopilot problem types. - local_mode_enabled """ problem_type: Optional[StrPipeVar] = Unassigned() - local_mode_enabled: Optional[bool] = Unassigned() - - -class TextGenerationResolvedAttributes(Base): - """ - TextGenerationResolvedAttributes - The resolved attributes specific to the text generation problem type. - - Attributes - ---------------------- - base_model_name: The name of the base model to fine-tune. - """ - - base_model_name: Optional[StrPipeVar] = Unassigned() - - -class AutoMLProblemTypeResolvedAttributes(Base): - """ - AutoMLProblemTypeResolvedAttributes - Stores resolved attributes specific to the problem type of an AutoML job V2. - - Attributes - ---------------------- - tabular_resolved_attributes: The resolved attributes for the tabular problem type. - text_generation_resolved_attributes: The resolved attributes for the text generation problem type. - """ - - tabular_resolved_attributes: Optional[TabularResolvedAttributes] = Unassigned() - text_generation_resolved_attributes: Optional[TextGenerationResolvedAttributes] = Unassigned() - - -class AutoMLResolvedAttributes(Base): - """ - AutoMLResolvedAttributes - The resolved attributes used to configure an AutoML job V2. - - Attributes - ---------------------- - auto_ml_job_objective - completion_criteria - auto_ml_problem_type_resolved_attributes: Defines the resolved attributes specific to a problem type. - """ - - auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() - completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() - auto_ml_problem_type_resolved_attributes: Optional[AutoMLProblemTypeResolvedAttributes] = ( - Unassigned() - ) - - -class AutoMLTask(Base): - """ - AutoMLTask - - Attributes - ---------------------- - auto_ml_job_arn - auto_ml_task_arn - candidate_name - auto_ml_task_type - auto_ml_task_status - creation_time - end_time - last_modified_time - """ - - auto_ml_job_arn: StrPipeVar - auto_ml_task_arn: StrPipeVar - candidate_name: StrPipeVar - auto_ml_task_type: StrPipeVar - auto_ml_task_status: StrPipeVar - creation_time: datetime.datetime - last_modified_time: datetime.datetime - end_time: Optional[datetime.datetime] = Unassigned() -class ExplainabilityTaskContext(Base): +class TextGenerationResolvedAttributes(Base): """ - ExplainabilityTaskContext + TextGenerationResolvedAttributes + The resolved attributes specific to the text generation problem type. Attributes ---------------------- - candidate_name - include_pdp - overwrite_artifacts + base_model_name: The name of the base model to fine-tune. """ - candidate_name: StrPipeVar - include_pdp: Optional[bool] = Unassigned() - overwrite_artifacts: Optional[bool] = Unassigned() + base_model_name: Optional[StrPipeVar] = Unassigned() -class ModelInsightsTaskContext(Base): +class AutoMLProblemTypeResolvedAttributes(Base): """ - ModelInsightsTaskContext + AutoMLProblemTypeResolvedAttributes + Stores resolved attributes specific to the problem type of an AutoML job V2. Attributes ---------------------- - candidate_name + tabular_resolved_attributes: The resolved attributes for the tabular problem type. + text_generation_resolved_attributes: The resolved attributes for the text generation problem type. """ - candidate_name: StrPipeVar + tabular_resolved_attributes: Optional[TabularResolvedAttributes] = Unassigned() + text_generation_resolved_attributes: Optional[TextGenerationResolvedAttributes] = Unassigned() -class AutoMLTaskContext(Base): +class AutoMLResolvedAttributes(Base): """ - AutoMLTaskContext + AutoMLResolvedAttributes + The resolved attributes used to configure an AutoML job V2. Attributes ---------------------- - explainability_task_context - model_insights_task_context + auto_ml_job_objective + completion_criteria + auto_ml_problem_type_resolved_attributes: Defines the resolved attributes specific to a problem type. """ - explainability_task_context: Optional[ExplainabilityTaskContext] = Unassigned() - model_insights_task_context: Optional[ModelInsightsTaskContext] = Unassigned() + auto_ml_job_objective: Optional[AutoMLJobObjective] = Unassigned() + completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() + auto_ml_problem_type_resolved_attributes: Optional[AutoMLProblemTypeResolvedAttributes] = ( + Unassigned() + ) class AutoParameter(Base): @@ -3099,12 +3056,16 @@ class BatchAddClusterNodesError(Base): instance_group_name: The name of the instance group for which the error occurred. error_code: The error code associated with the failure. Possible values include InstanceGroupNotFound and InvalidInstanceGroupState. failed_count: The number of nodes that failed to be added to the specified instance group. + availability_zones: The availability zones associated with the failed node addition request. + instance_types: The instance types associated with the failed node addition request. message: A descriptive message providing additional details about the error. """ instance_group_name: StrPipeVar error_code: StrPipeVar failed_count: int + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() message: Optional[StrPipeVar] = Unassigned() @@ -3118,11 +3079,15 @@ class NodeAdditionResult(Base): node_logical_id: A unique identifier assigned to the node that can be used to track its provisioning status through the DescribeClusterNode operation. instance_group_name: The name of the instance group to which the node was added. status: The current status of the node. Possible values include Pending, Running, Failed, ShuttingDown, SystemUpdating, DeepHealthCheckInProgress, and NotFound. + availability_zones: The availability zones associated with the successfully added node. + instance_types: The instance types associated with the successfully added node. """ node_logical_id: StrPipeVar instance_group_name: StrPipeVar status: StrPipeVar + availability_zones: Optional[List[StrPipeVar]] = Unassigned() + instance_types: Optional[List[StrPipeVar]] = Unassigned() class BatchDataCaptureConfig(Base): @@ -3245,7 +3210,7 @@ class BatchDescribeModelPackageSummary(Base): inference_specification model_package_status: The status of the mortgage package. model_approval_status: The approval status of the model. - model_package_registration_type + model_package_registration_type: The package registration type of the model package summary. """ model_package_group_name: Union[StrPipeVar, object] @@ -3280,12 +3245,13 @@ class BatchDescribeModelPackageOutput(Base): class BatchRebootClusterNodeLogicalIdsError(Base): """ BatchRebootClusterNodeLogicalIdsError + Represents an error encountered when rebooting a node (identified by its logical node ID) from a SageMaker HyperPod cluster. Attributes ---------------------- - node_logical_id - error_code - message + node_logical_id: The logical node ID of the node that encountered an error during the reboot operation. + error_code: The error code associated with the error encountered when rebooting a node by logical node ID. Possible values: InstanceIdNotFound: The node does not exist in the specified cluster. InvalidInstanceStatus: The node is in a state that does not allow rebooting. Wait for the node to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when rebooting a node by logical node ID. """ node_logical_id: StrPipeVar @@ -3296,12 +3262,13 @@ class BatchRebootClusterNodeLogicalIdsError(Base): class BatchRebootClusterNodesError(Base): """ BatchRebootClusterNodesError + Represents an error encountered when rebooting a node from a SageMaker HyperPod cluster. Attributes ---------------------- - node_id - error_code - message + node_id: The EC2 instance ID of the node that encountered an error during the reboot operation. + error_code: The error code associated with the error encountered when rebooting a node. Possible values: InstanceIdNotFound: The instance does not exist in the specified cluster. InvalidInstanceStatus: The instance is in a state that does not allow rebooting. Wait for the instance to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when rebooting a node. """ node_id: StrPipeVar @@ -3309,61 +3276,16 @@ class BatchRebootClusterNodesError(Base): message: StrPipeVar -class BatchRepairClusterNodesError(Base): - """ - BatchRepairClusterNodesError - - Attributes - ---------------------- - repair_action - node_id - message - code - """ - - repair_action: StrPipeVar - node_id: StrPipeVar - message: StrPipeVar - code: StrPipeVar - - -class RepairNodeItem(Base): - """ - RepairNodeItem - - Attributes - ---------------------- - node_ids - repair_action - """ - - node_ids: List[StrPipeVar] - repair_action: StrPipeVar - - -class BatchRepairClusterNodesSuccess(Base): - """ - BatchRepairClusterNodesSuccess - - Attributes - ---------------------- - repair_action - node_id - """ - - repair_action: StrPipeVar - node_id: StrPipeVar - - class BatchReplaceClusterNodeLogicalIdsError(Base): """ BatchReplaceClusterNodeLogicalIdsError + Represents an error encountered when replacing a node (identified by its logical node ID) in a SageMaker HyperPod cluster. Attributes ---------------------- - node_logical_id - error_code - message + node_logical_id: The logical node ID of the node that encountered an error during the replacement operation. + error_code: The error code associated with the error encountered when replacing a node by logical node ID. Possible values: InstanceIdNotFound: The node does not exist in the specified cluster. InvalidInstanceStatus: The node is in a state that does not allow replacement. Wait for the node to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when replacing a node by logical node ID. """ node_logical_id: StrPipeVar @@ -3374,12 +3296,13 @@ class BatchReplaceClusterNodeLogicalIdsError(Base): class BatchReplaceClusterNodesError(Base): """ BatchReplaceClusterNodesError + Represents an error encountered when replacing a node in a SageMaker HyperPod cluster. Attributes ---------------------- - node_id - error_code - message + node_id: The EC2 instance ID of the node that encountered an error during the replacement operation. + error_code: The error code associated with the error encountered when replacing a node. Possible values: InstanceIdNotFound: The instance does not exist in the specified cluster. InvalidInstanceStatus: The instance is in a state that does not allow replacement. Wait for the instance to finish any ongoing changes before retrying. InstanceIdInUse: Another operation is already in progress for this node. Wait for the operation to complete before retrying. InternalServerError: An internal error occurred while processing this node. + message: A human-readable message describing the error encountered when replacing a node. """ node_id: StrPipeVar @@ -3395,11 +3318,9 @@ class MonitoringCsvDatasetFormat(Base): Attributes ---------------------- header: Indicates if the CSV data has a header. - compressed """ header: Optional[bool] = Unassigned() - compressed: Optional[bool] = Unassigned() class MonitoringJsonDatasetFormat(Base): @@ -3410,11 +3331,9 @@ class MonitoringJsonDatasetFormat(Base): Attributes ---------------------- line: Indicates if the file should be read as a JSON object per line. - compressed """ line: Optional[bool] = Unassigned() - compressed: Optional[bool] = Unassigned() class MonitoringParquetDatasetFormat(Base): @@ -3482,10 +3401,11 @@ class BatchTransformInput(Base): class BedrockCustomModelDeploymentMetadata(Base): """ BedrockCustomModelDeploymentMetadata + The metadata of the Amazon Bedrock custom model deployment. Attributes ---------------------- - arn + arn: The Amazon Resource Name (ARN) for the Amazon Bedrock custom model deployment. """ arn: Optional[StrPipeVar] = Unassigned() @@ -3494,10 +3414,11 @@ class BedrockCustomModelDeploymentMetadata(Base): class BedrockCustomModelMetadata(Base): """ BedrockCustomModelMetadata + The metadata of the Amazon Bedrock custom model. Attributes ---------------------- - arn + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock custom model. """ arn: Optional[StrPipeVar] = Unassigned() @@ -3506,10 +3427,11 @@ class BedrockCustomModelMetadata(Base): class BedrockModelImportMetadata(Base): """ BedrockModelImportMetadata + The metadata of the Amazon Bedrock model import. Attributes ---------------------- - arn + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock model import. """ arn: Optional[StrPipeVar] = Unassigned() @@ -3518,27 +3440,16 @@ class BedrockModelImportMetadata(Base): class BedrockProvisionedModelThroughputMetadata(Base): """ BedrockProvisionedModelThroughputMetadata + The metadata of the Amazon Bedrock provisioned model throughput. Attributes ---------------------- - arn + arn: The Amazon Resource Name (ARN) of the Amazon Bedrock provisioned model throughput. """ arn: Optional[StrPipeVar] = Unassigned() -class BenchmarkResultsOutputConfig(Base): - """ - BenchmarkResultsOutputConfig - - Attributes - ---------------------- - s3_output_uri - """ - - s3_output_uri: Optional[StrPipeVar] = Unassigned() - - class BestObjectiveNotImproving(Base): """ BestObjectiveNotImproving @@ -3637,20 +3548,6 @@ class BlueGreenUpdatePolicy(Base): maximum_execution_timeout_in_seconds: Optional[int] = Unassigned() -class BurstLimit(Base): - """ - BurstLimit - - Attributes - ---------------------- - allow_unlimited_burst - burst_multiplier - """ - - allow_unlimited_burst: Optional[bool] = Unassigned() - burst_multiplier: Optional[int] = Unassigned() - - class CacheHitResult(Base): """ CacheHitResult @@ -3779,11 +3676,9 @@ class KendraSettings(Base): Attributes ---------------------- status: Describes whether the document querying feature is enabled or disabled in the Canvas application. - index_id_list """ status: Optional[StrPipeVar] = Unassigned() - index_id_list: Optional[List[StrPipeVar]] = Unassigned() class GenerativeAiSettings(Base): @@ -3814,20 +3709,6 @@ class EmrServerlessSettings(Base): status: Optional[StrPipeVar] = Unassigned() -class DataScienceAssistantSettings(Base): - """ - DataScienceAssistantSettings - - Attributes - ---------------------- - status - cross_region_q_service_status - """ - - status: Optional[StrPipeVar] = Unassigned() - cross_region_q_service_status: Optional[StrPipeVar] = Unassigned() - - class CanvasAppSettings(Base): """ CanvasAppSettings @@ -3843,7 +3724,6 @@ class CanvasAppSettings(Base): kendra_settings: The settings for document querying. generative_ai_settings: The generative AI settings for the SageMaker Canvas application. emr_serverless_settings: The settings for running Amazon EMR Serverless data processing jobs in SageMaker Canvas. - data_science_assistant_settings """ time_series_forecasting_settings: Optional[TimeSeriesForecastingSettings] = Unassigned() @@ -3854,29 +3734,6 @@ class CanvasAppSettings(Base): kendra_settings: Optional[KendraSettings] = Unassigned() generative_ai_settings: Optional[GenerativeAiSettings] = Unassigned() emr_serverless_settings: Optional[EmrServerlessSettings] = Unassigned() - data_science_assistant_settings: Optional[DataScienceAssistantSettings] = Unassigned() - - -class CapacityBlockOffering(Base): - """ - CapacityBlockOffering - - Attributes - ---------------------- - capacity_block_duration_in_hours - start_time - end_time - upfront_fee - currency_code - availability_zone - """ - - capacity_block_duration_in_hours: int - upfront_fee: StrPipeVar - currency_code: StrPipeVar - start_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() - availability_zone: Optional[StrPipeVar] = Unassigned() class CapacityReservation(Base): @@ -3894,136 +3751,6 @@ class CapacityReservation(Base): type: Optional[StrPipeVar] = Unassigned() -class CapacityResources(Base): - """ - CapacityResources - - Attributes - ---------------------- - capacity_block_offerings - capacity_resource_arn - """ - - capacity_block_offerings: Optional[List[CapacityBlockOffering]] = Unassigned() - capacity_resource_arn: Optional[StrPipeVar] = Unassigned() - - -class CapacityScheduleStatusTransition(Base): - """ - CapacityScheduleStatusTransition - - Attributes - ---------------------- - status - start_time - end_time - status_message - """ - - status: StrPipeVar - start_time: datetime.datetime - status_message: StrPipeVar - end_time: Optional[datetime.datetime] = Unassigned() - - -class CapacityScheduleDetail(Base): - """ - CapacityScheduleDetail - - Attributes - ---------------------- - capacity_schedule_arn - owner_account_id - capacity_schedule_type - instance_type - total_instance_count - available_instance_count - availability_zone_distribution - placement - availability_zone - status - requested_start_time - requested_end_time - start_time - end_time - duration_in_hours - capacity_block_offerings - capacity_resources - target_resources - capacity_schedule_status_transitions - """ - - capacity_schedule_arn: StrPipeVar - capacity_schedule_type: StrPipeVar - instance_type: StrPipeVar - total_instance_count: int - placement: StrPipeVar - status: StrPipeVar - requested_start_time: datetime.datetime - owner_account_id: Optional[StrPipeVar] = Unassigned() - available_instance_count: Optional[int] = Unassigned() - availability_zone_distribution: Optional[StrPipeVar] = Unassigned() - availability_zone: Optional[StrPipeVar] = Unassigned() - requested_end_time: Optional[datetime.datetime] = Unassigned() - start_time: Optional[datetime.datetime] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() - duration_in_hours: Optional[int] = Unassigned() - capacity_block_offerings: Optional[List[CapacityBlockOffering]] = Unassigned() - capacity_resources: Optional[CapacityResources] = Unassigned() - target_resources: Optional[List[StrPipeVar]] = Unassigned() - capacity_schedule_status_transitions: Optional[List[CapacityScheduleStatusTransition]] = ( - Unassigned() - ) - - -class CapacityScheduleFilter(Base): - """ - CapacityScheduleFilter - - Attributes - ---------------------- - name - value - """ - - name: StrPipeVar - value: StrPipeVar - - -class CapacityScheduleOffering(Base): - """ - CapacityScheduleOffering - - Attributes - ---------------------- - capacity_schedule_offering_id - capacity_schedule_type - eligible_resources - instance_type - instance_count - placement - requested_start_time - requested_end_time - availability_zones - availability_zone_distribution - duration_in_hours - capacity_block_offerings - """ - - capacity_schedule_offering_id: StrPipeVar - capacity_schedule_type: StrPipeVar - instance_type: StrPipeVar - instance_count: int - requested_start_time: datetime.datetime - eligible_resources: Optional[List[StrPipeVar]] = Unassigned() - placement: Optional[StrPipeVar] = Unassigned() - requested_end_time: Optional[datetime.datetime] = Unassigned() - availability_zones: Optional[List[StrPipeVar]] = Unassigned() - availability_zone_distribution: Optional[StrPipeVar] = Unassigned() - duration_in_hours: Optional[int] = Unassigned() - capacity_block_offerings: Optional[List[CapacityBlockOffering]] = Unassigned() - - class CapacitySizeConfig(Base): """ CapacitySizeConfig @@ -4039,18 +3766,6 @@ class CapacitySizeConfig(Base): value: int -class CaptureContainerConfig(Base): - """ - CaptureContainerConfig - - Attributes - ---------------------- - container_hostname - """ - - container_hostname: StrPipeVar - - class CaptureContentTypeHeader(Base): """ CaptureContentTypeHeader @@ -4074,13 +3789,9 @@ class CaptureOption(Base): Attributes ---------------------- capture_mode: Specify the boundary of data to capture. - capture_boundary - capture_containers """ capture_mode: StrPipeVar - capture_boundary: Optional[StrPipeVar] = Unassigned() - capture_containers: Optional[List[CaptureContainerConfig]] = Unassigned() class CategoricalParameter(Base): @@ -4319,7 +4030,6 @@ class ClarifyInferenceConfig(Base): ---------------------- features_attribute: Provides the JMESPath expression to extract the features from a model container input in JSON Lines format. For example, if FeaturesAttribute is the JMESPath expression 'myfeatures', it extracts a list of features [1,2,3] from request data '{"myfeatures":[1,2,3]}'. content_template: A template string used to format a JSON record into an acceptable model container input. For example, a ContentTemplate string '{"myfeatures":$features}' will format a list of features [1,2,3] into the record string '{"myfeatures":[1,2,3]}'. Required only when the model container input is in JSON Lines format. - record_template max_record_count: The maximum number of records in a request that the model container can process when querying the model container for the predictions of a synthetic dataset. A record is a unit of input data that inference can be made on, for example, a single line in CSV data. If MaxRecordCount is 1, the model container expects one record per request. A value of 2 or greater means that the model expects batch requests, which can reduce overhead and speed up the inferencing process. If this parameter is not provided, the explainer will tune the record count per request according to the model container's capacity at runtime. max_payload_in_mb: The maximum payload size (MB) allowed of a request from the explainer to the model container. Defaults to 6 MB. probability_index: A zero-based index used to extract a probability value (score) or list from model container output in CSV format. If this value is not provided, the entire model container output will be treated as a probability value (score) or list. Example for a single class model: If the model container output consists of a string-formatted prediction label followed by its probability: '1,0.6', set ProbabilityIndex to 1 to select the probability value 0.6. Example for a multiclass model: If the model container output consists of a string-formatted prediction label followed by its probability: '"[\'cat\',\'dog\',\'fish\']","[0.1,0.6,0.3]"', set ProbabilityIndex to 1 to select the probability values [0.1,0.6,0.3]. @@ -4333,7 +4043,6 @@ class ClarifyInferenceConfig(Base): features_attribute: Optional[StrPipeVar] = Unassigned() content_template: Optional[StrPipeVar] = Unassigned() - record_template: Optional[StrPipeVar] = Unassigned() max_record_count: Optional[int] = Unassigned() max_payload_in_mb: Optional[int] = Unassigned() probability_index: Optional[int] = Unassigned() @@ -4452,6 +4161,7 @@ class ClusterAutoScalingConfigOutput(Base): class ClusterSpotOptions(Base): """ ClusterSpotOptions + Configuration options specific to Spot instances. Attributes ---------------------- @@ -4461,6 +4171,7 @@ class ClusterSpotOptions(Base): class ClusterOnDemandOptions(Base): """ ClusterOnDemandOptions + Configuration options specific to On-Demand instances. Attributes ---------------------- @@ -4470,11 +4181,12 @@ class ClusterOnDemandOptions(Base): class ClusterCapacityRequirements(Base): """ ClusterCapacityRequirements + Defines the instance capacity requirements for an instance group, including configurations for both Spot and On-Demand capacity types. Attributes ---------------------- - spot - on_demand + spot: Configuration options specific to Spot instances. + on_demand: Configuration options specific to On-Demand instances. """ spot: Optional[ClusterSpotOptions] = Unassigned() @@ -4515,20 +4227,6 @@ class ClusterMetadata(Base): slr_access_entry: Optional[StrPipeVar] = Unassigned() -class InstanceGroupDeepHealthCheck(Base): - """ - InstanceGroupDeepHealthCheck - - Attributes - ---------------------- - operation_status - requested_checks - """ - - operation_status: Optional[StrPipeVar] = Unassigned() - requested_checks: Optional[List[StrPipeVar]] = Unassigned() - - class InstanceGroupMetadata(Base): """ InstanceGroupMetadata @@ -4542,7 +4240,6 @@ class InstanceGroupMetadata(Base): subnet_id: The ID of the subnet where the instance group is located. security_group_ids: A list of security group IDs associated with the instance group. ami_override: If you use a custom Amazon Machine Image (AMI) for the instance group, this field shows the ID of the custom AMI. - instance_group_deep_health_check """ failure_message: Optional[StrPipeVar] = Unassigned() @@ -4551,7 +4248,6 @@ class InstanceGroupMetadata(Base): subnet_id: Optional[StrPipeVar] = Unassigned() security_group_ids: Optional[List[StrPipeVar]] = Unassigned() ami_override: Optional[StrPipeVar] = Unassigned() - instance_group_deep_health_check: Optional[InstanceGroupDeepHealthCheck] = Unassigned() class InstanceGroupScalingMetadata(Base): @@ -4563,7 +4259,7 @@ class InstanceGroupScalingMetadata(Base): ---------------------- instance_count: The current number of instances in the group. target_count: The desired number of instances for the group after scaling. - min_count + min_count: Minimum instance count of the instance group. failure_message: An error message describing why the scaling operation failed, if applicable. """ @@ -4573,42 +4269,6 @@ class InstanceGroupScalingMetadata(Base): failure_message: Optional[StrPipeVar] = Unassigned() -class HealthInfo(Base): - """ - HealthInfo - - Attributes - ---------------------- - health_status - health_status_reason - repair_action - recommendation - """ - - health_status: Optional[StrPipeVar] = Unassigned() - health_status_reason: Optional[StrPipeVar] = Unassigned() - repair_action: Optional[StrPipeVar] = Unassigned() - recommendation: Optional[StrPipeVar] = Unassigned() - - -class InstanceDeepHealthCheck(Base): - """ - InstanceDeepHealthCheck - - Attributes - ---------------------- - operation_status - requested_checks - completed_checks - message - """ - - operation_status: Optional[StrPipeVar] = Unassigned() - requested_checks: Optional[List[StrPipeVar]] = Unassigned() - completed_checks: Optional[List[StrPipeVar]] = Unassigned() - message: Optional[StrPipeVar] = Unassigned() - - class InstanceMetadata(Base): """ InstanceMetadata @@ -4622,8 +4282,6 @@ class InstanceMetadata(Base): failure_message: An error message describing why the instance creation or update failed, if applicable. lcs_execution_state: The execution state of the Lifecycle Script (LCS) for the instance. node_logical_id: The unique logical identifier of the node within the cluster. The ID used here is the same object as in the BatchAddClusterNodes API. - node_health_info - instance_deep_health_check """ customer_eni: Optional[StrPipeVar] = Unassigned() @@ -4632,38 +4290,6 @@ class InstanceMetadata(Base): failure_message: Optional[StrPipeVar] = Unassigned() lcs_execution_state: Optional[StrPipeVar] = Unassigned() node_logical_id: Optional[StrPipeVar] = Unassigned() - node_health_info: Optional[HealthInfo] = Unassigned() - instance_deep_health_check: Optional[InstanceDeepHealthCheck] = Unassigned() - - -class InstanceMonitorMetadata(Base): - """ - InstanceMonitorMetadata - - Attributes - ---------------------- - instance_ready_count - target_count - failure_message - """ - - instance_ready_count: Optional[int] = Unassigned() - target_count: Optional[int] = Unassigned() - failure_message: Optional[StrPipeVar] = Unassigned() - - -class InstanceHealthMetadata(Base): - """ - InstanceHealthMetadata - - Attributes - ---------------------- - orchestrator_health_state - failure_message - """ - - orchestrator_health_state: Optional[StrPipeVar] = Unassigned() - failure_message: Optional[StrPipeVar] = Unassigned() class EventMetadata(Base): @@ -4677,16 +4303,12 @@ class EventMetadata(Base): instance_group: Metadata specific to instance group-level events. instance_group_scaling: Metadata related to instance group scaling events. instance: Metadata specific to instance-level events. - instance_monitor - instance_health """ cluster: Optional[ClusterMetadata] = Unassigned() instance_group: Optional[InstanceGroupMetadata] = Unassigned() instance_group_scaling: Optional[InstanceGroupScalingMetadata] = Unassigned() instance: Optional[InstanceMetadata] = Unassigned() - instance_monitor: Optional[InstanceMonitorMetadata] = Unassigned() - instance_health: Optional[InstanceHealthMetadata] = Unassigned() class EventDetails(Base): @@ -4731,31 +4353,95 @@ class ClusterEventDetail(Base): description: Optional[StrPipeVar] = Unassigned() -class ClusterEventSummary(Base): +class ClusterEventSummary(Base): + """ + ClusterEventSummary + A summary of an event in a HyperPod cluster. + + Attributes + ---------------------- + event_id: The unique identifier (UUID) of the event. + cluster_arn: The Amazon Resource Name (ARN) of the HyperPod cluster associated with the event. + cluster_name: The name of the HyperPod cluster associated with the event. + instance_group_name: The name of the instance group associated with the event, if applicable. + instance_id: The Amazon Elastic Compute Cloud (EC2) instance ID associated with the event, if applicable. + resource_type: The type of resource associated with the event. Valid values are Cluster, InstanceGroup, or Instance. + event_time: The timestamp when the event occurred. + description: A brief, human-readable description of the event. + """ + + event_id: StrPipeVar + cluster_arn: StrPipeVar + cluster_name: Union[StrPipeVar, object] + resource_type: StrPipeVar + event_time: datetime.datetime + instance_group_name: Optional[StrPipeVar] = Unassigned() + instance_id: Optional[StrPipeVar] = Unassigned() + description: Optional[StrPipeVar] = Unassigned() + + +class ClusterFsxLustreConfig(Base): + """ + ClusterFsxLustreConfig + Defines the configuration for attaching an Amazon FSx for Lustre file system to instances in a SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + dns_name: The DNS name of the Amazon FSx for Lustre file system. + mount_name: The mount name of the Amazon FSx for Lustre file system. + mount_path: The local path where the Amazon FSx for Lustre file system is mounted on instances. + """ + + dns_name: StrPipeVar + mount_name: StrPipeVar + mount_path: Optional[StrPipeVar] = Unassigned() + + +class ClusterFsxOpenZfsConfig(Base): + """ + ClusterFsxOpenZfsConfig + Defines the configuration for attaching an Amazon FSx for OpenZFS file system to instances in a SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + dns_name: The DNS name of the Amazon FSx for OpenZFS file system. + mount_path: The local path where the Amazon FSx for OpenZFS file system is mounted on instances. + """ + + dns_name: StrPipeVar + mount_path: Optional[StrPipeVar] = Unassigned() + + +class ClusterInstanceRequirementDetails(Base): """ - ClusterEventSummary - A summary of an event in a HyperPod cluster. + ClusterInstanceRequirementDetails + The instance requirement details for a flexible instance group, including the current and desired instance types. Attributes ---------------------- - event_id: The unique identifier (UUID) of the event. - cluster_arn: The Amazon Resource Name (ARN) of the HyperPod cluster associated with the event. - cluster_name: The name of the HyperPod cluster associated with the event. - instance_group_name: The name of the instance group associated with the event, if applicable. - instance_id: The Amazon Elastic Compute Cloud (EC2) instance ID associated with the event, if applicable. - resource_type: The type of resource associated with the event. Valid values are Cluster, InstanceGroup, or Instance. - event_time: The timestamp when the event occurred. - description: A brief, human-readable description of the event. + current_instance_types: The instance types currently in use by the instance group. + desired_instance_types: The desired instance types for the instance group, as specified in the most recent update request. """ - event_id: StrPipeVar - cluster_arn: StrPipeVar - cluster_name: Union[StrPipeVar, object] - resource_type: StrPipeVar - event_time: datetime.datetime - instance_group_name: Optional[StrPipeVar] = Unassigned() - instance_id: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() + current_instance_types: Optional[List[StrPipeVar]] = Unassigned() + desired_instance_types: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterInstanceTypeDetail(Base): + """ + ClusterInstanceTypeDetail + Details about a specific instance type within a flexible instance group, including the count and configuration. + + Attributes + ---------------------- + instance_type: The instance type. + current_count: The number of instances of this type currently running in the instance group. + threads_per_core: The number of threads per CPU core for this instance type. + """ + + instance_type: Optional[StrPipeVar] = Unassigned() + current_count: Optional[int] = Unassigned() + threads_per_core: Optional[int] = Unassigned() class ClusterLifeCycleConfig(Base): @@ -4767,10 +4453,12 @@ class ClusterLifeCycleConfig(Base): ---------------------- source_s3_uri: An Amazon S3 bucket path where your lifecycle scripts are stored. Make sure that the S3 bucket path starts with s3://sagemaker-. The IAM role for SageMaker HyperPod has the managed AmazonSageMakerClusterInstanceRolePolicy attached, which allows access to S3 buckets with the specific prefix sagemaker-. on_create: The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This entrypoint script runs during cluster creation. + on_init_complete: The file name of the entrypoint script of lifecycle scripts under SourceS3Uri. This script runs on the node after the AMI-based initialization is complete. """ - source_s3_uri: StrPipeVar - on_create: StrPipeVar + source_s3_uri: Optional[StrPipeVar] = Unassigned() + on_create: Optional[StrPipeVar] = Unassigned() + on_init_complete: Optional[StrPipeVar] = Unassigned() class ClusterInstanceStorageConfig(Base): @@ -4781,22 +4469,13 @@ class ClusterInstanceStorageConfig(Base): Attributes ---------------------- ebs_volume_config: Defines the configuration for attaching additional Amazon Elastic Block Store (EBS) volumes to the instances in the SageMaker HyperPod cluster instance group. The additional EBS volume is attached to each instance within the SageMaker HyperPod cluster instance group and mounted to /opt/sagemaker. + fsx_lustre_config: Defines the configuration for attaching an Amazon FSx for Lustre file system to the instances in the SageMaker HyperPod cluster instance group. + fsx_open_zfs_config: Defines the configuration for attaching an Amazon FSx for OpenZFS file system to the instances in the SageMaker HyperPod cluster instance group. """ ebs_volume_config: Optional[ClusterEbsVolumeConfig] = Unassigned() - - -class ScalingConfig(Base): - """ - ScalingConfig - Defines how an instance group should be scaled and provisioned in SageMaker HyperPod. - - Attributes - ---------------------- - best_effort_provisioning: Specifies whether to turn on best-effort provisioning. The default value is false. If set to true, SageMaker HyperPod will attempt to provision as many instances as possible, even if some instances fail to provision due to faulty nodes or configuration issues. This allows for partial provisioning of the requested number of instances when the full target cannot be achieved. Note that for provisioning with on-demand instances, billing begins as soon as healthy instances become available and enter the InService status. - """ - - best_effort_provisioning: bool + fsx_lustre_config: Optional[ClusterFsxLustreConfig] = Unassigned() + fsx_open_zfs_config: Optional[ClusterFsxOpenZfsConfig] = Unassigned() class RollingDeploymentPolicy(Base): @@ -4849,12 +4528,13 @@ class ScheduledUpdateConfig(Base): class ClusterKubernetesTaint(Base): """ ClusterKubernetesTaint + A Kubernetes taint that can be applied to cluster nodes. Attributes ---------------------- - key - value - effect + key: The key of the taint. + value: The value of the taint. + effect: The effect of the taint. Valid values are NoSchedule, PreferNoSchedule, and NoExecute. """ key: StrPipeVar @@ -4865,13 +4545,14 @@ class ClusterKubernetesTaint(Base): class ClusterKubernetesConfigDetails(Base): """ ClusterKubernetesConfigDetails + Detailed Kubernetes configuration showing both the current and desired state of labels and taints for cluster nodes. Attributes ---------------------- - current_labels - desired_labels - current_taints - desired_taints + current_labels: The current labels applied to cluster nodes of an instance group. + desired_labels: The desired labels to be applied to cluster nodes of an instance group. + current_taints: The current taints applied to cluster nodes of an instance group. + desired_taints: The desired taints to be applied to cluster nodes of an instance group. """ current_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() @@ -4880,6 +4561,34 @@ class ClusterKubernetesConfigDetails(Base): desired_taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() +class ClusterSlurmConfigDetails(Base): + """ + ClusterSlurmConfigDetails + The Slurm configuration details for an instance group in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_type: The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login. + partition_names: The list of Slurm partition names that the instance group belongs to. + """ + + node_type: StrPipeVar + partition_names: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterNetworkInterfaceDetails(Base): + """ + ClusterNetworkInterfaceDetails + The network interface configuration details for a Amazon SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + interface_type: The type of network interface for the instance group. Valid values are efa and efa-only. + """ + + interface_type: Optional[StrPipeVar] = Unassigned() + + class ClusterInstanceGroupDetails(Base): """ ClusterInstanceGroupDetails @@ -4889,33 +4598,31 @@ class ClusterInstanceGroupDetails(Base): ---------------------- current_count: The number of instances that are currently in the instance group of a SageMaker HyperPod cluster. target_count: The number of instances you specified to add to the instance group of a SageMaker HyperPod cluster. - min_count + min_count: The minimum number of instances that must be available in the instance group of a SageMaker HyperPod cluster before it transitions to InService status. instance_group_name: The name of the instance group of a SageMaker HyperPod cluster. instance_type: The instance type of the instance group of a SageMaker HyperPod cluster. + instance_requirements: The instance requirements for the instance group, including the current and desired instance types. This field is present for flexible instance groups that support multiple instance types. + instance_type_details: Details about the instance types in the instance group, including the count and configuration of each instance type. This field is present for flexible instance groups that support multiple instance types. life_cycle_config: Details of LifeCycle configuration for the instance group. execution_role: The execution role for the instance group to assume. threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. instance_storage_configs: The additional storage configurations for the instances in the SageMaker HyperPod cluster instance group. - enable_burn_in_test - on_start_deep_health_check on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated. status: The current status of the cluster instance group. InService: The instance group is active and healthy. Creating: The instance group is being provisioned. Updating: The instance group is being updated. Failed: The instance group has failed to provision or is no longer healthy. Degraded: The instance group is degraded, meaning that some instances have failed to provision or are no longer healthy. Deleting: The instance group is being deleted. - failure_messages: If the instance group is in a Failed or Degraded state, this field contains a list of failure messages that explain why the instances failed to provision or are no longer healthy. Each message includes a description of the issue. - scaling_config: The actual scaling configuration applied to an existing instance group, reflecting the current provisioning state and scaling characteristics. 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. - custom_metadata scheduled_update_config: The configuration object of the schedule that SageMaker follows when updating the AMI. current_image_id: The ID of the Amazon Machine Image (AMI) currently in use by the instance group. desired_image_id: The ID of the Amazon Machine Image (AMI) desired for the instance group. - active_operations - kubernetes_config - capacity_type - capacity_requirements - target_state_count: The number of nodes running a specific image ID since the last software update request. - software_update_status: Status of the last software udpate request. + active_operations: A map indicating active operations currently in progress for the instance group of a SageMaker HyperPod cluster. When there is a scaling operation in progress, this map contains a key Scaling with value 1. + kubernetes_config: The Kubernetes configuration for the instance group that contains labels and taints to be applied for the nodes in this instance group. + capacity_requirements: The instance capacity requirements for the instance group. + target_state_count: Represents the number of running nodes using the desired Image ID. During software update operations: This count shows the number of nodes running on the desired Image ID. If a rollback occurs, the current image ID and desired image ID (both included in the describe cluster response) swap values. The TargetStateCount then shows the number of nodes running on the newly designated desired image ID (which was previously the current image ID). During simultaneous scaling and software update operations: This count shows the number of instances running on the desired image ID, including any new instances created as part of the scaling request. New nodes are always created using the desired image ID, so TargetStateCount reflects the total count of nodes running on the desired image ID, even during rollback scenarios. + software_update_status: Status of the last software udpate request. Status transitions follow these possible sequences: Pending -> InProgress -> Succeeded Pending -> InProgress -> RollbackInProgress -> RollbackComplete Pending -> InProgress -> RollbackInProgress -> Failed active_software_update_config + slurm_config: The Slurm configuration for the instance group. + network_interface: The network interface configuration for the instance group. """ current_count: Optional[int] = Unassigned() @@ -4923,46 +4630,86 @@ class ClusterInstanceGroupDetails(Base): min_count: Optional[int] = Unassigned() instance_group_name: Optional[StrPipeVar] = Unassigned() instance_type: Optional[StrPipeVar] = Unassigned() + instance_requirements: Optional[ClusterInstanceRequirementDetails] = Unassigned() + instance_type_details: Optional[List[ClusterInstanceTypeDetail]] = Unassigned() life_cycle_config: Optional[ClusterLifeCycleConfig] = Unassigned() execution_role: Optional[StrPipeVar] = Unassigned() threads_per_core: Optional[int] = Unassigned() instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() - enable_burn_in_test: Optional[bool] = Unassigned() - on_start_deep_health_check: Optional[List[StrPipeVar]] = Unassigned() on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() status: Optional[StrPipeVar] = Unassigned() - failure_messages: Optional[List[StrPipeVar]] = Unassigned() - scaling_config: Optional[ScalingConfig] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() training_plan_status: Optional[StrPipeVar] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() current_image_id: Optional[StrPipeVar] = Unassigned() desired_image_id: Optional[StrPipeVar] = Unassigned() active_operations: Optional[Dict[StrPipeVar, int]] = Unassigned() kubernetes_config: Optional[ClusterKubernetesConfigDetails] = Unassigned() - capacity_type: Optional[StrPipeVar] = Unassigned() capacity_requirements: Optional[ClusterCapacityRequirements] = Unassigned() target_state_count: Optional[int] = Unassigned() software_update_status: Optional[StrPipeVar] = Unassigned() active_software_update_config: Optional[DeploymentConfiguration] = Unassigned() + slurm_config: Optional[ClusterSlurmConfigDetails] = Unassigned() + network_interface: Optional[ClusterNetworkInterfaceDetails] = Unassigned() + + +class ClusterInstanceRequirements(Base): + """ + ClusterInstanceRequirements + The instance requirements for a flexible instance group. Use this to specify multiple instance types that the instance group can use. The order of instance types in the list determines the priority for instance provisioning. + + Attributes + ---------------------- + instance_types: The list of instance types that the instance group can use. The order of instance types determines the priority—HyperPod attempts to provision instances using the first instance type in the list and falls back to subsequent types if capacity is unavailable. + """ + + instance_types: List[StrPipeVar] class ClusterKubernetesConfig(Base): """ ClusterKubernetesConfig + Kubernetes configuration that specifies labels and taints to be applied to cluster nodes in an instance group. Attributes ---------------------- - labels - taints + labels: Key-value pairs of labels to be applied to cluster nodes. + taints: List of taints to be applied to cluster nodes. """ labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() taints: Optional[List[ClusterKubernetesTaint]] = Unassigned() +class ClusterSlurmConfig(Base): + """ + ClusterSlurmConfig + The Slurm configuration for an instance group in a SageMaker HyperPod cluster. + + Attributes + ---------------------- + node_type: The type of Slurm node for the instance group. Valid values are Controller, Worker, and Login. + partition_names: The list of Slurm partition names that the instance group belongs to. + """ + + node_type: StrPipeVar + partition_names: Optional[List[StrPipeVar]] = Unassigned() + + +class ClusterNetworkInterface(Base): + """ + ClusterNetworkInterface + The network interface configuration for a Amazon SageMaker HyperPod cluster instance group. + + Attributes + ---------------------- + interface_type: The type of network interface for the instance group. Valid values: efa – An EFA with ENA interface, which provides both the EFA device for low-latency, high-throughput communication and the ENA device for IP networking. efa-only – An EFA-only interface, which provides only the EFA device capabilities without the ENA device for traditional IP networking. For more information, see Elastic Fabric Adapter. + """ + + interface_type: Optional[StrPipeVar] = Unassigned() + + class ClusterInstanceGroupSpecification(Base): """ ClusterInstanceGroupSpecification @@ -4971,47 +4718,43 @@ class ClusterInstanceGroupSpecification(Base): Attributes ---------------------- instance_count: Specifies the number of instances to add to the instance group of a SageMaker HyperPod cluster. - min_instance_count + min_instance_count: Defines the minimum number of instances required for an instance group to become InService. If this threshold isn't met within 3 hours, the instance group rolls back to its previous state - zero instances for new instance groups, or previous settings for existing instance groups. MinInstanceCount only affects the initial transition to InService and does not guarantee maintaining this minimum afterward. instance_group_name: Specifies the name of the instance group. instance_type: Specifies the instance type of the instance group. + instance_requirements: The instance requirements for the instance group, including the instance types to use. Use this to create a flexible instance group that supports multiple instance types. The InstanceType and InstanceRequirements properties are mutually exclusive. life_cycle_config: Specifies the LifeCycle configuration for the instance group. execution_role: Specifies an IAM execution role to be assumed by the instance group. threads_per_core: Specifies the value for Threads per core. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For instance types that doesn't support multithreading, specify 1. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. instance_storage_configs: Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster instance group. - enable_burn_in_test - on_start_deep_health_check on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster instance group is created or updated. - scaling_config: The scaling and provisioning strategy for a planned instance group, specifying how instances should be allocated and handled during cluster creation. 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. - custom_metadata scheduled_update_config: The configuration object of the schedule that SageMaker uses to update the AMI. 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. - kubernetes_config - capacity_type - capacity_requirements + kubernetes_config: Specifies the Kubernetes configuration for the instance group. You describe what you want the labels and taints to look like, and the cluster works to reconcile the actual state with the declared state for nodes in this instance group. + slurm_config: Specifies the Slurm configuration for the instance group. + capacity_requirements: Specifies the capacity requirements for the instance group. + network_interface: The network interface configuration for the instance group. """ instance_count: int instance_group_name: StrPipeVar - instance_type: StrPipeVar - life_cycle_config: ClusterLifeCycleConfig execution_role: StrPipeVar min_instance_count: Optional[int] = Unassigned() + instance_type: Optional[StrPipeVar] = Unassigned() + instance_requirements: Optional[ClusterInstanceRequirements] = Unassigned() + life_cycle_config: Optional[ClusterLifeCycleConfig] = Unassigned() threads_per_core: Optional[int] = Unassigned() instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() - enable_burn_in_test: Optional[bool] = Unassigned() - on_start_deep_health_check: Optional[List[StrPipeVar]] = Unassigned() on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() - scaling_config: Optional[ScalingConfig] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() image_id: Optional[StrPipeVar] = Unassigned() kubernetes_config: Optional[ClusterKubernetesConfig] = Unassigned() - capacity_type: Optional[StrPipeVar] = Unassigned() + slurm_config: Optional[ClusterSlurmConfig] = Unassigned() capacity_requirements: Optional[ClusterCapacityRequirements] = Unassigned() + network_interface: Optional[ClusterNetworkInterface] = Unassigned() class ClusterInstancePlacement(Base): @@ -5047,13 +4790,14 @@ class ClusterInstanceStatusDetails(Base): class ClusterKubernetesConfigNodeDetails(Base): """ ClusterKubernetesConfigNodeDetails + Node-specific Kubernetes configuration showing both current and desired state of labels and taints for an individual cluster node. Attributes ---------------------- - current_labels - desired_labels - current_taints - desired_taints + current_labels: The current labels applied to the cluster node. + desired_labels: The desired labels to be applied to the cluster node. + current_taints: The current taints applied to the cluster node. + desired_taints: The desired taints to be applied to the cluster node. """ current_labels: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() @@ -5070,9 +4814,11 @@ class UltraServerInfo(Base): Attributes ---------------------- id: The unique identifier of the UltraServer. + type: The type of the UltraServer. """ id: Optional[StrPipeVar] = Unassigned() + type: Optional[StrPipeVar] = Unassigned() class ClusterNodeDetails(Base): @@ -5097,12 +4843,12 @@ class ClusterNodeDetails(Base): private_primary_ipv6: The private primary IPv6 address of the SageMaker HyperPod cluster node when configured with an Amazon VPC that supports IPv6 and includes subnets with IPv6 addressing enabled in either the cluster Amazon VPC configuration or the instance group Amazon VPC configuration. private_dns_hostname: The private DNS hostname of the SageMaker HyperPod cluster node. placement: The placement details of the SageMaker HyperPod cluster node. - health_info current_image_id: The ID of the Amazon Machine Image (AMI) currently in use by the node. desired_image_id: The ID of the Amazon Machine Image (AMI) desired for the node. ultra_server_info: Contains information about the UltraServer. - kubernetes_config - capacity_type + kubernetes_config: The Kubernetes configuration applied to this node, showing both the current and desired state of labels and taints. The cluster works to reconcile the actual state with the declared state. + capacity_type: The capacity type of the node. Valid values are OnDemand and Spot. When set to OnDemand, the node is launched as an On-Demand instance. When set to Spot, the node is launched as a Spot instance. + network_interface: The network interface configuration for the cluster node. """ instance_group_name: Optional[StrPipeVar] = Unassigned() @@ -5120,26 +4866,12 @@ class ClusterNodeDetails(Base): private_primary_ipv6: Optional[StrPipeVar] = Unassigned() private_dns_hostname: Optional[StrPipeVar] = Unassigned() placement: Optional[ClusterInstancePlacement] = Unassigned() - health_info: Optional[HealthInfo] = Unassigned() current_image_id: Optional[StrPipeVar] = Unassigned() desired_image_id: Optional[StrPipeVar] = Unassigned() ultra_server_info: Optional[UltraServerInfo] = Unassigned() kubernetes_config: Optional[ClusterKubernetesConfigNodeDetails] = Unassigned() capacity_type: Optional[StrPipeVar] = Unassigned() - - -class ClusterNodeSummaryHealthInfo(Base): - """ - ClusterNodeSummaryHealthInfo - - Attributes - ---------------------- - health_status - health_status_reason - """ - - health_status: Optional[StrPipeVar] = Unassigned() - health_status_reason: Optional[StrPipeVar] = Unassigned() + network_interface: Optional[ClusterNetworkInterfaceDetails] = Unassigned() class ClusterNodeSummary(Base): @@ -5156,9 +4888,8 @@ class ClusterNodeSummary(Base): launch_time: The time when the instance is launched. last_software_update_time: The time when SageMaker last updated the software of the instances in the cluster. instance_status: The status of the instance. - health_info ultra_server_info: Contains information about the UltraServer. - private_dns_hostname + private_dns_hostname: The private DNS hostname of the SageMaker HyperPod cluster node. """ instance_group_name: StrPipeVar @@ -5168,7 +4899,6 @@ class ClusterNodeSummary(Base): instance_status: ClusterInstanceStatusDetails node_logical_id: Optional[StrPipeVar] = Unassigned() last_software_update_time: Optional[datetime.datetime] = Unassigned() - health_info: Optional[ClusterNodeSummaryHealthInfo] = Unassigned() ultra_server_info: Optional[UltraServerInfo] = Unassigned() private_dns_hostname: Optional[StrPipeVar] = Unassigned() @@ -5186,29 +4916,32 @@ class ClusterOrchestratorEksConfig(Base): cluster_arn: StrPipeVar -class ClusterOrchestrator(Base): +class ClusterOrchestratorSlurmConfig(Base): """ - ClusterOrchestrator - The type of orchestrator used for the SageMaker HyperPod cluster. + ClusterOrchestratorSlurmConfig + The configuration settings for the Slurm orchestrator used with the SageMaker HyperPod cluster. Attributes ---------------------- - eks: The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster. + slurm_config_strategy: The strategy for managing partitions for the Slurm configuration. Valid values are Managed, Overwrite, and Merge. """ - eks: ClusterOrchestratorEksConfig + slurm_config_strategy: Optional[StrPipeVar] = Unassigned() -class ClusterResilienceConfig(Base): +class ClusterOrchestrator(Base): """ - ClusterResilienceConfig + ClusterOrchestrator + The type of orchestrator used for the SageMaker HyperPod cluster. Attributes ---------------------- - enable_node_auto_recovery + eks: The Amazon EKS cluster used as the orchestrator for the SageMaker HyperPod cluster. + slurm: The Slurm orchestrator configuration for the SageMaker HyperPod cluster. """ - enable_node_auto_recovery: Optional[bool] = Unassigned() + eks: Optional[ClusterOrchestratorEksConfig] = Unassigned() + slurm: Optional[ClusterOrchestratorSlurmConfig] = Unassigned() class FSxLustreConfig(Base): @@ -5226,20 +4959,6 @@ class FSxLustreConfig(Base): per_unit_storage_throughput: int -class TrustedEnvironmentDetails(Base): - """ - TrustedEnvironmentDetails - - Attributes - ---------------------- - f_sx_lustre_config - s3_output_path - """ - - f_sx_lustre_config: Optional[FSxLustreConfig] = Unassigned() - s3_output_path: Optional[StrPipeVar] = Unassigned() - - class EnvironmentConfigDetails(Base): """ EnvironmentConfigDetails @@ -5269,18 +4988,12 @@ class ClusterRestrictedInstanceGroupDetails(Base): execution_role: The execution role for the restricted instance group to assume. threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. instance_storage_configs: The additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group. - enable_burn_in_test - on_start_deep_health_check on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster's restricted instance group is created or updated. status: The current status of the cluster's restricted instance group. InService: The restricted instance group is active and healthy. Creating: The restricted instance group is being provisioned. Updating: The restricted instance group is being updated. Failed: The restricted instance group has failed to provision or is no longer healthy. Degraded: The restricted instance group is degraded, meaning that some instances have failed to provision or are no longer healthy. Deleting: The restricted instance group is being deleted. - failure_messages - scaling_config training_plan_arn: The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving 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 restricted instance group. override_vpc_config - custom_metadata scheduled_update_config - trusted_environment environment_config: The configuration for the restricted instance groups (RIG) environment. """ @@ -5291,45 +5004,15 @@ class ClusterRestrictedInstanceGroupDetails(Base): execution_role: Optional[StrPipeVar] = Unassigned() threads_per_core: Optional[int] = Unassigned() instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() - enable_burn_in_test: Optional[bool] = Unassigned() - on_start_deep_health_check: Optional[List[StrPipeVar]] = Unassigned() on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() status: Optional[StrPipeVar] = Unassigned() - failure_messages: Optional[List[StrPipeVar]] = Unassigned() - scaling_config: Optional[ScalingConfig] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() training_plan_status: Optional[StrPipeVar] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() - trusted_environment: Optional[TrustedEnvironmentDetails] = Unassigned() environment_config: Optional[EnvironmentConfigDetails] = Unassigned() -class TrustedEnvironmentConfig(Base): - """ - TrustedEnvironmentConfig - - Attributes - ---------------------- - f_sx_lustre_config - """ - - f_sx_lustre_config: Optional[FSxLustreConfig] = Unassigned() - - -class TrustedEnvironment(Base): - """ - TrustedEnvironment - - Attributes - ---------------------- - config - """ - - config: Optional[TrustedEnvironmentConfig] = Unassigned() - - class EnvironmentConfig(Base): """ EnvironmentConfig @@ -5356,15 +5039,10 @@ class ClusterRestrictedInstanceGroupSpecification(Base): execution_role: Specifies an IAM execution role to be assumed by the restricted instance group. threads_per_core: The number you specified to TreadsPerCore in CreateCluster for enabling or disabling multithreading. For instance types that support multithreading, you can specify 1 for disabling multithreading and 2 for enabling multithreading. For more information, see the reference table of CPU cores and threads per CPU core per instance type in the Amazon Elastic Compute Cloud User Guide. instance_storage_configs: Specifies the additional storage configurations for the instances in the SageMaker HyperPod cluster restricted instance group. - enable_burn_in_test - on_start_deep_health_check on_start_deep_health_checks: A flag indicating whether deep health checks should be performed when the cluster restricted instance group is created or updated. - scaling_config training_plan_arn: The Amazon Resource Name (ARN) of the training plan to filter clusters by. For more information about reserving GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . override_vpc_config - custom_metadata scheduled_update_config - trusted_environment environment_config: The configuration for the restricted instance groups (RIG) environment. """ @@ -5375,15 +5053,10 @@ class ClusterRestrictedInstanceGroupSpecification(Base): environment_config: EnvironmentConfig threads_per_core: Optional[int] = Unassigned() instance_storage_configs: Optional[List[ClusterInstanceStorageConfig]] = Unassigned() - enable_burn_in_test: Optional[bool] = Unassigned() - on_start_deep_health_check: Optional[List[StrPipeVar]] = Unassigned() on_start_deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() - scaling_config: Optional[ScalingConfig] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() override_vpc_config: Optional[VpcConfig] = Unassigned() - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() scheduled_update_config: Optional[ScheduledUpdateConfig] = Unassigned() - trusted_environment: Optional[TrustedEnvironment] = Unassigned() class ClusterSchedulerConfigSummary(Base): @@ -5563,13 +5236,11 @@ class CognitoMemberDefinition(Base): user_pool: An identifier for a user pool. The user pool must be in the same region as the service that you are calling. user_group: An identifier for a user group. client_id: An identifier for an application client. You must create the app client ID using Amazon Cognito. - member_definition_id """ user_pool: StrPipeVar user_group: StrPipeVar client_id: StrPipeVar - member_definition_id: Optional[StrPipeVar] = Unassigned() class VectorConfig(Base): @@ -5613,34 +5284,6 @@ class CollectionConfiguration(Base): collection_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() -class CommentEntity(Base): - """ - CommentEntity - - Attributes - ---------------------- - publisher - comment - creation_time - """ - - publisher: Optional[StrPipeVar] = Unassigned() - comment: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - - -class CompilationJobStepMetadata(Base): - """ - CompilationJobStepMetadata - - Attributes - ---------------------- - arn - """ - - arn: Optional[StrPipeVar] = Unassigned() - - class CompilationJobSummary(Base): """ CompilationJobSummary @@ -5674,38 +5317,6 @@ class CompilationJobSummary(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() -class ComponentJobSummary(Base): - """ - ComponentJobSummary - - Attributes - ---------------------- - auto_ml_job_name - auto_ml_job_arn - last_modified_time - status - creation_time - component_job_type - component_job_name - component_job_arn - end_time - failure_reason - description - """ - - auto_ml_job_name: Optional[StrPipeVar] = Unassigned() - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - component_job_type: Optional[StrPipeVar] = Unassigned() - component_job_name: Optional[StrPipeVar] = Unassigned() - component_job_arn: Optional[StrPipeVar] = Unassigned() - end_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - - class ComputeQuotaResourceConfig(Base): """ ComputeQuotaResourceConfig @@ -5718,7 +5329,7 @@ class ComputeQuotaResourceConfig(Base): accelerators: The number of accelerators to allocate. If you don't specify a value for vCPU and MemoryInGiB, SageMaker AI automatically allocates ratio-based values for those parameters based on the number of accelerators you provide. For example, if you allocate 16 out of 32 total accelerators, SageMaker AI uses the ratio of 0.5 and allocates values to vCPU and MemoryInGiB. v_cpu: The number of vCPU to allocate. If you specify a value only for vCPU, SageMaker AI automatically allocates ratio-based values for MemoryInGiB based on this vCPU parameter. For example, if you allocate 20 out of 40 total vCPU, SageMaker AI uses the ratio of 0.5 and allocates values to MemoryInGiB. Accelerators are set to 0. memory_in_gi_b: The amount of memory in GiB to allocate. If you specify a value only for this parameter, SageMaker AI automatically allocates a ratio-based value for vCPU based on this memory that you provide. For example, if you allocate 200 out of 400 total memory in GiB, SageMaker AI uses the ratio of 0.5 and allocates values to vCPU. Accelerators are set to 0. - accelerator_partition + accelerator_partition: The accelerator partition configuration for fractional GPU allocation. """ instance_type: StrPipeVar @@ -5738,10 +5349,12 @@ class ResourceSharingConfig(Base): ---------------------- strategy: The strategy of how idle compute is shared within the cluster. The following are the options of strategies. DontLend: entities do not lend idle compute. Lend: entities can lend idle compute to entities that can borrow. LendandBorrow: entities can lend idle compute and borrow idle compute from other entities. Default is LendandBorrow. borrow_limit: The limit on how much idle compute can be borrowed.The values can be 1 - 500 percent of idle compute that the team is allowed to borrow. Default is 50. + absolute_borrow_limits: The absolute limits on compute resources that can be borrowed from idle compute. When specified, these limits define the maximum amount of specific resource types (such as accelerators, vCPU, or memory) that an entity can borrow, regardless of the percentage-based BorrowLimit. """ strategy: StrPipeVar borrow_limit: Optional[int] = Unassigned() + absolute_borrow_limits: Optional[List[ComputeQuotaResourceConfig]] = Unassigned() class ComputeQuotaConfig(Base): @@ -5809,20 +5422,6 @@ class ComputeQuotaSummary(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() -class Concurrency(Base): - """ - Concurrency - - Attributes - ---------------------- - number_of_concurrent_users - duration_in_seconds - """ - - number_of_concurrent_users: Optional[int] = Unassigned() - duration_in_seconds: Optional[int] = Unassigned() - - class ConditionStepMetadata(Base): """ ConditionStepMetadata @@ -5885,11 +5484,9 @@ class MultiModelConfig(Base): Attributes ---------------------- model_cache_setting: Whether to cache models for a multi-model endpoint. By default, multi-model endpoints cache models so that a model does not have to be loaded into memory each time it is invoked. Some use cases do not benefit from model caching. For example, if an endpoint hosts a large number of models that are each invoked infrequently, the endpoint might perform better if you disable model caching. To disable model caching, set the value of this parameter to Disabled. - model_load_concurrency_factor """ model_cache_setting: Optional[StrPipeVar] = Unassigned() - model_load_concurrency_factor: Optional[int] = Unassigned() class ContainerDefinition(Base): @@ -5965,24 +5562,6 @@ class ContextSummary(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() -class ContinuousParameter(Base): - """ - ContinuousParameter - - Attributes - ---------------------- - name - min_value - max_value - scaling_type - """ - - name: Optional[StrPipeVar] = Unassigned() - min_value: Optional[float] = Unassigned() - max_value: Optional[float] = Unassigned() - scaling_type: Optional[StrPipeVar] = Unassigned() - - class ContinuousParameterRange(Base): """ ContinuousParameterRange @@ -6041,14 +5620,12 @@ class MetadataProperties(Base): repository: The repository. generated_by: The entity this entity was generated by. project_id: The project ID. - branch_name """ commit_id: Optional[StrPipeVar] = Unassigned() repository: Optional[StrPipeVar] = Unassigned() generated_by: Optional[StrPipeVar] = Unassigned() project_id: Optional[StrPipeVar] = Unassigned() - branch_name: Optional[StrPipeVar] = Unassigned() class IntegerParameterRangeSpecification(Base): @@ -6103,7 +5680,6 @@ class HyperParameterSpecification(Base): is_tunable: Indicates whether this hyperparameter is tunable in a hyperparameter tuning job. is_required: Indicates whether this hyperparameter is required. default_value: The default value for this hyperparameter. If a default value is specified, a hyperparameter cannot be required. - default_scaling_type """ name: StrPipeVar @@ -6113,7 +5689,6 @@ class HyperParameterSpecification(Base): is_tunable: Optional[bool] = Unassigned() is_required: Optional[bool] = Unassigned() default_value: Optional[StrPipeVar] = Unassigned() - default_scaling_type: Optional[StrPipeVar] = Unassigned() class HyperParameterTuningJobObjective(Base): @@ -6162,34 +5737,6 @@ class TrainingSpecification(Base): additional_s3_data_source: Optional[AdditionalS3DataSource] = Unassigned() -class ImageUrlOverrides(Base): - """ - ImageUrlOverrides - - Attributes - ---------------------- - data_builder_image_url - data_processing_image_url - pipeline_recommender_image_url - agt_image_url - multimodal_pretraining_image_url - robotorch_image_url - time_series_pre_training_image_url - time_series_training_image_url - thundera_image_url - """ - - data_builder_image_url: Optional[StrPipeVar] = Unassigned() - data_processing_image_url: Optional[StrPipeVar] = Unassigned() - pipeline_recommender_image_url: Optional[StrPipeVar] = Unassigned() - agt_image_url: Optional[StrPipeVar] = Unassigned() - multimodal_pretraining_image_url: Optional[StrPipeVar] = Unassigned() - robotorch_image_url: Optional[StrPipeVar] = Unassigned() - time_series_pre_training_image_url: Optional[StrPipeVar] = Unassigned() - time_series_training_image_url: Optional[StrPipeVar] = Unassigned() - thundera_image_url: Optional[StrPipeVar] = Unassigned() - - class ModelDeployConfig(Base): """ ModelDeployConfig @@ -6197,18 +5744,12 @@ class ModelDeployConfig(Base): Attributes ---------------------- - model_deploy_mode auto_generate_endpoint_name: Set to True to automatically generate an endpoint name for a one-click Autopilot model deployment; set to False otherwise. The default value is False. If you set AutoGenerateEndpointName to True, do not specify the EndpointName; otherwise a 400 error is thrown. endpoint_name: Specifies the endpoint name to use for a one-click Autopilot model deployment if the endpoint name is not generated automatically. Specify the EndpointName if and only if you set AutoGenerateEndpointName to False; otherwise a 400 error is thrown. - endpoint_config_definitions - endpoint_definitions """ - model_deploy_mode: Optional[StrPipeVar] = Unassigned() auto_generate_endpoint_name: Optional[bool] = Unassigned() endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() - endpoint_config_definitions: Optional[List[AutoMLEndpointConfigDefinition]] = Unassigned() - endpoint_definitions: Optional[List[AutoMLEndpointDefinition]] = Unassigned() class PriorityClass(Base): @@ -6235,10 +5776,12 @@ class SchedulerConfig(Base): ---------------------- priority_classes: List of the priority classes, PriorityClass, of the cluster policy. When specified, these class configurations define how tasks are queued. fair_share: When enabled, entities borrow idle compute based on their assigned FairShareWeight. When disabled, entities borrow idle compute based on a first-come first-serve basis. Default is Enabled. + idle_resource_sharing: Configuration for sharing idle compute resources across entities in the cluster. When enabled, unallocated resources are automatically calculated and made available for entities to borrow. """ priority_classes: Optional[List[PriorityClass]] = Unassigned() fair_share: Optional[StrPipeVar] = Unassigned() + idle_resource_sharing: Optional[StrPipeVar] = Unassigned() class InputConfig(Base): @@ -6291,206 +5834,92 @@ class OutputConfig(Base): kms_key_id: The Amazon Web Services Key Management Service key (Amazon Web Services KMS) that Amazon SageMaker AI uses to encrypt your output models with Amazon S3 server-side encryption after compilation job. If you don't provide a KMS key ID, Amazon SageMaker AI uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias """ - s3_output_location: StrPipeVar - target_device: Optional[StrPipeVar] = Unassigned() - target_platform: Optional[TargetPlatform] = Unassigned() - compiler_options: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class NeoResourceConfig(Base): - """ - NeoResourceConfig - - Attributes - ---------------------- - volume_kms_key_id - """ - - volume_kms_key_id: StrPipeVar - - -class NeoVpcConfig(Base): - """ - NeoVpcConfig - The VpcConfig configuration object that specifies the VPC that you want the compilation jobs to connect to. For more information on controlling access to your Amazon S3 buckets used for compilation job, see Give Amazon SageMaker AI Compilation Jobs Access to Resources in Your Amazon VPC. - - Attributes - ---------------------- - security_group_ids: The VPC security group IDs. IDs have the form of sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. - subnets: The ID of the subnets in the VPC that you want to connect the compilation job to for accessing the model in Amazon S3. - """ - - security_group_ids: List[StrPipeVar] - subnets: List[StrPipeVar] - - -class CustomMonitoringAppSpecification(Base): - """ - CustomMonitoringAppSpecification - - Attributes - ---------------------- - image_uri - container_entrypoint - container_arguments - environment - record_preprocessor_source_uri - post_analytics_processor_source_uri - """ - - image_uri: StrPipeVar - container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() - container_arguments: Optional[List[StrPipeVar]] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() - post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() - - -class ProcessingS3Input(Base): - """ - ProcessingS3Input - Configuration for downloading input data from Amazon S3 into the processing container. - - Attributes - ---------------------- - s3_uri: The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job. - local_path: The local path in your container where you want Amazon SageMaker to write input data to. LocalPath is an absolute path to the input data and must begin with /opt/ml/processing/. LocalPath is a required parameter when AppManaged is False (default). - s3_data_type: Whether you use an S3Prefix or a ManifestFile for the data type. If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job. - s3_input_mode: Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume. - s3_data_distribution_type: Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is sharded by Amazon S3 key, downloading one shard of data to each processing instance. - s3_compression_type: Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. Gzip can only be used when Pipe mode is specified as the S3InputMode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume. - """ - - s3_uri: StrPipeVar - s3_data_type: StrPipeVar - local_path: Optional[StrPipeVar] = Unassigned() - s3_input_mode: Optional[StrPipeVar] = Unassigned() - s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() - s3_compression_type: Optional[StrPipeVar] = Unassigned() - + s3_output_location: StrPipeVar + target_device: Optional[StrPipeVar] = Unassigned() + target_platform: Optional[TargetPlatform] = Unassigned() + compiler_options: Optional[StrPipeVar] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() -class RedshiftDatasetDefinition(Base): + +class NeoVpcConfig(Base): """ - RedshiftDatasetDefinition - Configuration for Redshift Dataset Definition input. + NeoVpcConfig + The VpcConfig configuration object that specifies the VPC that you want the compilation jobs to connect to. For more information on controlling access to your Amazon S3 buckets used for compilation job, see Give Amazon SageMaker AI Compilation Jobs Access to Resources in Your Amazon VPC. Attributes ---------------------- - cluster_id - database - db_user - query_string - cluster_role_arn: The IAM role attached to your Redshift cluster that Amazon SageMaker uses to generate datasets. - output_s3_uri: The location in Amazon S3 where the Redshift query results are stored. - output_dataset_s3_uri - kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data from a Redshift execution. - output_format - output_compression + security_group_ids: The VPC security group IDs. IDs have the form of sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field. + subnets: The ID of the subnets in the VPC that you want to connect the compilation job to for accessing the model in Amazon S3. """ - cluster_id: StrPipeVar - database: StrPipeVar - db_user: StrPipeVar - query_string: StrPipeVar - cluster_role_arn: StrPipeVar - output_s3_uri: StrPipeVar - output_format: StrPipeVar - output_dataset_s3_uri: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - output_compression: Optional[StrPipeVar] = Unassigned() + security_group_ids: List[StrPipeVar] + subnets: List[StrPipeVar] -class SnowflakeQueryVariable(Base): +class MonitoringConstraintsResource(Base): """ - SnowflakeQueryVariable + MonitoringConstraintsResource + The constraints resource for a monitoring job. Attributes ---------------------- - value + s3_uri: The Amazon S3 URI for the constraints resource. """ - value: StrPipeVar + s3_uri: Optional[StrPipeVar] = Unassigned() -class SnowflakeDatasetDefinition(Base): +class MonitoringStatisticsResource(Base): """ - SnowflakeDatasetDefinition + MonitoringStatisticsResource + The statistics resource for a monitoring job. Attributes ---------------------- - warehouse - database - schema - snowflake_role - secret_arn - query_string - query_variables - output_s3_uri - output_dataset_s3_uri - storage_integration - output_format_type - output_compression - output_format_name - kms_key_id + s3_uri: The Amazon S3 URI for the statistics resource. """ - warehouse: StrPipeVar - secret_arn: StrPipeVar - query_string: StrPipeVar - output_s3_uri: StrPipeVar - storage_integration: StrPipeVar - database: Optional[StrPipeVar] = Unassigned() - schema: Optional[StrPipeVar] = Unassigned() - snowflake_role: Optional[StrPipeVar] = Unassigned() - query_variables: Optional[List[SnowflakeQueryVariable]] = Unassigned() - output_dataset_s3_uri: Optional[StrPipeVar] = Unassigned() - output_format_type: Optional[StrPipeVar] = Unassigned() - output_compression: Optional[StrPipeVar] = Unassigned() - output_format_name: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() + s3_uri: Optional[StrPipeVar] = Unassigned() -class DatasetDefinition(Base): +class DataQualityBaselineConfig(Base): """ - DatasetDefinition - Configuration for Dataset Definition inputs. The Dataset Definition input must specify exactly one of either AthenaDatasetDefinition or RedshiftDatasetDefinition types. + DataQualityBaselineConfig + Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically. Attributes ---------------------- - athena_dataset_definition - redshift_dataset_definition - local_path: The local path where you want Amazon SageMaker to download the Dataset Definition inputs to run a processing job. LocalPath is an absolute path to the input data. This is a required parameter when AppManaged is False (default). - data_distribution_type: Whether the generated dataset is FullyReplicated or ShardedByS3Key (default). - input_mode: Whether to use File or Pipe input mode. In File (default) mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume. - snowflake_dataset_definition + baselining_job_name: The name of the job that performs baselining for the data quality monitoring job. + constraints_resource + statistics_resource """ - athena_dataset_definition: Optional[AthenaDatasetDefinition] = Unassigned() - redshift_dataset_definition: Optional[RedshiftDatasetDefinition] = Unassigned() - local_path: Optional[StrPipeVar] = Unassigned() - data_distribution_type: Optional[StrPipeVar] = Unassigned() - input_mode: Optional[StrPipeVar] = Unassigned() - snowflake_dataset_definition: Optional[SnowflakeDatasetDefinition] = Unassigned() + baselining_job_name: Optional[StrPipeVar] = Unassigned() + constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() + statistics_resource: Optional[MonitoringStatisticsResource] = Unassigned() -class ProcessingInput(Base): +class DataQualityAppSpecification(Base): """ - ProcessingInput - The inputs for a processing job. The processing input must specify exactly one of either S3Input or DatasetDefinition types. + DataQualityAppSpecification + Information about the container that a data quality monitoring job runs. Attributes ---------------------- - input_name: The name for the processing job input. - app_managed: When True, input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker. - s3_input: Configuration for downloading input data from Amazon S3 into the processing container. - dataset_definition: Configuration for a Dataset Definition input. + image_uri: The container image that the data quality monitoring job runs. + container_entrypoint: The entrypoint for a container used to run a monitoring job. + container_arguments: The arguments to send to the container that the monitoring job runs. + record_preprocessor_source_uri: An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers. + post_analytics_processor_source_uri: An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers. + environment: Sets the environment variables in the container that the monitoring job runs. """ - input_name: StrPipeVar - app_managed: Optional[bool] = Unassigned() - s3_input: Optional[ProcessingS3Input] = Unassigned() - dataset_definition: Optional[DatasetDefinition] = Unassigned() + image_uri: StrPipeVar + container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() + container_arguments: Optional[List[StrPipeVar]] = Unassigned() + record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() + post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() + environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() class EndpointInput(Base): @@ -6510,7 +5939,6 @@ class EndpointInput(Base): probability_threshold_attribute: The threshold for the class probability to be evaluated as a positive result. start_time_offset: If specified, monitoring jobs substract this time from the start time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. end_time_offset: If specified, monitoring jobs substract this time from the end time. For information about using offsets for scheduling monitoring jobs, see Schedule Model Quality Monitoring Jobs. - variant_name exclude_features_attribute: The attributes of the input data to exclude from the analysis. """ @@ -6524,39 +5952,22 @@ class EndpointInput(Base): probability_threshold_attribute: Optional[float] = Unassigned() start_time_offset: Optional[StrPipeVar] = Unassigned() end_time_offset: Optional[StrPipeVar] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() exclude_features_attribute: Optional[StrPipeVar] = Unassigned() -class MonitoringGroundTruthS3Input(Base): - """ - MonitoringGroundTruthS3Input - The ground truth labels for the dataset used for the monitoring job. - - Attributes - ---------------------- - s3_uri: The address of the Amazon S3 location of the ground truth labels. - """ - - s3_uri: Optional[StrPipeVar] = Unassigned() - - -class CustomMonitoringJobInput(Base): +class DataQualityJobInput(Base): """ - CustomMonitoringJobInput + DataQualityJobInput + The input for the data quality monitoring job. Currently endpoints are supported for input. Attributes ---------------------- - processing_inputs endpoint_input - batch_transform_input - ground_truth_s3_input + batch_transform_input: Input object for the batch transform job. """ - processing_inputs: Optional[List[ProcessingInput]] = Unassigned() endpoint_input: Optional[EndpointInput] = Unassigned() batch_transform_input: Optional[BatchTransformInput] = Unassigned() - ground_truth_s3_input: Optional[MonitoringGroundTruthS3Input] = Unassigned() class MonitoringS3Output(Base): @@ -6666,87 +6077,6 @@ class MonitoringStoppingCondition(Base): max_runtime_in_seconds: int -class MonitoringConstraintsResource(Base): - """ - MonitoringConstraintsResource - The constraints resource for a monitoring job. - - Attributes - ---------------------- - s3_uri: The Amazon S3 URI for the constraints resource. - """ - - s3_uri: Optional[StrPipeVar] = Unassigned() - - -class MonitoringStatisticsResource(Base): - """ - MonitoringStatisticsResource - The statistics resource for a monitoring job. - - Attributes - ---------------------- - s3_uri: The Amazon S3 URI for the statistics resource. - """ - - s3_uri: Optional[StrPipeVar] = Unassigned() - - -class DataQualityBaselineConfig(Base): - """ - DataQualityBaselineConfig - Configuration for monitoring constraints and monitoring statistics. These baseline resources are compared against the results of the current job from the series of jobs scheduled to collect data periodically. - - Attributes - ---------------------- - baselining_job_name: The name of the job that performs baselining for the data quality monitoring job. - constraints_resource - statistics_resource - """ - - baselining_job_name: Optional[StrPipeVar] = Unassigned() - constraints_resource: Optional[MonitoringConstraintsResource] = Unassigned() - statistics_resource: Optional[MonitoringStatisticsResource] = Unassigned() - - -class DataQualityAppSpecification(Base): - """ - DataQualityAppSpecification - Information about the container that a data quality monitoring job runs. - - Attributes - ---------------------- - image_uri: The container image that the data quality monitoring job runs. - container_entrypoint: The entrypoint for a container used to run a monitoring job. - container_arguments: The arguments to send to the container that the monitoring job runs. - record_preprocessor_source_uri: An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers. - post_analytics_processor_source_uri: An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers. - environment: Sets the environment variables in the container that the monitoring job runs. - """ - - image_uri: StrPipeVar - container_entrypoint: Optional[List[StrPipeVar]] = Unassigned() - container_arguments: Optional[List[StrPipeVar]] = Unassigned() - record_preprocessor_source_uri: Optional[StrPipeVar] = Unassigned() - post_analytics_processor_source_uri: Optional[StrPipeVar] = Unassigned() - environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - - -class DataQualityJobInput(Base): - """ - DataQualityJobInput - The input for the data quality monitoring job. Currently endpoints are supported for input. - - Attributes - ---------------------- - endpoint_input - batch_transform_input: Input object for the batch transform job. - """ - - endpoint_input: Optional[EndpointInput] = Unassigned() - batch_transform_input: Optional[BatchTransformInput] = Unassigned() - - class EdgeOutputConfig(Base): """ EdgeOutputConfig @@ -6766,20 +6096,6 @@ class EdgeOutputConfig(Base): preset_deployment_config: Optional[StrPipeVar] = Unassigned() -class EnvironmentSettings(Base): - """ - EnvironmentSettings - - Attributes - ---------------------- - default_s3_artifact_path - default_s3_kms_key_id - """ - - default_s3_artifact_path: Optional[StrPipeVar] = Unassigned() - default_s3_kms_key_id: Optional[StrPipeVar] = Unassigned() - - class SharingSettings(Base): """ SharingSettings @@ -6874,40 +6190,6 @@ class RSessionAppSettings(Base): custom_images: Optional[List[CustomImage]] = Unassigned() -class VSCodeAppSettings(Base): - """ - VSCodeAppSettings - - Attributes - ---------------------- - default_resource_spec - custom_images - lifecycle_config_arns - """ - - default_resource_spec: Optional[ResourceSpec] = Unassigned() - custom_images: Optional[List[CustomImage]] = Unassigned() - lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() - - -class SaviturAppSettings(Base): - """ - SaviturAppSettings - - Attributes - ---------------------- - default_resource_spec - custom_images - lifecycle_config_arns - code_repositories - """ - - default_resource_spec: Optional[ResourceSpec] = Unassigned() - custom_images: Optional[List[CustomImage]] = Unassigned() - lifecycle_config_arns: Optional[List[StrPipeVar]] = Unassigned() - code_repositories: Optional[List[CodeRepository]] = Unassigned() - - class EmrSettings(Base): """ EmrSettings @@ -7095,7 +6377,6 @@ class UserSettings(Base): Attributes ---------------------- execution_role: The execution role for the user. SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces. - environment_settings: The environment settings. security_groups: The security groups for the Amazon Virtual Private Cloud (VPC) that the domain uses for communication. Optional when the CreateDomain.AppNetworkAccessType parameter is set to PublicInternetOnly. Required when the CreateDomain.AppNetworkAccessType parameter is set to VpcOnly, unless specified as part of the DefaultUserSettings for the domain. Amazon SageMaker AI adds a security group to allow NFS traffic from Amazon SageMaker AI Studio. Therefore, the number of security groups that you can specify is one less than the maximum number shown. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. sharing_settings: Specifies options for sharing Amazon SageMaker AI Studio notebooks. jupyter_server_app_settings: The Jupyter server's app settings. @@ -7104,8 +6385,6 @@ class UserSettings(Base): r_studio_server_pro_app_settings: A collection of settings that configure user interaction with the RStudioServerPro app. r_session_app_settings: A collection of settings that configure the RSessionGateway app. canvas_app_settings: The Canvas app settings. SageMaker applies these settings only to private spaces that SageMaker creates for the Canvas app. - vs_code_app_settings - savitur_app_settings code_editor_app_settings: The Code Editor application settings. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. jupyter_lab_app_settings: The settings for the JupyterLab application. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. space_storage_settings: The storage settings for a space. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. @@ -7113,13 +6392,11 @@ class UserSettings(Base): studio_web_portal: Whether the user can access Studio. If this value is set to DISABLED, the user cannot access Studio, even if that is the default experience for the domain. custom_posix_user_config: Details about the POSIX identity that is used for file system operations. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. custom_file_system_configs: The settings for assigning a custom file system to a user profile. Permitted users can access this file system in Amazon SageMaker AI Studio. SageMaker applies these settings only to private spaces that the user creates in the domain. SageMaker doesn't apply these settings to shared spaces. - emr_settings studio_web_portal_settings: Studio settings. If these settings are applied on a user level, they take priority over the settings applied on a domain level. auto_mount_home_efs: Indicates whether auto-mounting of an EFS volume is supported for the user profile. The DefaultAsDomain value is only supported for user profiles. Do not use the DefaultAsDomain value when setting this parameter for a domain. SageMaker applies this setting only to private spaces that the user creates in the domain. SageMaker doesn't apply this setting to shared spaces. """ execution_role: Optional[StrPipeVar] = Unassigned() - environment_settings: Optional[EnvironmentSettings] = Unassigned() security_groups: Optional[List[StrPipeVar]] = Unassigned() sharing_settings: Optional[SharingSettings] = Unassigned() jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned() @@ -7128,8 +6405,6 @@ class UserSettings(Base): r_studio_server_pro_app_settings: Optional[RStudioServerProAppSettings] = Unassigned() r_session_app_settings: Optional[RSessionAppSettings] = Unassigned() canvas_app_settings: Optional[CanvasAppSettings] = Unassigned() - vs_code_app_settings: Optional[VSCodeAppSettings] = Unassigned() - savitur_app_settings: Optional[SaviturAppSettings] = Unassigned() code_editor_app_settings: Optional[CodeEditorAppSettings] = Unassigned() jupyter_lab_app_settings: Optional[JupyterLabAppSettings] = Unassigned() space_storage_settings: Optional[DefaultSpaceStorageSettings] = Unassigned() @@ -7137,7 +6412,6 @@ class UserSettings(Base): studio_web_portal: Optional[StrPipeVar] = Unassigned() custom_posix_user_config: Optional[CustomPosixUserConfig] = Unassigned() custom_file_system_configs: Optional[List[CustomFileSystemConfig]] = Unassigned() - emr_settings: Optional[EmrSettings] = Unassigned() studio_web_portal_settings: Optional[StudioWebPortalSettings] = Unassigned() auto_mount_home_efs: Optional[StrPipeVar] = Unassigned() @@ -7226,7 +6500,6 @@ class DomainSettings(Base): Attributes ---------------------- security_group_ids: The security groups for the Amazon Virtual Private Cloud that the Domain uses for communication between Domain-level apps and user apps. - logout_redirection_url r_studio_server_pro_domain_settings: A collection of settings that configure the RStudioServerPro Domain-level app. execution_role_identity_config: The configuration for attaching a SageMaker AI user profile name to the execution role as a sts:SourceIdentity key. trusted_identity_propagation_settings: The Trusted Identity Propagation (TIP) settings for the SageMaker domain. These settings determine how user identities from IAM Identity Center are propagated through the domain to TIP enabled Amazon Web Services services. @@ -7237,7 +6510,6 @@ class DomainSettings(Base): """ security_group_ids: Optional[List[StrPipeVar]] = Unassigned() - logout_redirection_url: Optional[StrPipeVar] = Unassigned() r_studio_server_pro_domain_settings: Optional[RStudioServerProDomainSettings] = Unassigned() execution_role_identity_config: Optional[StrPipeVar] = Unassigned() trusted_identity_propagation_settings: Optional[TrustedIdentityPropagationSettings] = ( @@ -7372,60 +6644,53 @@ class ProductionVariantServerlessConfig(Base): provisioned_concurrency: Optional[int] = Unassigned() -class ProductionVariantManagedInstanceScaling(Base): - """ - ProductionVariantManagedInstanceScaling - Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. - - Attributes - ---------------------- - status: Indicates whether managed instance scaling is enabled. - min_instance_count: The minimum number of instances that the endpoint must retain when it scales down to accommodate a decrease in traffic. - max_instance_count: The maximum number of instances that the endpoint can provision when it scales up to accommodate an increase in traffic. - """ - - status: Optional[StrPipeVar] = Unassigned() - min_instance_count: Optional[int] = Unassigned() - max_instance_count: Optional[int] = Unassigned() - - -class ProductionVariantRoutingConfig(Base): +class ProductionVariantManagedInstanceScalingScaleInPolicy(Base): """ - ProductionVariantRoutingConfig - Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. + ProductionVariantManagedInstanceScalingScaleInPolicy + Configures the scale-in behavior for managed instance scaling. Attributes ---------------------- - routing_strategy: Sets how the endpoint routes incoming traffic: LEAST_OUTSTANDING_REQUESTS: The endpoint routes requests to the specific instances that have more capacity to process them. RANDOM: The endpoint routes each request to a randomly chosen instance. + strategy: The strategy for scaling in instances. IDLE_RELEASE Releases instances that have no hosted inference component copies. CONSOLIDATION Consolidates inference component copies onto fewer instances to release more instances. Consolidation honors the scheduling configuration of each inference component. For example, if an inference component specifies Availability Zone balance, consolidation only proceeds when the resulting distribution does not increase the imbalance. + maximum_step_size: The maximum number of instances that the endpoint can terminate at a time during a consolidation scale-in operation. Default value: 1. + cooldown_in_minutes: The cooldown period, in minutes, after the last endpoint operation before the endpoint evaluates consolidation scale-in opportunities. Default value: 20. """ - routing_strategy: StrPipeVar + strategy: StrPipeVar + maximum_step_size: Optional[int] = Unassigned() + cooldown_in_minutes: Optional[int] = Unassigned() -class ProductionVariantCapacitySchedulesConfig(Base): +class ProductionVariantManagedInstanceScaling(Base): """ - ProductionVariantCapacitySchedulesConfig + ProductionVariantManagedInstanceScaling + Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. Attributes ---------------------- - capacity_fallback_strategy - capacity_schedules + status: Indicates whether managed instance scaling is enabled. + min_instance_count: The minimum number of instances that the endpoint must retain when it scales down to accommodate a decrease in traffic. + max_instance_count: The maximum number of instances that the endpoint can provision when it scales up to accommodate an increase in traffic. + scale_in_policy: Configures the scale-in behavior for managed instance scaling. """ - capacity_schedules: List[CapacitySchedule] - capacity_fallback_strategy: Optional[StrPipeVar] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + min_instance_count: Optional[int] = Unassigned() + max_instance_count: Optional[int] = Unassigned() + scale_in_policy: Optional[ProductionVariantManagedInstanceScalingScaleInPolicy] = Unassigned() -class ProductionVariantHyperPodConfig(Base): +class ProductionVariantRoutingConfig(Base): """ - ProductionVariantHyperPodConfig + ProductionVariantRoutingConfig + Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. Attributes ---------------------- - ingress_address + routing_strategy: Sets how the endpoint routes incoming traffic: LEAST_OUTSTANDING_REQUESTS: The endpoint routes requests to the specific instances that have more capacity to process them. RANDOM: The endpoint routes each request to a randomly chosen instance. """ - ingress_address: StrPipeVar + routing_strategy: StrPipeVar class ProductionVariantCapacityReservationConfig(Base): @@ -7435,12 +6700,10 @@ class ProductionVariantCapacityReservationConfig(Base): Attributes ---------------------- - ec2_capacity_reservations capacity_reservation_preference: Options that you can choose for the capacity reservation. SageMaker AI supports the following options: capacity-reservations-only SageMaker AI launches instances only into an ML capacity reservation. If no capacity is available, the instances fail to launch. ml_reservation_arn: The Amazon Resource Name (ARN) that uniquely identifies the ML capacity reservation that SageMaker AI applies when it deploys the endpoint. """ - ec2_capacity_reservations: Optional[List[StrPipeVar]] = Unassigned() capacity_reservation_preference: Optional[StrPipeVar] = Unassigned() ml_reservation_arn: Optional[StrPipeVar] = Unassigned() @@ -7466,9 +6729,7 @@ class ProductionVariant(Base): enable_ssm_access: You can use this parameter to turn on native Amazon Web Services Systems Manager (SSM) access for a production variant behind an endpoint. By default, SSM access is disabled for all production variants behind an endpoint. You can turn on or turn off SSM access for a production variant behind an existing endpoint by creating a new endpoint configuration and calling UpdateEndpoint. managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. - capacity_schedules_config - inference_ami_version: Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads. By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions. The AMI version names, and their configurations, are the following: al2-ami-sagemaker-inference-gpu-2 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 al2-ami-sagemaker-inference-gpu-2-1 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-gpu-3-1 Accelerator: GPU NVIDIA driver version: 550 CUDA version: 12.4 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-neuron-2 Accelerator: Inferentia2 and Trainium Neuron driver version: 2.19 - hyper_pod_config + inference_ami_version: Specifies an option from a collection of preconfigured Amazon Machine Image (AMI) images. Each image is configured by Amazon Web Services with a set of software and driver versions. Amazon Web Services optimizes these configurations for different machine learning workloads. By selecting an AMI version, you can ensure that your inference environment is compatible with specific software requirements, such as CUDA driver versions, Linux kernel versions, or Amazon Web Services Neuron driver versions. The AMI version names, and their configurations, are the following: al2-ami-sagemaker-inference-gpu-2 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 al2-ami-sagemaker-inference-gpu-2-1 Accelerator: GPU NVIDIA driver version: 535 CUDA version: 12.2 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-gpu-3-1 Accelerator: GPU NVIDIA driver version: 550 CUDA version: 12.4 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2023-ami-sagemaker-inference-gpu-4-1 Accelerator: GPU NVIDIA driver version: 580 CUDA version: 13.0 NVIDIA Container Toolkit with disabled CUDA-compat mounting al2-ami-sagemaker-inference-neuron-2 Accelerator: Inferentia2 and Trainium Neuron driver version: 2.19 capacity_reservation_config: Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. """ @@ -7486,9 +6747,7 @@ class ProductionVariant(Base): enable_ssm_access: Optional[bool] = Unassigned() managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() - capacity_schedules_config: Optional[ProductionVariantCapacitySchedulesConfig] = Unassigned() inference_ami_version: Optional[StrPipeVar] = Unassigned() - hyper_pod_config: Optional[ProductionVariantHyperPodConfig] = Unassigned() capacity_reservation_config: Optional[ProductionVariantCapacityReservationConfig] = Unassigned() @@ -7531,29 +6790,18 @@ class ExplainerConfig(Base): class MetricsConfig(Base): """ MetricsConfig + The configuration for Utilization metrics. Attributes ---------------------- - enable_enhanced_metrics: Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization data at instance and container granularity. Container granularity is supported for Inference Components. The default is False. - metric_publish_frequency_in_seconds: The frequency, in seconds, at which Utilization Metrics are published to Amazon CloudWatch. The default is 60 seconds. + enable_enhanced_metrics: Specifies whether to enable enhanced metrics for the endpoint. Enhanced metrics provide utilization and invocation data at instance and container granularity. Container granularity is supported for Inference Components. The default is False. + metric_publish_frequency_in_seconds: The interval, in seconds, at which metrics are published to Amazon CloudWatch. Defaults to 60. Valid values: 10, 30, 60, 120, 180, 240, 300. When EnableEnhancedMetrics is set to False, this interval applies to utilization metrics only; invocation metrics continue to be published at the default 60-second interval. When EnableEnhancedMetrics is set to True, this interval applies to both utilization and invocation metrics. """ enable_enhanced_metrics: Optional[bool] = Unassigned() metric_publish_frequency_in_seconds: Optional[int] = Unassigned() -class EndpointDeletionCondition(Base): - """ - EndpointDeletionCondition - - Attributes - ---------------------- - max_runtime_in_seconds - """ - - max_runtime_in_seconds: int - - class RollingUpdatePolicy(Base): """ RollingUpdatePolicy @@ -7564,14 +6812,12 @@ class RollingUpdatePolicy(Base): maximum_batch_size: Batch size for each rolling step to provision capacity and turn on traffic on the new endpoint fleet, and terminate capacity on the old endpoint fleet. Value must be between 5% to 50% of the variant's total instance count. wait_interval_in_seconds: The length of the baking period, during which SageMaker monitors alarms for each batch on the new fleet. maximum_execution_timeout_in_seconds: The time limit for the total deployment. Exceeding this limit causes a timeout. - wait_for_instance_termination rollback_maximum_batch_size: Batch size for rollback to the old endpoint fleet. Each rolling step to provision capacity and turn on traffic on the old endpoint fleet, and terminate capacity on the new endpoint fleet. If this field is absent, the default value will be set to 100% of total capacity which means to bring up the whole capacity of the old fleet at once during rollback. """ maximum_batch_size: CapacitySize wait_interval_in_seconds: int maximum_execution_timeout_in_seconds: Optional[int] = Unassigned() - wait_for_instance_termination: Optional[bool] = Unassigned() rollback_maximum_batch_size: Optional[CapacitySize] = Unassigned() @@ -7592,214 +6838,6 @@ class DeploymentConfig(Base): auto_rollback_configuration: Optional[AutoRollbackConfig] = Unassigned() -class EvaluationJobModel(Base): - """ - EvaluationJobModel - - Attributes - ---------------------- - model_identifier - model_type - endpoint_arn - """ - - model_identifier: StrPipeVar - model_type: StrPipeVar - endpoint_arn: Optional[StrPipeVar] = Unassigned() - - -class EvaluationJobModelConfig(Base): - """ - EvaluationJobModelConfig - - Attributes - ---------------------- - models - """ - - models: List[EvaluationJobModel] - - -class EvaluationJobOutputDataConfig(Base): - """ - EvaluationJobOutputDataConfig - - Attributes - ---------------------- - s3_uri - kms_key_id - """ - - s3_uri: StrPipeVar - kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class EvaluationJobCustomDataset(Base): - """ - EvaluationJobCustomDataset - - Attributes - ---------------------- - dataset_name - s3_uri - """ - - dataset_name: Optional[StrPipeVar] = Unassigned() - s3_uri: Optional[StrPipeVar] = Unassigned() - - -class EvaluationJobInputDataConfig(Base): - """ - EvaluationJobInputDataConfig - - Attributes - ---------------------- - custom_datasets - """ - - custom_datasets: Optional[List[EvaluationJobCustomDataset]] = Unassigned() - - -class EvaluationJobHumanTaskConfig(Base): - """ - EvaluationJobHumanTaskConfig - - Attributes - ---------------------- - flow_definition_arn - task_instructions - """ - - flow_definition_arn: StrPipeVar - task_instructions: StrPipeVar - - -class EvaluationJobHumanWorkflowConfig(Base): - """ - EvaluationJobHumanWorkflowConfig - - Attributes - ---------------------- - flow_definition_arn - task_instructions - """ - - flow_definition_arn: StrPipeVar - task_instructions: StrPipeVar - - -class EvaluationJobHumanEvaluationMetric(Base): - """ - EvaluationJobHumanEvaluationMetric - - Attributes - ---------------------- - metric_name - rating_method - metric_type - description - """ - - metric_name: StrPipeVar - rating_method: Optional[StrPipeVar] = Unassigned() - metric_type: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - - -class EvaluationJobHumanEvaluationConfig(Base): - """ - EvaluationJobHumanEvaluationConfig - - Attributes - ---------------------- - human_task_config - human_workflow_config - human_evaluation_metrics - """ - - human_evaluation_metrics: List[EvaluationJobHumanEvaluationMetric] - human_task_config: Optional[EvaluationJobHumanTaskConfig] = Unassigned() - human_workflow_config: Optional[EvaluationJobHumanWorkflowConfig] = Unassigned() - - -class EvaluationJobEvaluationConfig(Base): - """ - EvaluationJobEvaluationConfig - - Attributes - ---------------------- - human_evaluation_config - """ - - human_evaluation_config: EvaluationJobHumanEvaluationConfig - - -class EvaluationJobCredentialProxyConfig(Base): - """ - EvaluationJobCredentialProxyConfig - - Attributes - ---------------------- - upstream_platform_customer_credential_token - credential_provider_function - """ - - upstream_platform_customer_credential_token: StrPipeVar - credential_provider_function: StrPipeVar - - -class EvaluationJobUpstreamPlatformCustomerOutputDataConfig(Base): - """ - EvaluationJobUpstreamPlatformCustomerOutputDataConfig - - Attributes - ---------------------- - kms_key_id - s3_kms_encryption_context - kms_encryption_context - s3_uri - """ - - s3_uri: StrPipeVar - kms_key_id: Optional[StrPipeVar] = Unassigned() - s3_kms_encryption_context: Optional[StrPipeVar] = Unassigned() - kms_encryption_context: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - - -class EvaluationJobUpstreamPlatformConfig(Base): - """ - EvaluationJobUpstreamPlatformConfig - - Attributes - ---------------------- - credential_proxy_config - upstream_platform_customer_output_data_config - upstream_platform_customer_account_id - upstream_platform_customer_evaluation_job_arn - upstream_platform_customer_execution_role - """ - - credential_proxy_config: EvaluationJobCredentialProxyConfig - upstream_platform_customer_output_data_config: ( - EvaluationJobUpstreamPlatformCustomerOutputDataConfig - ) - upstream_platform_customer_account_id: StrPipeVar - upstream_platform_customer_execution_role: StrPipeVar - upstream_platform_customer_evaluation_job_arn: Optional[StrPipeVar] = Unassigned() - - -class InputExperimentSource(Base): - """ - InputExperimentSource - - Attributes - ---------------------- - source_arn - """ - - source_arn: StrPipeVar - - class FeatureDefinition(Base): """ FeatureDefinition @@ -7819,6 +6857,19 @@ class FeatureDefinition(Base): collection_config: Optional[CollectionConfig] = Unassigned() +class OnlineStoreSecurityConfig(Base): + """ + OnlineStoreSecurityConfig + The security configuration for OnlineStore. + + Attributes + ---------------------- + kms_key_id: The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption. The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId: "kms:Encrypt" "kms:Decrypt" "kms:DescribeKey" "kms:CreateGrant" "kms:RetireGrant" "kms:ReEncryptFrom" "kms:ReEncryptTo" "kms:GenerateDataKey" "kms:ListAliases" "kms:ListGrants" "kms:RevokeGrant" The caller (either user or IAM role) to all DataPlane operations (PutRecord, GetRecord, DeleteRecord) must have the following permissions to the KmsKeyId: "kms:Decrypt" + """ + + kms_key_id: Optional[StrPipeVar] = Unassigned() + + class OnlineStoreConfig(Base): """ OnlineStoreConfig @@ -7880,8 +6931,8 @@ class OfflineStoreConfig(Base): Attributes ---------------------- s3_storage_config: The Amazon Simple Storage (Amazon S3) location of OfflineStore. - disable_glue_table_creation: Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore. If set to False, Feature Store will name the OfflineStore Glue table following Athena's naming recommendations. The default value is False. - data_catalog_config: The meta data of the Glue table that is autogenerated when an OfflineStore is created. + disable_glue_table_creation: Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore. If set to True and DataCatalogConfig is provided, Feature Store associates the provided catalog configuration with the feature group without creating a table. In this case, you are responsible for creating and managing the Glue table. If set to True without DataCatalogConfig, no Glue table is created or associated with the feature group. The Iceberg table format is only supported when this is set to False. If set to False and DataCatalogConfig is provided, Feature Store creates the table using the specified names. If set to False without DataCatalogConfig, Feature Store auto-generates the table name following Athena's naming recommendations. This applies to both Glue and Apache Iceberg table formats. The default value is False. + data_catalog_config: The meta data of the Glue table for the OfflineStore. If not provided, Feature Store auto-generates the table name, database, and catalog when the OfflineStore is created. You can optionally provide this configuration to specify custom values. This applies to both Glue and Apache Iceberg table formats. table_format: Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg. """ @@ -7891,38 +6942,6 @@ class OfflineStoreConfig(Base): table_format: Optional[StrPipeVar] = Unassigned() -class OnlineStoreReplicaMetadata(Base): - """ - OnlineStoreReplicaMetadata - - Attributes - ---------------------- - source_region_name - source_table_name - source_feature_group_arn - """ - - source_region_name: StrPipeVar - source_table_name: StrPipeVar - source_feature_group_arn: StrPipeVar - - -class OnlineStoreMetadata(Base): - """ - OnlineStoreMetadata - - Attributes - ---------------------- - storage_account_id - is_online_store_replica - online_store_replica_metadata - """ - - storage_account_id: Optional[StrPipeVar] = Unassigned() - is_online_store_replica: Optional[bool] = Unassigned() - online_store_replica_metadata: Optional[OnlineStoreReplicaMetadata] = Unassigned() - - class ThroughputConfig(Base): """ ThroughputConfig @@ -7973,12 +6992,10 @@ class HumanLoopActivationConfig(Base): Attributes ---------------------- - human_loop_request_source human_loop_activation_conditions_config: Container structure for defining under what conditions SageMaker creates a human loop. """ human_loop_activation_conditions_config: HumanLoopActivationConditionsConfig - human_loop_request_source: Optional[HumanLoopRequestSource] = Unassigned() class USD(Base): @@ -8008,127 +7025,51 @@ class PublicWorkforceTaskPrice(Base): amount_in_usd: Defines the amount of money paid to an Amazon Mechanical Turk worker in United States dollars. """ - amount_in_usd: Optional[USD] = Unassigned() - - -class HumanLoopConfig(Base): - """ - HumanLoopConfig - Describes the work to be performed by human workers. - - Attributes - ---------------------- - workteam_arn: Amazon Resource Name (ARN) of a team of workers. To learn more about the types of workforces and work teams you can create and use with Amazon A2I, see Create and Manage Workforces. - human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface. You can use standard HTML and Crowd HTML Elements to create a custom worker task template. You use this template to create a human task UI. To learn how to create a custom HTML template, see Create Custom Worker Task Template. To learn how to create a human task UI, which is a worker task template that can be used in a flow definition, see Create and Delete a Worker Task Templates. - task_title: A title for the human worker task. - task_description: A description for the human worker task. - task_count: The number of distinct workers who will perform the same task on each object. For example, if TaskCount is set to 3 for an image classification labeling job, three workers will classify each input image. Increasing TaskCount can improve label accuracy. - task_availability_lifetime_in_seconds: The length of time that a task remains available for review by human workers. - task_time_limit_in_seconds: The amount of time that a worker has to complete a task. The default value is 3,600 seconds (1 hour). - task_keywords: Keywords used to describe the task so that workers can discover the task. - public_workforce_task_price - """ - - workteam_arn: StrPipeVar - human_task_ui_arn: StrPipeVar - task_title: StrPipeVar - task_description: StrPipeVar - task_count: int - task_availability_lifetime_in_seconds: Optional[int] = Unassigned() - task_time_limit_in_seconds: Optional[int] = Unassigned() - task_keywords: Optional[List[StrPipeVar]] = Unassigned() - public_workforce_task_price: Optional[PublicWorkforceTaskPrice] = Unassigned() - - -class FlowDefinitionOutputConfig(Base): - """ - FlowDefinitionOutputConfig - Contains information about where human output will be stored. - - Attributes - ---------------------- - s3_output_path: The Amazon S3 path where the object containing human output will be made available. To learn more about the format of Amazon A2I output data, see Amazon A2I Output Data. - kms_key_id: The Amazon Key Management Service (KMS) key ID for server-side encryption. - """ - - s3_output_path: StrPipeVar - kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class GroundTruthJobDataAttributes(Base): - """ - GroundTruthJobDataAttributes - - Attributes - ---------------------- - content_classifiers - """ - - content_classifiers: Optional[List[StrPipeVar]] = Unassigned() - - -class GroundTruthJobS3DataSource(Base): - """ - GroundTruthJobS3DataSource - - Attributes - ---------------------- - s3_uri - """ - - s3_uri: Optional[StrPipeVar] = Unassigned() - - -class GroundTruthJobDataSource(Base): - """ - GroundTruthJobDataSource - - Attributes - ---------------------- - s3_data_source - """ - - s3_data_source: Optional[GroundTruthJobS3DataSource] = Unassigned() - - -class GroundTruthJobInputConfig(Base): - """ - GroundTruthJobInputConfig - - Attributes - ---------------------- - data_attributes - data_source - """ - - data_attributes: Optional[GroundTruthJobDataAttributes] = Unassigned() - data_source: Optional[GroundTruthJobDataSource] = Unassigned() + amount_in_usd: Optional[USD] = Unassigned() -class GroundTruthJobOutputConfig(Base): +class HumanLoopConfig(Base): """ - GroundTruthJobOutputConfig + HumanLoopConfig + Describes the work to be performed by human workers. Attributes ---------------------- - s3_output_path + workteam_arn: Amazon Resource Name (ARN) of a team of workers. To learn more about the types of workforces and work teams you can create and use with Amazon A2I, see Create and Manage Workforces. + human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface. You can use standard HTML and Crowd HTML Elements to create a custom worker task template. You use this template to create a human task UI. To learn how to create a custom HTML template, see Create Custom Worker Task Template. To learn how to create a human task UI, which is a worker task template that can be used in a flow definition, see Create and Delete a Worker Task Templates. + task_title: A title for the human worker task. + task_description: A description for the human worker task. + task_count: The number of distinct workers who will perform the same task on each object. For example, if TaskCount is set to 3 for an image classification labeling job, three workers will classify each input image. Increasing TaskCount can improve label accuracy. + task_availability_lifetime_in_seconds: The length of time that a task remains available for review by human workers. + task_time_limit_in_seconds: The amount of time that a worker has to complete a task. The default value is 3,600 seconds (1 hour). + task_keywords: Keywords used to describe the task so that workers can discover the task. + public_workforce_task_price """ - s3_output_path: Optional[StrPipeVar] = Unassigned() + workteam_arn: StrPipeVar + human_task_ui_arn: StrPipeVar + task_title: StrPipeVar + task_description: StrPipeVar + task_count: int + task_availability_lifetime_in_seconds: Optional[int] = Unassigned() + task_time_limit_in_seconds: Optional[int] = Unassigned() + task_keywords: Optional[List[StrPipeVar]] = Unassigned() + public_workforce_task_price: Optional[PublicWorkforceTaskPrice] = Unassigned() -class GroundTruthProjectPointOfContact(Base): +class FlowDefinitionOutputConfig(Base): """ - GroundTruthProjectPointOfContact + FlowDefinitionOutputConfig + Contains information about where human output will be stored. Attributes ---------------------- - name - email + s3_output_path: The Amazon S3 path where the object containing human output will be made available. To learn more about the format of Amazon A2I output data, see Amazon A2I Output Data. + kms_key_id: The Amazon Key Management Service (KMS) key ID for server-side encryption. """ - name: StrPipeVar - email: StrPipeVar + s3_output_path: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() class PresignedUrlAccessConfig(Base): @@ -8179,16 +7120,10 @@ class HyperbandStrategyConfig(Base): Attributes ---------------------- - number_of_brackets - reduction_factor - variant min_resource: The minimum number of resources (such as epochs) that can be used by a training job launched by a hyperparameter tuning job. If the value for MinResource has not been reached, the training job is not stopped by Hyperband. max_resource: The maximum number of resources (such as epochs) that can be used by a training job launched by a hyperparameter tuning job. Once a job reaches the MaxResource value, it is stopped. If a value for MaxResource is not provided, and Hyperband is selected as the hyperparameter tuning strategy, HyperbandTraining attempts to infer MaxResource from the following keys (if present) in StaticsHyperParameters: epochs numepochs n-epochs n_epochs num_epochs If HyperbandStrategyConfig is unable to infer a value for MaxResource, it generates a validation error. The maximum value is 20,000 epochs. All metrics that correspond to an objective metric are used to derive early stopping decisions. For distributed training jobs, ensure that duplicate metrics are not printed in the logs across the individual nodes in a training job. If multiple nodes are publishing duplicate or incorrect metrics, training jobs may make an incorrect stopping decision and stop the job prematurely. """ - number_of_brackets: Optional[int] = Unassigned() - reduction_factor: Optional[int] = Unassigned() - variant: Optional[StrPipeVar] = Unassigned() min_resource: Optional[int] = Unassigned() max_resource: Optional[int] = Unassigned() @@ -8215,18 +7150,12 @@ class ResourceLimits(Base): ---------------------- max_number_of_training_jobs: The maximum number of training jobs that a hyperparameter tuning job can launch. max_parallel_training_jobs: The maximum number of concurrent training jobs that a hyperparameter tuning job can launch. - max_wall_clock_time_in_minutes - max_total_compute_time_in_minutes max_runtime_in_seconds: The maximum time in seconds that a hyperparameter tuning job can run. - max_billable_time_in_seconds """ max_parallel_training_jobs: int max_number_of_training_jobs: Optional[int] = Unassigned() - max_wall_clock_time_in_minutes: Optional[int] = Unassigned() - max_total_compute_time_in_minutes: Optional[int] = Unassigned() max_runtime_in_seconds: Optional[int] = Unassigned() - max_billable_time_in_seconds: Optional[int] = Unassigned() class IntegerParameterRange(Base): @@ -8267,20 +7196,6 @@ class ParameterRanges(Base): auto_parameters: Optional[List[AutoParameter]] = Unassigned() -class HyperParameterTrainingJobInstancePool(Base): - """ - HyperParameterTrainingJobInstancePool - - Attributes - ---------------------- - instance_type - pool_size - """ - - instance_type: StrPipeVar - pool_size: int - - class TuningJobCompletionCriteria(Base): """ TuningJobCompletionCriteria @@ -8298,18 +7213,6 @@ class TuningJobCompletionCriteria(Base): convergence_detected: Optional[ConvergenceDetected] = Unassigned() -class HyperParameterTuningJobCompletionConfig(Base): - """ - HyperParameterTuningJobCompletionConfig - - Attributes - ---------------------- - in_progress_training_jobs_handling - """ - - in_progress_training_jobs_handling: Optional[StrPipeVar] = Unassigned() - - class HyperParameterTuningJobConfig(Base): """ HyperParameterTuningJobConfig @@ -8323,9 +7226,7 @@ class HyperParameterTuningJobConfig(Base): resource_limits: The ResourceLimits object that specifies the maximum number of training and parallel training jobs that can be used for this hyperparameter tuning job. parameter_ranges: The ParameterRanges object that specifies the ranges of hyperparameters that this tuning job searches over to find the optimal configuration for the highest model performance against your chosen objective metric. training_job_early_stopping_type: Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. Because the Hyperband strategy has its own advanced internal early stopping mechanism, TrainingJobEarlyStoppingType must be OFF to use Hyperband. This parameter can take on one of the following values (the default value is OFF): OFF Training jobs launched by the hyperparameter tuning job do not use early stopping. AUTO SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early. - training_job_instance_pools tuning_job_completion_criteria: The tuning job's completion criteria. - completion_config random_seed: A value used to initialize a pseudo-random number generator. Setting a random seed and using the same seed later for the same tuning job will allow hyperparameter optimization to find more a consistent hyperparameter configuration between the two runs. """ @@ -8335,11 +7236,7 @@ class HyperParameterTuningJobConfig(Base): hyper_parameter_tuning_job_objective: Optional[HyperParameterTuningJobObjective] = Unassigned() parameter_ranges: Optional[ParameterRanges] = Unassigned() training_job_early_stopping_type: Optional[StrPipeVar] = Unassigned() - training_job_instance_pools: Optional[List[HyperParameterTrainingJobInstancePool]] = ( - Unassigned() - ) tuning_job_completion_criteria: Optional[TuningJobCompletionCriteria] = Unassigned() - completion_config: Optional[HyperParameterTuningJobCompletionConfig] = Unassigned() random_seed: Optional[int] = Unassigned() @@ -8362,22 +7259,6 @@ class HyperParameterAlgorithmSpecification(Base): metric_definitions: Optional[List[MetricDefinition]] = Unassigned() -class HyperParameterTuningInstanceGroup(Base): - """ - HyperParameterTuningInstanceGroup - - Attributes - ---------------------- - instance_type - instance_count - instance_group_name - """ - - instance_type: StrPipeVar - instance_count: int - instance_group_name: StrPipeVar - - class HyperParameterTuningInstanceConfig(Base): """ HyperParameterTuningInstanceConfig @@ -8406,7 +7287,6 @@ class HyperParameterTuningResourceConfig(Base): instance_count: The number of compute instances of type InstanceType to use. For distributed training, select a value greater than 1. volume_size_in_gb: The volume size in GB for the storage volume to be used in processing hyperparameter optimization jobs (optional). These volumes store model artifacts, incremental states and optionally, scratch space for training algorithms. Do not provide a value for this parameter if a value for InstanceConfigs is also specified. Some instance types have a fixed total local storage size. If you select one of these instances for training, VolumeSizeInGB cannot be greater than this total size. For a list of instance types with local instance storage and their sizes, see instance store volumes. SageMaker supports only the General Purpose SSD (gp2) storage volume type. volume_kms_key_id: A key used by Amazon Web Services Key Management Service to encrypt data on the storage volume attached to the compute instances used to run the training job. You can use either of the following formats to specify a key. KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" Amazon Resource Name (ARN) of a KMS key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" Some instances use local storage, which use a hardware module to encrypt storage volumes. If you choose one of these instance types, you cannot request a VolumeKmsKeyId. For a list of instance types that use local storage, see instance store volumes. For more information about Amazon Web Services Key Management Service, see KMS encryption for more information. - instance_groups allocation_strategy: The strategy that determines the order of preference for resources specified in InstanceConfigs used in hyperparameter optimization. instance_configs: A list containing the configuration(s) for one or more resources for processing hyperparameter jobs. These resources include compute instances and storage volumes to use in model training jobs launched by hyperparameter tuning jobs. The AllocationStrategy controls the order in which multiple configurations provided in InstanceConfigs are used. If you only want to use a single instance configuration inside the HyperParameterTuningResourceConfig API, do not provide a value for InstanceConfigs. Instead, use InstanceType, VolumeSizeInGB and InstanceCount. If you use InstanceConfigs, do not provide values for InstanceType, VolumeSizeInGB or InstanceCount. """ @@ -8415,7 +7295,6 @@ class HyperParameterTuningResourceConfig(Base): instance_count: Optional[int] = Unassigned() volume_size_in_gb: Optional[int] = Unassigned() volume_kms_key_id: Optional[StrPipeVar] = Unassigned() - instance_groups: Optional[List[HyperParameterTuningInstanceGroup]] = Unassigned() allocation_strategy: Optional[StrPipeVar] = Unassigned() instance_configs: Optional[List[HyperParameterTuningInstanceConfig]] = Unassigned() @@ -8444,7 +7323,6 @@ class HyperParameterTrainingJobDefinition(Base): tuning_objective hyper_parameter_ranges static_hyper_parameters: Specifies the values of hyperparameters that do not change for the tuning job. - initial_hyper_parameter_configurations algorithm_specification: The HyperParameterAlgorithmSpecification object that specifies the resource algorithm to use for the training jobs that the tuning job launches. role_arn: The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches. input_data_config: An array of Channel objects that specify the input for the training jobs that the tuning job launches. @@ -8469,9 +7347,6 @@ class HyperParameterTrainingJobDefinition(Base): tuning_objective: Optional[HyperParameterTuningJobObjective] = Unassigned() hyper_parameter_ranges: Optional[ParameterRanges] = Unassigned() static_hyper_parameters: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - initial_hyper_parameter_configurations: Optional[List[Dict[StrPipeVar, StrPipeVar]]] = ( - Unassigned() - ) input_data_config: Optional[List[Channel]] = Unassigned() vpc_config: Optional[VpcConfig] = Unassigned() resource_config: Optional[ResourceConfig] = Unassigned() @@ -8514,24 +7389,6 @@ class HyperParameterTuningJobWarmStartConfig(Base): warm_start_type: StrPipeVar -class IdentityCenterUserToken(Base): - """ - IdentityCenterUserToken - - Attributes - ---------------------- - encrypted_refresh_token - client_id - idc_user_id - skip_revoke_token_after_complete - """ - - encrypted_refresh_token: StrPipeVar - client_id: StrPipeVar - idc_user_id: StrPipeVar - skip_revoke_token_after_complete: Optional[bool] = Unassigned() - - class InferenceComponentContainerSpecification(Base): """ InferenceComponentContainerSpecification @@ -8577,9 +7434,9 @@ class InferenceComponentComputeResourceRequirements(Base): max_memory_required_in_mb: The maximum MB of memory to allocate to run a model that you assign to an inference component. """ - min_memory_required_in_mb: Optional[int] = Unassigned() number_of_cpu_cores_required: Optional[float] = Unassigned() number_of_accelerator_devices_required: Optional[float] = Unassigned() + min_memory_required_in_mb: Optional[int] = Unassigned() max_memory_required_in_mb: Optional[int] = Unassigned() @@ -8596,6 +7453,36 @@ class InferenceComponentDataCacheConfig(Base): enable_caching: bool +class InferenceComponentAvailabilityZoneBalance(Base): + """ + InferenceComponentAvailabilityZoneBalance + Configuration for balancing inference component copies across Availability Zones. + + Attributes + ---------------------- + enforcement_mode: Determines how strictly the Availability Zone balance constraint is enforced. PERMISSIVE The endpoint attempts to balance copies across Availability Zones but proceeds with scheduling even if balance can't be achieved due to available capacity or instance distribution across Availability Zones. + max_imbalance: The maximum allowed difference in the number of inference component copies between any two Availability Zones. This parameter applies only when the endpoint has instances across two or more Availability Zones. A copy placement is allowed if it reduces imbalance or the resulting imbalance is within this value. Default value: 0. + """ + + enforcement_mode: StrPipeVar + max_imbalance: Optional[int] = Unassigned() + + +class InferenceComponentSchedulingConfig(Base): + """ + InferenceComponentSchedulingConfig + The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. + + Attributes + ---------------------- + placement_strategy: The strategy for placing inference component copies across available instances. If you also set AvailabilityZoneBalance, this strategy applies to placement within each Availability Zone. SPREAD Distributes copies evenly across available instances for better resilience. BINPACK Packs copies onto fewer instances to optimize resource utilization. + availability_zone_balance: Configuration for balancing inference component copies across Availability Zones. + """ + + placement_strategy: StrPipeVar + availability_zone_balance: Optional[InferenceComponentAvailabilityZoneBalance] = Unassigned() + + class InferenceComponentSpecification(Base): """ InferenceComponentSpecification @@ -8609,6 +7496,7 @@ class InferenceComponentSpecification(Base): compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component. Omit this parameter if your request is meant to create an adapter inference component. An adapter inference component is loaded by a base inference component, and it uses the compute resources of the base inference component. base_inference_component_name: The name of an existing inference component that is to contain the inference component that you're creating with your request. Specify this parameter only if your request is meant to create an adapter inference component. An adapter inference component contains the path to an adapter model. The purpose of the adapter model is to tailor the inference output of a base foundation model, which is hosted by the base inference component. The adapter inference component uses the compute resources that you assigned to the base inference component. When you create an adapter inference component, use the Container parameter to specify the location of the adapter artifacts. In the parameter value, use the ArtifactUrl parameter of the InferenceComponentContainerSpecification data type. Before you can create an adapter inference component, you must have an existing inference component that contains the foundation model that you want to adapt. data_cache_config: Settings that affect how the inference component caches data. + scheduling_config: The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. """ model_name: Optional[Union[StrPipeVar, object]] = Unassigned() @@ -8619,6 +7507,7 @@ class InferenceComponentSpecification(Base): ) base_inference_component_name: Optional[StrPipeVar] = Unassigned() data_cache_config: Optional[InferenceComponentDataCacheConfig] = Unassigned() + scheduling_config: Optional[InferenceComponentSchedulingConfig] = Unassigned() class InferenceComponentRuntimeConfig(Base): @@ -8777,32 +7666,6 @@ class Stairs(Base): users_per_step: Optional[int] = Unassigned() -class InferenceInvocationTypes(Base): - """ - InferenceInvocationTypes - - Attributes - ---------------------- - invocation_type - """ - - invocation_type: Optional[StrPipeVar] = Unassigned() - - -class PayloadSampling(Base): - """ - PayloadSampling - - Attributes - ---------------------- - sampling_type - sampling_seed - """ - - sampling_type: Optional[StrPipeVar] = Unassigned() - sampling_seed: Optional[int] = Unassigned() - - class TrafficPattern(Base): """ TrafficPattern @@ -8813,17 +7676,11 @@ class TrafficPattern(Base): traffic_type: Defines the traffic patterns. Choose either PHASES or STAIRS. phases: Defines the phases traffic specification. stairs: Defines the stairs traffic pattern. - concurrencies - inference_invocation_types - payload_sampling """ traffic_type: Optional[StrPipeVar] = Unassigned() phases: Optional[List[Phase]] = Unassigned() stairs: Optional[Stairs] = Unassigned() - concurrencies: Optional[List[Concurrency]] = Unassigned() - inference_invocation_types: Optional[InferenceInvocationTypes] = Unassigned() - payload_sampling: Optional[PayloadSampling] = Unassigned() class RecommendationJobResourceLimit(Base): @@ -8841,24 +7698,6 @@ class RecommendationJobResourceLimit(Base): max_parallel_of_tests: Optional[int] = Unassigned() -class IntegerParameter(Base): - """ - IntegerParameter - - Attributes - ---------------------- - name - min_value - max_value - scaling_type - """ - - name: Optional[StrPipeVar] = Unassigned() - min_value: Optional[int] = Unassigned() - max_value: Optional[int] = Unassigned() - scaling_type: Optional[StrPipeVar] = Unassigned() - - class EnvironmentParameterRanges(Base): """ EnvironmentParameterRanges @@ -8867,13 +7706,9 @@ class EnvironmentParameterRanges(Base): Attributes ---------------------- categorical_parameter_ranges: Specified a list of parameters for each category. - integer_parameter_ranges - continuous_parameter_ranges """ categorical_parameter_ranges: Optional[List[CategoricalParameter]] = Unassigned() - integer_parameter_ranges: Optional[List[IntegerParameter]] = Unassigned() - continuous_parameter_ranges: Optional[List[ContinuousParameter]] = Unassigned() class EndpointInputConfiguration(Base): @@ -8969,20 +7804,6 @@ class RecommendationJobVpcConfig(Base): subnets: List[StrPipeVar] -class TokenizerConfig(Base): - """ - TokenizerConfig - - Attributes - ---------------------- - model_id - accept_eula - """ - - model_id: Optional[StrPipeVar] = Unassigned() - accept_eula: Optional[bool] = Unassigned() - - class RecommendationJobInputConfig(Base): """ RecommendationJobInputConfig @@ -9000,7 +7821,6 @@ class RecommendationJobInputConfig(Base): container_config: Specifies mandatory fields for running an Inference Recommender job. The fields specified in ContainerConfig override the corresponding fields in the model package. endpoints: Existing customer endpoints on which to run an Inference Recommender job. vpc_config: Inference Recommender provisions SageMaker endpoints with access to VPC in the inference recommendation job. - tokenizer_config """ model_package_version_arn: Optional[StrPipeVar] = Unassigned() @@ -9013,7 +7833,6 @@ class RecommendationJobInputConfig(Base): container_config: Optional[RecommendationJobContainerConfig] = Unassigned() endpoints: Optional[List[EndpointInfo]] = Unassigned() vpc_config: Optional[RecommendationJobVpcConfig] = Unassigned() - tokenizer_config: Optional[TokenizerConfig] = Unassigned() class ModelLatencyThreshold(Base): @@ -9048,102 +7867,6 @@ class RecommendationJobStoppingConditions(Base): flat_invocations: Optional[StrPipeVar] = Unassigned() -class RecommendationJobTuningJob(Base): - """ - RecommendationJobTuningJob - - Attributes - ---------------------- - job_name - """ - - job_name: Optional[StrPipeVar] = Unassigned() - - -class RecommendationJobTuningWarmStartConfig(Base): - """ - RecommendationJobTuningWarmStartConfig - - Attributes - ---------------------- - jobs - """ - - jobs: Optional[List[RecommendationJobTuningJob]] = Unassigned() - - -class RecommendationJobTuningConvergenceDetected(Base): - """ - RecommendationJobTuningConvergenceDetected - - Attributes - ---------------------- - complete_on_convergence - """ - - complete_on_convergence: Optional[StrPipeVar] = Unassigned() - - -class RecommendationJobTuningBestObjectiveNotImproving(Base): - """ - RecommendationJobTuningBestObjectiveNotImproving - - Attributes - ---------------------- - max_number_of_tests_not_improving - """ - - max_number_of_tests_not_improving: Optional[int] = Unassigned() - - -class RecommendationJobTuningCompletionCriteria(Base): - """ - RecommendationJobTuningCompletionCriteria - - Attributes - ---------------------- - convergence_detected - best_objective_not_improving - """ - - convergence_detected: Optional[RecommendationJobTuningConvergenceDetected] = Unassigned() - best_objective_not_improving: Optional[RecommendationJobTuningBestObjectiveNotImproving] = ( - Unassigned() - ) - - -class RecommendationJobTuningObjectiveMetric(Base): - """ - RecommendationJobTuningObjectiveMetric - - Attributes - ---------------------- - name - """ - - name: Optional[StrPipeVar] = Unassigned() - - -class RecommendationJobEndpointConfigurationTuning(Base): - """ - RecommendationJobEndpointConfigurationTuning - - Attributes - ---------------------- - warm_start_config - random_seed - strategy - completion_criteria - objective_metric - """ - - warm_start_config: Optional[RecommendationJobTuningWarmStartConfig] = Unassigned() - random_seed: Optional[int] = Unassigned() - strategy: Optional[StrPipeVar] = Unassigned() - completion_criteria: Optional[RecommendationJobTuningCompletionCriteria] = Unassigned() - objective_metric: Optional[RecommendationJobTuningObjectiveMetric] = Unassigned() - - class RecommendationJobCompiledOutputConfig(Base): """ RecommendationJobCompiledOutputConfig @@ -9166,12 +7889,10 @@ class RecommendationJobOutputConfig(Base): ---------------------- kms_key_id: The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt your output artifacts with Amazon S3 server-side encryption. The SageMaker execution role must have kms:GenerateDataKey permission. The KmsKeyId can be any of the following formats: // KMS Key ID "1234abcd-12ab-34cd-56ef-1234567890ab" // Amazon Resource Name (ARN) of a KMS Key "arn:aws:kms:<region>:<account>:key/<key-id-12ab-34cd-56ef-1234567890ab>" // KMS Key Alias "alias/ExampleAlias" // Amazon Resource Name (ARN) of a KMS Key Alias "arn:aws:kms:<region>:<account>:alias/<ExampleAlias>" For more information about key identifiers, see Key identifiers (KeyID) in the Amazon Web Services Key Management Service (Amazon Web Services KMS) documentation. compiled_output_config: Provides information about the output configuration for the compiled model. - benchmark_results_output_config """ kms_key_id: Optional[StrPipeVar] = Unassigned() compiled_output_config: Optional[RecommendationJobCompiledOutputConfig] = Unassigned() - benchmark_results_output_config: Optional[BenchmarkResultsOutputConfig] = Unassigned() class LabelingJobS3DataSource(Base): @@ -9389,6 +8110,19 @@ class ModelBiasAppSpecification(Base): environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() +class MonitoringGroundTruthS3Input(Base): + """ + MonitoringGroundTruthS3Input + The ground truth labels for the dataset used for the monitoring job. + + Attributes + ---------------------- + s3_uri: The address of the Amazon S3 location of the ground truth labels. + """ + + s3_uri: Optional[StrPipeVar] = Unassigned() + + class ModelBiasJobInput(Base): """ ModelBiasJobInput @@ -9616,52 +8350,6 @@ class ModelMetrics(Base): explainability: Optional[Explainability] = Unassigned() -class TestInput(Base): - """ - TestInput - - Attributes - ---------------------- - data_source - content_type - compression_type - split_type - """ - - data_source: Optional[DataSource] = Unassigned() - content_type: Optional[StrPipeVar] = Unassigned() - compression_type: Optional[StrPipeVar] = Unassigned() - split_type: Optional[StrPipeVar] = Unassigned() - - -class HealthCheckConfig(Base): - """ - HealthCheckConfig - - Attributes - ---------------------- - num_payload - num_failures_allowed - """ - - num_payload: Optional[int] = Unassigned() - num_failures_allowed: Optional[int] = Unassigned() - - -class DeploymentSpecification(Base): - """ - DeploymentSpecification - - Attributes - ---------------------- - test_input - health_check_config - """ - - test_input: Optional[TestInput] = Unassigned() - health_check_config: Optional[HealthCheckConfig] = Unassigned() - - class FileSource(Base): """ FileSource @@ -9770,7 +8458,7 @@ class ModelPackageSecurityConfig(Base): kms_key_id: The KMS Key ID (KMSKeyId) used for encryption of model package information. """ - kms_key_id: Optional[str] = Unassigned() + kms_key_id: Optional[StrPipeVar] = Unassigned() class ModelPackageModelCard(Base): @@ -9903,12 +8591,10 @@ class MonitoringInput(Base): Attributes ---------------------- - processing_inputs endpoint_input: The endpoint for a monitoring job. batch_transform_input: Input object for the batch transform job. """ - processing_inputs: Optional[List[ProcessingInput]] = Unassigned() endpoint_input: Optional[EndpointInput] = Unassigned() batch_transform_input: Optional[BatchTransformInput] = Unassigned() @@ -10056,10 +8742,11 @@ class OptimizationJobModelSourceS3(Base): class OptimizationSageMakerModel(Base): """ OptimizationSageMakerModel + A SageMaker model to use as the source or destination for an optimization job. Attributes ---------------------- - model_name + model_name: The name of a SageMaker model. """ model_name: Optional[Union[StrPipeVar, object]] = Unassigned() @@ -10073,7 +8760,7 @@ class OptimizationJobModelSource(Base): Attributes ---------------------- s3: The Amazon S3 location of a source model to optimize with an optimization job. - sage_maker_model + sage_maker_model: The name of an existing SageMaker model to optimize with an optimization job. """ s3: Optional[OptimizationJobModelSourceS3] = Unassigned() @@ -10098,42 +8785,16 @@ class ModelQuantizationConfig(Base): class ModelCompilationConfig(Base): """ ModelCompilationConfig - Settings for the model compilation technique that's applied by a model optimization job. - - Attributes - ---------------------- - image: The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the optimization. - override_environment: Environment variables that override the default ones in the model container. - """ - - image: Optional[StrPipeVar] = Unassigned() - override_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - - -class OptimizationJobDraftModel(Base): - """ - OptimizationJobDraftModel - - Attributes - ---------------------- - s3_uri - model_access_config - """ - - s3_uri: Optional[StrPipeVar] = Unassigned() - model_access_config: Optional[OptimizationModelAccessConfig] = Unassigned() - - -class SpeculativeDecodingConfig(Base): - """ - SpeculativeDecodingConfig + Settings for the model compilation technique that's applied by a model optimization job. Attributes ---------------------- - draft_model + image: The URI of an LMI DLC in Amazon ECR. SageMaker uses this image to run the optimization. + override_environment: Environment variables that override the default ones in the model container. """ - draft_model: Optional[OptimizationJobDraftModel] = Unassigned() + image: Optional[StrPipeVar] = Unassigned() + override_environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() class ModelShardingConfig(Base): @@ -10154,11 +8815,12 @@ class ModelShardingConfig(Base): class ModelSpeculativeDecodingTrainingDataSource(Base): """ ModelSpeculativeDecodingTrainingDataSource + Contains information about the training data source for speculative decoding. Attributes ---------------------- - s3_uri - s3_data_type + s3_uri: The Amazon S3 URI that points to the training data for speculative decoding. + s3_data_type: The type of data stored in the Amazon S3 location. Valid values are S3Prefix or ManifestFile. """ s3_uri: StrPipeVar @@ -10168,11 +8830,12 @@ class ModelSpeculativeDecodingTrainingDataSource(Base): class ModelSpeculativeDecodingConfig(Base): """ ModelSpeculativeDecodingConfig + Settings for the model speculative decoding technique that's applied by a model optimization job. Attributes ---------------------- - technique - training_data_source + technique: The speculative decoding technique to apply during model optimization. + training_data_source: The location of the training data to use for speculative decoding. The data must be formatted as ShareGPT, OpenAI Completions or OpenAI Chat Completions. The input can also be unencrypted captured data from a SageMaker endpoint as long as the endpoint uses one of the above formats. """ technique: StrPipeVar @@ -10188,14 +8851,12 @@ class OptimizationConfig(Base): ---------------------- model_quantization_config: Settings for the model quantization technique that's applied by a model optimization job. model_compilation_config: Settings for the model compilation technique that's applied by a model optimization job. - speculative_decoding_config model_sharding_config: Settings for the model sharding technique that's applied by a model optimization job. - model_speculative_decoding_config + model_speculative_decoding_config: Settings for the model speculative decoding technique that's applied by a model optimization job. """ model_quantization_config: Optional[ModelQuantizationConfig] = Unassigned() model_compilation_config: Optional[ModelCompilationConfig] = Unassigned() - speculative_decoding_config: Optional[SpeculativeDecodingConfig] = Unassigned() model_sharding_config: Optional[ModelShardingConfig] = Unassigned() model_speculative_decoding_config: Optional[ModelSpeculativeDecodingConfig] = Unassigned() @@ -10209,7 +8870,7 @@ class OptimizationJobOutputConfig(Base): ---------------------- kms_key_id: The Amazon Resource Name (ARN) of a key in Amazon Web Services KMS. SageMaker uses they key to encrypt the artifacts of the optimized model when SageMaker uploads the model to Amazon S3. s3_output_location: The Amazon S3 URI for where to store the optimized model that you create with an optimization job. - sage_maker_model + sage_maker_model: The name of a SageMaker model to use as the output destination for an optimization job. """ s3_output_location: StrPipeVar @@ -10279,18 +8940,6 @@ class PartnerAppConfig(Base): role_group_assignments: Optional[List[RoleGroupAssignment]] = Unassigned() -class PersistentVolumeConfiguration(Base): - """ - PersistentVolumeConfiguration - - Attributes - ---------------------- - size_in_gb - """ - - size_in_gb: Optional[int] = Unassigned() - - class PipelineDefinitionS3Location(Base): """ PipelineDefinitionS3Location @@ -10321,45 +8970,95 @@ class ParallelismConfiguration(Base): max_parallel_execution_steps: int -class ProcessingS3InputInternal(Base): +class ProcessingS3Input(Base): """ - ProcessingS3InputInternal + ProcessingS3Input + Configuration for downloading input data from Amazon S3 into the processing container. Attributes ---------------------- - s3_uri - local_path - s3_data_type - s3_input_mode - s3_download_mode - s3_data_distribution_type - s3_compression_type + s3_uri: The URI of the Amazon S3 prefix Amazon SageMaker downloads data required to run a processing job. + local_path: The local path in your container where you want Amazon SageMaker to write input data to. LocalPath is an absolute path to the input data and must begin with /opt/ml/processing/. LocalPath is a required parameter when AppManaged is False (default). + s3_data_type: Whether you use an S3Prefix or a ManifestFile for the data type. If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker uses all objects with the specified key name prefix for the processing job. If you choose ManifestFile, S3Uri identifies an object that is a manifest file containing a list of object keys that you want Amazon SageMaker to use for the processing job. + s3_input_mode: Whether to use File or Pipe input mode. In File mode, Amazon SageMaker copies the data from the input source onto the local ML storage volume before starting your processing container. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your processing container into named pipes without using the ML storage volume. + s3_data_distribution_type: Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is sharded by Amazon S3 key, downloading one shard of data to each processing instance. + s3_compression_type: Whether to GZIP-decompress the data in Amazon S3 as it is streamed into the processing container. Gzip can only be used when Pipe mode is specified as the S3InputMode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your container without using the EBS volume. """ s3_uri: StrPipeVar s3_data_type: StrPipeVar local_path: Optional[StrPipeVar] = Unassigned() s3_input_mode: Optional[StrPipeVar] = Unassigned() - s3_download_mode: Optional[StrPipeVar] = Unassigned() s3_data_distribution_type: Optional[StrPipeVar] = Unassigned() s3_compression_type: Optional[StrPipeVar] = Unassigned() -class ProcessingInputInternal(Base): +class RedshiftDatasetDefinition(Base): + """ + RedshiftDatasetDefinition + Configuration for Redshift Dataset Definition input. + + Attributes + ---------------------- + cluster_id + database + db_user + query_string + cluster_role_arn: The IAM role attached to your Redshift cluster that Amazon SageMaker uses to generate datasets. + output_s3_uri: The location in Amazon S3 where the Redshift query results are stored. + kms_key_id: The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data from a Redshift execution. + output_format + output_compression + """ + + cluster_id: StrPipeVar + database: StrPipeVar + db_user: StrPipeVar + query_string: StrPipeVar + cluster_role_arn: StrPipeVar + output_s3_uri: StrPipeVar + output_format: StrPipeVar + kms_key_id: Optional[StrPipeVar] = Unassigned() + output_compression: Optional[StrPipeVar] = Unassigned() + + +class DatasetDefinition(Base): + """ + DatasetDefinition + Configuration for Dataset Definition inputs. The Dataset Definition input must specify exactly one of either AthenaDatasetDefinition or RedshiftDatasetDefinition types. + + Attributes + ---------------------- + athena_dataset_definition + redshift_dataset_definition + local_path: The local path where you want Amazon SageMaker to download the Dataset Definition inputs to run a processing job. LocalPath is an absolute path to the input data. This is a required parameter when AppManaged is False (default). + data_distribution_type: Whether the generated dataset is FullyReplicated or ShardedByS3Key (default). + input_mode: Whether to use File or Pipe input mode. In File (default) mode, Amazon SageMaker copies the data from the input source onto the local Amazon Elastic Block Store (Amazon EBS) volumes before starting your training algorithm. This is the most commonly used input mode. In Pipe mode, Amazon SageMaker streams input data from the source directly to your algorithm without using the EBS volume. + """ + + athena_dataset_definition: Optional[AthenaDatasetDefinition] = Unassigned() + redshift_dataset_definition: Optional[RedshiftDatasetDefinition] = Unassigned() + local_path: Optional[StrPipeVar] = Unassigned() + data_distribution_type: Optional[StrPipeVar] = Unassigned() + input_mode: Optional[StrPipeVar] = Unassigned() + + +class ProcessingInput(Base): """ - ProcessingInputInternal + ProcessingInput + The inputs for a processing job. The processing input must specify exactly one of either S3Input or DatasetDefinition types. Attributes ---------------------- - input_name - app_managed - s3_input - dataset_definition + input_name: The name for the processing job input. + app_managed: When True, input operations such as data download are managed natively by the processing job application. When False (default), input operations are managed by Amazon SageMaker. + s3_input: Configuration for downloading input data from Amazon S3 into the processing container. + dataset_definition: Configuration for a Dataset Definition input. """ - input_name: Optional[StrPipeVar] = Unassigned() + input_name: StrPipeVar app_managed: Optional[bool] = Unassigned() - s3_input: Optional[ProcessingS3InputInternal] = Unassigned() + s3_input: Optional[ProcessingS3Input] = Unassigned() dataset_definition: Optional[DatasetDefinition] = Unassigned() @@ -10472,52 +9171,6 @@ class ProcessingStoppingCondition(Base): max_runtime_in_seconds: int -class ProcessingUpstreamS3Output(Base): - """ - ProcessingUpstreamS3Output - - Attributes - ---------------------- - s3_uri - local_path - s3_upload_mode - role_arn - """ - - s3_uri: StrPipeVar - local_path: StrPipeVar - s3_upload_mode: StrPipeVar - role_arn: Optional[StrPipeVar] = Unassigned() - - -class UpstreamProcessingOutput(Base): - """ - UpstreamProcessingOutput - - Attributes - ---------------------- - output_name - upstream_s3_output - """ - - output_name: StrPipeVar - upstream_s3_output: ProcessingUpstreamS3Output - - -class UpstreamProcessingOutputConfig(Base): - """ - UpstreamProcessingOutputConfig - - Attributes - ---------------------- - outputs - kms_key_id - """ - - outputs: List[UpstreamProcessingOutput] - kms_key_id: Optional[StrPipeVar] = Unassigned() - - class ExperimentConfig(Base): """ ExperimentConfig @@ -10584,66 +9237,6 @@ class CreateTemplateProvider(Base): cfn_template_provider: Optional[CfnCreateTemplateProvider] = Unassigned() -class QuotaResourceConfig(Base): - """ - QuotaResourceConfig - - Attributes - ---------------------- - instance_type - count - """ - - instance_type: Optional[StrPipeVar] = Unassigned() - count: Optional[int] = Unassigned() - - -class OverQuota(Base): - """ - OverQuota - - Attributes - ---------------------- - allow_over_quota - use_dedicated_capacity - fair_share_weight - burst_limit - """ - - allow_over_quota: Optional[bool] = Unassigned() - use_dedicated_capacity: Optional[bool] = Unassigned() - fair_share_weight: Optional[int] = Unassigned() - burst_limit: Optional[BurstLimit] = Unassigned() - - -class QuotaAllocationTarget(Base): - """ - QuotaAllocationTarget - - Attributes - ---------------------- - id - type - roles - """ - - id: Optional[StrPipeVar] = Unassigned() - type: Optional[StrPipeVar] = Unassigned() - roles: Optional[List[StrPipeVar]] = Unassigned() - - -class PreemptionConfig(Base): - """ - PreemptionConfig - - Attributes - ---------------------- - allow_same_team_preemption - """ - - allow_same_team_preemption: bool - - class SpaceIdleSettings(Base): """ SpaceIdleSettings @@ -10793,8 +9386,6 @@ class SpaceSettings(Base): ---------------------- jupyter_server_app_settings kernel_gateway_app_settings - vs_code_app_settings - savitur_app_settings code_editor_app_settings: The Code Editor application settings. jupyter_lab_app_settings: The settings for the JupyterLab application. app_type: The type of app created within the space. If using the UpdateSpace API, you can't change the app type of your space by specifying a different value for this field. @@ -10806,8 +9397,6 @@ class SpaceSettings(Base): jupyter_server_app_settings: Optional[JupyterServerAppSettings] = Unassigned() kernel_gateway_app_settings: Optional[KernelGatewayAppSettings] = Unassigned() - vs_code_app_settings: Optional[VSCodeAppSettings] = Unassigned() - savitur_app_settings: Optional[SaviturAppSettings] = Unassigned() code_editor_app_settings: Optional[SpaceCodeEditorAppSettings] = Unassigned() jupyter_lab_app_settings: Optional[SpaceJupyterLabAppSettings] = Unassigned() app_type: Optional[StrPipeVar] = Unassigned() @@ -10843,195 +9432,6 @@ class SpaceSharingSettings(Base): sharing_type: StrPipeVar -class ResourceTags(Base): - """ - ResourceTags - - Attributes - ---------------------- - network_interface_tags - """ - - network_interface_tags: Optional[List[Tag]] = Unassigned() - - -class ProcessingOutputTraining(Base): - """ - ProcessingOutputTraining - - Attributes - ---------------------- - output_name - s3_output - feature_store_output - app_managed - """ - - output_name: StrPipeVar - s3_output: Optional[ProcessingS3Output] = Unassigned() - feature_store_output: Optional[ProcessingFeatureStoreOutput] = Unassigned() - app_managed: Optional[bool] = Unassigned() - - -class ProcessingOutputConfigTraining(Base): - """ - ProcessingOutputConfigTraining - - Attributes - ---------------------- - outputs - kms_key_id - """ - - outputs: List[ProcessingOutputTraining] - kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class ProcessingResult(Base): - """ - ProcessingResult - - Attributes - ---------------------- - exit_message - internal_failure_reason - fault_entity - payer - """ - - exit_message: Optional[StrPipeVar] = Unassigned() - internal_failure_reason: Optional[StrPipeVar] = Unassigned() - fault_entity: Optional[StrPipeVar] = Unassigned() - payer: Optional[StrPipeVar] = Unassigned() - - -class ProcessingUpstreamSvcConfig(Base): - """ - ProcessingUpstreamSvcConfig - Populated only for a Processing Job running in Training platform. Has fields to represent the Upstream Service Resource ARNs for a Processing Job. (Upstream to a Processing Job). These fields are used to determine the sourceArn and sourceAccount headers to be used for assume-role service calls to prevent confused deputy attacks - - Attributes - ---------------------- - auto_ml_job_arn - monitoring_schedule_arn - training_job_arn - """ - - auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() - training_job_arn: Optional[StrPipeVar] = Unassigned() - - -class ProcessingJobConfig(Base): - """ - ProcessingJobConfig - - Attributes - ---------------------- - processing_inputs - processing_output_config - upstream_processing_output_config - processing_result - processing_upstream_svc_config - """ - - processing_inputs: Optional[List[ProcessingInputInternal]] = Unassigned() - processing_output_config: Optional[ProcessingOutputConfigTraining] = Unassigned() - upstream_processing_output_config: Optional[UpstreamProcessingOutputConfig] = Unassigned() - processing_result: Optional[ProcessingResult] = Unassigned() - processing_upstream_svc_config: Optional[ProcessingUpstreamSvcConfig] = Unassigned() - - -class CredentialProxyConfig(Base): - """ - CredentialProxyConfig - - Attributes - ---------------------- - platform_credential_token - customer_credential_token - credential_provider_function - platform_credential_provider_function - customer_credential_provider_encryption_key - platform_credential_provider_encryption_key - customer_credential_provider_kms_key_id - platform_credential_provider_kms_key_id - """ - - customer_credential_token: StrPipeVar - credential_provider_function: StrPipeVar - platform_credential_token: Optional[StrPipeVar] = Unassigned() - platform_credential_provider_function: Optional[StrPipeVar] = Unassigned() - customer_credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned() - platform_credential_provider_encryption_key: Optional[StrPipeVar] = Unassigned() - customer_credential_provider_kms_key_id: Optional[StrPipeVar] = Unassigned() - platform_credential_provider_kms_key_id: Optional[StrPipeVar] = Unassigned() - - -class LogRoutingConfig(Base): - """ - LogRoutingConfig - - Attributes - ---------------------- - log_group - log_stream_prefix - metrics_namespace - metrics_host_dimension_value - """ - - log_group: Optional[StrPipeVar] = Unassigned() - log_stream_prefix: Optional[StrPipeVar] = Unassigned() - metrics_namespace: Optional[StrPipeVar] = Unassigned() - metrics_host_dimension_value: Optional[StrPipeVar] = Unassigned() - - -class UpstreamPlatformOutputDataConfig(Base): - """ - UpstreamPlatformOutputDataConfig - - Attributes - ---------------------- - kms_key_id - kms_encryption_context - channels - """ - - kms_key_id: Optional[StrPipeVar] = Unassigned() - kms_encryption_context: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() - channels: Optional[List[OutputChannel]] = Unassigned() - - -class UpstreamPlatformConfig(Base): - """ - UpstreamPlatformConfig - - Attributes - ---------------------- - credential_proxy_config - log_routing_config - vpc_config - agents_credential_provider - output_data_config - checkpoint_config - upstream_customer_account_id - upstream_customer_arn - enable_s3_context_keys_on_input_data - execution_role - """ - - credential_proxy_config: Optional[CredentialProxyConfig] = Unassigned() - log_routing_config: Optional[LogRoutingConfig] = Unassigned() - vpc_config: Optional[VpcConfig] = Unassigned() - agents_credential_provider: Optional[AgentsCredentialProvider] = Unassigned() - output_data_config: Optional[UpstreamPlatformOutputDataConfig] = Unassigned() - checkpoint_config: Optional[CheckpointConfig] = Unassigned() - upstream_customer_account_id: Optional[StrPipeVar] = Unassigned() - upstream_customer_arn: Optional[StrPipeVar] = Unassigned() - enable_s3_context_keys_on_input_data: Optional[bool] = Unassigned() - execution_role: Optional[StrPipeVar] = Unassigned() - - class DebugHookConfig(Base): """ DebugHookConfig @@ -11177,19 +9577,19 @@ class SessionChainingConfig(Base): class ServerlessJobConfig(Base): """ ServerlessJobConfig + The configuration for the serverless training job. Attributes ---------------------- - base_model_arn - accept_eula - job_type - customization_technique - peft - evaluation_type - evaluator_arn - job_spec + base_model_arn: The base model Amazon Resource Name (ARN) in SageMaker Public Hub. SageMaker always selects the latest version of the provided model. + accept_eula: Specifies agreement to the model end-user license agreement (EULA). The AcceptEula value must be explicitly defined as True in order to accept the EULA that this model requires. You are responsible for reviewing and complying with any applicable license terms and making sure they are acceptable for your use case before downloading or using a model. For more information, see End-user license agreements section for more details on accepting the EULA. + job_type: The serverless training job type. + customization_technique: The model customization technique. + peft: The parameter-efficient fine-tuning configuration. + evaluation_type: The evaluation job type. Required when serverless job type is Evaluation. + evaluator_arn: The evaluator Amazon Resource Name (ARN) used as reward function or reward prompt. """ - + base_model_arn: StrPipeVar job_type: StrPipeVar accept_eula: Optional[bool] = Unassigned() @@ -11197,23 +9597,21 @@ class ServerlessJobConfig(Base): peft: Optional[StrPipeVar] = Unassigned() evaluation_type: Optional[StrPipeVar] = Unassigned() evaluator_arn: Optional[StrPipeVar] = Unassigned() - job_spec: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() class MlflowConfig(Base): """ MlflowConfig + The MLflow configuration using SageMaker managed MLflow. Attributes ---------------------- - mlflow_tracking_server_arn - mlflow_resource_arn - mlflow_experiment_name - mlflow_run_name + mlflow_resource_arn: The Amazon Resource Name (ARN) of the MLflow resource. + mlflow_experiment_name: The MLflow experiment name used for this job. + mlflow_run_name: The MLflow run name used for this job. """ mlflow_resource_arn: StrPipeVar - mlflow_tracking_server_arn: Optional[StrPipeVar] = Unassigned() mlflow_experiment_name: Optional[StrPipeVar] = Unassigned() mlflow_run_name: Optional[StrPipeVar] = Unassigned() @@ -11221,11 +9619,12 @@ class MlflowConfig(Base): class ModelPackageConfig(Base): """ ModelPackageConfig + The configuration for the Model package. Attributes ---------------------- - model_package_group_arn - source_model_package_arn + model_package_group_arn: The Amazon Resource Name (ARN) of the model package group of output model package. + source_model_package_arn: The Amazon Resource Name (ARN) of the source model package used for continued fine-tuning and custom model evaluation. """ model_package_group_arn: StrPipeVar @@ -11259,21 +9658,9 @@ class DataProcessing(Base): join_source: Specifies the source of the data to join with the transformed data. The valid values are None and Input. The default value is None, which specifies not to join the input with the transformed data. If you want the batch transform job to join the original input data with the transformed data, set JoinSource to Input. You can specify OutputFilter as an additional filter to select a portion of the joined dataset and store it in the output file. For JSON or JSONLines objects, such as a JSON array, SageMaker adds the transformed data to the input JSON object in an attribute called SageMakerOutput. The joined result for JSON must be a key-value pair object. If the input is not a key-value pair object, SageMaker creates a new JSON file. In the new JSON file, and the input data is stored under the SageMakerInput key and the results are stored in SageMakerOutput. For CSV data, SageMaker takes each row as a JSON array and joins the transformed data with the input by appending each transformed row to the end of the input. The joined data has the original input data followed by the transformed data and the output is a CSV file. For information on how joining in applied, see Workflow for Associating Inferences with Input Records. """ - input_filter: Optional[StrPipeVar] = Unassigned() - output_filter: Optional[StrPipeVar] = Unassigned() - join_source: Optional[StrPipeVar] = Unassigned() - - -class InputTrialComponentSource(Base): - """ - InputTrialComponentSource - - Attributes - ---------------------- - source_arn - """ - - source_arn: StrPipeVar + input_filter: Optional[StrPipeVar] = Unassigned() + output_filter: Optional[StrPipeVar] = Unassigned() + join_source: Optional[StrPipeVar] = Unassigned() class TrialComponentStatus(Base): @@ -11321,18 +9708,6 @@ class TrialComponentArtifact(Base): media_type: Optional[StrPipeVar] = Unassigned() -class InputTrialSource(Base): - """ - InputTrialSource - - Attributes - ---------------------- - source_arn - """ - - source_arn: StrPipeVar - - class OidcConfig(Base): """ OidcConfig @@ -11402,13 +9777,9 @@ class OidcMemberDefinition(Base): Attributes ---------------------- groups: A list of comma seperated strings that identifies user groups in your OIDC IdP. Each user group is made up of a group of private workers. - group - member_definition_id """ groups: Optional[List[StrPipeVar]] = Unassigned() - group: Optional[StrPipeVar] = Unassigned() - member_definition_id: Optional[StrPipeVar] = Unassigned() class MemberDefinition(Base): @@ -11426,20 +9797,6 @@ class MemberDefinition(Base): oidc_member_definition: Optional[OidcMemberDefinition] = Unassigned() -class MembershipRule(Base): - """ - MembershipRule - - Attributes - ---------------------- - target_member_definition - filter_expression - """ - - target_member_definition: Optional[StrPipeVar] = Unassigned() - filter_expression: Optional[StrPipeVar] = Unassigned() - - class NotificationConfiguration(Base): """ NotificationConfiguration @@ -11494,36 +9851,6 @@ class WorkerAccessConfiguration(Base): s3_presign: Optional[S3Presign] = Unassigned() -class CustomMonitoringJobDefinition(Base): - """ - CustomMonitoringJobDefinition - - Attributes - ---------------------- - job_definition_arn - job_definition_name - creation_time - custom_monitoring_app_specification - custom_monitoring_job_input - custom_monitoring_job_output_config - job_resources - network_config - role_arn - stopping_condition - """ - - job_definition_arn: StrPipeVar - job_definition_name: StrPipeVar - creation_time: datetime.datetime - custom_monitoring_app_specification: CustomMonitoringAppSpecification - custom_monitoring_job_input: CustomMonitoringJobInput - custom_monitoring_job_output_config: MonitoringOutputConfig - job_resources: MonitoringResources - role_arn: StrPipeVar - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - class CustomizedMetricSpecification(Base): """ CustomizedMetricSpecification @@ -11562,38 +9889,6 @@ class DataCaptureConfigSummary(Base): kms_key_id: StrPipeVar -class DataQualityJobDefinition(Base): - """ - DataQualityJobDefinition - - Attributes - ---------------------- - job_definition_arn - job_definition_name - creation_time - data_quality_baseline_config - data_quality_app_specification - data_quality_job_input - data_quality_job_output_config - job_resources - network_config - role_arn - stopping_condition - """ - - job_definition_arn: StrPipeVar - job_definition_name: StrPipeVar - creation_time: datetime.datetime - data_quality_app_specification: DataQualityAppSpecification - data_quality_job_input: DataQualityJobInput - data_quality_job_output_config: MonitoringOutputConfig - job_resources: MonitoringResources - role_arn: StrPipeVar - data_quality_baseline_config: Optional[DataQualityBaselineConfig] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - class DebugRuleEvaluationStatus(Base): """ DebugRuleEvaluationStatus @@ -11729,13 +10024,9 @@ class DerivedInformation(Base): Attributes ---------------------- derived_data_input_config: The data input configuration that SageMaker Neo automatically derived for the model. When SageMaker Neo derives this information, you don't need to specify the data input configuration when you create a compilation job. - derived_framework - derived_framework_version """ derived_data_input_config: Optional[StrPipeVar] = Unassigned() - derived_framework: Optional[StrPipeVar] = Unassigned() - derived_framework_version: Optional[StrPipeVar] = Unassigned() class ResolvedAttributes(Base): @@ -11755,34 +10046,6 @@ class ResolvedAttributes(Base): completion_criteria: Optional[AutoMLJobCompletionCriteria] = Unassigned() -class ModelDeployEndpointConfig(Base): - """ - ModelDeployEndpointConfig - - Attributes - ---------------------- - endpoint_config_name - endpoint_config_arn - """ - - endpoint_config_name: Optional[Union[StrPipeVar, object]] = Unassigned() - endpoint_config_arn: Optional[StrPipeVar] = Unassigned() - - -class ModelDeployEndpoint(Base): - """ - ModelDeployEndpoint - - Attributes - ---------------------- - endpoint_name - endpoint_arn - """ - - endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() - endpoint_arn: Optional[StrPipeVar] = Unassigned() - - class ModelDeployResult(Base): """ ModelDeployResult @@ -11791,13 +10054,9 @@ class ModelDeployResult(Base): Attributes ---------------------- endpoint_name: The name of the endpoint to which the model has been deployed. If model deployment fails, this field is omitted from the response. - endpoint_configs - endpoints """ endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() - endpoint_configs: Optional[List[ModelDeployEndpointConfig]] = Unassigned() - endpoints: Optional[List[ModelDeployEndpoint]] = Unassigned() class ModelArtifacts(Base): @@ -11941,8 +10200,6 @@ class ProductionVariantSummary(Base): desired_serverless_config: The serverless configuration requested for the endpoint update. managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. - capacity_schedules_config - hyper_pod_config capacity_reservation_config: Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. """ @@ -11957,8 +10214,6 @@ class ProductionVariantSummary(Base): desired_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() - capacity_schedules_config: Optional[ProductionVariantCapacitySchedulesConfig] = Unassigned() - hyper_pod_config: Optional[ProductionVariantHyperPodConfig] = Unassigned() capacity_reservation_config: Optional[ProductionVariantCapacityReservationSummary] = ( Unassigned() ) @@ -11984,8 +10239,6 @@ class PendingProductionVariantSummary(Base): desired_serverless_config: The serverless configuration requested for this deployment, as specified in the endpoint configuration for the endpoint. managed_instance_scaling: Settings that control the range in the number of instances that the endpoint provisions as it scales up or down to accommodate traffic. routing_config: Settings that control how the endpoint routes incoming traffic to the instances that the endpoint hosts. - capacity_schedules_config - capacity_reservation_config: Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint. """ variant_name: StrPipeVar @@ -12001,10 +10254,6 @@ class PendingProductionVariantSummary(Base): desired_serverless_config: Optional[ProductionVariantServerlessConfig] = Unassigned() managed_instance_scaling: Optional[ProductionVariantManagedInstanceScaling] = Unassigned() routing_config: Optional[ProductionVariantRoutingConfig] = Unassigned() - capacity_schedules_config: Optional[ProductionVariantCapacitySchedulesConfig] = Unassigned() - capacity_reservation_config: Optional[ProductionVariantCapacityReservationSummary] = ( - Unassigned() - ) class PendingDeploymentSummary(Base): @@ -12018,14 +10267,12 @@ class PendingDeploymentSummary(Base): production_variants: An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint for the in-progress deployment. start_time: The start time of the deployment. shadow_production_variants: An array of PendingProductionVariantSummary objects, one for each model hosted behind this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants for the in-progress deployment. - graph_config_name """ endpoint_config_name: Union[StrPipeVar, object] production_variants: Optional[List[PendingProductionVariantSummary]] = Unassigned() start_time: Optional[datetime.datetime] = Unassigned() shadow_production_variants: Optional[List[PendingProductionVariantSummary]] = Unassigned() - graph_config_name: Optional[StrPipeVar] = Unassigned() class ExperimentSource(Base): @@ -12090,34 +10337,6 @@ class LastUpdateStatus(Base): failure_reason: Optional[StrPipeVar] = Unassigned() -class OnlineStoreReplicaStatus(Base): - """ - OnlineStoreReplicaStatus - - Attributes - ---------------------- - status - failure_reason - """ - - status: StrPipeVar - failure_reason: Optional[StrPipeVar] = Unassigned() - - -class OnlineStoreReplica(Base): - """ - OnlineStoreReplica - - Attributes - ---------------------- - region_name - online_store_replica_status - """ - - region_name: StrPipeVar - online_store_replica_status: OnlineStoreReplicaStatus - - class FeatureParameter(Base): """ FeatureParameter @@ -12278,11 +10497,9 @@ class HyperParameterTuningJobConsumedResources(Base): Attributes ---------------------- runtime_in_seconds: The wall clock runtime in seconds used by your hyperparameter tuning job. - billable_time_in_seconds """ runtime_in_seconds: Optional[int] = Unassigned() - billable_time_in_seconds: Optional[int] = Unassigned() class InferenceComponentContainerSpecificationSummary(Base): @@ -12328,6 +10545,7 @@ class InferenceComponentSpecificationSummary(Base): compute_resource_requirements: The compute resources allocated to run the model, plus any adapter models, that you assign to the inference component. base_inference_component_name: The name of the base inference component that contains this inference component. data_cache_config: Settings that affect how the inference component caches data. + scheduling_config: The scheduling configuration that determines how inference component copies are placed across available instances when copies are added or removed. """ model_name: Optional[Union[StrPipeVar, object]] = Unassigned() @@ -12338,6 +10556,7 @@ class InferenceComponentSpecificationSummary(Base): ) base_inference_component_name: Optional[StrPipeVar] = Unassigned() data_cache_config: Optional[InferenceComponentDataCacheConfigSummary] = Unassigned() + scheduling_config: Optional[InferenceComponentSchedulingConfig] = Unassigned() class InferenceComponentRuntimeConfigSummary(Base): @@ -12456,14 +10675,6 @@ class RecommendationMetrics(Base): cpu_utilization: The expected CPU utilization at maximum invocations per minute for the instance. NaN indicates that the value is not available. memory_utilization: The expected memory utilization at maximum invocations per minute for the instance. NaN indicates that the value is not available. model_setup_time: The time it takes to launch new compute resources for a serverless endpoint. The time can vary depending on the model size, how long it takes to download the model, and the start-up time of the container. NaN indicates that the value is not available. - input_tokens_per_second_per_request - output_tokens_per_second_per_request - time_to_first_token - cost_per_million_tokens - cost_per_million_input_tokens - cost_per_million_output_tokens - intertoken_latency - max_concurrency """ cost_per_hour: Optional[float] = Unassigned() @@ -12473,14 +10684,6 @@ class RecommendationMetrics(Base): cpu_utilization: Optional[float] = Unassigned() memory_utilization: Optional[float] = Unassigned() model_setup_time: Optional[int] = Unassigned() - input_tokens_per_second_per_request: Optional[float] = Unassigned() - output_tokens_per_second_per_request: Optional[float] = Unassigned() - time_to_first_token: Optional[float] = Unassigned() - cost_per_million_tokens: Optional[float] = Unassigned() - cost_per_million_input_tokens: Optional[float] = Unassigned() - cost_per_million_output_tokens: Optional[float] = Unassigned() - intertoken_latency: Optional[float] = Unassigned() - max_concurrency: Optional[int] = Unassigned() class EndpointOutputConfiguration(Base): @@ -12531,13 +10734,11 @@ class ModelConfiguration(Base): inference_specification_name: The inference specification name in the model package version. environment_parameters: Defines the environment parameters that includes key, value types, and values. compilation_job_name: The name of the compilation job used to create the recommended model artifacts. - image """ inference_specification_name: Optional[StrPipeVar] = Unassigned() environment_parameters: Optional[List[EnvironmentParameter]] = Unassigned() compilation_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() - image: Optional[StrPipeVar] = Unassigned() class InferenceRecommendation(Base): @@ -12551,7 +10752,6 @@ class InferenceRecommendation(Base): metrics: The metrics used to decide what recommendation to make. endpoint_configuration: Defines the endpoint configuration parameters. model_configuration: Defines the model configuration. - endpoint_arn invocation_end_time: A timestamp that shows when the benchmark completed. invocation_start_time: A timestamp that shows when the benchmark started. """ @@ -12560,7 +10760,6 @@ class InferenceRecommendation(Base): model_configuration: ModelConfiguration recommendation_id: Optional[StrPipeVar] = Unassigned() metrics: Optional[RecommendationMetrics] = Unassigned() - endpoint_arn: Optional[StrPipeVar] = Unassigned() invocation_end_time: Optional[datetime.datetime] = Unassigned() invocation_start_time: Optional[datetime.datetime] = Unassigned() @@ -12574,20 +10773,10 @@ class InferenceMetrics(Base): ---------------------- max_invocations: The expected maximum number of requests per minute for the instance. model_latency: The expected model latency at maximum invocations per minute for the instance. - input_tokens_per_second_per_request - output_tokens_per_second_per_request - time_to_first_token - intertoken_latency - max_concurrency """ max_invocations: int model_latency: int - input_tokens_per_second_per_request: Optional[float] = Unassigned() - output_tokens_per_second_per_request: Optional[float] = Unassigned() - time_to_first_token: Optional[float] = Unassigned() - intertoken_latency: Optional[float] = Unassigned() - max_concurrency: Optional[int] = Unassigned() class EndpointPerformance(Base): @@ -12641,20 +10830,6 @@ class LabelingJobOutput(Base): final_active_learning_model_arn: Optional[StrPipeVar] = Unassigned() -class UpgradeRollbackVersionDetails(Base): - """ - UpgradeRollbackVersionDetails - - Attributes - ---------------------- - snapshot_time - previous_version - """ - - snapshot_time: Optional[datetime.datetime] = Unassigned() - previous_version: Optional[StrPipeVar] = Unassigned() - - class ModelCardExportArtifacts(Base): """ ModelCardExportArtifacts @@ -12717,8 +10892,6 @@ class MonitoringExecutionSummary(Base): failure_reason: Contains the reason a monitoring job failed, if it failed. monitoring_job_definition_name: The name of the monitoring job. monitoring_type: The type of the monitoring job. - variant_name - monitoring_execution_id """ monitoring_schedule_name: Union[StrPipeVar, object] @@ -12731,104 +10904,6 @@ class MonitoringExecutionSummary(Base): failure_reason: Optional[StrPipeVar] = Unassigned() monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() monitoring_type: Optional[StrPipeVar] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() - monitoring_execution_id: Optional[StrPipeVar] = Unassigned() - - -class ModelQualityJobDefinition(Base): - """ - ModelQualityJobDefinition - - Attributes - ---------------------- - job_definition_arn - job_definition_name - creation_time - model_quality_baseline_config - model_quality_app_specification - model_quality_job_input - model_quality_job_output_config - job_resources - network_config - role_arn - stopping_condition - """ - - job_definition_arn: StrPipeVar - job_definition_name: StrPipeVar - creation_time: datetime.datetime - model_quality_app_specification: ModelQualityAppSpecification - model_quality_job_input: ModelQualityJobInput - model_quality_job_output_config: MonitoringOutputConfig - job_resources: MonitoringResources - role_arn: StrPipeVar - model_quality_baseline_config: Optional[ModelQualityBaselineConfig] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - -class ModelBiasJobDefinition(Base): - """ - ModelBiasJobDefinition - - Attributes - ---------------------- - job_definition_arn - job_definition_name - creation_time - model_bias_baseline_config - model_bias_app_specification - model_bias_job_input - model_bias_job_output_config - job_resources - network_config - role_arn - stopping_condition - """ - - job_definition_arn: StrPipeVar - job_definition_name: StrPipeVar - creation_time: datetime.datetime - model_bias_app_specification: ModelBiasAppSpecification - model_bias_job_input: ModelBiasJobInput - model_bias_job_output_config: MonitoringOutputConfig - job_resources: MonitoringResources - role_arn: StrPipeVar - model_bias_baseline_config: Optional[ModelBiasBaselineConfig] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() - - -class ModelExplainabilityJobDefinition(Base): - """ - ModelExplainabilityJobDefinition - - Attributes - ---------------------- - job_definition_arn - job_definition_name - creation_time - model_explainability_baseline_config - model_explainability_app_specification - model_explainability_job_input - model_explainability_job_output_config - job_resources - network_config - role_arn - stopping_condition - """ - - job_definition_arn: StrPipeVar - job_definition_name: StrPipeVar - creation_time: datetime.datetime - model_explainability_app_specification: ModelExplainabilityAppSpecification - model_explainability_job_input: ModelExplainabilityJobInput - model_explainability_job_output_config: MonitoringOutputConfig - job_resources: MonitoringResources - role_arn: StrPipeVar - model_explainability_baseline_config: Optional[ModelExplainabilityBaselineConfig] = Unassigned() - network_config: Optional[MonitoringNetworkConfig] = Unassigned() - stopping_condition: Optional[MonitoringStoppingCondition] = Unassigned() class OptimizationOutput(Base): @@ -12919,11 +10994,12 @@ class SelectiveExecutionConfig(Base): class MLflowConfiguration(Base): """ MLflowConfiguration + The MLflow configuration. Attributes ---------------------- - mlflow_resource_arn - mlflow_experiment_name + mlflow_resource_arn: The Amazon Resource Name (ARN) of MLflow configuration resource. + mlflow_experiment_name: The name of the MLflow configuration. """ mlflow_resource_arn: Optional[StrPipeVar] = Unassigned() @@ -13000,19 +11076,6 @@ class SubscribedWorkteam(Base): listing_id: Optional[StrPipeVar] = Unassigned() -class TrainingJobOutput(Base): - """ - TrainingJobOutput - Provides information about the location that is configured for storing optional output. - - Attributes - ---------------------- - s3_training_job_output: Provides information about the S3 bucket where training job output (model artifacts) is stored. For example, s3://bucket-name/keyname-prefix/output.tar.gz. - """ - - s3_training_job_output: StrPipeVar - - class WarmPoolStatus(Base): """ WarmPoolStatus @@ -13087,26 +11150,15 @@ class ProfilerRuleEvaluationStatus(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() -class ImageMetadata(Base): - """ - ImageMetadata - - Attributes - ---------------------- - image_type - """ - - image_type: Optional[StrPipeVar] = Unassigned() - - class MlflowDetails(Base): """ MlflowDetails + The MLflow details of this job. Attributes ---------------------- - mlflow_experiment_id - mlflow_run_id + mlflow_experiment_id: The MLflow experiment ID used for this job. + mlflow_run_id: The MLflow run ID used for this job. """ mlflow_experiment_id: Optional[StrPipeVar] = Unassigned() @@ -13116,13 +11168,14 @@ class MlflowDetails(Base): class TrainingProgressInfo(Base): """ TrainingProgressInfo + The serverless training job progress information. Attributes ---------------------- - total_step_count_per_epoch - current_step - current_epoch - max_epoch + total_step_count_per_epoch: The total step count per epoch. + current_step: The current step number. + current_epoch: The current epoch number. + max_epoch: The maximum number of epochs for this job. """ total_step_count_per_epoch: Optional[int] = Unassigned() @@ -13131,6 +11184,39 @@ class TrainingProgressInfo(Base): max_epoch: Optional[int] = Unassigned() +class TrainingPlanExtension(Base): + """ + TrainingPlanExtension + Details about an extension to a training plan, including the offering ID, dates, status, and cost information. + + Attributes + ---------------------- + training_plan_extension_offering_id: The unique identifier of the extension offering that was used to create this extension. + extended_at: The timestamp when the extension was created. + start_date: The start date of the extension period. + end_date: The end date of the extension period. + status: The current status of the extension (e.g., Pending, Active, Scheduled, Failed, Expired). + payment_status: The payment processing status of the extension. + availability_zone: The Availability Zone of the extension. + availability_zone_id: The Availability Zone ID of the extension. + duration_hours: The duration of the extension in hours. + upfront_fee: The upfront fee for the extension. + currency_code: The currency code for the upfront fee (e.g., USD). + """ + + training_plan_extension_offering_id: StrPipeVar + extended_at: Optional[datetime.datetime] = Unassigned() + start_date: Optional[datetime.datetime] = Unassigned() + end_date: Optional[datetime.datetime] = Unassigned() + status: Optional[StrPipeVar] = Unassigned() + payment_status: Optional[StrPipeVar] = Unassigned() + availability_zone: Optional[StrPipeVar] = Unassigned() + availability_zone_id: Optional[StrPipeVar] = Unassigned() + duration_hours: Optional[int] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() + + class ReservedCapacitySummary(Base): """ ReservedCapacitySummary @@ -13146,7 +11232,6 @@ class ReservedCapacitySummary(Base): total_instance_count: The total number of instances in the reserved capacity. status: The current status of the reserved capacity. availability_zone: The availability zone for the reserved capacity. - availability_zone_id duration_hours: The number of whole hours in the total duration for this reserved capacity. duration_minutes: The additional minutes beyond whole hours in the total duration for this reserved capacity. start_time: The start time of the reserved capacity. @@ -13161,57 +11246,12 @@ class ReservedCapacitySummary(Base): ultra_server_type: Optional[StrPipeVar] = Unassigned() ultra_server_count: Optional[int] = Unassigned() availability_zone: Optional[StrPipeVar] = Unassigned() - availability_zone_id: Optional[StrPipeVar] = Unassigned() duration_hours: Optional[int] = Unassigned() duration_minutes: Optional[int] = Unassigned() start_time: Optional[datetime.datetime] = Unassigned() end_time: Optional[datetime.datetime] = Unassigned() -class TrainingPlanStatusTransition(Base): - """ - TrainingPlanStatusTransition - - Attributes - ---------------------- - status - start_time - end_time - status_message - """ - - status: StrPipeVar - start_time: datetime.datetime - end_time: Optional[datetime.datetime] = Unassigned() - status_message: Optional[StrPipeVar] = Unassigned() - - -class S3JobProgress(Base): - """ - S3JobProgress - - Attributes - ---------------------- - completed_objects - failed_objects - """ - - completed_objects: int - failed_objects: int - - -class TransformJobProgress(Base): - """ - TransformJobProgress - - Attributes - ---------------------- - s3_job_progress - """ - - s3_job_progress: Optional[S3JobProgress] = Unassigned() - - class TrialComponentSource(Base): """ TrialComponentSource @@ -13371,8 +11411,6 @@ class Workteam(Base): create_date: The date and time that the work team was created (timestamp). last_updated_date: The date and time that the work team was last updated (timestamp). notification_configuration: Configures SNS notifications of available or expiring work items for work teams. - membership_rule - membership_type worker_access_configuration: Describes any access constraints that have been defined for Amazon S3 resources. """ @@ -13386,8 +11424,6 @@ class Workteam(Base): create_date: Optional[datetime.datetime] = Unassigned() last_updated_date: Optional[datetime.datetime] = Unassigned() notification_configuration: Optional[NotificationConfiguration] = Unassigned() - membership_rule: Optional[MembershipRule] = Unassigned() - membership_type: Optional[StrPipeVar] = Unassigned() worker_access_configuration: Optional[WorkerAccessConfiguration] = Unassigned() @@ -13553,68 +11589,6 @@ class DeviceSummary(Base): agent_version: Optional[StrPipeVar] = Unassigned() -class Domain(Base): - """ - Domain - - Attributes - ---------------------- - domain_arn - domain_id - domain_name - home_efs_file_system_id - single_sign_on_managed_application_instance_id - single_sign_on_application_arn - status - creation_time - last_modified_time - failure_reason - security_group_id_for_domain_boundary - auth_mode - default_user_settings - domain_settings - app_network_access - app_network_access_type - home_efs_file_system_kms_key_id - subnet_ids - url - vpc_id - kms_key_id - app_security_group_management - app_storage_type - tag_propagation - default_space_settings - tags - """ - - domain_arn: Optional[StrPipeVar] = Unassigned() - domain_id: Optional[StrPipeVar] = Unassigned() - domain_name: Optional[Union[StrPipeVar, object]] = Unassigned() - home_efs_file_system_id: Optional[StrPipeVar] = Unassigned() - single_sign_on_managed_application_instance_id: Optional[StrPipeVar] = Unassigned() - single_sign_on_application_arn: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - security_group_id_for_domain_boundary: Optional[StrPipeVar] = Unassigned() - auth_mode: Optional[StrPipeVar] = Unassigned() - default_user_settings: Optional[UserSettings] = Unassigned() - domain_settings: Optional[DomainSettings] = Unassigned() - app_network_access: Optional[StrPipeVar] = Unassigned() - app_network_access_type: Optional[StrPipeVar] = Unassigned() - home_efs_file_system_kms_key_id: Optional[StrPipeVar] = Unassigned() - subnet_ids: Optional[List[StrPipeVar]] = Unassigned() - url: Optional[StrPipeVar] = Unassigned() - vpc_id: Optional[StrPipeVar] = Unassigned() - kms_key_id: Optional[StrPipeVar] = Unassigned() - app_security_group_management: Optional[StrPipeVar] = Unassigned() - app_storage_type: Optional[StrPipeVar] = Unassigned() - tag_propagation: Optional[StrPipeVar] = Unassigned() - default_space_settings: Optional[DefaultSpaceSettings] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - - class DomainDetails(Base): """ DomainDetails @@ -13690,20 +11664,6 @@ class DomainSettingsForUpdate(Base): ip_address_type: Optional[StrPipeVar] = Unassigned() -class DryRunOperation(Base): - """ - DryRunOperation - - Attributes - ---------------------- - error_code - message - """ - - error_code: Optional[StrPipeVar] = Unassigned() - message: Optional[StrPipeVar] = Unassigned() - - class PredefinedMetricSpecification(Base): """ PredefinedMetricSpecification @@ -13911,12 +11871,6 @@ class MonitoringSchedule(Base): monitoring_schedule_config endpoint_name: The endpoint that hosts the model being monitored. last_monitoring_execution_summary - custom_monitoring_job_definition - data_quality_job_definition - model_quality_job_definition - model_bias_job_definition - model_explainability_job_definition - variant_name tags: A list of the tags associated with the monitoring schedlue. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide. """ @@ -13930,12 +11884,6 @@ class MonitoringSchedule(Base): monitoring_schedule_config: Optional[MonitoringScheduleConfig] = Unassigned() endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() - custom_monitoring_job_definition: Optional[CustomMonitoringJobDefinition] = Unassigned() - data_quality_job_definition: Optional[DataQualityJobDefinition] = Unassigned() - model_quality_job_definition: Optional[ModelQualityJobDefinition] = Unassigned() - model_bias_job_definition: Optional[ModelBiasJobDefinition] = Unassigned() - model_explainability_job_definition: Optional[ModelExplainabilityJobDefinition] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() tags: Optional[List[Tag]] = Unassigned() @@ -13949,7 +11897,6 @@ class Endpoint(Base): endpoint_name: The name of the endpoint. endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. endpoint_config_name: The endpoint configuration associated with the endpoint. - deletion_condition production_variants: A list of the production variants hosted on the endpoint. Each production variant is a model. data_capture_config endpoint_status: The status of the endpoint. @@ -13967,7 +11914,6 @@ class Endpoint(Base): endpoint_status: StrPipeVar creation_time: datetime.datetime last_modified_time: datetime.datetime - deletion_condition: Optional[EndpointDeletionCondition] = Unassigned() production_variants: Optional[List[ProductionVariantSummary]] = Unassigned() data_capture_config: Optional[DataCaptureConfigSummary] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() @@ -14030,60 +11976,14 @@ class EndpointSummary(Base): endpoint_arn: The Amazon Resource Name (ARN) of the endpoint. creation_time: A timestamp that shows when the endpoint was created. last_modified_time: A timestamp that shows when the endpoint was last modified. - endpoint_status: The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. To get a list of endpoints with a specified status, use the StatusEquals filter with a call to ListEndpoints. - """ - - endpoint_name: Union[StrPipeVar, object] - endpoint_arn: StrPipeVar - creation_time: datetime.datetime - last_modified_time: datetime.datetime - endpoint_status: StrPipeVar - - -class EvaluationJobSummary(Base): - """ - EvaluationJobSummary - - Attributes - ---------------------- - evaluation_job_name - evaluation_job_arn - evaluation_job_status - creation_time - evaluation_method - failure_reason - model_identifiers - """ - - evaluation_job_name: Union[StrPipeVar, object] - evaluation_job_arn: StrPipeVar - evaluation_job_status: StrPipeVar - creation_time: datetime.datetime - evaluation_method: StrPipeVar - failure_reason: Optional[StrPipeVar] = Unassigned() - model_identifiers: Optional[List[StrPipeVar]] = Unassigned() - - -class EventEntity(Base): - """ - EventEntity - - Attributes - ---------------------- - event_sender - event_id - shared_model_id - shared_model_version - event_type - read + endpoint_status: The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. To get a list of endpoints with a specified status, use the StatusEquals filter with a call to ListEndpoints. """ - event_sender: Optional[StrPipeVar] = Unassigned() - event_id: Optional[StrPipeVar] = Unassigned() - shared_model_id: Optional[StrPipeVar] = Unassigned() - shared_model_version: Optional[StrPipeVar] = Unassigned() - event_type: Optional[StrPipeVar] = Unassigned() - read: Optional[bool] = Unassigned() + endpoint_name: Union[StrPipeVar, object] + endpoint_arn: StrPipeVar + creation_time: datetime.datetime + last_modified_time: datetime.datetime + endpoint_status: StrPipeVar class Experiment(Base): @@ -14175,12 +12075,7 @@ class FeatureGroup(Base): last_update_status: A value that indicates whether the feature group was updated successfully. failure_reason: The reason that the FeatureGroup failed to be replicated in the OfflineStore. This is failure may be due to a failure to create a FeatureGroup in or delete a FeatureGroup from the OfflineStore. description: A free form description of a FeatureGroup. - online_store_replicas - online_store_read_write_type - last_modified_by - created_by tags: Tags used to define a FeatureGroup. - all_tags """ feature_group_arn: Optional[StrPipeVar] = Unassigned() @@ -14198,12 +12093,7 @@ class FeatureGroup(Base): last_update_status: Optional[LastUpdateStatus] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() description: Optional[StrPipeVar] = Unassigned() - online_store_replicas: Optional[List[OnlineStoreReplica]] = Unassigned() - online_store_read_write_type: Optional[StrPipeVar] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() tags: Optional[List[Tag]] = Unassigned() - all_tags: Optional[StrPipeVar] = Unassigned() class FeatureGroupSummary(Base): @@ -14242,7 +12132,6 @@ class FeatureMetadata(Base): last_modified_time: A timestamp indicating when the feature was last modified. description: An optional description that you specify to better describe the feature. parameters: Optional key-value pairs that you specify to better describe the feature. - all_parameters """ feature_group_arn: Optional[StrPipeVar] = Unassigned() @@ -14253,7 +12142,6 @@ class FeatureMetadata(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() description: Optional[StrPipeVar] = Unassigned() parameters: Optional[List[FeatureParameter]] = Unassigned() - all_parameters: Optional[StrPipeVar] = Unassigned() class Filter(Base): @@ -14320,34 +12208,6 @@ class GetDeviceFleetReportResponse(Base): model_stats: Optional[List[EdgeModelStat]] = Unassigned() -class LabelingPortalPolicyStatement(Base): - """ - LabelingPortalPolicyStatement - - Attributes - ---------------------- - labeling_portal_policy_groups - labeling_portal_policy_action - labeling_portal_policy_resources - """ - - labeling_portal_policy_groups: List[StrPipeVar] - labeling_portal_policy_action: StrPipeVar - labeling_portal_policy_resources: List[StrPipeVar] - - -class LabelingPortalPolicy(Base): - """ - LabelingPortalPolicy - - Attributes - ---------------------- - labeling_portal_policy_statements - """ - - labeling_portal_policy_statements: List[LabelingPortalPolicyStatement] - - class GetLineageGroupPolicyResponse(Base): """ GetLineageGroupPolicyResponse @@ -14444,66 +12304,6 @@ class GitConfigForUpdate(Base): secret_arn: Optional[StrPipeVar] = Unassigned() -class GroundTruthJobSummary(Base): - """ - GroundTruthJobSummary - - Attributes - ---------------------- - ground_truth_project_arn - ground_truth_workflow_arn - ground_truth_job_arn - ground_truth_job_name - ground_truth_job_status - created_at - """ - - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_job_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_job_name: Optional[Union[StrPipeVar, object]] = Unassigned() - ground_truth_job_status: Optional[StrPipeVar] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - - -class GroundTruthProjectSummary(Base): - """ - GroundTruthProjectSummary - - Attributes - ---------------------- - ground_truth_project_name - ground_truth_project_description - ground_truth_project_arn - ground_truth_project_status - created_at - """ - - ground_truth_project_name: Optional[Union[StrPipeVar, object]] = Unassigned() - ground_truth_project_description: Optional[StrPipeVar] = Unassigned() - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_project_status: Optional[StrPipeVar] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - - -class GroundTruthWorkflowSummary(Base): - """ - GroundTruthWorkflowSummary - - Attributes - ---------------------- - ground_truth_project_arn - ground_truth_workflow_arn - ground_truth_workflow_name - created_at - """ - - ground_truth_project_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_arn: Optional[StrPipeVar] = Unassigned() - ground_truth_workflow_name: Optional[Union[StrPipeVar, object]] = Unassigned() - created_at: Optional[datetime.datetime] = Unassigned() - - class HubContentInfo(Base): """ HubContentInfo @@ -14577,14 +12377,12 @@ class HumanTaskUiSummary(Base): ---------------------- human_task_ui_name: The name of the human task user interface. human_task_ui_arn: The Amazon Resource Name (ARN) of the human task user interface. - human_task_ui_status creation_time: A timestamp when SageMaker created the human task user interface. """ human_task_ui_name: Union[StrPipeVar, object] human_task_ui_arn: StrPipeVar creation_time: datetime.datetime - human_task_ui_status: Optional[StrPipeVar] = Unassigned() class HyperParameterTuningJobSearchEntity(Base): @@ -14692,36 +12490,6 @@ class Image(Base): failure_reason: Optional[StrPipeVar] = Unassigned() -class ImageSearchShape(Base): - """ - ImageSearchShape - - Attributes - ---------------------- - creation_time - description - display_name - failure_reason - image_arn - image_name - image_status - last_modified_time - role_arn - tags - """ - - creation_time: Optional[datetime.datetime] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - display_name: Optional[StrPipeVar] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - image_arn: Optional[StrPipeVar] = Unassigned() - image_name: Optional[Union[StrPipeVar, object]] = Unassigned() - image_status: Optional[StrPipeVar] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - role_arn: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - - class ImageVersion(Base): """ ImageVersion @@ -14747,59 +12515,14 @@ class ImageVersion(Base): failure_reason: Optional[StrPipeVar] = Unassigned() -class ImageVersionSearchShape(Base): - """ - ImageVersionSearchShape - - Attributes - ---------------------- - base_image - container_image - creation_time - failure_reason - image_arn - image_version_arn - image_version_status - last_modified_time - version - vendor_guidance - job_type - ml_framework - programming_lang - processor - horovod - soci_image - release_notes - override_alias_image_version - """ - - base_image: Optional[StrPipeVar] = Unassigned() - container_image: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - image_arn: Optional[StrPipeVar] = Unassigned() - image_version_arn: Optional[StrPipeVar] = Unassigned() - image_version_status: Optional[StrPipeVar] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - version: Optional[int] = Unassigned() - vendor_guidance: Optional[StrPipeVar] = Unassigned() - job_type: Optional[StrPipeVar] = Unassigned() - ml_framework: Optional[StrPipeVar] = Unassigned() - programming_lang: Optional[StrPipeVar] = Unassigned() - processor: Optional[StrPipeVar] = Unassigned() - horovod: Optional[bool] = Unassigned() - soci_image: Optional[bool] = Unassigned() - release_notes: Optional[StrPipeVar] = Unassigned() - override_alias_image_version: Optional[bool] = Unassigned() - - class InferenceComponentMetadata(Base): """ InferenceComponentMetadata + The metadata of the inference component. Attributes ---------------------- - arn + arn: The Amazon Resource Name (ARN) of the inference component. """ arn: Optional[StrPipeVar] = Unassigned() @@ -14849,7 +12572,6 @@ class InferenceExperimentSummary(Base): completion_time: The timestamp at which the inference experiment was completed. last_modified_time: The timestamp when you last modified the inference experiment. role_arn: The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment. - arn """ name: StrPipeVar @@ -14862,7 +12584,6 @@ class InferenceExperimentSummary(Base): description: Optional[StrPipeVar] = Unassigned() completion_time: Optional[datetime.datetime] = Unassigned() role_arn: Optional[StrPipeVar] = Unassigned() - arn: Optional[StrPipeVar] = Unassigned() class InferenceRecommendationsJob(Base): @@ -14885,7 +12606,6 @@ class InferenceRecommendationsJob(Base): model_name: The name of the created model. sample_payload_url: The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). model_package_version_arn: The Amazon Resource Name (ARN) of a versioned model package. - benchmark_results_output_config """ job_name: StrPipeVar @@ -14901,7 +12621,6 @@ class InferenceRecommendationsJob(Base): model_name: Optional[Union[StrPipeVar, object]] = Unassigned() sample_payload_url: Optional[StrPipeVar] = Unassigned() model_package_version_arn: Optional[StrPipeVar] = Unassigned() - benchmark_results_output_config: Optional[BenchmarkResultsOutputConfig] = Unassigned() class RecommendationJobInferenceBenchmark(Base): @@ -14948,34 +12667,21 @@ class InferenceRecommendationsJobStep(Base): inference_benchmark: Optional[RecommendationJobInferenceBenchmark] = Unassigned() -class InferenceServiceConfig(Base): - """ - InferenceServiceConfig - - Attributes - ---------------------- - request_status - execution_role_arn - """ - - request_status: StrPipeVar - execution_role_arn: Optional[StrPipeVar] = Unassigned() - - class InstanceGroupHealthCheckConfiguration(Base): """ InstanceGroupHealthCheckConfiguration + The configuration of deep health checks for an instance group. Overlapping deep health check configurations will be merged into a single operation. Attributes ---------------------- - instance_group_name - instance_ids - deep_health_checks + instance_group_name: The name of the instance group. + instance_ids: A list of Amazon Elastic Compute Cloud (EC2) instance IDs on which to perform deep health checks. Leave this field blank to perform deep health checks on the entire instance group. + deep_health_checks: A list of deep health checks to be performed. """ instance_group_name: StrPipeVar + deep_health_checks: List[StrPipeVar] instance_ids: Optional[List[StrPipeVar]] = Unassigned() - deep_health_checks: Optional[List[StrPipeVar]] = Unassigned() class LabelCountersForWorkteam(Base): @@ -15092,13 +12798,14 @@ class LineageGroupSummary(Base): class LineageMetadata(Base): """ LineageMetadata + The metadata that tracks relationships between ML artifacts, actions, and contexts. Attributes ---------------------- - action_arns - artifact_arns - context_arns - associations + action_arns: The Amazon Resource Name (ARN) of the lineage action. + artifact_arns: The Amazon Resource Name (ARN) of the lineage artifact. + context_arns: The Amazon Resource Name (ARN) of the lineage context. + associations: The lineage associations. """ action_arns: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() @@ -15118,28 +12825,27 @@ class MonitoringJobDefinitionSummary(Base): monitoring_job_definition_arn: The Amazon Resource Name (ARN) of the monitoring job. creation_time: The time that the monitoring job was created. endpoint_name: The name of the endpoint that the job monitors. - variant_name """ monitoring_job_definition_name: StrPipeVar monitoring_job_definition_arn: StrPipeVar creation_time: datetime.datetime endpoint_name: Union[StrPipeVar, object] - variant_name: Optional[StrPipeVar] = Unassigned() class MlflowAppSummary(Base): """ MlflowAppSummary + The summary of the Mlflow App to list. Attributes ---------------------- - arn - name - status - creation_time - last_modified_time - mlflow_version + arn: The ARN of a listed MLflow App. + name: The name of the MLflow App. + status: The status of the MLflow App. + creation_time: The creation time of a listed MLflow App. + last_modified_time: The last modified time of a listed MLflow App. + mlflow_version: The version of a listed MLflow App. """ arn: Optional[StrPipeVar] = Unassigned() @@ -15330,7 +13036,7 @@ class ModelPackageSummary(Base): model_package_status: The overall status of the model package. model_approval_status: The approval status of the model. This can be one of the following values. APPROVED - The model is approved REJECTED - The model is rejected. PENDING_MANUAL_APPROVAL - The model is waiting for manual approval. model_life_cycle - model_package_registration_type + model_package_registration_type: The package registration type of the model package summary. """ model_package_arn: StrPipeVar @@ -15447,7 +13153,6 @@ class MonitoringScheduleSummary(Base): endpoint_name: The name of the endpoint using the monitoring schedule. monitoring_job_definition_name: The name of the monitoring job definition that the schedule is for. monitoring_type: The type of the monitoring job definition that the schedule is for. - variant_name """ monitoring_schedule_name: Union[StrPipeVar, object] @@ -15458,7 +13163,6 @@ class MonitoringScheduleSummary(Base): endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() monitoring_job_definition_name: Optional[StrPipeVar] = Unassigned() monitoring_type: Optional[StrPipeVar] = Unassigned() - variant_name: Optional[StrPipeVar] = Unassigned() class NotebookInstanceLifecycleConfigSummary(Base): @@ -15526,7 +13230,7 @@ class OptimizationJobSummary(Base): optimization_end_time: The time when the optimization job finished processing. last_modified_time: The time when the optimization job was last updated. deployment_instance_type: The type of instance that hosts the optimized model that you create with the optimization job. - max_instance_count + max_instance_count: The maximum number of instances to use for the optimization job. optimization_types: The optimization techniques that are applied by the optimization job. """ @@ -15683,7 +13387,6 @@ class PipelineExecutionStepMetadata(Base): processing_job: The Amazon Resource Name (ARN) of the processing job that was run by this step execution. transform_job: The Amazon Resource Name (ARN) of the transform job that was run by this step execution. tuning_job: The Amazon Resource Name (ARN) of the tuning job that was run by this step execution. - compilation_job model: The Amazon Resource Name (ARN) of the model that was created by this step execution. register_model: The Amazon Resource Name (ARN) of the model package that the model was registered to by this step execution. condition: The outcome of the condition evaluation that was run by this step execution. @@ -15696,19 +13399,18 @@ class PipelineExecutionStepMetadata(Base): auto_ml_job: The Amazon Resource Name (ARN) of the AutoML job that was run by this step. endpoint: The endpoint that was invoked during this step execution. endpoint_config: The endpoint configuration used to create an endpoint during this step execution. - bedrock_custom_model - bedrock_custom_model_deployment - bedrock_provisioned_model_throughput - bedrock_model_import - inference_component - lineage + bedrock_custom_model: The metadata of the Amazon Bedrock custom model used in the pipeline execution step. + bedrock_custom_model_deployment: The metadata of the Amazon Bedrock custom model deployment used in pipeline execution step. + bedrock_provisioned_model_throughput: The metadata of the Amazon Bedrock provisioned model throughput used in the pipeline execution step. + bedrock_model_import: The metadata of Amazon Bedrock model import used in pipeline execution step. + inference_component: The metadata of the inference component used in pipeline execution step. + lineage: The metadata of the lineage used in pipeline execution step. """ training_job: Optional[TrainingJobStepMetadata] = Unassigned() processing_job: Optional[ProcessingJobStepMetadata] = Unassigned() transform_job: Optional[TransformJobStepMetadata] = Unassigned() tuning_job: Optional[TuningJobStepMetaData] = Unassigned() - compilation_job: Optional[CompilationJobStepMetadata] = Unassigned() model: Optional[ModelStepMetadata] = Unassigned() register_model: Optional[RegisterModelStepMetadata] = Unassigned() condition: Optional[ConditionStepMetadata] = Unassigned() @@ -15915,40 +13617,6 @@ class ProjectSummary(Base): project_description: Optional[StrPipeVar] = Unassigned() -class QuotaAllocationSummary(Base): - """ - QuotaAllocationSummary - - Attributes - ---------------------- - quota_allocation_arn - quota_id - quota_allocation_name - cluster_arn - quota_resources - creation_time - last_modified_time - quota_allocation_status - quota_allocation_target - activation_state - preemption_config - over_quota - """ - - quota_allocation_arn: Optional[StrPipeVar] = Unassigned() - quota_id: Optional[StrPipeVar] = Unassigned() - quota_allocation_name: Optional[Union[StrPipeVar, object]] = Unassigned() - cluster_arn: Optional[StrPipeVar] = Unassigned() - quota_resources: Optional[List[QuotaResourceConfig]] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - quota_allocation_status: Optional[StrPipeVar] = Unassigned() - quota_allocation_target: Optional[QuotaAllocationTarget] = Unassigned() - activation_state: Optional[ActivationStateV1] = Unassigned() - preemption_config: Optional[PreemptionConfig] = Unassigned() - over_quota: Optional[OverQuota] = Unassigned() - - class ResourceCatalog(Base): """ ResourceCatalog @@ -15968,64 +13636,6 @@ class ResourceCatalog(Base): creation_time: datetime.datetime -class SharedModelVersionListEntity(Base): - """ - SharedModelVersionListEntity - - Attributes - ---------------------- - shared_model_version - creator - model_type - problem_type - description - model_identifier - creation_time - last_modified_time - """ - - shared_model_version: Optional[StrPipeVar] = Unassigned() - creator: Optional[StrPipeVar] = Unassigned() - model_type: Optional[StrPipeVar] = Unassigned() - problem_type: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - model_identifier: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - - -class SharedModelListEntity(Base): - """ - SharedModelListEntity - - Attributes - ---------------------- - shared_model_id - shared_model_version - owner - model_name - model_type - problem_type - description - shares - model_identifier - creation_time - last_modified_time - """ - - shared_model_id: Optional[StrPipeVar] = Unassigned() - shared_model_version: Optional[StrPipeVar] = Unassigned() - owner: Optional[StrPipeVar] = Unassigned() - model_name: Optional[Union[StrPipeVar, object]] = Unassigned() - model_type: Optional[StrPipeVar] = Unassigned() - problem_type: Optional[StrPipeVar] = Unassigned() - description: Optional[StrPipeVar] = Unassigned() - shares: Optional[int] = Unassigned() - model_identifier: Optional[StrPipeVar] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - - class SpaceSettingsSummary(Base): """ SpaceSettingsSummary @@ -16134,7 +13744,6 @@ class TrainingJobSummary(Base): training_job_status: The status of the training job. secondary_status: The secondary status of the training job. warm_pool_status: The status of the warm pool associated with the training job. - keep_alive_period_in_seconds training_plan_arn: The Amazon Resource Name (ARN); of the training plan associated with this training job. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . """ @@ -16146,7 +13755,6 @@ class TrainingJobSummary(Base): last_modified_time: Optional[datetime.datetime] = Unassigned() secondary_status: Optional[StrPipeVar] = Unassigned() warm_pool_status: Optional[WarmPoolStatus] = Unassigned() - keep_alive_period_in_seconds: Optional[int] = Unassigned() training_plan_arn: Optional[StrPipeVar] = Unassigned() @@ -16185,12 +13793,9 @@ class TrainingPlanSummary(Base): total_instance_count: The total number of instances reserved in this training plan. available_instance_count: The number of instances currently available for use in this training plan. in_use_instance_count: The number of instances currently in use from this training plan. - unhealthy_instance_count - available_spare_instance_count total_ultra_server_count: The total number of UltraServers allocated to this training plan. - target_resources: The target resources (e.g., training jobs, HyperPod clusters) 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. + target_resources: The target resources (e.g., training jobs, HyperPod clusters, Endpoints) 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. A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment. reserved_capacity_summaries: A list of reserved capacities associated with this training plan, including details such as instance types, counts, and availability zones. - training_plan_status_transitions """ training_plan_arn: StrPipeVar @@ -16206,12 +13811,9 @@ class TrainingPlanSummary(Base): total_instance_count: Optional[int] = Unassigned() available_instance_count: Optional[int] = Unassigned() in_use_instance_count: Optional[int] = Unassigned() - unhealthy_instance_count: Optional[int] = Unassigned() - available_spare_instance_count: Optional[int] = Unassigned() total_ultra_server_count: Optional[int] = Unassigned() target_resources: Optional[List[StrPipeVar]] = Unassigned() reserved_capacity_summaries: Optional[List[ReservedCapacitySummary]] = Unassigned() - training_plan_status_transitions: Optional[List[TrainingPlanStatusTransition]] = Unassigned() class TransformJobSummary(Base): @@ -16468,11 +14070,8 @@ class TransformJob(Base): transform_end_time: Indicates when the transform job has been completed, or has stopped or failed. You are billed for the time interval between this time and the value of TransformStartTime. labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job that created the transform job. auto_ml_job_arn: The Amazon Resource Name (ARN) of the AutoML job that created the transform job. - transform_job_progress data_processing experiment_config - last_modified_by - created_by tags: A list of tags associated with the transform job. """ @@ -16495,11 +14094,8 @@ class TransformJob(Base): transform_end_time: Optional[datetime.datetime] = Unassigned() labeling_job_arn: Optional[StrPipeVar] = Unassigned() auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() - transform_job_progress: Optional[TransformJobProgress] = Unassigned() data_processing: Optional[DataProcessing] = Unassigned() experiment_config: Optional[ExperimentConfig] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() tags: Optional[List[Tag]] = Unassigned() @@ -16521,11 +14117,6 @@ class ModelDashboardMonitoringSchedule(Base): endpoint_name: The endpoint which is monitored. monitoring_alert_summaries: A JSON array where each element is a summary for a monitoring alert. last_monitoring_execution_summary - custom_monitoring_job_definition - data_quality_job_definition - model_quality_job_definition - model_bias_job_definition - model_explainability_job_definition batch_transform_input """ @@ -16540,11 +14131,6 @@ class ModelDashboardMonitoringSchedule(Base): endpoint_name: Optional[Union[StrPipeVar, object]] = Unassigned() monitoring_alert_summaries: Optional[List[MonitoringAlertSummary]] = Unassigned() last_monitoring_execution_summary: Optional[MonitoringExecutionSummary] = Unassigned() - custom_monitoring_job_definition: Optional[CustomMonitoringJobDefinition] = Unassigned() - data_quality_job_definition: Optional[DataQualityJobDefinition] = Unassigned() - model_quality_job_definition: Optional[ModelQualityJobDefinition] = Unassigned() - model_bias_job_definition: Optional[ModelBiasJobDefinition] = Unassigned() - model_explainability_job_definition: Optional[ModelExplainabilityJobDefinition] = Unassigned() batch_transform_input: Optional[BatchTransformInput] = Unassigned() @@ -16614,7 +14200,7 @@ class ModelPackage(Base): model_package_name: The name of the model package. The name can be as follows: For a versioned model, the name is automatically generated by SageMaker Model Registry and follows the format 'ModelPackageGroupName/ModelPackageVersion'. For an unversioned model, you must provide the name. model_package_group_name: The model group to which the model belongs. model_package_version: The version number of a versioned model. - model_package_registration_type + model_package_registration_type: The package registration type of the model package. model_package_arn: The Amazon Resource Name (ARN) of the model package. model_package_description: The description of the model package. creation_time: The time that the model package was created. @@ -16628,7 +14214,6 @@ class ModelPackage(Base): created_by: Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. metadata_properties: Metadata properties of the tracking entity, trial, or trial component. model_metrics: Metrics for the model. - deployment_specification last_modified_time: The last time the model package was modified. last_modified_by: Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. approval_description: A description provided when the model approval is set. @@ -16663,7 +14248,6 @@ class ModelPackage(Base): created_by: Optional[UserContext] = Unassigned() metadata_properties: Optional[MetadataProperties] = Unassigned() model_metrics: Optional[ModelMetrics] = Unassigned() - deployment_specification: Optional[DeploymentSpecification] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() last_modified_by: Optional[UserContext] = Unassigned() approval_description: Optional[StrPipeVar] = Unassigned() @@ -16811,7 +14395,6 @@ class PipelineExecution(Base): pipeline_parameters: Contains a list of pipeline parameters. This list can be empty. pipeline_version_id: The ID of the pipeline version that started this execution. pipeline_version_display_name: The display name of the pipeline version that started this execution. - tags """ pipeline_arn: Optional[StrPipeVar] = Unassigned() @@ -16830,7 +14413,6 @@ class PipelineExecution(Base): pipeline_parameters: Optional[List[Parameter]] = Unassigned() pipeline_version_id: Optional[int] = Unassigned() pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() class PipelineVersion(Base): @@ -16842,7 +14424,6 @@ class PipelineVersion(Base): ---------------------- pipeline_arn: The Amazon Resource Name (ARN) of the pipeline. pipeline_version_id: The ID of the pipeline version. - pipeline_version_arn pipeline_version_display_name: The display name of the pipeline version. pipeline_version_description: The description of the pipeline version. creation_time: The creation time of the pipeline version. @@ -16856,7 +14437,6 @@ class PipelineVersion(Base): pipeline_arn: Optional[StrPipeVar] = Unassigned() pipeline_version_id: Optional[int] = Unassigned() - pipeline_version_arn: Optional[StrPipeVar] = Unassigned() pipeline_version_display_name: Optional[StrPipeVar] = Unassigned() pipeline_version_description: Optional[StrPipeVar] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() @@ -16893,8 +14473,6 @@ class ProcessingJob(Base): processing_start_time: The time that the processing job started. last_modified_time: The time the processing job was last modified. creation_time: The time the processing job was created. - last_modified_by - created_by monitoring_schedule_arn: The ARN of a monitoring schedule for an endpoint associated with this processing job. auto_ml_job_arn: The Amazon Resource Name (ARN) of the AutoML job associated with this processing job. training_job_arn: The ARN of the training job associated with this processing job. @@ -16919,8 +14497,6 @@ class ProcessingJob(Base): processing_start_time: Optional[datetime.datetime] = Unassigned() last_modified_time: Optional[datetime.datetime] = Unassigned() creation_time: Optional[datetime.datetime] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() monitoring_schedule_arn: Optional[StrPipeVar] = Unassigned() auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() training_job_arn: Optional[StrPipeVar] = Unassigned() @@ -17085,6 +14661,8 @@ class ReservedCapacityOffering(Base): duration_minutes: The additional minutes beyond whole hours in the total duration for this reserved capacity offering. start_time: The start time of the reserved capacity offering. end_time: The end time of the reserved capacity offering. + extension_start_time: The start time of the extension for the reserved capacity offering. + extension_end_time: The end time of the extension for the reserved capacity offering. """ instance_type: StrPipeVar @@ -17097,18 +14675,8 @@ class ReservedCapacityOffering(Base): duration_minutes: Optional[int] = Unassigned() start_time: Optional[datetime.datetime] = Unassigned() end_time: Optional[datetime.datetime] = Unassigned() - - -class ResourceAlreadyExists(Base): - """ - ResourceAlreadyExists - - Attributes - ---------------------- - message - """ - - message: Optional[StrPipeVar] = Unassigned() + extension_start_time: Optional[datetime.datetime] = Unassigned() + extension_end_time: Optional[datetime.datetime] = Unassigned() class ResourceConfigForUpdate(Base): @@ -17182,7 +14750,6 @@ class TrainingJob(Base): labeling_job_arn: The Amazon Resource Name (ARN) of the labeling job. auto_ml_job_arn: The Amazon Resource Name (ARN) of the job. model_artifacts: Information about the Amazon S3 location that is configured for storing model artifacts. - training_job_output training_job_status: The status of the training job. Training job statuses are: InProgress - The training is in progress. Completed - The training job has completed. Failed - The training job has failed. To see the reason for the failure, see the FailureReason field in the response to a DescribeTrainingJobResponse call. Stopping - The training job is stopping. Stopped - The training job has stopped. For more detailed information, see SecondaryStatus. secondary_status: Provides detailed information about the state of the training job. For detailed information about the secondary status of the training job, see StatusMessage under SecondaryStatusTransition. SageMaker provides primary statuses and secondary statuses that apply to each of them: InProgress Starting - Starting the training job. Downloading - An optional stage for algorithms that support File training input mode. It indicates that data is being downloaded to the ML storage volumes. Training - Training is in progress. Uploading - Training is complete and the model artifacts are being uploaded to the S3 location. Completed Completed - The training job has completed. Failed Failed - The training job has failed. The reason for the failure is returned in the FailureReason field of DescribeTrainingJobResponse. Stopped MaxRuntimeExceeded - The job stopped because it exceeded the maximum allowed runtime. Stopped - The training job has stopped. Stopping Stopping - Stopping the training job. Valid values for SecondaryStatus are subject to change. We no longer support the following secondary statuses: LaunchingMLInstances PreparingTrainingStack DownloadingTrainingImage failure_reason: If the training job failed, the reason it failed. @@ -17211,15 +14778,11 @@ class TrainingJob(Base): debug_rule_configurations: Information about the debug rule configuration. tensor_board_output_config debug_rule_evaluation_statuses: Information about the evaluation status of the rules for the training job. - output_model_package_arn - model_package_config - upstream_platform_config + output_model_package_arn: The output model package Amazon Resource Name (ARN) that contains model weights or checkpoint. + model_package_config: The model package configuration. profiler_config - disable_efa environment: The environment variables to set in the Docker container. retry_strategy: The number of times to retry the job when the job fails due to an InternalServerError. - last_modified_by - created_by 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. """ @@ -17229,7 +14792,6 @@ class TrainingJob(Base): labeling_job_arn: Optional[StrPipeVar] = Unassigned() auto_ml_job_arn: Optional[StrPipeVar] = Unassigned() model_artifacts: Optional[ModelArtifacts] = Unassigned() - training_job_output: Optional[TrainingJobOutput] = Unassigned() training_job_status: Optional[StrPipeVar] = Unassigned() secondary_status: Optional[StrPipeVar] = Unassigned() failure_reason: Optional[StrPipeVar] = Unassigned() @@ -17260,13 +14822,9 @@ class TrainingJob(Base): debug_rule_evaluation_statuses: Optional[List[DebugRuleEvaluationStatus]] = Unassigned() output_model_package_arn: Optional[StrPipeVar] = Unassigned() model_package_config: Optional[ModelPackageConfig] = Unassigned() - upstream_platform_config: Optional[UpstreamPlatformConfig] = Unassigned() profiler_config: Optional[ProfilerConfig] = Unassigned() - disable_efa: Optional[bool] = Unassigned() environment: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() retry_strategy: Optional[RetryStrategy] = Unassigned() - last_modified_by: Optional[UserContext] = Unassigned() - created_by: Optional[UserContext] = Unassigned() tags: Optional[List[Tag]] = Unassigned() @@ -17398,42 +14956,6 @@ class TrialComponent(Base): run_name: Optional[StrPipeVar] = Unassigned() -class UserProfile(Base): - """ - UserProfile - - Attributes - ---------------------- - domain_id - user_profile_arn - user_profile_name - home_efs_file_system_uid - status - last_modified_time - creation_time - failure_reason - single_sign_on_user_identifier - single_sign_on_user_value - user_policy - user_settings - tags - """ - - domain_id: Optional[StrPipeVar] = Unassigned() - user_profile_arn: Optional[StrPipeVar] = Unassigned() - user_profile_name: Optional[Union[StrPipeVar, object]] = Unassigned() - home_efs_file_system_uid: Optional[StrPipeVar] = Unassigned() - status: Optional[StrPipeVar] = Unassigned() - last_modified_time: Optional[datetime.datetime] = Unassigned() - creation_time: Optional[datetime.datetime] = Unassigned() - failure_reason: Optional[StrPipeVar] = Unassigned() - single_sign_on_user_identifier: Optional[StrPipeVar] = Unassigned() - single_sign_on_user_value: Optional[StrPipeVar] = Unassigned() - user_policy: Optional[StrPipeVar] = Unassigned() - user_settings: Optional[UserSettings] = Unassigned() - tags: Optional[List[Tag]] = Unassigned() - - class SearchRecord(Base): """ SearchRecord @@ -17445,7 +14967,6 @@ class SearchRecord(Base): experiment: The properties of an experiment. trial: The properties of a trial. trial_component: The properties of a trial component. - transform_job endpoint model_package model_package_group @@ -17454,22 +14975,16 @@ class SearchRecord(Base): pipeline_version: The version of the pipeline. feature_group feature_metadata: The feature metadata used to search through the features. - image - image_version project: The properties of a project. hyper_parameter_tuning_job: The properties of a hyperparameter tuning job. model_card: An Amazon SageMaker Model Card that documents details about a machine learning model. model - app - user_profile - domain """ training_job: Optional[TrainingJob] = Unassigned() experiment: Optional[Experiment] = Unassigned() trial: Optional[Trial] = Unassigned() trial_component: Optional[TrialComponent] = Unassigned() - transform_job: Optional[TransformJob] = Unassigned() endpoint: Optional[Endpoint] = Unassigned() model_package: Optional[ModelPackage] = Unassigned() model_package_group: Optional[ModelPackageGroup] = Unassigned() @@ -17478,15 +14993,10 @@ class SearchRecord(Base): pipeline_version: Optional[PipelineVersion] = Unassigned() feature_group: Optional[FeatureGroup] = Unassigned() feature_metadata: Optional[FeatureMetadata] = Unassigned() - image: Optional[ImageSearchShape] = Unassigned() - image_version: Optional[ImageVersionSearchShape] = Unassigned() project: Optional[Project] = Unassigned() hyper_parameter_tuning_job: Optional[HyperParameterTuningJobSearchEntity] = Unassigned() model_card: Optional[ModelCard] = Unassigned() model: Optional[ModelDashboardModel] = Unassigned() - app: Optional[App] = Unassigned() - user_profile: Optional[UserProfile] = Unassigned() - domain: Optional[Domain] = Unassigned() class VisibilityConditions(Base): @@ -17527,7 +15037,7 @@ class TrainingPlanOffering(Base): Attributes ---------------------- training_plan_offering_id: The unique identifier for this training plan offering. - target_resources: The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod) for this training plan offering. 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. + target_resources: The target resources (e.g., SageMaker Training Jobs, SageMaker HyperPod, SageMaker Endpoints) for this training plan offering. 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. A training plan for SageMaker endpoints can be used exclusively to provide compute resources to SageMaker endpoints for model deployment. requested_start_time_after: The requested start time that the user specified when searching for the training plan offering. requested_end_time_before: The requested end time that the user specified when searching for the training plan offering. duration_hours: The number of whole hours in the total duration for this training plan offering. @@ -17548,127 +15058,44 @@ class TrainingPlanOffering(Base): reserved_capacity_offerings: Optional[List[ReservedCapacityOffering]] = Unassigned() -class ServiceCatalogProvisioningUpdateDetails(Base): - """ - ServiceCatalogProvisioningUpdateDetails - Details that you specify to provision a service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog. - - Attributes - ---------------------- - provisioning_artifact_id: The ID of the provisioning artifact. - provisioning_parameters: A list of key value pairs that you specify when you provision a product. - """ - - provisioning_artifact_id: Optional[StrPipeVar] = Unassigned() - provisioning_parameters: Optional[List[ProvisioningParameter]] = Unassigned() - - -class StudioUserSettings(Base): - """ - StudioUserSettings - - Attributes - ---------------------- - space_storage_settings - default_landing_uri - """ - - space_storage_settings: Optional[SpaceStorageSettings] = Unassigned() - default_landing_uri: Optional[StrPipeVar] = Unassigned() - - -class TagrisAccessDeniedException(Base): +class TrainingPlanExtensionOffering(Base): """ - TagrisAccessDeniedException + TrainingPlanExtensionOffering + Details about an available extension offering for a training plan. Use the offering ID with the ExtendTrainingPlan API to extend a training plan. Attributes ---------------------- - message - """ - - message: Optional[StrPipeVar] = Unassigned() - - -class TagrisInternalServiceException(Base): - """ - TagrisInternalServiceException - - Attributes - ---------------------- - message - """ - - message: Optional[StrPipeVar] = Unassigned() - - -class TagrisSweepListItem(Base): - """ - TagrisSweepListItem - - Attributes - ---------------------- - tagris_account_id - tagris_amazon_resource_name - tagris_internal_id - tagris_version - """ - - tagris_account_id: Optional[StrPipeVar] = Unassigned() - tagris_amazon_resource_name: Optional[StrPipeVar] = Unassigned() - tagris_internal_id: Optional[StrPipeVar] = Unassigned() - tagris_version: Optional[int] = Unassigned() - - -class TagrisInvalidArnException(Base): - """ - TagrisInvalidArnException - - Attributes - ---------------------- - message - sweep_list_item - """ - - message: Optional[StrPipeVar] = Unassigned() - sweep_list_item: Optional[TagrisSweepListItem] = Unassigned() - - -class TagrisInvalidParameterException(Base): - """ - TagrisInvalidParameterException - - Attributes - ---------------------- - message - """ - - message: Optional[StrPipeVar] = Unassigned() - - -class TagrisPartialResourcesExistResultsException(Base): - """ - TagrisPartialResourcesExistResultsException - - Attributes - ---------------------- - message - resource_existence_information + training_plan_extension_offering_id: The unique identifier for this extension offering. + availability_zone: The Availability Zone for this extension offering. + start_date: The start date of this extension offering. + end_date: The end date of this extension offering. + duration_hours: The duration of this extension offering in hours. + upfront_fee: The upfront fee for this extension offering. + currency_code: The currency code for the upfront fee (e.g., USD). """ - message: Optional[StrPipeVar] = Unassigned() - resource_existence_information: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() + training_plan_extension_offering_id: StrPipeVar + availability_zone: Optional[StrPipeVar] = Unassigned() + start_date: Optional[datetime.datetime] = Unassigned() + end_date: Optional[datetime.datetime] = Unassigned() + duration_hours: Optional[int] = Unassigned() + upfront_fee: Optional[StrPipeVar] = Unassigned() + currency_code: Optional[StrPipeVar] = Unassigned() -class TagrisThrottledException(Base): +class ServiceCatalogProvisioningUpdateDetails(Base): """ - TagrisThrottledException + ServiceCatalogProvisioningUpdateDetails + Details that you specify to provision a service catalog product. For information about service catalog, see What is Amazon Web Services Service Catalog. Attributes ---------------------- - message + provisioning_artifact_id: The ID of the provisioning artifact. + provisioning_parameters: A list of key value pairs that you specify when you provision a product. """ - message: Optional[StrPipeVar] = Unassigned() + provisioning_artifact_id: Optional[StrPipeVar] = Unassigned() + provisioning_parameters: Optional[List[ProvisioningParameter]] = Unassigned() class ThroughputConfigUpdate(Base): @@ -17696,11 +15123,9 @@ class UpdateClusterSoftwareInstanceGroupSpecification(Base): Attributes ---------------------- instance_group_name: The name of the instance group to update. - custom_metadata """ instance_group_name: StrPipeVar - custom_metadata: Optional[Dict[StrPipeVar, StrPipeVar]] = Unassigned() class VariantProperty(Base): diff --git a/sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py b/sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py index 738b47e309..0296e25935 100644 --- a/sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py +++ b/sagemaker-core/src/sagemaker/core/telemetry/telemetry_logging.py @@ -132,9 +132,7 @@ def wrapper(*args, **kwargs): FEATURE_TO_CODE[str(Feature.MODEL_CUSTOMIZATION_OSS)] ) except Exception: # pylint: disable=W0703 - logger.debug( - "Unable to determine NOVA/OSS model type for telemetry." - ) + logger.debug("Unable to determine NOVA/OSS model type for telemetry.") if ( hasattr(sagemaker_session, "sagemaker_config") diff --git a/sagemaker-core/src/sagemaker/core/tools/api_coverage.json b/sagemaker-core/src/sagemaker/core/tools/api_coverage.json index 860edc8e79..ca6f6ec7df 100644 --- a/sagemaker-core/src/sagemaker/core/tools/api_coverage.json +++ b/sagemaker-core/src/sagemaker/core/tools/api_coverage.json @@ -1 +1 @@ -{"SupportedAPIs": 361, "UnsupportedAPIs": 6} \ No newline at end of file +{"SupportedAPIs": 387, "UnsupportedAPIs": 18} \ No newline at end of file diff --git a/sagemaker-core/src/sagemaker/core/tools/constants.py b/sagemaker-core/src/sagemaker/core/tools/constants.py index e372a5897b..ea930561a3 100644 --- a/sagemaker-core/src/sagemaker/core/tools/constants.py +++ b/sagemaker-core/src/sagemaker/core/tools/constants.py @@ -56,6 +56,7 @@ "str": "string", "StrPipeVar": "string", "int": "integer", + "IntPipeVar": "integer", "bool": "boolean", "float": "double", "datetime.datetime": "timestamp", @@ -117,4 +118,18 @@ # E.g. DescribeInferenceComponent returns empty ComputeResourceRequirements for adapter ICs. REQUIRED_TO_OPTIONAL_OVERRIDES = { "InferenceComponentComputeResourceRequirements": ["MinMemoryRequiredInMb"], + # ModelPackageName is not applicable to versioned model packages (group-based). + # ModelPackageSecurityConfig.KmsKeyId is absent when no KMS key is configured. + "DescribeModelPackageOutput": ["ModelPackageName"], + "ModelPackageSecurityConfig": ["KmsKeyId"], +} + +# Members where the generated primitive type should be replaced with a PipelineVariable +# Key: shape name, Value: dict of member name -> replacement type. +PIPE_VAR_OVERRIDES = { + "ResourceConfig": { + "InstanceCount": "IntPipeVar", + "VolumeSizeInGB": "IntPipeVar", + "KeepAlivePeriodInSeconds": "IntPipeVar", + }, } diff --git a/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py b/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py index 563fc4a163..1a3bec54da 100644 --- a/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py +++ b/sagemaker-core/src/sagemaker/core/tools/resources_codegen.py @@ -2030,7 +2030,7 @@ def _get_dict_with_default_configurable_attributes(self, class_attributes: dict) Dict with attributes that can be configurable """ - PYTHON_TYPES = ["StrPipeVar", "datetime.datetime", "bool", "int", "float"] + PYTHON_TYPES = ["StrPipeVar", "IntPipeVar", "datetime.datetime", "bool", "int", "float"] default_attributes = {} for key, value in class_attributes.items(): if value in PYTHON_TYPES or value.startswith("List"): diff --git a/sagemaker-core/src/sagemaker/core/tools/resources_extractor.py b/sagemaker-core/src/sagemaker/core/tools/resources_extractor.py index 01072f98fa..9725af37b2 100644 --- a/sagemaker-core/src/sagemaker/core/tools/resources_extractor.py +++ b/sagemaker-core/src/sagemaker/core/tools/resources_extractor.py @@ -162,12 +162,18 @@ def _extract_resources_plan(self): [key[len("Import") :] for key in self.actions if key.startswith("Import")] ) + # Resource names that collide with critical imports (e.g. boto3.session.Session) + EXCLUDED_RESOURCES = {"Session"} + self.resources.update( - self.create_resources - | self.add_resources - | self.start_resources - | self.register_resources - | self.import_resources + ( + self.create_resources + | self.add_resources + | self.start_resources + | self.register_resources + | self.import_resources + ) + - EXCLUDED_RESOURCES ) self._filter_actions_for_resources(self.resources) diff --git a/sagemaker-core/src/sagemaker/core/tools/shapes_codegen.py b/sagemaker-core/src/sagemaker/core/tools/shapes_codegen.py index 2242804888..055ab87d8a 100644 --- a/sagemaker-core/src/sagemaker/core/tools/shapes_codegen.py +++ b/sagemaker-core/src/sagemaker/core/tools/shapes_codegen.py @@ -209,7 +209,7 @@ def generate_imports(self): imports += "from pydantic import BaseModel, ConfigDict\n" imports += "from typing import List, Dict, Optional, Any, Union\n" imports += "from sagemaker.core.utils.utils import Unassigned\n" - imports += "from sagemaker.core.helper.pipeline_variable import StrPipeVar\n" + imports += "from sagemaker.core.helper.pipeline_variable import StrPipeVar, IntPipeVar\n" imports += "\n" imports += "# Suppress Pydantic warnings about field names shadowing parent attributes\n" imports += "warnings.filterwarnings('ignore', message='.*shadows an attribute.*')\n" diff --git a/sagemaker-core/src/sagemaker/core/tools/shapes_extractor.py b/sagemaker-core/src/sagemaker/core/tools/shapes_extractor.py index 95cc359e59..7cc0102fcd 100644 --- a/sagemaker-core/src/sagemaker/core/tools/shapes_extractor.py +++ b/sagemaker-core/src/sagemaker/core/tools/shapes_extractor.py @@ -19,6 +19,7 @@ from sagemaker.core.tools.constants import ( BASIC_JSON_TYPES_TO_PYTHON_TYPES, REQUIRED_TO_OPTIONAL_OVERRIDES, + PIPE_VAR_OVERRIDES, SHAPE_DAG_FILE_PATH, ) from sagemaker.core.utils.utils import ( @@ -222,8 +223,7 @@ def generate_shape_members(self, shape, required_override=()): required_args = list(required_override) or shape_dict.get("required", []) # Remove members that are known to be optional despite the service model required_args = [ - r for r in required_args - if r not in REQUIRED_TO_OPTIONAL_OVERRIDES.get(shape, []) + r for r in required_args if r not in REQUIRED_TO_OPTIONAL_OVERRIDES.get(shape, []) ] init_data_body = {} # bring the required members in front @@ -242,7 +242,9 @@ def generate_shape_members(self, shape, required_override=()): member_type = self._evaluate_map_type(member_shape) else: # Shape is a simple type like string - member_type = BASIC_JSON_TYPES_TO_PYTHON_TYPES[member_shape_type] + member_type = PIPE_VAR_OVERRIDES.get(shape, {}).get( + member_name, BASIC_JSON_TYPES_TO_PYTHON_TYPES[member_shape_type] + ) else: raise Exception("The Shape definition mush exist. The Json Data might be corrupt") member_name_snake_case = convert_to_snake_case(member_name) diff --git a/sagemaker-core/src/sagemaker/core/training/configs.py b/sagemaker-core/src/sagemaker/core/training/configs.py index a308ed40ee..9cefc87570 100644 --- a/sagemaker-core/src/sagemaker/core/training/configs.py +++ b/sagemaker-core/src/sagemaker/core/training/configs.py @@ -124,10 +124,11 @@ class SourceCode(BaseConfig): ".ipynb_checkpoints", ] + class OutputDataConfig(shapes.OutputDataConfig): """OutputDataConfig. - Provides the configuration for the output data location of the training job + Provides the configuration for the output data location of the training job (will not be carried over to any model repository or deployment). Parameters: diff --git a/sagemaker-core/src/sagemaker/core/user_agent.py b/sagemaker-core/src/sagemaker/core/user_agent.py index e5d6fc9dfe..e87729368a 100644 --- a/sagemaker-core/src/sagemaker/core/user_agent.py +++ b/sagemaker-core/src/sagemaker/core/user_agent.py @@ -23,7 +23,7 @@ NOTEBOOK_METADATA_FILE = "/etc/opt/ml/sagemaker-notebook-instance-version.txt" STUDIO_METADATA_FILE = "/opt/ml/metadata/resource-metadata.json" -SDK_VERSION ="3.0" +SDK_VERSION = "3.0" def process_notebook_metadata_file(): diff --git a/sagemaker-core/src/sagemaker/core/utils/code_injection/shape_dag.py b/sagemaker-core/src/sagemaker/core/utils/code_injection/shape_dag.py index 1af541220f..d7ad54ee25 100644 --- a/sagemaker-core/src/sagemaker/core/utils/code_injection/shape_dag.py +++ b/sagemaker-core/src/sagemaker/core/utils/code_injection/shape_dag.py @@ -1,4 +1,344 @@ SHAPE_DAG = { + "AIBenchmarkEndpoint": { + "members": [ + {"name": "Identifier", "shape": "AIResourceIdentifier", "type": "string"}, + {"name": "TargetContainerHostname", "shape": "String", "type": "string"}, + { + "name": "InferenceComponents", + "shape": "AIBenchmarkInferenceComponentList", + "type": "list", + }, + ], + "type": "structure", + }, + "AIBenchmarkInferenceComponent": { + "members": [{"name": "Identifier", "shape": "AIResourceIdentifier", "type": "string"}], + "type": "structure", + }, + "AIBenchmarkInferenceComponentList": { + "member_shape": "AIBenchmarkInferenceComponent", + "member_type": "structure", + "type": "list", + }, + "AIBenchmarkJobSummary": { + "members": [ + {"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}, + {"name": "AIBenchmarkJobStatus", "shape": "AIBenchmarkJobStatus", "type": "string"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}, + ], + "type": "structure", + }, + "AIBenchmarkJobSummaryList": { + "member_shape": "AIBenchmarkJobSummary", + "member_type": "structure", + "type": "list", + }, + "AIBenchmarkNetworkConfig": { + "members": [{"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}], + "type": "structure", + }, + "AIBenchmarkOutputConfig": { + "members": [{"name": "S3OutputLocation", "shape": "S3Uri", "type": "string"}], + "type": "structure", + }, + "AIBenchmarkOutputResult": { + "members": [ + {"name": "S3OutputLocation", "shape": "S3Uri", "type": "string"}, + {"name": "CloudWatchLogs", "shape": "AICloudWatchLogsList", "type": "list"}, + ], + "type": "structure", + }, + "AIBenchmarkTarget": { + "members": [{"name": "Endpoint", "shape": "AIBenchmarkEndpoint", "type": "structure"}], + "type": "structure", + }, + "AICapacityReservationConfig": { + "members": [ + { + "name": "CapacityReservationPreference", + "shape": "AICapacityReservationPreference", + "type": "string", + }, + {"name": "MlReservationArns", "shape": "AIMlReservationArnList", "type": "list"}, + ], + "type": "structure", + }, + "AICloudWatchLogs": { + "members": [ + {"name": "LogGroupArn", "shape": "String", "type": "string"}, + {"name": "LogStreamName", "shape": "String", "type": "string"}, + ], + "type": "structure", + }, + "AICloudWatchLogsList": { + "member_shape": "AICloudWatchLogs", + "member_type": "structure", + "type": "list", + }, + "AIDatasetConfig": { + "members": [ + {"name": "InputDataConfig", "shape": "AIWorkloadInputDataConfigList", "type": "list"} + ], + "type": "structure", + }, + "AIMlReservationArnList": { + "member_shape": "AIMlReservationArn", + "member_type": "string", + "type": "list", + }, + "AIModelSource": { + "members": [{"name": "S3", "shape": "AIModelSourceS3", "type": "structure"}], + "type": "structure", + }, + "AIModelSourceS3": { + "members": [{"name": "S3Uri", "shape": "S3Uri", "type": "string"}], + "type": "structure", + }, + "AIRecommendation": { + "members": [ + {"name": "RecommendationDescription", "shape": "String", "type": "string"}, + { + "name": "OptimizationDetails", + "shape": "AIRecommendationOptimizationDetailList", + "type": "list", + }, + {"name": "ModelDetails", "shape": "AIRecommendationModelDetails", "type": "structure"}, + { + "name": "DeploymentConfiguration", + "shape": "AIRecommendationDeploymentConfiguration", + "type": "structure", + }, + {"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}, + {"name": "ExpectedPerformance", "shape": "ExpectedPerformanceList", "type": "list"}, + ], + "type": "structure", + }, + "AIRecommendationComputeSpec": { + "members": [ + {"name": "InstanceTypes", "shape": "AIRecommendationInstanceTypeList", "type": "list"}, + { + "name": "CapacityReservationConfig", + "shape": "AICapacityReservationConfig", + "type": "structure", + }, + ], + "type": "structure", + }, + "AIRecommendationConstraint": { + "members": [{"name": "Metric", "shape": "AIRecommendationMetric", "type": "string"}], + "type": "structure", + }, + "AIRecommendationConstraintList": { + "member_shape": "AIRecommendationConstraint", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationDeploymentConfiguration": { + "members": [ + {"name": "S3", "shape": "AIRecommendationDeploymentS3ChannelList", "type": "list"}, + {"name": "ImageUri", "shape": "String", "type": "string"}, + {"name": "InstanceType", "shape": "AIRecommendationInstanceType", "type": "string"}, + {"name": "InstanceCount", "shape": "AIRecommendationInstanceCount", "type": "integer"}, + { + "name": "CopyCountPerInstance", + "shape": "AIRecommendationCopyCountPerInstance", + "type": "integer", + }, + {"name": "EnvironmentVariables", "shape": "EnvironmentMap", "type": "map"}, + ], + "type": "structure", + }, + "AIRecommendationDeploymentS3Channel": { + "members": [ + {"name": "ChannelName", "shape": "AIChannelName", "type": "string"}, + {"name": "Uri", "shape": "S3Uri", "type": "string"}, + ], + "type": "structure", + }, + "AIRecommendationDeploymentS3ChannelList": { + "member_shape": "AIRecommendationDeploymentS3Channel", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationInferenceSpecification": { + "members": [ + {"name": "Framework", "shape": "AIRecommendationInferenceFramework", "type": "string"} + ], + "type": "structure", + }, + "AIRecommendationInstanceDetail": { + "members": [ + {"name": "InstanceType", "shape": "AIRecommendationInstanceType", "type": "string"}, + {"name": "InstanceCount", "shape": "AIRecommendationInstanceCount", "type": "integer"}, + { + "name": "CopyCountPerInstance", + "shape": "AIRecommendationCopyCountPerInstance", + "type": "integer", + }, + ], + "type": "structure", + }, + "AIRecommendationInstanceDetailList": { + "member_shape": "AIRecommendationInstanceDetail", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationInstanceTypeList": { + "member_shape": "AIRecommendationInstanceType", + "member_type": "string", + "type": "list", + }, + "AIRecommendationJobSummary": { + "members": [ + {"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIRecommendationJobArn", "shape": "AIRecommendationJobArn", "type": "string"}, + { + "name": "AIRecommendationJobStatus", + "shape": "AIRecommendationJobStatus", + "type": "string", + }, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, + ], + "type": "structure", + }, + "AIRecommendationJobSummaryList": { + "member_shape": "AIRecommendationJobSummary", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationList": { + "member_shape": "AIRecommendation", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationModelDetails": { + "members": [ + {"name": "ModelPackageArn", "shape": "ModelPackageArn", "type": "string"}, + { + "name": "InferenceSpecificationName", + "shape": "AIInferenceSpecificationName", + "type": "string", + }, + { + "name": "InstanceDetails", + "shape": "AIRecommendationInstanceDetailList", + "type": "list", + }, + ], + "type": "structure", + }, + "AIRecommendationOptimizationConfigMap": { + "key_shape": "String", + "key_type": "string", + "type": "map", + "value_shape": "String", + "value_type": "string", + }, + "AIRecommendationOptimizationDetail": { + "members": [ + { + "name": "OptimizationType", + "shape": "AIRecommendationOptimizationType", + "type": "string", + }, + { + "name": "OptimizationConfig", + "shape": "AIRecommendationOptimizationConfigMap", + "type": "map", + }, + ], + "type": "structure", + }, + "AIRecommendationOptimizationDetailList": { + "member_shape": "AIRecommendationOptimizationDetail", + "member_type": "structure", + "type": "list", + }, + "AIRecommendationOutputConfig": { + "members": [ + {"name": "S3OutputLocation", "shape": "S3Uri", "type": "string"}, + { + "name": "ModelPackageGroupIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + ], + "type": "structure", + }, + "AIRecommendationOutputResult": { + "members": [ + {"name": "S3OutputLocation", "shape": "S3Uri", "type": "string"}, + { + "name": "ModelPackageGroupIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + ], + "type": "structure", + }, + "AIRecommendationPerformanceMetric": { + "members": [ + {"name": "Metric", "shape": "String", "type": "string"}, + {"name": "Stat", "shape": "String", "type": "string"}, + {"name": "Value", "shape": "String", "type": "string"}, + {"name": "Unit", "shape": "String", "type": "string"}, + ], + "type": "structure", + }, + "AIRecommendationPerformanceTarget": { + "members": [ + {"name": "Constraints", "shape": "AIRecommendationConstraintList", "type": "list"} + ], + "type": "structure", + }, + "AIWorkloadConfigSummary": { + "members": [ + {"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIWorkloadConfigArn", "shape": "AIWorkloadConfigArn", "type": "string"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + ], + "type": "structure", + }, + "AIWorkloadConfigSummaryList": { + "member_shape": "AIWorkloadConfigSummary", + "member_type": "structure", + "type": "list", + }, + "AIWorkloadConfigs": { + "members": [{"name": "WorkloadSpec", "shape": "WorkloadSpec", "type": "structure"}], + "type": "structure", + }, + "AIWorkloadDataSource": { + "members": [ + {"name": "S3DataSource", "shape": "AIWorkloadS3DataSource", "type": "structure"} + ], + "type": "structure", + }, + "AIWorkloadInputDataConfig": { + "members": [ + {"name": "ChannelName", "shape": "AIChannelName", "type": "string"}, + {"name": "DataSource", "shape": "AIWorkloadDataSource", "type": "structure"}, + ], + "type": "structure", + }, + "AIWorkloadInputDataConfigList": { + "member_shape": "AIWorkloadInputDataConfig", + "member_type": "structure", + "type": "list", + }, + "AIWorkloadS3DataSource": { + "members": [{"name": "S3Uri", "shape": "S3Uri", "type": "string"}], + "type": "structure", + }, + "AbsoluteBorrowLimitResourceList": { + "member_shape": "ComputeQuotaResourceConfig", + "member_type": "structure", + "type": "list", + }, "AcceleratorPartitionConfig": { "members": [ {"name": "Type", "shape": "MIGProfileType", "type": "string"}, @@ -6,10 +346,6 @@ ], "type": "structure", }, - "AccessDeniedException": { - "members": [{"name": "Message", "shape": "FailureReason", "type": "string"}], - "type": "structure", - }, "AccessForbidden": { "members": [{"name": "Message", "shape": "Message", "type": "string"}], "type": "structure", @@ -39,10 +375,6 @@ ], "type": "structure", }, - "ActivationStateV1": { - "members": [{"name": "Enabled", "shape": "Boolean", "type": "boolean"}], - "type": "structure", - }, "ActiveOperations": { "key_shape": "ActiveClusterOperationName", "key_type": "string", @@ -50,22 +382,6 @@ "value_shape": "ActiveClusterOperationCount", "value_type": "integer", }, - "AddAssociationInternalRequest": { - "members": [ - {"name": "SourceArn", "shape": "AssociationEntityArn", "type": "string"}, - {"name": "DestinationArn", "shape": "AssociationEntityArn", "type": "string"}, - {"name": "AssociationType", "shape": "AssociationEdgeType", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "AddAssociationInternalResponse": { - "members": [ - {"name": "SourceArn", "shape": "AssociationEntityArn", "type": "string"}, - {"name": "DestinationArn", "shape": "AssociationEntityArn", "type": "string"}, - ], - "type": "structure", - }, "AddAssociationRequest": { "members": [ {"name": "SourceArn", "shape": "AssociationEntityArn", "type": "string"}, @@ -89,6 +405,8 @@ "shape": "AddClusterNodeSpecificationIncrementTargetCountByInteger", "type": "integer", }, + {"name": "AvailabilityZones", "shape": "ClusterAvailabilityZones", "type": "list"}, + {"name": "InstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}, ], "type": "structure", }, @@ -97,23 +415,6 @@ "member_type": "structure", "type": "list", }, - "AddOnlineStoreReplicaAction": { - "members": [ - {"name": "RegionName", "shape": "RegionName", "type": "string"}, - {"name": "OnlineStoreConfig", "shape": "OnlineStoreReplicaConfig", "type": "structure"}, - {"name": "Description", "shape": "Description", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "AddSharedModelReviewersRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "ReviewerUserProfiles", "shape": "UserProfileNameList", "type": "list"}, - ], - "type": "structure", - }, - "AddSharedModelReviewersResponse": {"members": [], "type": "structure"}, "AddTagsInput": { "members": [ {"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}, @@ -176,9 +477,7 @@ {"name": "S3DataType", "shape": "AdditionalS3DataSourceDataType", "type": "string"}, {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, {"name": "CompressionType", "shape": "CompressionType", "type": "string"}, - {"name": "ManifestS3Uri", "shape": "S3Uri", "type": "string"}, {"name": "ETag", "shape": "String", "type": "string"}, - {"name": "ManifestEtag", "shape": "String", "type": "string"}, ], "type": "structure", }, @@ -190,26 +489,6 @@ "type": "structure", }, "AgentVersions": {"member_shape": "AgentVersion", "member_type": "structure", "type": "list"}, - "AgentsCredentialProvider": { - "members": [ - { - "name": "AlgorithmContainerCredentialProvider", - "shape": "CredentialProvider", - "type": "string", - }, - { - "name": "AlgorithmContainerSecondaryCredentialProvider", - "shape": "CredentialProvider", - "type": "string", - }, - { - "name": "TrainingImageCredentialProvider", - "shape": "CredentialProvider", - "type": "string", - }, - ], - "type": "structure", - }, "AggregationTransformations": { "key_shape": "TransformationAttributeName", "key_type": "string", @@ -319,41 +598,6 @@ ], "type": "structure", }, - "App": { - "members": [ - {"name": "AppArn", "shape": "AppArn", "type": "string"}, - {"name": "AppType", "shape": "AppType", "type": "string"}, - {"name": "AppName", "shape": "AppName", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "UserProfileName", "shape": "UserProfileName", "type": "string"}, - {"name": "SpaceName", "shape": "SpaceName", "type": "string"}, - {"name": "Status", "shape": "AppStatus", "type": "string"}, - { - "name": "EffectiveTrustedIdentityPropagationStatus", - "shape": "FeatureStatus", - "type": "string", - }, - {"name": "RecoveryMode", "shape": "Boolean", "type": "boolean"}, - {"name": "LastHealthCheckTimestamp", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastUserActivityTimestamp", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RestartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "ResourceSpec", "shape": "ResourceSpec", "type": "structure"}, - { - "name": "BuiltInLifecycleConfigArn", - "shape": "StudioLifecycleConfigArn", - "type": "string", - }, - { - "name": "AppLaunchConfiguration", - "shape": "AppLaunchConfiguration", - "type": "structure", - }, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, "AppDetails": { "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, @@ -378,11 +622,6 @@ "shape": "KernelGatewayImageConfig", "type": "structure", }, - { - "name": "SaviturAppImageConfig", - "shape": "SaviturAppImageConfig", - "type": "structure", - }, { "name": "JupyterLabAppImageConfig", "shape": "JupyterLabAppImageConfig", @@ -401,16 +640,6 @@ "member_type": "structure", "type": "list", }, - "AppLaunchConfiguration": { - "members": [ - { - "name": "LocalAppLaunchConfiguration", - "shape": "LocalAppLaunchConfiguration", - "type": "structure", - } - ], - "type": "structure", - }, "AppLifecycleManagement": { "members": [{"name": "IdleSettings", "shape": "IdleSettings", "type": "structure"}], "type": "structure", @@ -471,21 +700,6 @@ "member_type": "string", "type": "list", }, - "AssociateTrialComponentInternalRequest": { - "members": [ - {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "TrialName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "AssociateTrialComponentInternalResponse": { - "members": [ - {"name": "TrialComponentArn", "shape": "TrialComponentArn", "type": "string"}, - {"name": "TrialArn", "shape": "TrialArn", "type": "string"}, - ], - "type": "structure", - }, "AssociateTrialComponentRequest": { "members": [ {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, @@ -538,12 +752,7 @@ "name": "MaxConcurrentInvocationsPerInstance", "shape": "MaxConcurrentInvocationsPerInstance", "type": "integer", - }, - { - "name": "InvocationTimeoutInSeconds", - "shape": "InvocationTimeoutInSeconds", - "type": "integer", - }, + } ], "type": "structure", }, @@ -591,7 +800,6 @@ {"name": "QueryString", "shape": "AthenaQueryString", "type": "string"}, {"name": "WorkGroup", "shape": "AthenaWorkGroup", "type": "string"}, {"name": "OutputS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "OutputDatasetS3Uri", "shape": "S3Uri", "type": "string"}, {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "OutputFormat", "shape": "AthenaResultFormat", "type": "string"}, {"name": "OutputCompression", "shape": "AthenaResultCompressionType", "type": "string"}, @@ -603,7 +811,6 @@ {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, {"name": "VolumeId", "shape": "VolumeId", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -669,7 +876,6 @@ {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "FailureReason", "shape": "AutoMLFailureReason", "type": "string"}, {"name": "CandidateProperties", "shape": "CandidateProperties", "type": "structure"}, - {"name": "LocalModeEnabled", "shape": "LocalModeEnabled", "type": "boolean"}, { "name": "InferenceContainerDefinitions", "shape": "AutoMLInferenceContainerDefinitions", @@ -680,15 +886,7 @@ }, "AutoMLCandidateGenerationConfig": { "members": [ - { - "name": "GenerateCandidatesMode", - "shape": "AutoMLGenerateCandidatesMode", - "type": "string", - }, - {"name": "Algorithms", "shape": "AutoMLAlgorithms", "type": "list"}, - {"name": "Transformers", "shape": "AutoMLTransformers", "type": "list"}, {"name": "FeatureSpecificationS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "CandidatesSpecification", "shape": "CandidatesSpecification", "type": "list"}, {"name": "AlgorithmsConfig", "shape": "AutoMLAlgorithmsConfig", "type": "list"}, ], "type": "structure", @@ -711,12 +909,6 @@ {"name": "DataSource", "shape": "AutoMLDataSource", "type": "structure"}, {"name": "CompressionType", "shape": "CompressionType", "type": "string"}, {"name": "TargetAttributeName", "shape": "TargetAttributeName", "type": "string"}, - {"name": "FeatureAttributeS3Uri", "shape": "S3Uri", "type": "string"}, - { - "name": "AutoMLDatasetDefinition", - "shape": "AutoMLDatasetDefinition", - "type": "structure", - }, {"name": "ContentType", "shape": "ContentType", "type": "string"}, {"name": "ChannelType", "shape": "AutoMLChannelType", "type": "string"}, { @@ -727,7 +919,6 @@ ], "type": "structure", }, - "AutoMLColumnNames": {"member_shape": "AutoMLColumn", "member_type": "string", "type": "list"}, "AutoMLComputeConfig": { "members": [ { @@ -752,89 +943,13 @@ "type": "list", }, "AutoMLDataSource": { - "members": [ - {"name": "S3DataSource", "shape": "AutoMLS3DataSource", "type": "structure"}, - { - "name": "FileSystemDataSource", - "shape": "AutoMLFileSystemDataSource", - "type": "structure", - }, - ], + "members": [{"name": "S3DataSource", "shape": "AutoMLS3DataSource", "type": "structure"}], "type": "structure", }, "AutoMLDataSplitConfig": { "members": [{"name": "ValidationFraction", "shape": "ValidationFraction", "type": "float"}], "type": "structure", }, - "AutoMLDatasetDefinition": { - "members": [ - { - "name": "AutoMLSnowflakeDatasetDefinition", - "shape": "AutoMLSnowflakeDatasetDefinition", - "type": "structure", - } - ], - "type": "structure", - }, - "AutoMLEndpointConfigDefinition": { - "members": [ - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - {"name": "InitialInstanceCount", "shape": "TaskCount", "type": "integer"}, - {"name": "InstanceType", "shape": "ProductionVariantInstanceType", "type": "string"}, - ], - "type": "structure", - }, - "AutoMLEndpointConfigDefinitionList": { - "member_shape": "AutoMLEndpointConfigDefinition", - "member_type": "structure", - "type": "list", - }, - "AutoMLEndpointDefinition": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - { - "name": "DeletionCondition", - "shape": "AutoMLEndpointDeletionCondition", - "type": "structure", - }, - ], - "type": "structure", - }, - "AutoMLEndpointDefinitionList": { - "member_shape": "AutoMLEndpointDefinition", - "member_type": "structure", - "type": "list", - }, - "AutoMLEndpointDeletionCondition": { - "members": [ - { - "name": "MaxRuntimeInSeconds", - "shape": "EndpointMaxRuntimeInSeconds", - "type": "integer", - } - ], - "type": "structure", - }, - "AutoMLExternalFeatureTransformers": { - "members": [ - { - "name": "PreFeatureTransformers", - "shape": "AutoMLContainerDefinitions", - "type": "list", - } - ], - "type": "structure", - }, - "AutoMLFileSystemDataSource": { - "members": [ - {"name": "FileSystemId", "shape": "FileSystemId", "type": "string"}, - {"name": "FileSystemAccessMode", "shape": "FileSystemAccessMode", "type": "string"}, - {"name": "FileSystemType", "shape": "FileSystemType", "type": "string"}, - {"name": "DirectoryPath", "shape": "DirectoryPath", "type": "string"}, - ], - "type": "structure", - }, "AutoMLInferenceContainerDefinitions": { "key_shape": "AutoMLProcessingUnit", "key_type": "string", @@ -868,7 +983,6 @@ {"name": "ContentType", "shape": "ContentType", "type": "string"}, {"name": "CompressionType", "shape": "CompressionType", "type": "string"}, {"name": "DataSource", "shape": "AutoMLDataSource", "type": "structure"}, - {"name": "DatasetDefinition", "shape": "AutoMLDatasetDefinition", "type": "structure"}, ], "type": "structure", }, @@ -902,14 +1016,7 @@ "type": "structure", }, {"name": "DataSplitConfig", "shape": "AutoMLDataSplitConfig", "type": "structure"}, - {"name": "Engine", "shape": "AutoMLEngine", "type": "string"}, {"name": "Mode", "shape": "AutoMLMode", "type": "string"}, - {"name": "LocalModeEnabled", "shape": "LocalModeEnabled", "type": "boolean"}, - { - "name": "ExternalFeatureTransformers", - "shape": "AutoMLExternalFeatureTransformers", - "type": "structure", - }, ], "type": "structure", }, @@ -1047,54 +1154,6 @@ ], "type": "structure", }, - "AutoMLSnowflakeDatasetDefinition": { - "members": [ - {"name": "Warehouse", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "Database", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "Schema", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "TableName", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "SnowflakeRole", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "SecretArn", "shape": "ProcessingSecretArn", "type": "string"}, - {"name": "OutputS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "StorageIntegration", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, - "AutoMLTask": { - "members": [ - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "AutoMLTaskArn", "shape": "AutoMLTaskArn", "type": "string"}, - {"name": "CandidateName", "shape": "CandidateName", "type": "string"}, - {"name": "AutoMLTaskType", "shape": "AutoMLTaskType", "type": "string"}, - {"name": "AutoMLTaskStatus", "shape": "AutoMLTaskStatus", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "AutoMLTaskContext": { - "members": [ - { - "name": "ExplainabilityTaskContext", - "shape": "ExplainabilityTaskContext", - "type": "structure", - }, - { - "name": "ModelInsightsTaskContext", - "shape": "ModelInsightsTaskContext", - "type": "structure", - }, - ], - "type": "structure", - }, - "AutoMLTasks": {"member_shape": "AutoMLTask", "member_type": "structure", "type": "list"}, - "AutoMLTransformers": { - "member_shape": "AutoMLTransformer", - "member_type": "string", - "type": "list", - }, "AutoParameter": { "members": [ {"name": "Name", "shape": "ParameterKey", "type": "string"}, @@ -1116,11 +1175,6 @@ "members": [{"name": "Mode", "shape": "AutotuneMode", "type": "string"}], "type": "structure", }, - "AvailabilityZones": { - "member_shape": "AvailabilityZone", - "member_type": "string", - "type": "list", - }, "AvailableUpgrade": { "members": [ {"name": "Version", "shape": "MajorMinorVersion", "type": "string"}, @@ -1141,6 +1195,8 @@ {"name": "InstanceGroupName", "shape": "InstanceGroupName", "type": "string"}, {"name": "ErrorCode", "shape": "BatchAddClusterNodesErrorCode", "type": "string"}, {"name": "FailedCount", "shape": "BatchAddFailureCount", "type": "integer"}, + {"name": "AvailabilityZones", "shape": "ClusterAvailabilityZones", "type": "list"}, + {"name": "InstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}, {"name": "Message", "shape": "String", "type": "string"}, ], "type": "structure", @@ -1159,7 +1215,6 @@ "type": "string", }, {"name": "NodesToAdd", "shape": "AddClusterNodeSpecificationList", "type": "list"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -1209,7 +1264,6 @@ {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, {"name": "NodeIds", "shape": "ClusterNodeIds", "type": "list"}, {"name": "NodeLogicalIds", "shape": "ClusterNodeLogicalIdList", "type": "list"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -1356,7 +1410,6 @@ "BatchPutMetricsError": { "members": [ {"name": "Code", "shape": "PutMetricsErrorCode", "type": "string"}, - {"name": "Message", "shape": "String", "type": "string"}, {"name": "MetricIndex", "shape": "Integer", "type": "integer"}, ], "type": "structure", @@ -1368,7 +1421,7 @@ }, "BatchPutMetricsRequest": { "members": [ - {"name": "ResourceArn", "shape": "SageMakerResourceArn", "type": "string"}, + {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, {"name": "MetricData", "shape": "RawMetricDataList", "type": "list"}, ], "type": "structure", @@ -1416,7 +1469,6 @@ "shape": "BatchRebootClusterNodesRequestNodeLogicalIdsList", "type": "list", }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -1447,47 +1499,6 @@ ], "type": "structure", }, - "BatchRepairClusterNodesError": { - "members": [ - {"name": "RepairAction", "shape": "RepairAction", "type": "string"}, - {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, - {"name": "Message", "shape": "String", "type": "string"}, - {"name": "Code", "shape": "BatchRepairClusterNodesErrorCode", "type": "string"}, - ], - "type": "structure", - }, - "BatchRepairClusterNodesErrorList": { - "member_shape": "BatchRepairClusterNodesError", - "member_type": "structure", - "type": "list", - }, - "BatchRepairClusterNodesRequest": { - "members": [ - {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, - {"name": "RepairNodeList", "shape": "RepairNodeList", "type": "list"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, - ], - "type": "structure", - }, - "BatchRepairClusterNodesResponse": { - "members": [ - {"name": "Failed", "shape": "BatchRepairClusterNodesErrorList", "type": "list"}, - {"name": "Successful", "shape": "BatchRepairClusterNodesSuccessList", "type": "list"}, - ], - "type": "structure", - }, - "BatchRepairClusterNodesSuccess": { - "members": [ - {"name": "RepairAction", "shape": "RepairAction", "type": "string"}, - {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, - ], - "type": "structure", - }, - "BatchRepairClusterNodesSuccessList": { - "member_shape": "BatchRepairClusterNodesSuccess", - "member_type": "structure", - "type": "list", - }, "BatchReplaceClusterNodeLogicalIdsError": { "members": [ {"name": "NodeLogicalId", "shape": "ClusterNodeLogicalId", "type": "string"}, @@ -1527,7 +1538,6 @@ "shape": "BatchReplaceClusterNodesRequestNodeLogicalIdsList", "type": "list", }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -1603,10 +1613,6 @@ "members": [{"name": "Arn", "shape": "String1024", "type": "string"}], "type": "structure", }, - "BenchmarkResultsOutputConfig": { - "members": [{"name": "S3OutputUri", "shape": "S3Uri", "type": "string"}], - "type": "structure", - }, "BestObjectiveNotImproving": { "members": [ { @@ -1645,13 +1651,6 @@ ], "type": "structure", }, - "BurstLimit": { - "members": [ - {"name": "AllowUnlimitedBurst", "shape": "Boolean", "type": "boolean"}, - {"name": "BurstMultiplier", "shape": "BurstMultiplier", "type": "integer"}, - ], - "type": "structure", - }, "CacheHitResult": { "members": [ { @@ -1680,14 +1679,7 @@ }, "CandidateGenerationConfig": { "members": [ - {"name": "AlgorithmsConfig", "shape": "AutoMLAlgorithmsConfig", "type": "list"}, - { - "name": "GenerateCandidatesMode", - "shape": "AutoMLGenerateCandidatesMode", - "type": "string", - }, - {"name": "Transformers", "shape": "AutoMLTransformers", "type": "list"}, - {"name": "CandidatesSpecification", "shape": "CandidatesSpecification", "type": "list"}, + {"name": "AlgorithmsConfig", "shape": "AutoMLAlgorithmsConfig", "type": "list"} ], "type": "structure", }, @@ -1702,23 +1694,11 @@ ], "type": "structure", }, - "CandidateSpecification": { - "members": [ - {"name": "Algorithm", "shape": "AutoMLAlgorithm", "type": "string"}, - {"name": "ColumnsConfig", "shape": "ColumnsConfig", "type": "list"}, - ], - "type": "structure", - }, "CandidateSteps": { "member_shape": "AutoMLCandidateStep", "member_type": "structure", "type": "list", }, - "CandidatesSpecification": { - "member_shape": "CandidateSpecification", - "member_type": "structure", - "type": "list", - }, "CanvasAppSettings": { "members": [ { @@ -1745,34 +1725,9 @@ "shape": "EmrServerlessSettings", "type": "structure", }, - { - "name": "DataScienceAssistantSettings", - "shape": "DataScienceAssistantSettings", - "type": "structure", - }, - ], - "type": "structure", - }, - "CapacityBlockOffering": { - "members": [ - { - "name": "CapacityBlockDurationInHours", - "shape": "CapacityBlockDurationInHours", - "type": "integer", - }, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "UpfrontFee", "shape": "String256", "type": "string"}, - {"name": "CurrencyCode", "shape": "CurrencyCode", "type": "string"}, - {"name": "AvailabilityZone", "shape": "AvailabilityZone", "type": "string"}, ], "type": "structure", }, - "CapacityBlockOfferings": { - "member_shape": "CapacityBlockOffering", - "member_type": "structure", - "type": "list", - }, "CapacityReservation": { "members": [ {"name": "Arn", "shape": "String", "type": "string"}, @@ -1780,137 +1735,6 @@ ], "type": "structure", }, - "CapacityReservationIds": { - "member_shape": "CapacityReservationId", - "member_type": "string", - "type": "list", - }, - "CapacityResources": { - "members": [ - {"name": "CapacityBlockOfferings", "shape": "CapacityBlockOfferings", "type": "list"}, - {"name": "CapacityResourceArn", "shape": "CapacityResourceArn", "type": "string"}, - ], - "type": "structure", - }, - "CapacitySchedule": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"} - ], - "type": "structure", - }, - "CapacityScheduleDetail": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"}, - {"name": "OwnerAccountId", "shape": "AccountId", "type": "string"}, - {"name": "CapacityScheduleType", "shape": "CapacityScheduleType", "type": "string"}, - {"name": "InstanceType", "shape": "CapacityScheduleInstanceType", "type": "string"}, - {"name": "TotalInstanceCount", "shape": "Integer", "type": "integer"}, - { - "name": "AvailableInstanceCount", - "shape": "AvailableInstanceCount", - "type": "integer", - }, - { - "name": "AvailabilityZoneDistribution", - "shape": "AvailabilityZoneDistribution", - "type": "string", - }, - {"name": "Placement", "shape": "Placement", "type": "string"}, - {"name": "AvailabilityZone", "shape": "AvailabilityZone", "type": "string"}, - {"name": "Status", "shape": "CapacityScheduleStatus", "type": "string"}, - {"name": "RequestedStartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedEndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "DurationInHours", "shape": "CapacityScheduleDurationInHours", "type": "long"}, - {"name": "CapacityBlockOfferings", "shape": "CapacityBlockOfferings", "type": "list"}, - {"name": "CapacityResources", "shape": "CapacityResources", "type": "structure"}, - {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, - { - "name": "CapacityScheduleStatusTransitions", - "shape": "CapacityScheduleStatusTransitions", - "type": "list", - }, - ], - "type": "structure", - }, - "CapacityScheduleDetails": { - "member_shape": "CapacityScheduleDetail", - "member_type": "structure", - "type": "list", - }, - "CapacityScheduleFilter": { - "members": [ - {"name": "Name", "shape": "CapacityScheduleFilterName", "type": "string"}, - {"name": "Value", "shape": "String64", "type": "string"}, - ], - "type": "structure", - }, - "CapacityScheduleFilters": { - "member_shape": "CapacityScheduleFilter", - "member_type": "structure", - "type": "list", - }, - "CapacityScheduleOffering": { - "members": [ - { - "name": "CapacityScheduleOfferingId", - "shape": "CapacityScheduleOfferingId", - "type": "string", - }, - {"name": "CapacityScheduleType", "shape": "CapacityScheduleType", "type": "string"}, - {"name": "EligibleResources", "shape": "SageMakerResourceNames", "type": "list"}, - {"name": "InstanceType", "shape": "CapacityScheduleInstanceType", "type": "string"}, - {"name": "InstanceCount", "shape": "CapacityScheduleInstanceCount", "type": "integer"}, - {"name": "Placement", "shape": "Placement", "type": "string"}, - {"name": "RequestedStartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedEndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "AvailabilityZones", "shape": "AvailabilityZones", "type": "list"}, - { - "name": "AvailabilityZoneDistribution", - "shape": "AvailabilityZoneDistribution", - "type": "string", - }, - {"name": "DurationInHours", "shape": "CapacityScheduleDurationInHours", "type": "long"}, - {"name": "CapacityBlockOfferings", "shape": "CapacityBlockOfferings", "type": "list"}, - ], - "type": "structure", - }, - "CapacityScheduleOfferings": { - "member_shape": "CapacityScheduleOffering", - "member_type": "structure", - "type": "list", - }, - "CapacityScheduleStatusTransition": { - "members": [ - {"name": "Status", "shape": "CapacityScheduleStatus", "type": "string"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StatusMessage", "shape": "String64", "type": "string"}, - ], - "type": "structure", - }, - "CapacityScheduleStatusTransitions": { - "member_shape": "CapacityScheduleStatusTransition", - "member_type": "structure", - "type": "list", - }, - "CapacitySchedulesConfig": { - "members": [ - { - "name": "CapacityFallbackStrategy", - "shape": "TrainingCapacityFallbackStrategy", - "type": "string", - }, - {"name": "CapacitySchedules", "shape": "CapacitySchedulesList", "type": "list"}, - ], - "type": "structure", - }, - "CapacitySchedulesList": { - "member_shape": "CapacitySchedule", - "member_type": "structure", - "type": "list", - }, "CapacitySize": { "members": [ {"name": "Type", "shape": "CapacitySizeType", "type": "string"}, @@ -1925,15 +1749,6 @@ ], "type": "structure", }, - "CaptureContainerConfig": { - "members": [{"name": "ContainerHostname", "shape": "ContainerHostname", "type": "string"}], - "type": "structure", - }, - "CaptureContainerList": { - "member_shape": "CaptureContainerConfig", - "member_type": "structure", - "type": "list", - }, "CaptureContentTypeHeader": { "members": [ {"name": "CsvContentTypes", "shape": "CsvContentTypes", "type": "list"}, @@ -1942,11 +1757,7 @@ "type": "structure", }, "CaptureOption": { - "members": [ - {"name": "CaptureMode", "shape": "CaptureMode", "type": "string"}, - {"name": "CaptureBoundary", "shape": "CaptureBoundary", "type": "string"}, - {"name": "CaptureContainers", "shape": "CaptureContainerList", "type": "list"}, - ], + "members": [{"name": "CaptureMode", "shape": "CaptureMode", "type": "string"}], "type": "structure", }, "CaptureOptionList": { @@ -2067,7 +1878,6 @@ {"name": "RecordWrapperType", "shape": "RecordWrapper", "type": "string"}, {"name": "InputMode", "shape": "TrainingInputMode", "type": "string"}, {"name": "ShuffleConfig", "shape": "ShuffleConfig", "type": "structure"}, - {"name": "EnableFFM", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -2134,7 +1944,6 @@ "members": [ {"name": "FeaturesAttribute", "shape": "ClarifyFeaturesAttribute", "type": "string"}, {"name": "ContentTemplate", "shape": "ClarifyContentTemplate", "type": "string"}, - {"name": "RecordTemplate", "shape": "ClarifyRecordTemplate", "type": "string"}, {"name": "MaxRecordCount", "shape": "ClarifyMaxRecordCount", "type": "integer"}, {"name": "MaxPayloadInMB", "shape": "ClarifyMaxPayloadInMB", "type": "integer"}, {"name": "ProbabilityIndex", "shape": "ClarifyProbabilityIndex", "type": "integer"}, @@ -2201,6 +2010,11 @@ ], "type": "structure", }, + "ClusterAvailabilityZones": { + "member_shape": "ClusterAvailabilityZone", + "member_type": "string", + "type": "list", + }, "ClusterCapacityRequirements": { "members": [ {"name": "Spot", "shape": "ClusterSpotOptions", "type": "structure"}, @@ -2248,6 +2062,21 @@ ], "type": "structure", }, + "ClusterFsxLustreConfig": { + "members": [ + {"name": "DnsName", "shape": "ClusterDnsName", "type": "string"}, + {"name": "MountName", "shape": "ClusterMountName", "type": "string"}, + {"name": "MountPath", "shape": "ClusterFsxMountPath", "type": "string"}, + ], + "type": "structure", + }, + "ClusterFsxOpenZfsConfig": { + "members": [ + {"name": "DnsName", "shape": "ClusterDnsName", "type": "string"}, + {"name": "MountPath", "shape": "ClusterFsxMountPath", "type": "string"}, + ], + "type": "structure", + }, "ClusterInstanceGroupDetails": { "members": [ {"name": "CurrentCount", "shape": "ClusterNonNegativeInstanceCount", "type": "integer"}, @@ -2255,6 +2084,12 @@ {"name": "MinCount", "shape": "ClusterInstanceCount", "type": "integer"}, {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, + { + "name": "InstanceRequirements", + "shape": "ClusterInstanceRequirementDetails", + "type": "structure", + }, + {"name": "InstanceTypeDetails", "shape": "ClusterInstanceTypeDetails", "type": "list"}, {"name": "LifeCycleConfig", "shape": "ClusterLifeCycleConfig", "type": "structure"}, {"name": "ExecutionRole", "shape": "RoleArn", "type": "string"}, {"name": "ThreadsPerCore", "shape": "ClusterThreadsPerCore", "type": "integer"}, @@ -2263,12 +2098,8 @@ "shape": "ClusterInstanceStorageConfigs", "type": "list", }, - {"name": "EnableBurnInTest", "shape": "EnableBurnInTest", "type": "boolean"}, - {"name": "OnStartDeepHealthCheck", "shape": "OnStartDeepHealthCheck", "type": "list"}, {"name": "OnStartDeepHealthChecks", "shape": "OnStartDeepHealthChecks", "type": "list"}, {"name": "Status", "shape": "InstanceGroupStatus", "type": "string"}, - {"name": "FailureMessages", "shape": "InstanceGroupFailureMessages", "type": "list"}, - {"name": "ScalingConfig", "shape": "ScalingConfig", "type": "structure"}, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, { "name": "TrainingPlanStatus", @@ -2276,7 +2107,6 @@ "type": "string", }, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, { "name": "ScheduledUpdateConfig", "shape": "ScheduledUpdateConfig", @@ -2290,7 +2120,6 @@ "shape": "ClusterKubernetesConfigDetails", "type": "structure", }, - {"name": "CapacityType", "shape": "ClusterCapacityType", "type": "string"}, { "name": "CapacityRequirements", "shape": "ClusterCapacityRequirements", @@ -2303,6 +2132,12 @@ "shape": "DeploymentConfiguration", "type": "structure", }, + {"name": "SlurmConfig", "shape": "ClusterSlurmConfigDetails", "type": "structure"}, + { + "name": "NetworkInterface", + "shape": "ClusterNetworkInterfaceDetails", + "type": "structure", + }, ], "type": "structure", }, @@ -2317,6 +2152,11 @@ {"name": "MinInstanceCount", "shape": "ClusterInstanceCount", "type": "integer"}, {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, + { + "name": "InstanceRequirements", + "shape": "ClusterInstanceRequirements", + "type": "structure", + }, {"name": "LifeCycleConfig", "shape": "ClusterLifeCycleConfig", "type": "structure"}, {"name": "ExecutionRole", "shape": "RoleArn", "type": "string"}, {"name": "ThreadsPerCore", "shape": "ClusterThreadsPerCore", "type": "integer"}, @@ -2325,13 +2165,9 @@ "shape": "ClusterInstanceStorageConfigs", "type": "list", }, - {"name": "EnableBurnInTest", "shape": "EnableBurnInTest", "type": "boolean"}, - {"name": "OnStartDeepHealthCheck", "shape": "OnStartDeepHealthCheck", "type": "list"}, {"name": "OnStartDeepHealthChecks", "shape": "OnStartDeepHealthChecks", "type": "list"}, - {"name": "ScalingConfig", "shape": "ScalingConfig", "type": "structure"}, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, { "name": "ScheduledUpdateConfig", "shape": "ScheduledUpdateConfig", @@ -2339,12 +2175,13 @@ }, {"name": "ImageId", "shape": "ImageId", "type": "string"}, {"name": "KubernetesConfig", "shape": "ClusterKubernetesConfig", "type": "structure"}, - {"name": "CapacityType", "shape": "ClusterCapacityType", "type": "string"}, + {"name": "SlurmConfig", "shape": "ClusterSlurmConfig", "type": "structure"}, { "name": "CapacityRequirements", "shape": "ClusterCapacityRequirements", "type": "structure", }, + {"name": "NetworkInterface", "shape": "ClusterNetworkInterface", "type": "structure"}, ], "type": "structure", }, @@ -2365,6 +2202,17 @@ ], "type": "structure", }, + "ClusterInstanceRequirementDetails": { + "members": [ + {"name": "CurrentInstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}, + {"name": "DesiredInstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}, + ], + "type": "structure", + }, + "ClusterInstanceRequirements": { + "members": [{"name": "InstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}], + "type": "structure", + }, "ClusterInstanceStatusDetails": { "members": [ {"name": "Status", "shape": "ClusterInstanceStatus", "type": "string"}, @@ -2374,7 +2222,9 @@ }, "ClusterInstanceStorageConfig": { "members": [ - {"name": "EbsVolumeConfig", "shape": "ClusterEbsVolumeConfig", "type": "structure"} + {"name": "EbsVolumeConfig", "shape": "ClusterEbsVolumeConfig", "type": "structure"}, + {"name": "FsxLustreConfig", "shape": "ClusterFsxLustreConfig", "type": "structure"}, + {"name": "FsxOpenZfsConfig", "shape": "ClusterFsxOpenZfsConfig", "type": "structure"}, ], "type": "structure", }, @@ -2383,6 +2233,24 @@ "member_type": "structure", "type": "list", }, + "ClusterInstanceTypeDetail": { + "members": [ + {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, + {"name": "CurrentCount", "shape": "ClusterNonNegativeInstanceCount", "type": "integer"}, + {"name": "ThreadsPerCore", "shape": "ClusterThreadsPerCore", "type": "integer"}, + ], + "type": "structure", + }, + "ClusterInstanceTypeDetails": { + "member_shape": "ClusterInstanceTypeDetail", + "member_type": "structure", + "type": "list", + }, + "ClusterInstanceTypes": { + "member_shape": "ClusterInstanceType", + "member_type": "string", + "type": "list", + }, "ClusterKubernetesConfig": { "members": [ {"name": "Labels", "shape": "ClusterKubernetesLabels", "type": "map"}, @@ -2432,6 +2300,7 @@ "members": [ {"name": "SourceS3Uri", "shape": "S3Uri", "type": "string"}, {"name": "OnCreate", "shape": "ClusterLifeCycleConfigFileName", "type": "string"}, + {"name": "OnInitComplete", "shape": "ClusterLifeCycleConfigFileName", "type": "string"}, ], "type": "structure", }, @@ -2443,6 +2312,14 @@ ], "type": "structure", }, + "ClusterNetworkInterface": { + "members": [{"name": "InterfaceType", "shape": "ClusterInterfaceType", "type": "string"}], + "type": "structure", + }, + "ClusterNetworkInterfaceDetails": { + "members": [{"name": "InterfaceType", "shape": "ClusterInterfaceType", "type": "string"}], + "type": "structure", + }, "ClusterNodeDetails": { "members": [ {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, @@ -2468,7 +2345,6 @@ {"name": "PrivatePrimaryIpv6", "shape": "ClusterPrivatePrimaryIpv6", "type": "string"}, {"name": "PrivateDnsHostname", "shape": "ClusterPrivateDnsHostname", "type": "string"}, {"name": "Placement", "shape": "ClusterInstancePlacement", "type": "structure"}, - {"name": "HealthInfo", "shape": "HealthInfo", "type": "structure"}, {"name": "CurrentImageId", "shape": "ImageId", "type": "string"}, {"name": "DesiredImageId", "shape": "ImageId", "type": "string"}, {"name": "UltraServerInfo", "shape": "UltraServerInfo", "type": "structure"}, @@ -2478,15 +2354,15 @@ "type": "structure", }, {"name": "CapacityType", "shape": "ClusterCapacityType", "type": "string"}, + { + "name": "NetworkInterface", + "shape": "ClusterNetworkInterfaceDetails", + "type": "structure", + }, ], "type": "structure", }, "ClusterNodeIds": {"member_shape": "ClusterNodeId", "member_type": "string", "type": "list"}, - "ClusterNodeIdsForBatchRepair": { - "member_shape": "ClusterNodeId", - "member_type": "string", - "type": "list", - }, "ClusterNodeLogicalIdList": { "member_shape": "ClusterNodeLogicalId", "member_type": "string", @@ -2510,34 +2386,34 @@ "shape": "ClusterInstanceStatusDetails", "type": "structure", }, - {"name": "HealthInfo", "shape": "ClusterNodeSummaryHealthInfo", "type": "structure"}, {"name": "UltraServerInfo", "shape": "UltraServerInfo", "type": "structure"}, {"name": "PrivateDnsHostname", "shape": "ClusterPrivateDnsHostname", "type": "string"}, ], "type": "structure", }, - "ClusterNodeSummaryHealthInfo": { - "members": [ - {"name": "HealthStatus", "shape": "HealthStatus", "type": "string"}, - {"name": "HealthStatusReason", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, "ClusterOnDemandOptions": {"members": [], "type": "structure"}, "ClusterOrchestrator": { - "members": [{"name": "Eks", "shape": "ClusterOrchestratorEksConfig", "type": "structure"}], + "members": [ + {"name": "Eks", "shape": "ClusterOrchestratorEksConfig", "type": "structure"}, + {"name": "Slurm", "shape": "ClusterOrchestratorSlurmConfig", "type": "structure"}, + ], "type": "structure", }, "ClusterOrchestratorEksConfig": { "members": [{"name": "ClusterArn", "shape": "EksClusterArn", "type": "string"}], "type": "structure", }, - "ClusterResilienceConfig": { + "ClusterOrchestratorSlurmConfig": { "members": [ - {"name": "EnableNodeAutoRecovery", "shape": "EnableNodeAutoRecovery", "type": "boolean"} + {"name": "SlurmConfigStrategy", "shape": "ClusterSlurmConfigStrategy", "type": "string"} ], "type": "structure", }, + "ClusterPartitionNames": { + "member_shape": "ClusterPartitionName", + "member_type": "string", + "type": "list", + }, "ClusterRestrictedInstanceGroupDetails": { "members": [ {"name": "CurrentCount", "shape": "ClusterNonNegativeInstanceCount", "type": "integer"}, @@ -2551,12 +2427,8 @@ "shape": "ClusterInstanceStorageConfigs", "type": "list", }, - {"name": "EnableBurnInTest", "shape": "EnableBurnInTest", "type": "boolean"}, - {"name": "OnStartDeepHealthCheck", "shape": "OnStartDeepHealthCheck", "type": "list"}, {"name": "OnStartDeepHealthChecks", "shape": "OnStartDeepHealthChecks", "type": "list"}, {"name": "Status", "shape": "InstanceGroupStatus", "type": "string"}, - {"name": "FailureMessages", "shape": "InstanceGroupFailureMessages", "type": "list"}, - {"name": "ScalingConfig", "shape": "ScalingConfig", "type": "structure"}, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, { "name": "TrainingPlanStatus", @@ -2564,17 +2436,11 @@ "type": "string", }, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, { "name": "ScheduledUpdateConfig", "shape": "ScheduledUpdateConfig", "type": "structure", }, - { - "name": "TrustedEnvironment", - "shape": "TrustedEnvironmentDetails", - "type": "structure", - }, {"name": "EnvironmentConfig", "shape": "EnvironmentConfigDetails", "type": "structure"}, ], "type": "structure", @@ -2596,19 +2462,14 @@ "shape": "ClusterInstanceStorageConfigs", "type": "list", }, - {"name": "EnableBurnInTest", "shape": "EnableBurnInTest", "type": "boolean"}, - {"name": "OnStartDeepHealthCheck", "shape": "OnStartDeepHealthCheck", "type": "list"}, {"name": "OnStartDeepHealthChecks", "shape": "OnStartDeepHealthChecks", "type": "list"}, - {"name": "ScalingConfig", "shape": "ScalingConfig", "type": "structure"}, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, {"name": "OverrideVpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, { "name": "ScheduledUpdateConfig", "shape": "ScheduledUpdateConfig", "type": "structure", }, - {"name": "TrustedEnvironment", "shape": "TrustedEnvironment", "type": "structure"}, {"name": "EnvironmentConfig", "shape": "EnvironmentConfig", "type": "structure"}, ], "type": "structure", @@ -2644,6 +2505,20 @@ "member_type": "structure", "type": "list", }, + "ClusterSlurmConfig": { + "members": [ + {"name": "NodeType", "shape": "ClusterSlurmNodeType", "type": "string"}, + {"name": "PartitionNames", "shape": "ClusterPartitionNames", "type": "list"}, + ], + "type": "structure", + }, + "ClusterSlurmConfigDetails": { + "members": [ + {"name": "NodeType", "shape": "ClusterSlurmNodeType", "type": "string"}, + {"name": "PartitionNames", "shape": "ClusterPartitionNames", "type": "list"}, + ], + "type": "structure", + }, "ClusterSpotOptions": {"members": [], "type": "structure"}, "ClusterSummaries": { "member_shape": "ClusterSummary", @@ -2732,7 +2607,6 @@ {"name": "UserPool", "shape": "CognitoUserPool", "type": "string"}, {"name": "UserGroup", "shape": "CognitoUserGroup", "type": "string"}, {"name": "ClientId", "shape": "ClientId", "type": "string"}, - {"name": "MemberDefinitionId", "shape": "MemberDefinitionId", "type": "string"}, ], "type": "structure", }, @@ -2759,29 +2633,6 @@ "value_shape": "ConfigValue", "value_type": "string", }, - "ColumnConfig": { - "members": [ - {"name": "ColumnType", "shape": "AutoMLColumnType", "type": "string"}, - {"name": "ColumnNames", "shape": "AutoMLColumnNames", "type": "list"}, - {"name": "Transformers", "shape": "Transformers", "type": "list"}, - ], - "type": "structure", - }, - "ColumnsConfig": {"member_shape": "ColumnConfig", "member_type": "structure", "type": "list"}, - "Command": {"member_shape": "String2048", "member_type": "string", "type": "list"}, - "CommentEntity": { - "members": [ - {"name": "Publisher", "shape": "UserProfileName", "type": "string"}, - {"name": "Comment", "shape": "Comment", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "Comments": {"member_shape": "CommentEntity", "member_type": "structure", "type": "list"}, - "CompilationJobStepMetadata": { - "members": [{"name": "Arn", "shape": "CompilationJobArn", "type": "string"}], - "type": "structure", - }, "CompilationJobSummaries": { "member_shape": "CompilationJobSummary", "member_type": "structure", @@ -2798,37 +2649,16 @@ {"name": "CompilationTargetPlatformOs", "shape": "TargetPlatformOs", "type": "string"}, { "name": "CompilationTargetPlatformArch", - "shape": "TargetPlatformArch", - "type": "string", - }, - { - "name": "CompilationTargetPlatformAccelerator", - "shape": "TargetPlatformAccelerator", - "type": "string", - }, - {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, - {"name": "CompilationJobStatus", "shape": "CompilationJobStatus", "type": "string"}, - ], - "type": "structure", - }, - "ComponentJobSummaries": { - "member_shape": "ComponentJobSummary", - "member_type": "structure", - "type": "list", - }, - "ComponentJobSummary": { - "members": [ - {"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Status", "shape": "ComponentJobStatus", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "ComponentJobType", "shape": "ComponentJobType", "type": "string"}, - {"name": "ComponentJobName", "shape": "ComponentJobName", "type": "string"}, - {"name": "ComponentJobArn", "shape": "ComponentJobArn", "type": "string"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "FailureReason", "shape": "AutoMLFailureReason", "type": "string"}, - {"name": "Description", "shape": "ComponentJobDescription", "type": "string"}, + "shape": "TargetPlatformArch", + "type": "string", + }, + { + "name": "CompilationTargetPlatformAccelerator", + "shape": "TargetPlatformAccelerator", + "type": "string", + }, + {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, + {"name": "CompilationJobStatus", "shape": "CompilationJobStatus", "type": "string"}, ], "type": "structure", }, @@ -2901,18 +2731,6 @@ ], "type": "structure", }, - "Concurrencies": {"member_shape": "Concurrency", "member_type": "structure", "type": "list"}, - "Concurrency": { - "members": [ - { - "name": "NumberOfConcurrentUsers", - "shape": "NumberOfConcurrentUsers", - "type": "integer", - }, - {"name": "DurationInSeconds", "shape": "TrafficDurationInSeconds", "type": "integer"}, - ], - "type": "structure", - }, "ConditionStepMetadata": { "members": [{"name": "Outcome", "shape": "ConditionOutcome", "type": "string"}], "type": "structure", @@ -3010,15 +2828,6 @@ ], "type": "structure", }, - "ContinuousParameter": { - "members": [ - {"name": "Name", "shape": "String64", "type": "string"}, - {"name": "MinValue", "shape": "Double", "type": "double"}, - {"name": "MaxValue", "shape": "Double", "type": "double"}, - {"name": "ScalingType", "shape": "ScalingType", "type": "string"}, - ], - "type": "structure", - }, "ContinuousParameterRange": { "members": [ {"name": "Name", "shape": "ParameterKey", "type": "string"}, @@ -3040,45 +2849,82 @@ "member_type": "structure", "type": "list", }, - "ContinuousParameters": { - "member_shape": "ContinuousParameter", - "member_type": "structure", - "type": "list", - }, "ConvergenceDetected": { "members": [ {"name": "CompleteOnConvergence", "shape": "CompleteOnConvergence", "type": "string"} ], "type": "structure", }, - "CopySharedModelRequest": { + "CreateAIBenchmarkJobRequest": { "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, + {"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "BenchmarkTarget", "shape": "AIBenchmarkTarget", "type": "structure"}, + {"name": "OutputConfig", "shape": "AIBenchmarkOutputConfig", "type": "structure"}, + { + "name": "AIWorkloadConfigIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, + {"name": "NetworkConfig", "shape": "AIBenchmarkNetworkConfig", "type": "structure"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", }, - "CopySharedModelResponse": { - "members": [{"name": "S3OutputUri", "shape": "S3OutputUri", "type": "string"}], + "CreateAIBenchmarkJobResponse": { + "members": [{"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}], "type": "structure", }, - "CreateActionInternalRequest": { + "CreateAIRecommendationJobRequest": { "members": [ - {"name": "ActionName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "Source", "shape": "ActionSource", "type": "structure"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "ActionType", "shape": "String64", "type": "string"}, - {"name": "Description", "shape": "ExperimentDescription", "type": "string"}, - {"name": "Status", "shape": "ActionStatus", "type": "string"}, - {"name": "Properties", "shape": "LineageEntityParameters", "type": "map"}, - {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, + {"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "ModelSource", "shape": "AIModelSource", "type": "structure"}, + {"name": "OutputConfig", "shape": "AIRecommendationOutputConfig", "type": "structure"}, + { + "name": "AIWorkloadConfigIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + { + "name": "PerformanceTarget", + "shape": "AIRecommendationPerformanceTarget", + "type": "structure", + }, + {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, + { + "name": "InferenceSpecification", + "shape": "AIRecommendationInferenceSpecification", + "type": "structure", + }, + { + "name": "OptimizeModel", + "shape": "AIRecommendationAllowOptimization", + "type": "boolean", + }, + {"name": "ComputeSpec", "shape": "AIRecommendationComputeSpec", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, ], "type": "structure", }, - "CreateActionInternalResponse": { - "members": [{"name": "ActionArn", "shape": "ActionArn", "type": "string"}], + "CreateAIRecommendationJobResponse": { + "members": [ + {"name": "AIRecommendationJobArn", "shape": "AIRecommendationJobArn", "type": "string"} + ], + "type": "structure", + }, + "CreateAIWorkloadConfigRequest": { + "members": [ + {"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}, + {"name": "DatasetConfig", "shape": "AIDatasetConfig", "type": "structure"}, + {"name": "AIWorkloadConfigs", "shape": "AIWorkloadConfigs", "type": "structure"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, + ], + "type": "structure", + }, + "CreateAIWorkloadConfigResponse": { + "members": [ + {"name": "AIWorkloadConfigArn", "shape": "AIWorkloadConfigArn", "type": "string"} + ], "type": "structure", }, "CreateActionRequest": { @@ -3118,8 +2964,6 @@ "type": "structure", }, {"name": "CertifyForMarketplace", "shape": "CertifyForMarketplace", "type": "boolean"}, - {"name": "RequireImageScan", "shape": "RequireImageScan", "type": "boolean"}, - {"name": "WorkflowDisabled", "shape": "Boolean", "type": "boolean"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -3137,11 +2981,6 @@ "shape": "KernelGatewayImageConfig", "type": "structure", }, - { - "name": "SaviturAppImageConfig", - "shape": "SaviturAppImageConfig", - "type": "structure", - }, { "name": "JupyterLabAppImageConfig", "shape": "JupyterLabAppImageConfig", @@ -3168,12 +3007,6 @@ {"name": "AppName", "shape": "AppName", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, {"name": "ResourceSpec", "shape": "ResourceSpec", "type": "structure"}, - {"name": "PersistentVolumeNames", "shape": "PersistentVolumeNames", "type": "list"}, - { - "name": "AppLaunchConfiguration", - "shape": "AppLaunchConfiguration", - "type": "structure", - }, {"name": "RecoveryMode", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", @@ -3182,23 +3015,6 @@ "members": [{"name": "AppArn", "shape": "AppArn", "type": "string"}], "type": "structure", }, - "CreateArtifactInternalRequest": { - "members": [ - {"name": "ArtifactName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Source", "shape": "ArtifactSource", "type": "structure"}, - {"name": "ArtifactType", "shape": "String256", "type": "string"}, - {"name": "Properties", "shape": "LineageEntityParameters", "type": "map"}, - {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "CreateArtifactInternalResponse": { - "members": [{"name": "ArtifactArn", "shape": "ArtifactArn", "type": "string"}], - "type": "structure", - }, "CreateArtifactRequest": { "members": [ {"name": "ArtifactName", "shape": "ExperimentEntityName", "type": "string"}, @@ -3229,7 +3045,6 @@ "type": "boolean", }, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "ImageUrlOverrides", "shape": "ImageUrlOverrides", "type": "structure"}, {"name": "ModelDeployConfig", "shape": "ModelDeployConfig", "type": "structure"}, ], "type": "structure", @@ -3257,14 +3072,7 @@ {"name": "SecurityConfig", "shape": "AutoMLSecurityConfig", "type": "structure"}, {"name": "AutoMLJobObjective", "shape": "AutoMLJobObjective", "type": "structure"}, {"name": "ModelDeployConfig", "shape": "ModelDeployConfig", "type": "structure"}, - {"name": "ImageUrlOverrides", "shape": "ImageUrlOverrides", "type": "structure"}, {"name": "DataSplitConfig", "shape": "AutoMLDataSplitConfig", "type": "structure"}, - {"name": "AutoMLExecutionMode", "shape": "AutoMLExecutionMode", "type": "string"}, - { - "name": "ExternalFeatureTransformers", - "shape": "AutoMLExternalFeatureTransformers", - "type": "structure", - }, {"name": "AutoMLComputeConfig", "shape": "AutoMLComputeConfig", "type": "structure"}, ], "type": "structure", @@ -3273,41 +3081,6 @@ "members": [{"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}], "type": "structure", }, - "CreateAutoMLTaskRequest": { - "members": [ - {"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}, - {"name": "AutoMLTaskContext", "shape": "AutoMLTaskContext", "type": "structure"}, - {"name": "AutoMLTaskType", "shape": "AutoMLTaskType", "type": "string"}, - ], - "type": "structure", - }, - "CreateAutoMLTaskResponse": { - "members": [{"name": "AutoMLTaskArn", "shape": "AutoMLTaskArn", "type": "string"}], - "type": "structure", - }, - "CreateCapacityScheduleRequest": { - "members": [ - {"name": "CapacityScheduleName", "shape": "CapacityScheduleName", "type": "string"}, - { - "name": "CapacityScheduleOfferingId", - "shape": "CapacityScheduleOfferingId", - "type": "string", - }, - {"name": "TargetServices", "shape": "SageMakerResourceNames", "type": "list"}, - { - "name": "MaxWaitTimeInSeconds", - "shape": "CapacityScheduleMaxWaitTimeInSeconds", - "type": "integer", - }, - ], - "type": "structure", - }, - "CreateCapacityScheduleResponse": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"} - ], - "type": "structure", - }, "CreateClusterRequest": { "members": [ {"name": "ClusterName", "shape": "ClusterName", "type": "string"}, @@ -3324,7 +3097,6 @@ {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, {"name": "Orchestrator", "shape": "ClusterOrchestrator", "type": "structure"}, - {"name": "ResilienceConfig", "shape": "ClusterResilienceConfig", "type": "structure"}, {"name": "NodeRecovery", "shape": "ClusterNodeRecovery", "type": "string"}, { "name": "TieredStorageConfig", @@ -3336,10 +3108,8 @@ "shape": "ClusterNodeProvisioningMode", "type": "string", }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, {"name": "ClusterRole", "shape": "RoleArn", "type": "string"}, {"name": "AutoScaling", "shape": "ClusterAutoScalingConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, ], "type": "structure", }, @@ -3354,7 +3124,6 @@ {"name": "SchedulerConfig", "shape": "SchedulerConfig", "type": "structure"}, {"name": "Description", "shape": "EntityDescription", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -3392,7 +3161,6 @@ {"name": "ModelPackageVersionArn", "shape": "ModelPackageArn", "type": "string"}, {"name": "InputConfig", "shape": "InputConfig", "type": "structure"}, {"name": "OutputConfig", "shape": "OutputConfig", "type": "structure"}, - {"name": "ResourceConfig", "shape": "NeoResourceConfig", "type": "structure"}, {"name": "VpcConfig", "shape": "NeoVpcConfig", "type": "structure"}, {"name": "StoppingCondition", "shape": "StoppingCondition", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, @@ -3412,7 +3180,6 @@ {"name": "ComputeQuotaTarget", "shape": "ComputeQuotaTarget", "type": "structure"}, {"name": "ActivationState", "shape": "ActivationState", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -3423,23 +3190,6 @@ ], "type": "structure", }, - "CreateContextInternalRequest": { - "members": [ - {"name": "ContextName", "shape": "ContextName", "type": "string"}, - {"name": "Source", "shape": "ContextSource", "type": "structure"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "ContextType", "shape": "String64", "type": "string"}, - {"name": "Description", "shape": "ExperimentDescription", "type": "string"}, - {"name": "Properties", "shape": "LineageEntityParameters", "type": "map"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "CreateContextInternalResponse": { - "members": [{"name": "ContextArn", "shape": "ContextArn", "type": "string"}], - "type": "structure", - }, "CreateContextRequest": { "members": [ {"name": "ContextName", "shape": "ContextName", "type": "string"}, @@ -3455,68 +3205,6 @@ "members": [{"name": "ContextArn", "shape": "ContextArn", "type": "string"}], "type": "structure", }, - "CreateCrossAccountTrainingJobRequest": { - "members": [ - {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, - {"name": "HyperParameters", "shape": "HyperParameters", "type": "map"}, - { - "name": "AlgorithmSpecification", - "shape": "AlgorithmSpecification", - "type": "structure", - }, - {"name": "CrossAccountRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "InputDataConfig", "shape": "InputDataConfig", "type": "list"}, - {"name": "OutputDataConfig", "shape": "OutputDataConfig", "type": "structure"}, - {"name": "ResourceConfig", "shape": "ResourceConfig", "type": "structure"}, - {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "StoppingCondition", "shape": "StoppingCondition", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "Environment", "shape": "TrainingEnvironmentMap", "type": "map"}, - {"name": "SourceArn", "shape": "IoTAnalyticsDatasetArn", "type": "string"}, - {"name": "SourceAccount", "shape": "AccountId", "type": "string"}, - ], - "type": "structure", - }, - "CreateCrossAccountTrainingJobResponse": { - "members": [{"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}], - "type": "structure", - }, - "CreateCustomMonitoringJobDefinitionRequest": { - "members": [ - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - { - "name": "CustomMonitoringAppSpecification", - "shape": "CustomMonitoringAppSpecification", - "type": "structure", - }, - { - "name": "CustomMonitoringJobInput", - "shape": "CustomMonitoringJobInput", - "type": "structure", - }, - { - "name": "CustomMonitoringJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "CreateCustomMonitoringJobDefinitionResponse": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"} - ], - "type": "structure", - }, "CreateDataQualityJobDefinitionRequest": { "members": [ {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, @@ -3574,7 +3262,6 @@ {"name": "SubnetIds", "shape": "Subnets", "type": "list"}, {"name": "VpcId", "shape": "VpcId", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "AppNetworkAccess", "shape": "AppNetworkAccess", "type": "string"}, {"name": "AppNetworkAccessType", "shape": "AppNetworkAccessType", "type": "string"}, {"name": "HomeEfsFileSystemKmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, @@ -3583,7 +3270,6 @@ "shape": "AppSecurityGroupManagement", "type": "string", }, - {"name": "AppStorageType", "shape": "AppStorageType", "type": "string"}, {"name": "TagPropagation", "shape": "TagPropagation", "type": "string"}, {"name": "DefaultSpaceSettings", "shape": "DefaultSpaceSettings", "type": "structure"}, ], @@ -3631,144 +3317,40 @@ {"name": "ResourceKey", "shape": "KmsKeyId", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], - "type": "structure", - }, - "CreateEndpointConfigInput": { - "members": [ - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - {"name": "ProductionVariants", "shape": "ProductionVariantList", "type": "list"}, - {"name": "DataCaptureConfig", "shape": "DataCaptureConfig", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "AsyncInferenceConfig", "shape": "AsyncInferenceConfig", "type": "structure"}, - {"name": "ExplainerConfig", "shape": "ExplainerConfig", "type": "structure"}, - {"name": "ShadowProductionVariants", "shape": "ProductionVariantList", "type": "list"}, - {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"}, - {"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"}, - ], - "type": "structure", - }, - "CreateEndpointConfigInputInternal": { - "members": [ - { - "name": "EndpointConfigInput", - "shape": "CreateEndpointConfigInput", - "type": "structure", - }, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - ], - "type": "structure", - }, - "CreateEndpointConfigOutput": { - "members": [{"name": "EndpointConfigArn", "shape": "EndpointConfigArn", "type": "string"}], - "type": "structure", - }, - "CreateEndpointConfigOutputInternal": { - "members": [ - { - "name": "EndpointConfigOutput", - "shape": "CreateEndpointConfigOutput", - "type": "structure", - } - ], - "type": "structure", - }, - "CreateEndpointInput": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - {"name": "GraphConfigName", "shape": "GraphConfigName", "type": "string"}, - { - "name": "DeletionCondition", - "shape": "EndpointDeletionCondition", - "type": "structure", - }, - {"name": "DeploymentConfig", "shape": "DeploymentConfig", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "CreateEndpointInputInternal": { - "members": [ - {"name": "EndpointInput", "shape": "CreateEndpointInput", "type": "structure"}, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - { - "name": "EncryptedFasCredentials", - "shape": "EncryptedFasCredentials", - "type": "string", - }, - {"name": "BillingMode", "shape": "BillingMode", "type": "string"}, - ], - "type": "structure", - }, - "CreateEndpointOutput": { - "members": [{"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}], - "type": "structure", - }, - "CreateEndpointOutputInternal": { - "members": [ - {"name": "EndpointOutput", "shape": "CreateEndpointOutput", "type": "structure"} - ], - "type": "structure", - }, - "CreateEvaluationJobRequest": { - "members": [ - {"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}, - {"name": "Description", "shape": "EvaluationJobDescription", "type": "string"}, - { - "name": "EvaluationMethod", - "shape": "EvaluationJobEvaluationMethod", - "type": "string", - }, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "ModelConfig", "shape": "EvaluationJobModelConfig", "type": "structure"}, - { - "name": "OutputDataConfig", - "shape": "EvaluationJobOutputDataConfig", - "type": "structure", - }, - { - "name": "InputDataConfig", - "shape": "EvaluationJobInputDataConfig", - "type": "structure", - }, - { - "name": "EvaluationConfig", - "shape": "EvaluationJobEvaluationConfig", - "type": "structure", - }, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "UpstreamPlatformConfig", - "shape": "EvaluationJobUpstreamPlatformConfig", - "type": "structure", - }, + "type": "structure", + }, + "CreateEndpointConfigInput": { + "members": [ + {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, + {"name": "ProductionVariants", "shape": "ProductionVariantList", "type": "list"}, + {"name": "DataCaptureConfig", "shape": "DataCaptureConfig", "type": "structure"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, + {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, + {"name": "AsyncInferenceConfig", "shape": "AsyncInferenceConfig", "type": "structure"}, + {"name": "ExplainerConfig", "shape": "ExplainerConfig", "type": "structure"}, + {"name": "ShadowProductionVariants", "shape": "ProductionVariantList", "type": "list"}, + {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, + {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, + {"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"}, + {"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"}, ], "type": "structure", }, - "CreateEvaluationJobResponse": { - "members": [{"name": "EvaluationJobArn", "shape": "EvaluationJobArn", "type": "string"}], + "CreateEndpointConfigOutput": { + "members": [{"name": "EndpointConfigArn", "shape": "EndpointConfigArn", "type": "string"}], "type": "structure", }, - "CreateExperimentInternalRequest": { + "CreateEndpointInput": { "members": [ - {"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "Description", "shape": "ExperimentDescription", "type": "string"}, - {"name": "Source", "shape": "InputExperimentSource", "type": "structure"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, + {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, + {"name": "DeploymentConfig", "shape": "DeploymentConfig", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, ], "type": "structure", }, - "CreateExperimentInternalResponse": { - "members": [{"name": "ExperimentArn", "shape": "ExperimentArn", "type": "string"}], + "CreateEndpointOutput": { + "members": [{"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}], "type": "structure", }, "CreateExperimentRequest": { @@ -3784,41 +3366,6 @@ "members": [{"name": "ExperimentArn", "shape": "ExperimentArn", "type": "string"}], "type": "structure", }, - "CreateFeatureGroupInternalRequest": { - "members": [ - {"name": "FeatureGroupName", "shape": "FeatureGroupName", "type": "string"}, - {"name": "RecordIdentifierFeatureName", "shape": "FeatureName", "type": "string"}, - {"name": "EventTimeFeatureName", "shape": "FeatureName", "type": "string"}, - {"name": "FeatureDefinitions", "shape": "FeatureDefinitions", "type": "list"}, - {"name": "OnlineStoreConfig", "shape": "OnlineStoreConfig", "type": "structure"}, - {"name": "OfflineStoreConfig", "shape": "OfflineStoreConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "Description", "shape": "Description", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - { - "name": "UsePreProdOfflineStoreReplicatorLambda", - "shape": "Boolean", - "type": "boolean", - }, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AwsPayerToken", "shape": "AwsPayerToken", "type": "string"}, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "IgnoreSweeperExecution", "shape": "Boolean", "type": "boolean"}, - {"name": "StorageAccountStageTestOverride", "shape": "Stage", "type": "string"}, - {"name": "OnlineStoreMetadata", "shape": "OnlineStoreMetadata", "type": "structure"}, - { - "name": "OnlineStoreReplicaMetadata", - "shape": "OnlineStoreReplicaMetadata", - "type": "structure", - }, - ], - "type": "structure", - }, - "CreateFeatureGroupInternalResponse": { - "members": [{"name": "FeatureGroupArn", "shape": "FeatureGroupArn", "type": "string"}], - "type": "structure", - }, "CreateFeatureGroupRequest": { "members": [ {"name": "FeatureGroupName", "shape": "FeatureGroupName", "type": "string"}, @@ -3831,11 +3378,6 @@ {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, {"name": "Description", "shape": "Description", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - { - "name": "UsePreProdOfflineStoreReplicatorLambda", - "shape": "Boolean", - "type": "boolean", - }, ], "type": "structure", }, @@ -3857,11 +3399,8 @@ "type": "structure", }, {"name": "HumanLoopConfig", "shape": "HumanLoopConfig", "type": "structure"}, - {"name": "WorkflowSteps", "shape": "WorkflowSteps", "type": "string"}, {"name": "OutputConfig", "shape": "FlowDefinitionOutputConfig", "type": "structure"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "TaskRenderingRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -3870,74 +3409,6 @@ "members": [{"name": "FlowDefinitionArn", "shape": "FlowDefinitionArn", "type": "string"}], "type": "structure", }, - "CreateGroundTruthJobRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - {"name": "GroundTruthJobName", "shape": "GroundTruthJobName", "type": "string"}, - { - "name": "GroundTruthJobDescription", - "shape": "GroundTruthJobDescription", - "type": "string", - }, - {"name": "InputConfig", "shape": "GroundTruthJobInputConfig", "type": "structure"}, - {"name": "OutputConfig", "shape": "GroundTruthJobOutputConfig", "type": "structure"}, - ], - "type": "structure", - }, - "CreateGroundTruthJobResponse": { - "members": [{"name": "GroundTruthJobArn", "shape": "GroundTruthJobArn", "type": "string"}], - "type": "structure", - }, - "CreateGroundTruthProjectRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthProjectDescription", - "shape": "GroundTruthProjectDescription", - "type": "string", - }, - { - "name": "PointOfContact", - "shape": "GroundTruthProjectPointOfContact", - "type": "structure", - }, - ], - "type": "structure", - }, - "CreateGroundTruthProjectResponse": { - "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"} - ], - "type": "structure", - }, - "CreateGroundTruthWorkflowRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - { - "name": "GroundTruthWorkflowDefinitionSpec", - "shape": "GroundTruthWorkflowDefinitionSpec", - "type": "string", - }, - {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, - ], - "type": "structure", - }, - "CreateGroundTruthWorkflowResponse": { - "members": [ - {"name": "GroundTruthWorkflowArn", "shape": "GroundTruthWorkflowArn", "type": "string"} - ], - "type": "structure", - }, "CreateHubContentPresignedUrlsRequest": { "members": [ {"name": "HubName", "shape": "HubNameOrArn", "type": "string"}, @@ -3997,7 +3468,6 @@ "members": [ {"name": "HumanTaskUiName", "shape": "HumanTaskUiName", "type": "string"}, {"name": "UiTemplate", "shape": "UiTemplate", "type": "structure"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -4006,58 +3476,6 @@ "members": [{"name": "HumanTaskUiArn", "shape": "HumanTaskUiArn", "type": "string"}], "type": "structure", }, - "CreateHyperParameterTuningJobInternalRequest": { - "members": [ - { - "name": "HyperParameterTuningJobName", - "shape": "HyperParameterTuningJobName", - "type": "string", - }, - { - "name": "HyperParameterTuningJobConfig", - "shape": "HyperParameterTuningJobConfig", - "type": "structure", - }, - { - "name": "TrainingJobDefinition", - "shape": "HyperParameterTrainingJobDefinition", - "type": "structure", - }, - { - "name": "TrainingJobDefinitions", - "shape": "HyperParameterTrainingJobDefinitions", - "type": "list", - }, - { - "name": "WarmStartConfig", - "shape": "HyperParameterTuningJobWarmStartConfig", - "type": "structure", - }, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "Autotune", "shape": "Autotune", "type": "structure"}, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "BillingMode", "shape": "BillingMode", "type": "string"}, - {"name": "SourceIdentity", "shape": "String256", "type": "string"}, - { - "name": "IdentityCenterUserToken", - "shape": "IdentityCenterUserToken", - "type": "structure", - }, - ], - "type": "structure", - }, - "CreateHyperParameterTuningJobInternalResponse": { - "members": [ - { - "name": "HyperParameterTuningJobArn", - "shape": "HyperParameterTuningJobArn", - "type": "string", - } - ], - "type": "structure", - }, "CreateHyperParameterTuningJobRequest": { "members": [ { @@ -4126,11 +3544,6 @@ {"name": "ProgrammingLang", "shape": "ProgrammingLang", "type": "string"}, {"name": "Processor", "shape": "Processor", "type": "string"}, {"name": "Horovod", "shape": "Horovod", "type": "boolean"}, - { - "name": "OverrideAliasImageVersion", - "shape": "OverrideAliasImageVersion", - "type": "boolean", - }, {"name": "ReleaseNotes", "shape": "ReleaseNotes", "type": "string"}, ], "type": "structure", @@ -4202,11 +3615,6 @@ "shape": "RecommendationJobStoppingConditions", "type": "structure", }, - { - "name": "EndpointConfigurationTuning", - "shape": "RecommendationJobEndpointConfigurationTuning", - "type": "structure", - }, {"name": "OutputConfig", "shape": "RecommendationJobOutputConfig", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], @@ -4223,7 +3631,6 @@ {"name": "InputConfig", "shape": "LabelingJobInputConfig", "type": "structure"}, {"name": "OutputConfig", "shape": "LabelingJobOutputConfig", "type": "structure"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "TaskRenderingRoleArn", "shape": "RoleArn", "type": "string"}, {"name": "LabelCategoryConfigS3Uri", "shape": "S3Uri", "type": "string"}, { "name": "StoppingConditions", @@ -4244,34 +3651,6 @@ "members": [{"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}], "type": "structure", }, - "CreateLineageGroupInternalRequest": { - "members": [ - {"name": "LineageGroupName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "Description", "shape": "ExperimentDescription", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "CreateLineageGroupInternalResponse": { - "members": [{"name": "LineageGroupArn", "shape": "LineageGroupArn", "type": "string"}], - "type": "structure", - }, - "CreateLineageGroupRequest": { - "members": [ - {"name": "LineageGroupName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "Description", "shape": "ExperimentDescription", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "CreateLineageGroupResponse": { - "members": [{"name": "LineageGroupArn", "shape": "LineageGroupArn", "type": "string"}], - "type": "structure", - }, "CreateMlflowAppRequest": { "members": [ {"name": "Name", "shape": "MlflowAppName", "type": "string"}, @@ -4307,6 +3686,8 @@ "type": "string", }, {"name": "Tags", "shape": "TagList", "type": "list"}, + {"name": "S3BucketOwnerAccountId", "shape": "AccountId", "type": "string"}, + {"name": "S3BucketOwnerVerification", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -4438,18 +3819,6 @@ ], "type": "structure", }, - "CreateModelInternalInput": { - "members": [ - {"name": "ModelInput", "shape": "CreateModelInput", "type": "structure"}, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - ], - "type": "structure", - }, - "CreateModelInternalOutput": { - "members": [{"name": "ModelOutput", "shape": "CreateModelOutput", "type": "structure"}], - "type": "structure", - }, "CreateModelOutput": { "members": [{"name": "ModelArn", "shape": "ModelArn", "type": "string"}], "type": "structure", @@ -4498,22 +3867,14 @@ "type": "structure", }, {"name": "CertifyForMarketplace", "shape": "CertifyForMarketplace", "type": "boolean"}, - {"name": "RequireImageScan", "shape": "RequireImageScan", "type": "boolean"}, - {"name": "WorkflowDisabled", "shape": "Boolean", "type": "boolean"}, {"name": "Tags", "shape": "TagList", "type": "list"}, {"name": "ModelApprovalStatus", "shape": "ModelApprovalStatus", "type": "string"}, {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, {"name": "ModelMetrics", "shape": "ModelMetrics", "type": "structure"}, - { - "name": "DeploymentSpecification", - "shape": "DeploymentSpecification", - "type": "structure", - }, {"name": "ClientToken", "shape": "ClientToken", "type": "string"}, {"name": "Domain", "shape": "String", "type": "string"}, {"name": "Task", "shape": "String", "type": "string"}, {"name": "SamplePayloadUrl", "shape": "S3Uri", "type": "string"}, - {"name": "SamplePayloadContentType", "shape": "String", "type": "string"}, {"name": "CustomerMetadataProperties", "shape": "CustomerMetadataMap", "type": "map"}, {"name": "DriftCheckBaselines", "shape": "DriftCheckBaselines", "type": "structure"}, { @@ -4721,7 +4082,6 @@ "type": "structure", }, {"name": "Tier", "shape": "NonEmptyString64", "type": "string"}, - {"name": "Version", "shape": "NonEmptyString64", "type": "string"}, {"name": "ApplicationConfig", "shape": "PartnerAppConfig", "type": "structure"}, {"name": "AuthType", "shape": "PartnerAppAuthType", "type": "string"}, {"name": "EnableIamSessionBasedIdentity", "shape": "Boolean", "type": "boolean"}, @@ -4735,26 +4095,6 @@ "members": [{"name": "Arn", "shape": "PartnerAppArn", "type": "string"}], "type": "structure", }, - "CreatePersistentVolumeRequest": { - "members": [ - {"name": "PersistentVolumeName", "shape": "PersistentVolumeName", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - { - "name": "PersistentVolumeConfiguration", - "shape": "PersistentVolumeConfiguration", - "type": "structure", - }, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "OwningEntityArn", "shape": "OwningEntityArn", "type": "string"}, - ], - "type": "structure", - }, - "CreatePersistentVolumeResponse": { - "members": [ - {"name": "PersistentVolumeArn", "shape": "PersistentVolumeArn", "type": "string"} - ], - "type": "structure", - }, "CreatePipelineRequest": { "members": [ {"name": "PipelineName", "shape": "PipelineName", "type": "string"}, @@ -4791,15 +4131,8 @@ "type": "integer", }, {"name": "ExpiresInSeconds", "shape": "ExpiresInSeconds", "type": "integer"}, - {"name": "AppType", "shape": "AppType", "type": "string"}, - { - "name": "AppRedirectionRelativePath", - "shape": "AppRedirectionRelativePath", - "type": "string", - }, {"name": "SpaceName", "shape": "SpaceName", "type": "string"}, {"name": "LandingUri", "shape": "LandingUri", "type": "string"}, - {"name": "isDualStackEndpoint", "shape": "isDualStackEndpoint", "type": "boolean"}, ], "type": "structure", }, @@ -4807,24 +4140,6 @@ "members": [{"name": "AuthorizedUrl", "shape": "PresignedDomainUrl", "type": "string"}], "type": "structure", }, - "CreatePresignedDomainUrlWithPrincipalTagRequest": { - "members": [ - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - { - "name": "SessionExpirationDurationInSeconds", - "shape": "SessionExpirationDurationInSeconds", - "type": "integer", - }, - {"name": "ExpiresInSeconds", "shape": "ExpiresInSeconds", "type": "integer"}, - {"name": "LandingUri", "shape": "LandingUri", "type": "string"}, - {"name": "isDualStackEndpoint", "shape": "isDualStackEndpoint", "type": "boolean"}, - ], - "type": "structure", - }, - "CreatePresignedDomainUrlWithPrincipalTagResponse": { - "members": [{"name": "AuthorizedUrl", "shape": "PresignedDomainUrl", "type": "string"}], - "type": "structure", - }, "CreatePresignedMlflowAppUrlRequest": { "members": [ {"name": "Arn", "shape": "MlflowAppArn", "type": "string"}, @@ -4863,82 +4178,13 @@ { "name": "SessionExpirationDurationInSeconds", "shape": "SessionExpirationDurationInSeconds", - "type": "integer", - }, - ], - "type": "structure", - }, - "CreatePresignedNotebookInstanceUrlOutput": { - "members": [{"name": "AuthorizedUrl", "shape": "NotebookInstanceUrl", "type": "string"}], - "type": "structure", - }, - "CreateProcessingJobInternalRequest": { - "members": [ - {"name": "ProcessingInputs", "shape": "ProcessingInputsInternal", "type": "list"}, - { - "name": "ProcessingOutputConfig", - "shape": "ProcessingOutputConfig", - "type": "structure", - }, - {"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}, - {"name": "ProcessingResources", "shape": "ProcessingResources", "type": "structure"}, - { - "name": "StoppingCondition", - "shape": "ProcessingStoppingCondition", - "type": "structure", - }, - {"name": "AppSpecification", "shape": "AppSpecification", "type": "structure"}, - {"name": "Environment", "shape": "ProcessingEnvironmentMap", "type": "map"}, - {"name": "NetworkConfig", "shape": "NetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "BillingOption", "shape": "BillingOption", "type": "string"}, - {"name": "BillingMode", "shape": "BillingMode", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - { - "name": "UpstreamProcessingOutputConfig", - "shape": "UpstreamProcessingOutputConfig", - "type": "structure", - }, - {"name": "MonitoringScheduleArn", "shape": "MonitoringScheduleArn", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, - { - "name": "StateMachineArnProviderLambdaArn", - "shape": "ProcessingStateMachineArnProviderLambdaArn", - "type": "string", - }, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - {"name": "PlatformCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "CustomerCredentialToken", "shape": "ProxyToken", "type": "string"}, - { - "name": "CredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - {"name": "CredentialProviderEncryptionKey", "shape": "KmsKeyId", "type": "string"}, - {"name": "WorkflowType", "shape": "WorkflowType", "type": "string"}, - {"name": "SessionTags", "shape": "TagList", "type": "list"}, - {"name": "SourceIdentity", "shape": "String256", "type": "string"}, - {"name": "FasSourceArn", "shape": "SourceArn", "type": "string"}, - {"name": "FasSourceAccount", "shape": "AccountId", "type": "string"}, - {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - { - "name": "IdentityCenterUserToken", - "shape": "IdentityCenterUserToken", - "type": "structure", + "type": "integer", }, ], "type": "structure", }, - "CreateProcessingJobInternalResponse": { - "members": [ - { - "name": "ProcessingJobResponse", - "shape": "CreateProcessingJobResponse", - "type": "structure", - } - ], + "CreatePresignedNotebookInstanceUrlOutput": { + "members": [{"name": "AuthorizedUrl", "shape": "NotebookInstanceUrl", "type": "string"}], "type": "structure", }, "CreateProcessingJobRequest": { @@ -4961,7 +4207,6 @@ {"name": "NetworkConfig", "shape": "NetworkConfig", "type": "structure"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "WorkflowType", "shape": "WorkflowType", "type": "string"}, {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, ], "type": "structure", @@ -4981,7 +4226,6 @@ }, {"name": "Tags", "shape": "TagList", "type": "list"}, {"name": "TemplateProviders", "shape": "CreateTemplateProviderList", "type": "list"}, - {"name": "WorkflowDisabled", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -4992,48 +4236,6 @@ ], "type": "structure", }, - "CreateQuotaAllocationRequest": { - "members": [ - {"name": "QuotaAllocationName", "shape": "EntityName", "type": "string"}, - {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, - {"name": "QuotaResources", "shape": "QuotaResourceConfigList", "type": "list"}, - {"name": "OverQuota", "shape": "OverQuota", "type": "structure"}, - { - "name": "QuotaAllocationTarget", - "shape": "QuotaAllocationTarget", - "type": "structure", - }, - {"name": "PreemptionConfig", "shape": "PreemptionConfig", "type": "structure"}, - {"name": "ActivationState", "shape": "ActivationStateV1", "type": "structure"}, - {"name": "QuotaAllocationDescription", "shape": "EntityDescription", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "CreateQuotaAllocationResponse": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"}, - {"name": "QuotaId", "shape": "QuotaId", "type": "string"}, - ], - "type": "structure", - }, - "CreateSharedModelRequest": { - "members": [ - {"name": "ReviewerUserProfiles", "shape": "UserProfileNameList", "type": "list"}, - {"name": "ModelArtifacts", "shape": "SharedModelArtifacts", "type": "map"}, - {"name": "Comment", "shape": "Comment", "type": "string"}, - {"name": "ModelName", "shape": "SharedModelName", "type": "string"}, - {"name": "Origin", "shape": "Origin", "type": "string"}, - ], - "type": "structure", - }, - "CreateSharedModelResponse": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - ], - "type": "structure", - }, "CreateSpaceRequest": { "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, @@ -5096,73 +4298,6 @@ "member_type": "structure", "type": "list", }, - "CreateTrainingJobInternalRequest": { - "members": [ - {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, - {"name": "HyperParameters", "shape": "HyperParameters", "type": "map"}, - { - "name": "AlgorithmSpecification", - "shape": "AlgorithmSpecification", - "type": "structure", - }, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "ChainedCustomerRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "InputDataConfig", "shape": "InputDataConfig", "type": "list"}, - {"name": "OutputDataConfig", "shape": "OutputDataConfig", "type": "structure"}, - {"name": "ResourceConfig", "shape": "ResourceConfig", "type": "structure"}, - {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, - {"name": "StoppingCondition", "shape": "StoppingCondition", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "ResourceTags", "shape": "ResourceTags", "type": "structure"}, - {"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"}, - { - "name": "EnableInterContainerTrafficEncryption", - "shape": "Boolean", - "type": "boolean", - }, - {"name": "EnableManagedSpotTraining", "shape": "Boolean", "type": "boolean"}, - {"name": "CheckpointConfig", "shape": "CheckpointConfig", "type": "structure"}, - {"name": "Environment", "shape": "TrainingEnvironmentMap", "type": "map"}, - {"name": "RetryStrategy", "shape": "RetryStrategy", "type": "structure"}, - {"name": "ProcessingJobConfig", "shape": "ProcessingJobConfig", "type": "structure"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "ProcessingJobArn", "shape": "ProcessingJobArn", "type": "string"}, - {"name": "TuningJobArn", "shape": "HyperParameterTuningJobArn", "type": "string"}, - {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - {"name": "StateMachineArn", "shape": "StateMachineArn", "type": "string"}, - {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - { - "name": "UpstreamPlatformConfig", - "shape": "UpstreamPlatformConfig", - "type": "structure", - }, - {"name": "DisableEFA", "shape": "Boolean", "type": "boolean"}, - {"name": "BillingMode", "shape": "BillingMode", "type": "string"}, - {"name": "SessionTags", "shape": "TagList", "type": "list"}, - {"name": "SourceIdentity", "shape": "String256", "type": "string"}, - {"name": "FasSourceArn", "shape": "SourceArn", "type": "string"}, - {"name": "FasSourceAccount", "shape": "AccountId", "type": "string"}, - {"name": "StsContextMap", "shape": "StsContextMap", "type": "map"}, - { - "name": "IdentityCenterUserToken", - "shape": "IdentityCenterUserToken", - "type": "structure", - }, - ], - "type": "structure", - }, - "CreateTrainingJobInternalResponse": { - "members": [ - { - "name": "TrainingJobResponse", - "shape": "CreateTrainingJobResponse", - "type": "structure", - } - ], - "type": "structure", - }, "CreateTrainingJobRequest": { "members": [ {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, @@ -5173,14 +4308,12 @@ "type": "structure", }, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "ChainedCustomerRoleArn", "shape": "RoleArn", "type": "string"}, {"name": "InputDataConfig", "shape": "InputDataConfig", "type": "list"}, {"name": "OutputDataConfig", "shape": "OutputDataConfig", "type": "structure"}, {"name": "ResourceConfig", "shape": "ResourceConfig", "type": "structure"}, {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, {"name": "StoppingCondition", "shape": "StoppingCondition", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "ResourceTags", "shape": "ResourceTags", "type": "structure"}, {"name": "EnableNetworkIsolation", "shape": "Boolean", "type": "boolean"}, { "name": "EnableInterContainerTrafficEncryption", @@ -5197,25 +4330,14 @@ "type": "structure", }, {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - { - "name": "UpstreamPlatformConfig", - "shape": "UpstreamPlatformConfig", - "type": "structure", - }, {"name": "ProfilerConfig", "shape": "ProfilerConfig", "type": "structure"}, { "name": "ProfilerRuleConfigurations", "shape": "ProfilerRuleConfigurations", "type": "list", }, - {"name": "DisableEFA", "shape": "Boolean", "type": "boolean"}, {"name": "Environment", "shape": "TrainingEnvironmentMap", "type": "map"}, {"name": "RetryStrategy", "shape": "RetryStrategy", "type": "structure"}, - {"name": "UpstreamAssumeRoleSourceArn", "shape": "SourceArn", "type": "string"}, - {"name": "UpstreamAssumeRoleSourceAccount", "shape": "AccountId", "type": "string"}, - {"name": "OnHoldClusterId", "shape": "ClusterId", "type": "string"}, - {"name": "TargetComputeCellAccountId", "shape": "AccountId", "type": "string"}, - {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, {"name": "RemoteDebugConfig", "shape": "RemoteDebugConfig", "type": "structure"}, {"name": "InfraCheckConfig", "shape": "InfraCheckConfig", "type": "structure"}, { @@ -5225,7 +4347,6 @@ }, {"name": "ServerlessJobConfig", "shape": "ServerlessJobConfig", "type": "structure"}, {"name": "MlflowConfig", "shape": "MlflowConfig", "type": "structure"}, - {"name": "WithWarmPoolValidationError", "shape": "Boolean", "type": "boolean"}, {"name": "ModelPackageConfig", "shape": "ModelPackageConfig", "type": "structure"}, ], "type": "structure", @@ -5251,61 +4372,6 @@ "members": [{"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}], "type": "structure", }, - "CreateTransformJobInternalRequest": { - "members": [ - {"name": "TransformJobName", "shape": "TransformJobName", "type": "string"}, - {"name": "ModelName", "shape": "ModelName", "type": "string"}, - { - "name": "MaxConcurrentTransforms", - "shape": "MaxConcurrentTransforms", - "type": "integer", - }, - {"name": "MaxPayloadInMB", "shape": "MaxPayloadInMB", "type": "integer"}, - {"name": "ModelClientConfig", "shape": "ModelClientConfig", "type": "structure"}, - {"name": "BatchStrategy", "shape": "BatchStrategy", "type": "string"}, - {"name": "Environment", "shape": "TransformEnvironmentMap", "type": "map"}, - {"name": "TransformInput", "shape": "TransformInput", "type": "structure"}, - {"name": "TransformOutput", "shape": "TransformOutput", "type": "structure"}, - {"name": "DataCaptureConfig", "shape": "BatchDataCaptureConfig", "type": "structure"}, - {"name": "TransformResources", "shape": "TransformResources", "type": "structure"}, - {"name": "DataProcessing", "shape": "DataProcessing", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - { - "name": "StateMachineArnProviderLambdaArn", - "shape": "StateMachineArnProviderLambdaArn", - "type": "string", - }, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "FasCredentials", "shape": "FasCredentials", "type": "string"}, - {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "PlatformCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "CustomerCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "DataAccessCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "DataAccessVpcConfig", "shape": "VpcConfig", "type": "structure"}, - { - "name": "CredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - {"name": "CredentialProviderEncryptionKey", "shape": "KmsKeyId", "type": "string"}, - {"name": "BillingMode", "shape": "BillingMode", "type": "string"}, - {"name": "FasSourceArn", "shape": "SourceArn", "type": "string"}, - {"name": "FasSourceAccount", "shape": "AccountId", "type": "string"}, - ], - "type": "structure", - }, - "CreateTransformJobInternalResponse": { - "members": [ - { - "name": "TransformJobResponse", - "shape": "CreateTransformJobResponse", - "type": "structure", - } - ], - "type": "structure", - }, "CreateTransformJobRequest": { "members": [ {"name": "TransformJobName", "shape": "TransformJobName", "type": "string"}, @@ -5325,16 +4391,6 @@ {"name": "TransformResources", "shape": "TransformResources", "type": "structure"}, {"name": "DataProcessing", "shape": "DataProcessing", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "PlatformCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "CustomerCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "DataAccessCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "DataAccessVpcConfig", "shape": "VpcConfig", "type": "structure"}, - { - "name": "CredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - {"name": "CredentialProviderEncryptionKey", "shape": "KmsKeyId", "type": "string"}, {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, ], "type": "structure", @@ -5343,28 +4399,6 @@ "members": [{"name": "TransformJobArn", "shape": "TransformJobArn", "type": "string"}], "type": "structure", }, - "CreateTrialComponentInternalRequest": { - "members": [ - {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Source", "shape": "InputTrialComponentSource", "type": "structure"}, - {"name": "Status", "shape": "TrialComponentStatus", "type": "structure"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Parameters", "shape": "TrialComponentParameters", "type": "map"}, - {"name": "InputArtifacts", "shape": "TrialComponentArtifacts", "type": "map"}, - {"name": "OutputArtifacts", "shape": "TrialComponentArtifacts", "type": "map"}, - {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "CreateTrialComponentInternalResponse": { - "members": [{"name": "TrialComponentArn", "shape": "TrialComponentArn", "type": "string"}], - "type": "structure", - }, "CreateTrialComponentRequest": { "members": [ {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, @@ -5384,23 +4418,6 @@ "members": [{"name": "TrialComponentArn", "shape": "TrialComponentArn", "type": "string"}], "type": "structure", }, - "CreateTrialInternalRequest": { - "members": [ - {"name": "TrialName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, - {"name": "Source", "shape": "InputTrialSource", "type": "structure"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "CreateTrialInternalResponse": { - "members": [{"name": "TrialArn", "shape": "TrialArn", "type": "string"}], - "type": "structure", - }, "CreateTrialRequest": { "members": [ {"name": "TrialName", "shape": "ExperimentEntityName", "type": "string"}, @@ -5426,7 +4443,6 @@ }, {"name": "SingleSignOnUserValue", "shape": "String256", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "UserPolicy", "shape": "String2048", "type": "string"}, {"name": "UserSettings", "shape": "UserSettings", "type": "structure"}, ], "type": "structure", @@ -5460,8 +4476,6 @@ {"name": "WorkteamName", "shape": "WorkteamName", "type": "string"}, {"name": "WorkforceName", "shape": "WorkforceName", "type": "string"}, {"name": "MemberDefinitions", "shape": "MemberDefinitions", "type": "list"}, - {"name": "MembershipRule", "shape": "MembershipRule", "type": "structure"}, - {"name": "MembershipType", "shape": "MembershipType", "type": "string"}, {"name": "Description", "shape": "String200", "type": "string"}, { "name": "NotificationConfiguration", @@ -5481,35 +4495,6 @@ "members": [{"name": "WorkteamArn", "shape": "WorkteamArn", "type": "string"}], "type": "structure", }, - "CredentialProxyConfig": { - "members": [ - {"name": "PlatformCredentialToken", "shape": "ProxyToken", "type": "string"}, - {"name": "CustomerCredentialToken", "shape": "ProxyToken", "type": "string"}, - { - "name": "CredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - { - "name": "PlatformCredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - { - "name": "CustomerCredentialProviderEncryptionKey", - "shape": "KmsKeyId", - "type": "string", - }, - { - "name": "PlatformCredentialProviderEncryptionKey", - "shape": "KmsKeyId", - "type": "string", - }, - {"name": "CustomerCredentialProviderKmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "PlatformCredentialProviderKmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, "CsvContentTypes": {"member_shape": "CsvContentType", "member_type": "string", "type": "list"}, "CustomFileSystem": { "members": [ @@ -5567,68 +4552,6 @@ "value_type": "string", }, "CustomImages": {"member_shape": "CustomImage", "member_type": "structure", "type": "list"}, - "CustomMetadata": { - "key_shape": "CustomMetadataKey", - "key_type": "string", - "type": "map", - "value_shape": "CustomMetadataValue", - "value_type": "string", - }, - "CustomMonitoringAppSpecification": { - "members": [ - {"name": "ImageUri", "shape": "ImageUri", "type": "string"}, - {"name": "ContainerEntrypoint", "shape": "ContainerEntrypoint", "type": "list"}, - {"name": "ContainerArguments", "shape": "MonitoringContainerArguments", "type": "list"}, - {"name": "Environment", "shape": "MonitoringEnvironmentMap", "type": "map"}, - {"name": "RecordPreprocessorSourceUri", "shape": "S3Uri", "type": "string"}, - {"name": "PostAnalyticsProcessorSourceUri", "shape": "S3Uri", "type": "string"}, - ], - "type": "structure", - }, - "CustomMonitoringJobDefinition": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "CustomMonitoringAppSpecification", - "shape": "CustomMonitoringAppSpecification", - "type": "structure", - }, - { - "name": "CustomMonitoringJobInput", - "shape": "CustomMonitoringJobInput", - "type": "structure", - }, - { - "name": "CustomMonitoringJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - ], - "type": "structure", - }, - "CustomMonitoringJobInput": { - "members": [ - {"name": "ProcessingInputs", "shape": "MonitoringProcessingInputs", "type": "list"}, - {"name": "EndpointInput", "shape": "EndpointInput", "type": "structure"}, - {"name": "BatchTransformInput", "shape": "BatchTransformInput", "type": "structure"}, - { - "name": "GroundTruthS3Input", - "shape": "MonitoringGroundTruthS3Input", - "type": "structure", - }, - ], - "type": "structure", - }, "CustomPosixUserConfig": { "members": [ {"name": "Uid", "shape": "Uid", "type": "long"}, @@ -5636,14 +4559,6 @@ ], "type": "structure", }, - "CustomerDetails": { - "members": [ - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "UserContext", "shape": "UserContext", "type": "structure"}, - {"name": "OrganizationId", "shape": "OrganizationId", "type": "string"}, - ], - "type": "structure", - }, "CustomerMetadataKeyList": { "member_shape": "CustomerMetadataKey", "member_type": "string", @@ -5732,38 +4647,6 @@ ], "type": "structure", }, - "DataQualityJobDefinition": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "DataQualityBaselineConfig", - "shape": "DataQualityBaselineConfig", - "type": "structure", - }, - { - "name": "DataQualityAppSpecification", - "shape": "DataQualityAppSpecification", - "type": "structure", - }, - {"name": "DataQualityJobInput", "shape": "DataQualityJobInput", "type": "structure"}, - { - "name": "DataQualityJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - ], - "type": "structure", - }, "DataQualityJobInput": { "members": [ {"name": "EndpointInput", "shape": "EndpointInput", "type": "structure"}, @@ -5771,13 +4654,6 @@ ], "type": "structure", }, - "DataScienceAssistantSettings": { - "members": [ - {"name": "Status", "shape": "FeatureStatus", "type": "string"}, - {"name": "CrossRegionQServiceStatus", "shape": "FeatureStatus", "type": "string"}, - ], - "type": "structure", - }, "DataSource": { "members": [ {"name": "S3DataSource", "shape": "S3DataSource", "type": "structure"}, @@ -5801,11 +4677,6 @@ {"name": "LocalPath", "shape": "ProcessingLocalPath", "type": "string"}, {"name": "DataDistributionType", "shape": "DataDistributionType", "type": "string"}, {"name": "InputMode", "shape": "InputMode", "type": "string"}, - { - "name": "SnowflakeDatasetDefinition", - "shape": "SnowflakeDatasetDefinition", - "type": "structure", - }, ], "type": "structure", }, @@ -5868,11 +4739,6 @@ "member_type": "string", "type": "list", }, - "DeepHealthChecksList": { - "member_shape": "DeepHealthCheckType", - "member_type": "string", - "type": "list", - }, "DefaultDomainIdList": {"member_shape": "DomainId", "member_type": "string", "type": "list"}, "DefaultEbsStorageSettings": { "members": [ @@ -5932,6 +4798,34 @@ ], "type": "structure", }, + "DeleteAIBenchmarkJobRequest": { + "members": [{"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DeleteAIBenchmarkJobResponse": { + "members": [{"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}], + "type": "structure", + }, + "DeleteAIRecommendationJobRequest": { + "members": [{"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DeleteAIRecommendationJobResponse": { + "members": [ + {"name": "AIRecommendationJobArn", "shape": "AIRecommendationJobArn", "type": "string"} + ], + "type": "structure", + }, + "DeleteAIWorkloadConfigRequest": { + "members": [{"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DeleteAIWorkloadConfigResponse": { + "members": [ + {"name": "AIWorkloadConfigArn", "shape": "AIWorkloadConfigArn", "type": "string"} + ], + "type": "structure", + }, "DeleteActionRequest": { "members": [{"name": "ActionName", "shape": "ExperimentEntityName", "type": "string"}], "type": "structure", @@ -5985,15 +4879,8 @@ ], "type": "structure", }, - "DeleteAutoMLJobRequest": { - "members": [{"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}], - "type": "structure", - }, "DeleteClusterRequest": { - "members": [ - {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, - ], + "members": [{"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}], "type": "structure", }, "DeleteClusterResponse": { @@ -6006,8 +4893,7 @@ "name": "ClusterSchedulerConfigId", "shape": "ClusterSchedulerConfigId", "type": "string", - }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, + } ], "type": "structure", }, @@ -6020,10 +4906,7 @@ "type": "structure", }, "DeleteComputeQuotaRequest": { - "members": [ - {"name": "ComputeQuotaId", "shape": "ComputeQuotaId", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, - ], + "members": [{"name": "ComputeQuotaId", "shape": "ComputeQuotaId", "type": "string"}], "type": "structure", }, "DeleteContextRequest": { @@ -6034,12 +4917,6 @@ "members": [{"name": "ContextArn", "shape": "ContextArn", "type": "string"}], "type": "structure", }, - "DeleteCustomMonitoringJobDefinitionRequest": { - "members": [ - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"} - ], - "type": "structure", - }, "DeleteDataQualityJobDefinitionRequest": { "members": [ {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"} @@ -6074,35 +4951,8 @@ ], "type": "structure", }, - "DeleteEndpointConfigInputInternal": { - "members": [ - { - "name": "EndpointConfigInput", - "shape": "DeleteEndpointConfigInput", - "type": "structure", - }, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - ], - "type": "structure", - }, "DeleteEndpointInput": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "ForceDelete", "shape": "Boolean", "type": "boolean"}, - ], - "type": "structure", - }, - "DeleteEndpointInputInternal": { - "members": [ - {"name": "EndpointInput", "shape": "DeleteEndpointInput", "type": "structure"}, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - ], - "type": "structure", - }, - "DeleteEvaluationJobRequest": { - "members": [{"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}], + "members": [{"name": "EndpointName", "shape": "EndpointName", "type": "string"}], "type": "structure", }, "DeleteExperimentRequest": { @@ -6190,50 +5040,6 @@ ], "type": "structure", }, - "DeleteInferenceRecommendationsJobRequest": { - "members": [{"name": "JobName", "shape": "RecommendationJobName", "type": "string"}], - "type": "structure", - }, - "DeleteLabelingJobRequest": { - "members": [ - {"name": "LabelingJobName", "shape": "LabelingJobName", "type": "string"}, - {"name": "NameReuseEnabled", "shape": "Boolean", "type": "boolean"}, - ], - "type": "structure", - }, - "DeleteLabelingPortalPolicyRequest": { - "members": [{"name": "WorkforceName", "shape": "WorkforceName", "type": "string"}], - "type": "structure", - }, - "DeleteLabelingPortalPolicyResponse": {"members": [], "type": "structure"}, - "DeleteLineageGroupPolicyRequest": { - "members": [ - {"name": "LineageGroupName", "shape": "LineageGroupNameOrArn", "type": "string"} - ], - "type": "structure", - }, - "DeleteLineageGroupPolicyResponse": { - "members": [{"name": "LineageGroupArn", "shape": "LineageGroupArn", "type": "string"}], - "type": "structure", - }, - "DeleteLineageGroupRequest": { - "members": [ - {"name": "LineageGroupName", "shape": "ExperimentEntityName", "type": "string"} - ], - "type": "structure", - }, - "DeleteLineageGroupResponse": { - "members": [{"name": "LineageGroupArn", "shape": "LineageGroupArn", "type": "string"}], - "type": "structure", - }, - "DeleteMlflowAppPolicyRequest": { - "members": [{"name": "Arn", "shape": "MlflowAppArn", "type": "string"}], - "type": "structure", - }, - "DeleteMlflowAppPolicyResponse": { - "members": [{"name": "Arn", "shape": "MlflowAppArn", "type": "string"}], - "type": "structure", - }, "DeleteMlflowAppRequest": { "members": [{"name": "Arn", "shape": "MlflowAppArn", "type": "string"}], "type": "structure", @@ -6272,23 +5078,12 @@ "members": [{"name": "ModelName", "shape": "ModelName", "type": "string"}], "type": "structure", }, - "DeleteModelInputInternal": { - "members": [ - {"name": "ModelInput", "shape": "DeleteModelInput", "type": "structure"}, - {"name": "AccountId", "shape": "AccountId", "type": "string"}, - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - ], - "type": "structure", - }, "DeleteModelPackageGroupInput": { "members": [{"name": "ModelPackageGroupName", "shape": "ArnOrName", "type": "string"}], "type": "structure", }, "DeleteModelPackageGroupPolicyInput": { - "members": [ - {"name": "ModelPackageGroupName", "shape": "EntityName", "type": "string"}, - {"name": "ModelPackageGroupArn", "shape": "ModelPackageGroupArn", "type": "string"}, - ], + "members": [{"name": "ModelPackageGroupName", "shape": "EntityName", "type": "string"}], "type": "structure", }, "DeleteModelPackageInput": { @@ -6327,14 +5122,6 @@ "members": [{"name": "OptimizationJobName", "shape": "EntityName", "type": "string"}], "type": "structure", }, - "DeletePartnerAppPolicyRequest": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, - "DeletePartnerAppPolicyResponse": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, "DeletePartnerAppRequest": { "members": [ {"name": "Arn", "shape": "PartnerAppArn", "type": "string"}, @@ -6346,24 +5133,6 @@ "members": [{"name": "Arn", "shape": "PartnerAppArn", "type": "string"}], "type": "structure", }, - "DeletePersistentVolumeRequest": { - "members": [ - {"name": "PersistentVolumeName", "shape": "PersistentVolumeName", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - ], - "type": "structure", - }, - "DeletePipelinePolicyRequest": { - "members": [ - {"name": "PipelineName", "shape": "PipelineNameOrArn", "type": "string"}, - {"name": "ClientRequestToken", "shape": "IdempotencyToken", "type": "string"}, - ], - "type": "structure", - }, - "DeletePipelinePolicyResponse": { - "members": [{"name": "PipelineArn", "shape": "PipelineArn", "type": "string"}], - "type": "structure", - }, "DeletePipelineRequest": { "members": [ {"name": "PipelineName", "shape": "PipelineName", "type": "string"}, @@ -6375,15 +5144,6 @@ "members": [{"name": "PipelineArn", "shape": "PipelineArn", "type": "string"}], "type": "structure", }, - "DeleteProcessingJobInternalRequest": { - "members": [ - {"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "ProcessingJobArn", "shape": "ProcessingJobArn", "type": "string"}, - {"name": "AssociatedParentJobArn", "shape": "AssociatedParentJobArn", "type": "string"}, - ], - "type": "structure", - }, "DeleteProcessingJobRequest": { "members": [{"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}], "type": "structure", @@ -6392,12 +5152,6 @@ "members": [{"name": "ProjectName", "shape": "ProjectEntityName", "type": "string"}], "type": "structure", }, - "DeleteQuotaAllocationRequest": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"} - ], - "type": "structure", - }, "DeleteRecordRequest": { "members": [ {"name": "FeatureGroupName", "shape": "FeatureGroupNameOrArn", "type": "string"}, @@ -6408,28 +5162,6 @@ ], "type": "structure", }, - "DeleteResourcePolicyRequest": { - "members": [{"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}], - "type": "structure", - }, - "DeleteResourcePolicyResponse": { - "members": [{"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}], - "type": "structure", - }, - "DeleteSharedModelRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - ], - "type": "structure", - }, - "DeleteSharedModelResponse": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - ], - "type": "structure", - }, "DeleteSpaceRequest": { "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, @@ -6455,23 +5187,10 @@ "type": "structure", }, "DeleteTagsOutput": {"members": [], "type": "structure"}, - "DeleteTrainingJobInternalRequest": { - "members": [ - {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, - {"name": "AssociatedParentJobArn", "shape": "AssociatedParentJobArn", "type": "string"}, - ], - "type": "structure", - }, "DeleteTrainingJobRequest": { "members": [{"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}], "type": "structure", }, - "DeleteTransformJobRequest": { - "members": [{"name": "TransformJobName", "shape": "TransformJobName", "type": "string"}], - "type": "structure", - }, "DeleteTrialComponentRequest": { "members": [ {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"} @@ -6562,13 +5281,6 @@ ], "type": "structure", }, - "DeploymentSpecification": { - "members": [ - {"name": "TestInput", "shape": "TestInput", "type": "structure"}, - {"name": "HealthCheckConfig", "shape": "HealthCheckConfig", "type": "structure"}, - ], - "type": "structure", - }, "DeploymentStage": { "members": [ {"name": "StageName", "shape": "EntityName", "type": "string"}, @@ -6613,9 +5325,94 @@ }, "DerivedInformation": { "members": [ - {"name": "DerivedDataInputConfig", "shape": "DataInputConfig", "type": "string"}, - {"name": "DerivedFramework", "shape": "Framework", "type": "string"}, - {"name": "DerivedFrameworkVersion", "shape": "FrameworkVersion", "type": "string"}, + {"name": "DerivedDataInputConfig", "shape": "DataInputConfig", "type": "string"} + ], + "type": "structure", + }, + "DescribeAIBenchmarkJobRequest": { + "members": [{"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DescribeAIBenchmarkJobResponse": { + "members": [ + {"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}, + {"name": "AIBenchmarkJobStatus", "shape": "AIBenchmarkJobStatus", "type": "string"}, + {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, + {"name": "BenchmarkTarget", "shape": "AIBenchmarkTarget", "type": "structure"}, + {"name": "OutputConfig", "shape": "AIBenchmarkOutputResult", "type": "structure"}, + { + "name": "AIWorkloadConfigIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, + {"name": "NetworkConfig", "shape": "AIBenchmarkNetworkConfig", "type": "structure"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, + ], + "type": "structure", + }, + "DescribeAIRecommendationJobRequest": { + "members": [{"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DescribeAIRecommendationJobResponse": { + "members": [ + {"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIRecommendationJobArn", "shape": "AIRecommendationJobArn", "type": "string"}, + { + "name": "AIRecommendationJobStatus", + "shape": "AIRecommendationJobStatus", + "type": "string", + }, + {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, + {"name": "ModelSource", "shape": "AIModelSource", "type": "structure"}, + {"name": "OutputConfig", "shape": "AIRecommendationOutputResult", "type": "structure"}, + { + "name": "InferenceSpecification", + "shape": "AIRecommendationInferenceSpecification", + "type": "structure", + }, + { + "name": "AIWorkloadConfigIdentifier", + "shape": "AIResourceIdentifier", + "type": "string", + }, + { + "name": "OptimizeModel", + "shape": "AIRecommendationAllowOptimization", + "type": "boolean", + }, + { + "name": "PerformanceTarget", + "shape": "AIRecommendationPerformanceTarget", + "type": "structure", + }, + {"name": "Recommendations", "shape": "AIRecommendationList", "type": "list"}, + {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, + {"name": "ComputeSpec", "shape": "AIRecommendationComputeSpec", "type": "structure"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, + ], + "type": "structure", + }, + "DescribeAIWorkloadConfigRequest": { + "members": [{"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}], + "type": "structure", + }, + "DescribeAIWorkloadConfigResponse": { + "members": [ + {"name": "AIWorkloadConfigName", "shape": "AIEntityName", "type": "string"}, + {"name": "AIWorkloadConfigArn", "shape": "AIWorkloadConfigArn", "type": "string"}, + {"name": "DatasetConfig", "shape": "AIDatasetConfig", "type": "structure"}, + {"name": "AIWorkloadConfigs", "shape": "AIWorkloadConfigs", "type": "structure"}, + {"name": "Tags", "shape": "TagList", "type": "list"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, ], "type": "structure", }, @@ -6694,11 +5491,6 @@ "shape": "KernelGatewayImageConfig", "type": "structure", }, - { - "name": "SaviturAppImageConfig", - "shape": "SaviturAppImageConfig", - "type": "structure", - }, { "name": "JupyterLabAppImageConfig", "shape": "JupyterLabAppImageConfig", @@ -6740,7 +5532,6 @@ {"name": "LastHealthCheckTimestamp", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastUserActivityTimestamp", "shape": "Timestamp", "type": "timestamp"}, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RestartTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, {"name": "ResourceSpec", "shape": "ResourceSpec", "type": "structure"}, { @@ -6748,11 +5539,6 @@ "shape": "StudioLifecycleConfigArn", "type": "string", }, - { - "name": "AppLaunchConfiguration", - "shape": "AppLaunchConfiguration", - "type": "structure", - }, ], "type": "structure", }, @@ -6812,7 +5598,6 @@ "type": "boolean", }, {"name": "AutoMLJobArtifacts", "shape": "AutoMLJobArtifacts", "type": "structure"}, - {"name": "ImageUrlOverrides", "shape": "ImageUrlOverrides", "type": "structure"}, {"name": "ResolvedAttributes", "shape": "ResolvedAttributes", "type": "structure"}, {"name": "ModelDeployConfig", "shape": "ModelDeployConfig", "type": "structure"}, {"name": "ModelDeployResult", "shape": "ModelDeployResult", "type": "structure"}, @@ -6855,89 +5640,23 @@ "type": "list", }, {"name": "BestCandidate", "shape": "AutoMLCandidate", "type": "structure"}, - {"name": "AutoMLJobStatus", "shape": "AutoMLJobStatus", "type": "string"}, - { - "name": "AutoMLJobSecondaryStatus", - "shape": "AutoMLJobSecondaryStatus", - "type": "string", - }, - {"name": "AutoMLJobArtifacts", "shape": "AutoMLJobArtifacts", "type": "structure"}, - {"name": "ImageUrlOverrides", "shape": "ImageUrlOverrides", "type": "structure"}, - { - "name": "ResolvedAttributes", - "shape": "AutoMLResolvedAttributes", - "type": "structure", - }, - {"name": "ModelDeployConfig", "shape": "ModelDeployConfig", "type": "structure"}, - {"name": "ModelDeployResult", "shape": "ModelDeployResult", "type": "structure"}, - {"name": "DataSplitConfig", "shape": "AutoMLDataSplitConfig", "type": "structure"}, - {"name": "SecurityConfig", "shape": "AutoMLSecurityConfig", "type": "structure"}, - { - "name": "ExternalFeatureTransformers", - "shape": "AutoMLExternalFeatureTransformers", - "type": "structure", - }, - {"name": "AutoMLComputeConfig", "shape": "AutoMLComputeConfig", "type": "structure"}, - ], - "type": "structure", - }, - "DescribeAutoMLTaskRequest": { - "members": [{"name": "AutoMLTaskArn", "shape": "AutoMLTaskArn", "type": "string"}], - "type": "structure", - }, - "DescribeAutoMLTaskResponse": { - "members": [ - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "AutoMLTaskArn", "shape": "AutoMLTaskArn", "type": "string"}, - {"name": "CandidateName", "shape": "CandidateName", "type": "string"}, - {"name": "AutoMLTaskType", "shape": "AutoMLTaskType", "type": "string"}, - {"name": "AutoMLTaskStatus", "shape": "AutoMLTaskStatus", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "FailureReason", "shape": "AutoMLFailureReason", "type": "string"}, - { - "name": "AutoMLTaskArtifactsLocation", - "shape": "AutoMLTaskArtifactsLocation", - "type": "string", - }, - ], - "type": "structure", - }, - "DescribeCapacityScheduleRequest": { - "members": [ - {"name": "CapacityScheduleName", "shape": "CapacityScheduleName", "type": "string"} - ], - "type": "structure", - }, - "DescribeCapacityScheduleResponse": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"}, - {"name": "OwnerAccountId", "shape": "AccountId", "type": "string"}, - {"name": "CapacityScheduleType", "shape": "CapacityScheduleType", "type": "string"}, - {"name": "InstanceType", "shape": "CapacityScheduleInstanceType", "type": "string"}, - {"name": "TotalInstanceCount", "shape": "Integer", "type": "integer"}, - { - "name": "AvailableInstanceCount", - "shape": "AvailableInstanceCount", - "type": "integer", + {"name": "AutoMLJobStatus", "shape": "AutoMLJobStatus", "type": "string"}, + { + "name": "AutoMLJobSecondaryStatus", + "shape": "AutoMLJobSecondaryStatus", + "type": "string", }, - {"name": "Placement", "shape": "Placement", "type": "string"}, - {"name": "AvailabilityZone", "shape": "AvailabilityZone", "type": "string"}, - {"name": "Status", "shape": "CapacityScheduleStatus", "type": "string"}, - {"name": "RequestedStartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedEndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "DurationInHours", "shape": "CapacityScheduleDurationInHours", "type": "long"}, - {"name": "CapacityBlockOfferings", "shape": "CapacityBlockOfferings", "type": "list"}, - {"name": "CapacityResources", "shape": "CapacityResources", "type": "structure"}, - {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, + {"name": "AutoMLJobArtifacts", "shape": "AutoMLJobArtifacts", "type": "structure"}, { - "name": "CapacityScheduleStatusTransitions", - "shape": "CapacityScheduleStatusTransitions", - "type": "list", + "name": "ResolvedAttributes", + "shape": "AutoMLResolvedAttributes", + "type": "structure", }, + {"name": "ModelDeployConfig", "shape": "ModelDeployConfig", "type": "structure"}, + {"name": "ModelDeployResult", "shape": "ModelDeployResult", "type": "structure"}, + {"name": "DataSplitConfig", "shape": "AutoMLDataSplitConfig", "type": "structure"}, + {"name": "SecurityConfig", "shape": "AutoMLSecurityConfig", "type": "structure"}, + {"name": "AutoMLComputeConfig", "shape": "AutoMLComputeConfig", "type": "structure"}, ], "type": "structure", }, @@ -6952,17 +5671,6 @@ "members": [{"name": "EventDetails", "shape": "ClusterEventDetail", "type": "structure"}], "type": "structure", }, - "DescribeClusterInferenceRequest": { - "members": [{"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}], - "type": "structure", - }, - "DescribeClusterInferenceResponse": { - "members": [ - {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, - {"name": "Status", "shape": "Status", "type": "string"}, - ], - "type": "structure", - }, "DescribeClusterNodeRequest": { "members": [ {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, @@ -6994,7 +5702,6 @@ }, {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, {"name": "Orchestrator", "shape": "ClusterOrchestrator", "type": "structure"}, - {"name": "ResilienceConfig", "shape": "ClusterResilienceConfig", "type": "structure"}, { "name": "TieredStorageConfig", "shape": "ClusterTieredStorageConfig", @@ -7008,7 +5715,6 @@ }, {"name": "ClusterRole", "shape": "RoleArn", "type": "string"}, {"name": "AutoScaling", "shape": "ClusterAutoScalingConfigOutput", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, ], "type": "structure", }, @@ -7039,6 +5745,7 @@ {"name": "ClusterSchedulerConfigVersion", "shape": "Integer", "type": "integer"}, {"name": "Status", "shape": "SchedulerResourceStatus", "type": "string"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, + {"name": "StatusDetails", "shape": "StatusDetailsMap", "type": "map"}, {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, {"name": "SchedulerConfig", "shape": "SchedulerConfig", "type": "structure"}, {"name": "Description", "shape": "EntityDescription", "type": "string"}, @@ -7085,7 +5792,6 @@ {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, {"name": "InputConfig", "shape": "InputConfig", "type": "structure"}, {"name": "OutputConfig", "shape": "OutputConfig", "type": "structure"}, - {"name": "ResourceConfig", "shape": "NeoResourceConfig", "type": "structure"}, {"name": "VpcConfig", "shape": "NeoVpcConfig", "type": "structure"}, {"name": "DerivedInformation", "shape": "DerivedInformation", "type": "structure"}, ], @@ -7138,43 +5844,6 @@ ], "type": "structure", }, - "DescribeCustomMonitoringJobDefinitionRequest": { - "members": [ - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"} - ], - "type": "structure", - }, - "DescribeCustomMonitoringJobDefinitionResponse": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "CustomMonitoringAppSpecification", - "shape": "CustomMonitoringAppSpecification", - "type": "structure", - }, - { - "name": "CustomMonitoringJobInput", - "shape": "CustomMonitoringJobInput", - "type": "structure", - }, - { - "name": "CustomMonitoringJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - ], - "type": "structure", - }, "DescribeDataQualityJobDefinitionRequest": { "members": [ {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"} @@ -7286,7 +5955,6 @@ {"name": "AuthMode", "shape": "AuthMode", "type": "string"}, {"name": "DefaultUserSettings", "shape": "UserSettings", "type": "structure"}, {"name": "DomainSettings", "shape": "DomainSettings", "type": "structure"}, - {"name": "AppNetworkAccess", "shape": "AppNetworkAccess", "type": "string"}, {"name": "AppNetworkAccessType", "shape": "AppNetworkAccessType", "type": "string"}, {"name": "HomeEfsFileSystemKmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "SubnetIds", "shape": "Subnets", "type": "list"}, @@ -7298,7 +5966,6 @@ "shape": "AppSecurityGroupManagement", "type": "string", }, - {"name": "AppStorageType", "shape": "AppStorageType", "type": "string"}, {"name": "TagPropagation", "shape": "TagPropagation", "type": "string"}, {"name": "DefaultSpaceSettings", "shape": "DefaultSpaceSettings", "type": "structure"}, ], @@ -7389,11 +6056,6 @@ {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - { - "name": "DeletionCondition", - "shape": "EndpointDeletionCondition", - "type": "structure", - }, {"name": "ProductionVariants", "shape": "ProductionVariantSummaryList", "type": "list"}, {"name": "DataCaptureConfig", "shape": "DataCaptureConfigSummary", "type": "structure"}, {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, @@ -7413,55 +6075,10 @@ "shape": "ProductionVariantSummaryList", "type": "list", }, - {"name": "GraphConfigName", "shape": "GraphConfigName", "type": "string"}, {"name": "MetricsConfig", "shape": "MetricsConfig", "type": "structure"}, ], "type": "structure", }, - "DescribeEvaluationJobRequest": { - "members": [{"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}], - "type": "structure", - }, - "DescribeEvaluationJobResponse": { - "members": [ - {"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}, - {"name": "EvaluationJobArn", "shape": "EvaluationJobArn", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "EvaluationJobStatus", "shape": "EvaluationJobStatus", "type": "string"}, - {"name": "Description", "shape": "EvaluationJobDescription", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - { - "name": "OutputDataConfig", - "shape": "EvaluationJobOutputDataConfig", - "type": "structure", - }, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "EvaluationMethod", - "shape": "EvaluationJobEvaluationMethod", - "type": "string", - }, - {"name": "ModelConfig", "shape": "EvaluationJobModelConfig", "type": "structure"}, - { - "name": "InputDataConfig", - "shape": "EvaluationJobInputDataConfig", - "type": "structure", - }, - { - "name": "EvaluationConfig", - "shape": "EvaluationJobEvaluationConfig", - "type": "structure", - }, - {"name": "JobId", "shape": "EvaluationJobId", "type": "string"}, - { - "name": "UpstreamPlatformConfig", - "shape": "EvaluationJobUpstreamPlatformConfig", - "type": "structure", - }, - ], - "type": "structure", - }, "DescribeExperimentRequest": { "members": [{"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}], "type": "structure", @@ -7510,24 +6127,11 @@ {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, {"name": "Description", "shape": "Description", "type": "string"}, {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "OnlineStoreReplicas", "shape": "OnlineStoreReplicas", "type": "list"}, - { - "name": "OnlineStoreReadWriteType", - "shape": "OnlineStoreReadWriteType", - "type": "string", - }, { "name": "OnlineStoreTotalSizeBytes", "shape": "OnlineStoreTotalSizeBytes", "type": "long", }, - { - "name": "OnlineStoreTotalItemCount", - "shape": "OnlineStoreTotalItemCount", - "type": "long", - }, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, ], "type": "structure", }, @@ -7541,7 +6145,6 @@ "DescribeFeatureMetadataResponse": { "members": [ {"name": "FeatureGroupArn", "shape": "FeatureGroupArn", "type": "string"}, - {"name": "FeatureIdentifier", "shape": "FeatureIdentifier", "type": "string"}, {"name": "FeatureGroupName", "shape": "FeatureGroupName", "type": "string"}, {"name": "FeatureName", "shape": "FeatureName", "type": "string"}, {"name": "FeatureType", "shape": "FeatureType", "type": "string"}, @@ -7575,105 +6178,12 @@ "type": "structure", }, {"name": "HumanLoopConfig", "shape": "HumanLoopConfig", "type": "structure"}, - {"name": "WorkflowSteps", "shape": "WorkflowSteps", "type": "string"}, {"name": "OutputConfig", "shape": "FlowDefinitionOutputConfig", "type": "structure"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "TaskRenderingRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, ], "type": "structure", }, - "DescribeGroundTruthJobRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - {"name": "GroundTruthJobName", "shape": "GroundTruthJobName", "type": "string"}, - ], - "type": "structure", - }, - "DescribeGroundTruthJobResponse": { - "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, - {"name": "GroundTruthWorkflowArn", "shape": "GroundTruthWorkflowArn", "type": "string"}, - { - "name": "GroundTruthJobDescription", - "shape": "GroundTruthJobDescription", - "type": "string", - }, - {"name": "GroundTruthJobArn", "shape": "GroundTruthJobArn", "type": "string"}, - {"name": "GroundTruthJobName", "shape": "GroundTruthJobName", "type": "string"}, - {"name": "GroundTruthJobStatus", "shape": "GroundTruthJobStatus", "type": "string"}, - {"name": "InputConfig", "shape": "GroundTruthJobInputConfig", "type": "structure"}, - {"name": "OutputConfig", "shape": "GroundTruthJobOutputConfig", "type": "structure"}, - {"name": "FailureReason", "shape": "GroundTruthJobFailureReason", "type": "string"}, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "DescribeGroundTruthProjectRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"} - ], - "type": "structure", - }, - "DescribeGroundTruthProjectResponse": { - "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthProjectDescription", - "shape": "GroundTruthProjectDescription", - "type": "string", - }, - { - "name": "PointOfContact", - "shape": "GroundTruthProjectPointOfContact", - "type": "structure", - }, - { - "name": "GroundTruthProjectStatus", - "shape": "GroundTruthProjectStatus", - "type": "string", - }, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "DescribeGroundTruthWorkflowRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - ], - "type": "structure", - }, - "DescribeGroundTruthWorkflowResponse": { - "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, - {"name": "GroundTruthWorkflowArn", "shape": "GroundTruthWorkflowArn", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - { - "name": "GroundTruthWorkflowDefinitionSpec", - "shape": "GroundTruthWorkflowDefinitionSpec", - "type": "string", - }, - {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, "DescribeHubContentRequest": { "members": [ {"name": "HubName", "shape": "HubNameOrArn", "type": "string"}, @@ -7746,7 +6256,6 @@ {"name": "HumanTaskUiStatus", "shape": "HumanTaskUiStatus", "type": "string"}, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "UiTemplate", "shape": "UiTemplateInfo", "type": "structure"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, ], "type": "structure", }, @@ -7822,11 +6331,6 @@ }, {"name": "Autotune", "shape": "Autotune", "type": "structure"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - { - "name": "TuningJobCompletionReason", - "shape": "TuningJobCompletionReason", - "type": "string", - }, { "name": "TuningJobCompletionDetails", "shape": "HyperParameterTuningJobCompletionDetails", @@ -7883,12 +6387,6 @@ {"name": "ProgrammingLang", "shape": "ProgrammingLang", "type": "string"}, {"name": "Processor", "shape": "Processor", "type": "string"}, {"name": "Horovod", "shape": "Horovod", "type": "boolean"}, - { - "name": "OverrideAliasImageVersion", - "shape": "OverrideAliasImageVersion", - "type": "boolean", - }, - {"name": "SociImage", "shape": "SociImage", "type": "boolean"}, {"name": "ReleaseNotes", "shape": "ReleaseNotes", "type": "string"}, ], "type": "structure", @@ -7983,35 +6481,12 @@ "shape": "RecommendationJobStoppingConditions", "type": "structure", }, - { - "name": "EndpointConfigurationTuning", - "shape": "RecommendationJobEndpointConfigurationTuning", - "type": "structure", - }, { "name": "InferenceRecommendations", "shape": "InferenceRecommendations", "type": "list", }, {"name": "EndpointPerformances", "shape": "EndpointPerformances", "type": "list"}, - {"name": "OutputConfig", "shape": "RecommendationJobOutputConfig", "type": "structure"}, - ], - "type": "structure", - }, - "DescribeInternalRequest": { - "members": [ - {"name": "Arn", "shape": "String", "type": "string"}, - {"name": "ExpectedObjectFullyQualifiedClassName", "shape": "String", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "DescribeInternalResponse": { - "members": [ - {"name": "Arn", "shape": "String", "type": "string"}, - {"name": "ObjectFullyQualifiedClassName", "shape": "String", "type": "string"}, - {"name": "ObjectJson", "shape": "String", "type": "string"}, - {"name": "AdditionalProperties", "shape": "MapString256", "type": "map"}, ], "type": "structure", }, @@ -8033,7 +6508,6 @@ {"name": "InputConfig", "shape": "LabelingJobInputConfig", "type": "structure"}, {"name": "OutputConfig", "shape": "LabelingJobOutputConfig", "type": "structure"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "TaskRenderingRoleArn", "shape": "RoleArn", "type": "string"}, {"name": "LabelCategoryConfigS3Uri", "shape": "S3Uri", "type": "string"}, { "name": "StoppingConditions", @@ -8082,7 +6556,6 @@ {"name": "MlflowVersion", "shape": "MlflowVersion", "type": "string"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, {"name": "Status", "shape": "MlflowAppStatus", "type": "string"}, - {"name": "Url", "shape": "MlflowAppUrl", "type": "string"}, {"name": "ModelRegistrationMode", "shape": "ModelRegistrationMode", "type": "string"}, {"name": "AccountDefaultStatus", "shape": "AccountDefaultStatus", "type": "string"}, {"name": "DefaultDomainIdList", "shape": "DefaultDomainIdList", "type": "list"}, @@ -8131,11 +6604,8 @@ {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - { - "name": "UpgradeRollbackVersionDetails", - "shape": "UpgradeRollbackVersionDetails", - "type": "structure", - }, + {"name": "S3BucketOwnerAccountId", "shape": "AccountId", "type": "string"}, + {"name": "S3BucketOwnerVerification", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -8360,18 +6830,12 @@ {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, {"name": "ModelMetrics", "shape": "ModelMetrics", "type": "structure"}, - { - "name": "DeploymentSpecification", - "shape": "DeploymentSpecification", - "type": "structure", - }, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, {"name": "ApprovalDescription", "shape": "ApprovalDescription", "type": "string"}, {"name": "Domain", "shape": "String", "type": "string"}, {"name": "Task", "shape": "String", "type": "string"}, {"name": "SamplePayloadUrl", "shape": "String", "type": "string"}, - {"name": "SamplePayloadContentType", "shape": "String", "type": "string"}, {"name": "CustomerMetadataProperties", "shape": "CustomerMetadataMap", "type": "map"}, {"name": "DriftCheckBaselines", "shape": "DriftCheckBaselines", "type": "structure"}, { @@ -8425,32 +6889,6 @@ ], "type": "structure", }, - "DescribeMonitoringExecutionRequest": { - "members": [ - {"name": "MonitoringExecutionId", "shape": "MonitoringExecutionId", "type": "string"} - ], - "type": "structure", - }, - "DescribeMonitoringExecutionResponse": { - "members": [ - {"name": "MonitoringExecutionId", "shape": "MonitoringExecutionId", "type": "string"}, - {"name": "MonitoringScheduleName", "shape": "MonitoringScheduleName", "type": "string"}, - {"name": "ScheduledTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "MonitoringExecutionStatus", "shape": "ExecutionStatus", "type": "string"}, - {"name": "ProcessingJobArn", "shape": "ProcessingJobArn", "type": "string"}, - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - { - "name": "MonitoringJobDefinitionName", - "shape": "MonitoringJobDefinitionName", - "type": "string", - }, - {"name": "MonitoringType", "shape": "MonitoringType", "type": "string"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - ], - "type": "structure", - }, "DescribeMonitoringScheduleRequest": { "members": [ {"name": "MonitoringScheduleName", "shape": "MonitoringScheduleName", "type": "string"} @@ -8477,32 +6915,6 @@ "shape": "MonitoringExecutionSummary", "type": "structure", }, - { - "name": "CustomMonitoringJobDefinition", - "shape": "CustomMonitoringJobDefinition", - "type": "structure", - }, - { - "name": "DataQualityJobDefinition", - "shape": "DataQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelQualityJobDefinition", - "shape": "ModelQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelBiasJobDefinition", - "shape": "ModelBiasJobDefinition", - "type": "structure", - }, - { - "name": "ModelExplainabilityJobDefinition", - "shape": "ModelExplainabilityJobDefinition", - "type": "structure", - }, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -8645,7 +7057,6 @@ {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "SdkUrl", "shape": "String2048", "type": "string"}, {"name": "BaseUrl", "shape": "String2048", "type": "string"}, { "name": "MaintenanceConfig", @@ -8664,31 +7075,6 @@ ], "type": "structure", }, - "DescribePersistentVolumeRequest": { - "members": [ - {"name": "PersistentVolumeName", "shape": "PersistentVolumeName", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - ], - "type": "structure", - }, - "DescribePersistentVolumeResponse": { - "members": [ - {"name": "PersistentVolumeArn", "shape": "PersistentVolumeArn", "type": "string"}, - {"name": "PersistentVolumeName", "shape": "PersistentVolumeName", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "Status", "shape": "PersistentVolumeStatus", "type": "string"}, - { - "name": "PersistentVolumeConfiguration", - "shape": "PersistentVolumeConfiguration", - "type": "structure", - }, - {"name": "OwningEntityArn", "shape": "OwningEntityArn", "type": "string"}, - {"name": "CreationTime", "shape": "CreationTime", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - ], - "type": "structure", - }, "DescribePipelineDefinitionForExecutionRequest": { "members": [ {"name": "PipelineExecutionArn", "shape": "PipelineExecutionArn", "type": "string"} @@ -8823,8 +7209,6 @@ {"name": "ProcessingStartTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "MonitoringScheduleArn", "shape": "MonitoringScheduleArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, @@ -8864,39 +7248,6 @@ ], "type": "structure", }, - "DescribeQuotaAllocationRequest": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"}, - {"name": "QuotaAllocationVersion", "shape": "Integer", "type": "integer"}, - ], - "type": "structure", - }, - "DescribeQuotaAllocationResponse": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"}, - {"name": "QuotaId", "shape": "QuotaId", "type": "string"}, - {"name": "QuotaAllocationName", "shape": "EntityName", "type": "string"}, - {"name": "QuotaAllocationVersion", "shape": "Integer", "type": "integer"}, - {"name": "QuotaAllocationStatus", "shape": "SchedulerResourceStatus", "type": "string"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, - {"name": "QuotaResources", "shape": "QuotaResourceConfigList", "type": "list"}, - {"name": "OverQuota", "shape": "OverQuota", "type": "structure"}, - {"name": "PreemptionConfig", "shape": "PreemptionConfig", "type": "structure"}, - {"name": "ActivationState", "shape": "ActivationStateV1", "type": "structure"}, - { - "name": "QuotaAllocationTarget", - "shape": "QuotaAllocationTarget", - "type": "structure", - }, - {"name": "QuotaAllocationDescription", "shape": "EntityDescription", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - ], - "type": "structure", - }, "DescribeReservedCapacityRequest": { "members": [ {"name": "ReservedCapacityArn", "shape": "ReservedCapacityArn", "type": "string"} @@ -8920,28 +7271,8 @@ "shape": "AvailableInstanceCount", "type": "integer", }, - {"name": "InUseInstanceCount", "shape": "InUseInstanceCount", "type": "integer"}, - {"name": "UltraServerSummary", "shape": "UltraServerSummary", "type": "structure"}, - ], - "type": "structure", - }, - "DescribeSharedModelRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - ], - "type": "structure", - }, - "DescribeSharedModelResponse": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - {"name": "Owner", "shape": "UserProfileName", "type": "string"}, - {"name": "Creator", "shape": "UserProfileName", "type": "string"}, - {"name": "ModelArtifacts", "shape": "SharedModelArtifacts", "type": "map"}, - {"name": "Comments", "shape": "Comments", "type": "list"}, - {"name": "ModelName", "shape": "SharedModelName", "type": "string"}, - {"name": "Origin", "shape": "Origin", "type": "string"}, + {"name": "InUseInstanceCount", "shape": "InUseInstanceCount", "type": "integer"}, + {"name": "UltraServerSummary", "shape": "UltraServerSummary", "type": "structure"}, ], "type": "structure", }, @@ -9025,12 +7356,10 @@ "members": [ {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, - {"name": "ProcessingJobArn", "shape": "ProcessingJobArn", "type": "string"}, {"name": "TuningJobArn", "shape": "HyperParameterTuningJobArn", "type": "string"}, {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, {"name": "ModelArtifacts", "shape": "ModelArtifacts", "type": "structure"}, - {"name": "TrainingJobOutput", "shape": "TrainingJobOutput", "type": "structure"}, {"name": "TrainingJobStatus", "shape": "TrainingJobStatus", "type": "string"}, {"name": "SecondaryStatus", "shape": "SecondaryStatus", "type": "string"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, @@ -9081,11 +7410,6 @@ "shape": "DebugRuleEvaluationStatuses", "type": "list", }, - { - "name": "UpstreamPlatformConfig", - "shape": "UpstreamPlatformConfig", - "type": "structure", - }, {"name": "ProfilerConfig", "shape": "ProfilerConfig", "type": "structure"}, { "name": "ProfilerRuleConfigurations", @@ -9100,13 +7424,7 @@ {"name": "ProfilingStatus", "shape": "ProfilingStatus", "type": "string"}, {"name": "Environment", "shape": "TrainingEnvironmentMap", "type": "map"}, {"name": "RetryStrategy", "shape": "RetryStrategy", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "DisableEFA", "shape": "Boolean", "type": "boolean"}, - {"name": "ProcessingJobConfig", "shape": "ProcessingJobConfig", "type": "structure"}, - {"name": "ImageMetadata", "shape": "ImageMetadata", "type": "structure"}, {"name": "RemoteDebugConfig", "shape": "RemoteDebugConfig", "type": "structure"}, - {"name": "ResourceTags", "shape": "ResourceTags", "type": "structure"}, {"name": "InfraCheckConfig", "shape": "InfraCheckConfig", "type": "structure"}, {"name": "ServerlessJobConfig", "shape": "ServerlessJobConfig", "type": "structure"}, {"name": "MlflowConfig", "shape": "MlflowConfig", "type": "structure"}, @@ -9117,6 +7435,21 @@ ], "type": "structure", }, + "DescribeTrainingPlanExtensionHistoryRequest": { + "members": [ + {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, + ], + "type": "structure", + }, + "DescribeTrainingPlanExtensionHistoryResponse": { + "members": [ + {"name": "TrainingPlanExtensions", "shape": "TrainingPlanExtensions", "type": "list"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + ], + "type": "structure", + }, "DescribeTrainingPlanRequest": { "members": [{"name": "TrainingPlanName", "shape": "TrainingPlanName", "type": "string"}], "type": "structure", @@ -9157,11 +7490,6 @@ "shape": "ReservedCapacitySummaries", "type": "list", }, - { - "name": "TrainingPlanStatusTransitions", - "shape": "TrainingPlanStatusTransitions", - "type": "list", - }, ], "type": "structure", }, @@ -9194,11 +7522,8 @@ {"name": "TransformEndTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "TransformJobProgress", "shape": "TransformJobProgress", "type": "structure"}, {"name": "DataProcessing", "shape": "DataProcessing", "type": "structure"}, {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, ], "type": "structure", }, @@ -9273,7 +7598,6 @@ "type": "string", }, {"name": "SingleSignOnUserValue", "shape": "String256", "type": "string"}, - {"name": "UserPolicy", "shape": "String2048", "type": "string"}, {"name": "UserSettings", "shape": "UserSettings", "type": "structure"}, ], "type": "structure", @@ -9317,7 +7641,6 @@ {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, {"name": "VolumeId", "shape": "VolumeId", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -9440,53 +7763,6 @@ ], "type": "structure", }, - "Domain": { - "members": [ - {"name": "DomainArn", "shape": "DomainArn", "type": "string"}, - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "DomainName", "shape": "DomainName", "type": "string"}, - {"name": "HomeEfsFileSystemId", "shape": "ResourceId", "type": "string"}, - { - "name": "SingleSignOnManagedApplicationInstanceId", - "shape": "String256", - "type": "string", - }, - { - "name": "SingleSignOnApplicationArn", - "shape": "SingleSignOnApplicationArn", - "type": "string", - }, - {"name": "Status", "shape": "DomainStatus", "type": "string"}, - {"name": "CreationTime", "shape": "CreationTime", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - { - "name": "SecurityGroupIdForDomainBoundary", - "shape": "SecurityGroupId", - "type": "string", - }, - {"name": "AuthMode", "shape": "AuthMode", "type": "string"}, - {"name": "DefaultUserSettings", "shape": "UserSettings", "type": "structure"}, - {"name": "DomainSettings", "shape": "DomainSettings", "type": "structure"}, - {"name": "AppNetworkAccess", "shape": "AppNetworkAccess", "type": "string"}, - {"name": "AppNetworkAccessType", "shape": "AppNetworkAccessType", "type": "string"}, - {"name": "HomeEfsFileSystemKmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "SubnetIds", "shape": "Subnets", "type": "list"}, - {"name": "Url", "shape": "String1024", "type": "string"}, - {"name": "VpcId", "shape": "VpcId", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - { - "name": "AppSecurityGroupManagement", - "shape": "AppSecurityGroupManagement", - "type": "string", - }, - {"name": "AppStorageType", "shape": "AppStorageType", "type": "string"}, - {"name": "TagPropagation", "shape": "TagPropagation", "type": "string"}, - {"name": "DefaultSpaceSettings", "shape": "DefaultSpaceSettings", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, "DomainDetails": { "members": [ {"name": "DomainArn", "shape": "DomainArn", "type": "string"}, @@ -9508,7 +7784,6 @@ "DomainSettings": { "members": [ {"name": "SecurityGroupIds", "shape": "DomainSecurityGroupIds", "type": "list"}, - {"name": "LogoutRedirectionUrl", "shape": "redirectUrl", "type": "string"}, { "name": "RStudioServerProDomainSettings", "shape": "RStudioServerProDomainSettings", @@ -9606,13 +7881,6 @@ ], "type": "structure", }, - "DryRunOperation": { - "members": [ - {"name": "ErrorCode", "shape": "String", "type": "string"}, - {"name": "Message", "shape": "FailureReason", "type": "string"}, - ], - "type": "structure", - }, "DynamicScalingConfiguration": { "members": [ {"name": "MinCapacity", "shape": "Integer", "type": "integer"}, @@ -9662,11 +7930,6 @@ ], "type": "structure", }, - "Ec2CapacityReservationsIdList": { - "member_shape": "Ec2CapacityReservationId", - "member_type": "string", - "type": "list", - }, "Ec2CapacityReservationsList": { "member_shape": "Ec2CapacityReservation", "member_type": "structure", @@ -9825,11 +8088,6 @@ {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - { - "name": "DeletionCondition", - "shape": "EndpointDeletionCondition", - "type": "structure", - }, {"name": "ProductionVariants", "shape": "ProductionVariantSummaryList", "type": "list"}, {"name": "DataCaptureConfig", "shape": "DataCaptureConfigSummary", "type": "structure"}, {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, @@ -9863,16 +8121,6 @@ "member_type": "structure", "type": "list", }, - "EndpointDeletionCondition": { - "members": [ - { - "name": "MaxRuntimeInSeconds", - "shape": "EndpointMaxRuntimeInSeconds", - "type": "integer", - } - ], - "type": "structure", - }, "EndpointInfo": { "members": [{"name": "EndpointName", "shape": "EndpointName", "type": "string"}], "type": "structure", @@ -9897,355 +8145,143 @@ }, {"name": "StartTimeOffset", "shape": "MonitoringTimeOffsetString", "type": "string"}, {"name": "EndTimeOffset", "shape": "MonitoringTimeOffsetString", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, - { - "name": "ExcludeFeaturesAttribute", - "shape": "ExcludeFeaturesAttribute", - "type": "string", - }, - ], - "type": "structure", - }, - "EndpointInputConfiguration": { - "members": [ - {"name": "InstanceType", "shape": "ProductionVariantInstanceType", "type": "string"}, - { - "name": "ServerlessConfig", - "shape": "ProductionVariantServerlessConfig", - "type": "structure", - }, - { - "name": "InferenceSpecificationName", - "shape": "InferenceSpecificationName", - "type": "string", - }, - { - "name": "EnvironmentParameterRanges", - "shape": "EnvironmentParameterRanges", - "type": "structure", - }, - ], - "type": "structure", - }, - "EndpointInputConfigurations": { - "member_shape": "EndpointInputConfiguration", - "member_type": "structure", - "type": "list", - }, - "EndpointMetadata": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - ], - "type": "structure", - }, - "EndpointOutputConfiguration": { - "members": [ - {"name": "EndpointName", "shape": "String", "type": "string"}, - {"name": "VariantName", "shape": "String", "type": "string"}, - {"name": "InstanceType", "shape": "ProductionVariantInstanceType", "type": "string"}, - {"name": "InitialInstanceCount", "shape": "InitialInstanceCount", "type": "integer"}, - { - "name": "ServerlessConfig", - "shape": "ProductionVariantServerlessConfig", - "type": "structure", - }, - ], - "type": "structure", - }, - "EndpointPerformance": { - "members": [ - {"name": "Metrics", "shape": "InferenceMetrics", "type": "structure"}, - {"name": "EndpointInfo", "shape": "EndpointInfo", "type": "structure"}, - ], - "type": "structure", - }, - "EndpointPerformances": { - "member_shape": "EndpointPerformance", - "member_type": "structure", - "type": "list", - }, - "EndpointStepMetadata": { - "members": [{"name": "Arn", "shape": "EndpointArn", "type": "string"}], - "type": "structure", - }, - "EndpointSummary": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, - ], - "type": "structure", - }, - "EndpointSummaryList": { - "member_shape": "EndpointSummary", - "member_type": "structure", - "type": "list", - }, - "Endpoints": {"member_shape": "EndpointInfo", "member_type": "structure", "type": "list"}, - "Entrypoint": {"member_shape": "String2048", "member_type": "string", "type": "list"}, - "Environment": { - "key_shape": "String2048", - "key_type": "string", - "type": "map", - "value_shape": "String2048", - "value_type": "string", - }, - "EnvironmentConfig": { - "members": [{"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}], - "type": "structure", - }, - "EnvironmentConfigDetails": { - "members": [ - {"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}, - {"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}, - ], - "type": "structure", - }, - "EnvironmentMap": { - "key_shape": "EnvironmentKey", - "key_type": "string", - "type": "map", - "value_shape": "EnvironmentValue", - "value_type": "string", - }, - "EnvironmentParameter": { - "members": [ - {"name": "Key", "shape": "String", "type": "string"}, - {"name": "ValueType", "shape": "String", "type": "string"}, - {"name": "Value", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, - "EnvironmentParameterRanges": { - "members": [ - { - "name": "CategoricalParameterRanges", - "shape": "CategoricalParameters", - "type": "list", - }, - {"name": "IntegerParameterRanges", "shape": "IntegerParameters", "type": "list"}, - {"name": "ContinuousParameterRanges", "shape": "ContinuousParameters", "type": "list"}, - ], - "type": "structure", - }, - "EnvironmentParameters": { - "member_shape": "EnvironmentParameter", - "member_type": "structure", - "type": "list", - }, - "EnvironmentSettings": { - "members": [ - {"name": "DefaultS3ArtifactPath", "shape": "S3Uri", "type": "string"}, - {"name": "DefaultS3KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, - "ErrorInfo": { - "members": [ - {"name": "Code", "shape": "NonEmptyString64", "type": "string"}, - {"name": "Reason", "shape": "NonEmptyString256", "type": "string"}, - ], - "type": "structure", - }, - "EvaluationJobCredentialProxyConfig": { - "members": [ - { - "name": "UpstreamPlatformCustomerCredentialToken", - "shape": "ProxyToken", - "type": "string", - }, - { - "name": "CredentialProviderFunction", - "shape": "CredentialProviderLambdaFunctionArn", - "type": "string", - }, - ], - "type": "structure", - }, - "EvaluationJobCustomDataset": { - "members": [ - {"name": "DatasetName", "shape": "EvaluationJobCustomDatasetName", "type": "string"}, - {"name": "S3Uri", "shape": "EvaluationJobS3Uri", "type": "string"}, - ], - "type": "structure", - }, - "EvaluationJobCustomDatasetList": { - "member_shape": "EvaluationJobCustomDataset", - "member_type": "structure", - "type": "list", - }, - "EvaluationJobEvaluationConfig": { - "members": [ - { - "name": "HumanEvaluationConfig", - "shape": "EvaluationJobHumanEvaluationConfig", - "type": "structure", - } + { + "name": "ExcludeFeaturesAttribute", + "shape": "ExcludeFeaturesAttribute", + "type": "string", + }, ], "type": "structure", }, - "EvaluationJobHumanEvaluationConfig": { + "EndpointInputConfiguration": { "members": [ + {"name": "InstanceType", "shape": "ProductionVariantInstanceType", "type": "string"}, { - "name": "HumanTaskConfig", - "shape": "EvaluationJobHumanTaskConfig", + "name": "ServerlessConfig", + "shape": "ProductionVariantServerlessConfig", "type": "structure", }, { - "name": "HumanWorkflowConfig", - "shape": "EvaluationJobHumanWorkflowConfig", - "type": "structure", + "name": "InferenceSpecificationName", + "shape": "InferenceSpecificationName", + "type": "string", }, { - "name": "HumanEvaluationMetrics", - "shape": "EvaluationJobHumanEvaluationMetricsList", - "type": "list", + "name": "EnvironmentParameterRanges", + "shape": "EnvironmentParameterRanges", + "type": "structure", }, ], "type": "structure", }, - "EvaluationJobHumanEvaluationMetric": { - "members": [ - {"name": "MetricName", "shape": "HumanEvaluationMetricName", "type": "string"}, - {"name": "RatingMethod", "shape": "HumanEvaluationRatingMethod", "type": "string"}, - {"name": "MetricType", "shape": "HumanEvaluationMetricType", "type": "string"}, - {"name": "Description", "shape": "HumanEvaluationDescription", "type": "string"}, - ], - "type": "structure", - }, - "EvaluationJobHumanEvaluationMetricsList": { - "member_shape": "EvaluationJobHumanEvaluationMetric", + "EndpointInputConfigurations": { + "member_shape": "EndpointInputConfiguration", "member_type": "structure", "type": "list", }, - "EvaluationJobHumanTaskConfig": { + "EndpointMetadata": { "members": [ - {"name": "FlowDefinitionArn", "shape": "FlowDefinitionArn", "type": "string"}, - { - "name": "TaskInstructions", - "shape": "EvaluationJobHumanTaskInstructions", - "type": "string", - }, + {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, + {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, + {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, + {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, ], "type": "structure", }, - "EvaluationJobHumanWorkflowConfig": { + "EndpointOutputConfiguration": { "members": [ - {"name": "FlowDefinitionArn", "shape": "FlowDefinitionArn", "type": "string"}, + {"name": "EndpointName", "shape": "String", "type": "string"}, + {"name": "VariantName", "shape": "String", "type": "string"}, + {"name": "InstanceType", "shape": "ProductionVariantInstanceType", "type": "string"}, + {"name": "InitialInstanceCount", "shape": "InitialInstanceCount", "type": "integer"}, { - "name": "TaskInstructions", - "shape": "EvaluationJobHumanTaskInstructions", - "type": "string", + "name": "ServerlessConfig", + "shape": "ProductionVariantServerlessConfig", + "type": "structure", }, ], "type": "structure", }, - "EvaluationJobInputDataConfig": { + "EndpointPerformance": { "members": [ - {"name": "CustomDatasets", "shape": "EvaluationJobCustomDatasetList", "type": "list"} + {"name": "Metrics", "shape": "InferenceMetrics", "type": "structure"}, + {"name": "EndpointInfo", "shape": "EndpointInfo", "type": "structure"}, ], "type": "structure", }, - "EvaluationJobModel": { - "members": [ - {"name": "ModelIdentifier", "shape": "EvaluationJobModelIdentifier", "type": "string"}, - {"name": "ModelType", "shape": "EvaluationJobModelType", "type": "string"}, - {"name": "EndpointArn", "shape": "EvaluationJobModelEndpointArn", "type": "string"}, - ], - "type": "structure", + "EndpointPerformances": { + "member_shape": "EndpointPerformance", + "member_type": "structure", + "type": "list", }, - "EvaluationJobModelConfig": { - "members": [{"name": "Models", "shape": "ModelList", "type": "list"}], + "EndpointStepMetadata": { + "members": [{"name": "Arn", "shape": "EndpointArn", "type": "string"}], "type": "structure", }, - "EvaluationJobModelIdentifiersList": { - "member_shape": "EvaluationJobModelIdentifier", - "member_type": "string", - "type": "list", - }, - "EvaluationJobOutputDataConfig": { + "EndpointSummary": { "members": [ - {"name": "S3Uri", "shape": "EvaluationJobS3Uri", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, + {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, + {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, + {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndpointStatus", "shape": "EndpointStatus", "type": "string"}, ], "type": "structure", }, - "EvaluationJobSummaries": { - "member_shape": "EvaluationJobSummary", + "EndpointSummaryList": { + "member_shape": "EndpointSummary", "member_type": "structure", "type": "list", }, - "EvaluationJobSummary": { + "Endpoints": {"member_shape": "EndpointInfo", "member_type": "structure", "type": "list"}, + "EnvironmentConfig": { + "members": [{"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}], + "type": "structure", + }, + "EnvironmentConfigDetails": { "members": [ - {"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}, - {"name": "EvaluationJobArn", "shape": "EvaluationJobArn", "type": "string"}, - {"name": "EvaluationJobStatus", "shape": "EvaluationJobStatus", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "EvaluationMethod", - "shape": "EvaluationJobEvaluationMethod", - "type": "string", - }, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - { - "name": "ModelIdentifiers", - "shape": "EvaluationJobModelIdentifiersList", - "type": "list", - }, + {"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}, + {"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}, ], "type": "structure", }, - "EvaluationJobUpstreamPlatformConfig": { + "EnvironmentMap": { + "key_shape": "EnvironmentKey", + "key_type": "string", + "type": "map", + "value_shape": "EnvironmentValue", + "value_type": "string", + }, + "EnvironmentParameter": { "members": [ - { - "name": "CredentialProxyConfig", - "shape": "EvaluationJobCredentialProxyConfig", - "type": "structure", - }, - { - "name": "UpstreamPlatformCustomerOutputDataConfig", - "shape": "EvaluationJobUpstreamPlatformCustomerOutputDataConfig", - "type": "structure", - }, - {"name": "UpstreamPlatformCustomerAccountId", "shape": "AccountId", "type": "string"}, - { - "name": "UpstreamPlatformCustomerEvaluationJobArn", - "shape": "EvaluationJobUpstreamPlatformCustomerEvaluationJobArn", - "type": "string", - }, - {"name": "UpstreamPlatformCustomerExecutionRole", "shape": "RoleArn", "type": "string"}, + {"name": "Key", "shape": "String", "type": "string"}, + {"name": "ValueType", "shape": "String", "type": "string"}, + {"name": "Value", "shape": "String", "type": "string"}, ], "type": "structure", }, - "EvaluationJobUpstreamPlatformCustomerOutputDataConfig": { + "EnvironmentParameterRanges": { "members": [ - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "S3KmsEncryptionContext", "shape": "S3KmsEncryptionContext", "type": "string"}, - {"name": "KmsEncryptionContext", "shape": "KmsEncryptionContext", "type": "map"}, - {"name": "S3Uri", "shape": "EvaluationJobS3Uri", "type": "string"}, + {"name": "CategoricalParameterRanges", "shape": "CategoricalParameters", "type": "list"} ], "type": "structure", }, - "EventDetails": { - "members": [{"name": "EventMetadata", "shape": "EventMetadata", "type": "structure"}], - "type": "structure", + "EnvironmentParameters": { + "member_shape": "EnvironmentParameter", + "member_type": "structure", + "type": "list", }, - "EventEntity": { + "ErrorInfo": { "members": [ - {"name": "EventSender", "shape": "UserProfileName", "type": "string"}, - {"name": "EventId", "shape": "EventId", "type": "string"}, - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - {"name": "EventType", "shape": "EventType", "type": "string"}, - {"name": "Read", "shape": "Read", "type": "boolean"}, + {"name": "Code", "shape": "NonEmptyString64", "type": "string"}, + {"name": "Reason", "shape": "NonEmptyString256", "type": "string"}, ], "type": "structure", }, + "EventDetails": { + "members": [{"name": "EventMetadata", "shape": "EventMetadata", "type": "structure"}], + "type": "structure", + }, "EventMetadata": { "members": [ {"name": "Cluster", "shape": "ClusterMetadata", "type": "structure"}, @@ -10256,13 +8292,15 @@ "type": "structure", }, {"name": "Instance", "shape": "InstanceMetadata", "type": "structure"}, - {"name": "InstanceMonitor", "shape": "InstanceMonitorMetadata", "type": "structure"}, - {"name": "InstanceHealth", "shape": "InstanceHealthMetadata", "type": "structure"}, ], "type": "structure", }, - "Events": {"member_shape": "EventEntity", "member_type": "structure", "type": "list"}, "ExecutionRoleArns": {"member_shape": "RoleArn", "member_type": "string", "type": "list"}, + "ExpectedPerformanceList": { + "member_shape": "AIRecommendationPerformanceMetric", + "member_type": "structure", + "type": "list", + }, "Experiment": { "members": [ {"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}, @@ -10318,14 +8356,6 @@ "members": [{"name": "Report", "shape": "MetricsSource", "type": "structure"}], "type": "structure", }, - "ExplainabilityTaskContext": { - "members": [ - {"name": "CandidateName", "shape": "CandidateName", "type": "string"}, - {"name": "IncludePDP", "shape": "IncludePDP", "type": "boolean"}, - {"name": "OverwriteArtifacts", "shape": "OverwriteArtifacts", "type": "boolean"}, - ], - "type": "structure", - }, "ExplainerConfig": { "members": [ { @@ -10336,6 +8366,22 @@ ], "type": "structure", }, + "ExtendTrainingPlanRequest": { + "members": [ + { + "name": "TrainingPlanExtensionOfferingId", + "shape": "TrainingPlanExtensionOfferingId", + "type": "string", + } + ], + "type": "structure", + }, + "ExtendTrainingPlanResponse": { + "members": [ + {"name": "TrainingPlanExtensions", "shape": "TrainingPlanExtensions", "type": "list"} + ], + "type": "structure", + }, "FSxLustreConfig": { "members": [ {"name": "SizeInGiB", "shape": "FSxLustreSizeInGiB", "type": "integer"}, @@ -10398,16 +8444,7 @@ {"name": "LastUpdateStatus", "shape": "LastUpdateStatus", "type": "structure"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, {"name": "Description", "shape": "Description", "type": "string"}, - {"name": "OnlineStoreReplicas", "shape": "OnlineStoreReplicas", "type": "list"}, - { - "name": "OnlineStoreReadWriteType", - "shape": "OnlineStoreReadWriteType", - "type": "string", - }, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "AllTags", "shape": "AllTags", "type": "string"}, ], "type": "structure", }, @@ -10436,7 +8473,6 @@ {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, {"name": "Description", "shape": "FeatureDescription", "type": "string"}, {"name": "Parameters", "shape": "FeatureParameters", "type": "list"}, - {"name": "AllParameters", "shape": "AllFeatureParameters", "type": "string"}, ], "type": "structure", }, @@ -10594,17 +8630,6 @@ ], "type": "structure", }, - "GetLabelingPortalPolicyRequest": { - "members": [{"name": "WorkforceName", "shape": "WorkforceName", "type": "string"}], - "type": "structure", - }, - "GetLabelingPortalPolicyResponse": { - "members": [ - {"name": "WorkforceName", "shape": "WorkforceName", "type": "string"}, - {"name": "Policy", "shape": "LabelingPortalPolicy", "type": "structure"}, - ], - "type": "structure", - }, "GetLineageGroupPolicyRequest": { "members": [ {"name": "LineageGroupName", "shape": "LineageGroupNameOrArn", "type": "string"} @@ -10618,53 +8643,14 @@ ], "type": "structure", }, - "GetMlflowAppPolicyRequest": { - "members": [{"name": "Arn", "shape": "MlflowAppArn", "type": "string"}], - "type": "structure", - }, - "GetMlflowAppPolicyResponse": { - "members": [ - {"name": "Arn", "shape": "MlflowAppArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, "GetModelPackageGroupPolicyInput": { - "members": [ - {"name": "ModelPackageGroupName", "shape": "EntityName", "type": "string"}, - {"name": "ModelPackageGroupArn", "shape": "ModelPackageGroupArn", "type": "string"}, - ], + "members": [{"name": "ModelPackageGroupName", "shape": "EntityName", "type": "string"}], "type": "structure", }, "GetModelPackageGroupPolicyOutput": { "members": [{"name": "ResourcePolicy", "shape": "PolicyString", "type": "string"}], "type": "structure", }, - "GetPartnerAppPolicyRequest": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, - "GetPartnerAppPolicyResponse": { - "members": [ - {"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, - "GetPipelinePolicyRequest": { - "members": [{"name": "PipelineName", "shape": "PipelineNameOrArn", "type": "string"}], - "type": "structure", - }, - "GetPipelinePolicyResponse": { - "members": [ - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, "GetRecordRequest": { "members": [ {"name": "FeatureGroupName", "shape": "FeatureGroupNameOrArn", "type": "string"}, @@ -10681,26 +8667,9 @@ ], "type": "structure", }, - "GetResourcePolicyRequest": { - "members": [{"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}], - "type": "structure", - }, - "GetResourcePolicyResponse": { - "members": [ - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, "GetSagemakerServicecatalogPortfolioStatusInput": {"members": [], "type": "structure"}, "GetSagemakerServicecatalogPortfolioStatusOutput": { - "members": [ - {"name": "Status", "shape": "SagemakerServicecatalogStatus", "type": "string"}, - {"name": "PortfolioId", "shape": "PortfolioId", "type": "string"}, - ], + "members": [{"name": "Status", "shape": "SagemakerServicecatalogStatus", "type": "string"}], "type": "structure", }, "GetScalingConfigurationRecommendationRequest": { @@ -10736,155 +8705,51 @@ {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, { "name": "TargetCpuUtilizationPerCore", - "shape": "UtilizationPercentagePerCore", - "type": "integer", - }, - { - "name": "ScalingPolicyObjective", - "shape": "ScalingPolicyObjective", - "type": "structure", - }, - {"name": "Metric", "shape": "ScalingPolicyMetric", "type": "structure"}, - { - "name": "DynamicScalingConfiguration", - "shape": "DynamicScalingConfiguration", - "type": "structure", - }, - ], - "type": "structure", - }, - "GetSearchSuggestionsRequest": { - "members": [ - {"name": "Resource", "shape": "ResourceType", "type": "string"}, - {"name": "SuggestionQuery", "shape": "SuggestionQuery", "type": "structure"}, - ], - "type": "structure", - }, - "GetSearchSuggestionsResponse": { - "members": [ - { - "name": "PropertyNameSuggestions", - "shape": "PropertyNameSuggestionList", - "type": "list", - } - ], - "type": "structure", - }, - "GitConfig": { - "members": [ - {"name": "RepositoryUrl", "shape": "GitConfigUrl", "type": "string"}, - {"name": "Branch", "shape": "Branch", "type": "string"}, - {"name": "SecretArn", "shape": "SecretArn", "type": "string"}, - ], - "type": "structure", - }, - "GitConfigForUpdate": { - "members": [{"name": "SecretArn", "shape": "SecretArn", "type": "string"}], - "type": "structure", - }, - "GroundTruthJobContentClassifiersList": { - "member_shape": "GroundTruthJobContentClassifiers", - "member_type": "string", - "type": "list", - }, - "GroundTruthJobDataAttributes": { - "members": [ - { - "name": "ContentClassifiers", - "shape": "GroundTruthJobContentClassifiersList", - "type": "list", - } - ], - "type": "structure", - }, - "GroundTruthJobDataSource": { - "members": [ - {"name": "S3DataSource", "shape": "GroundTruthJobS3DataSource", "type": "structure"} - ], - "type": "structure", - }, - "GroundTruthJobInputConfig": { - "members": [ + "shape": "UtilizationPercentagePerCore", + "type": "integer", + }, { - "name": "DataAttributes", - "shape": "GroundTruthJobDataAttributes", + "name": "ScalingPolicyObjective", + "shape": "ScalingPolicyObjective", + "type": "structure", + }, + {"name": "Metric", "shape": "ScalingPolicyMetric", "type": "structure"}, + { + "name": "DynamicScalingConfiguration", + "shape": "DynamicScalingConfiguration", "type": "structure", }, - {"name": "DataSource", "shape": "GroundTruthJobDataSource", "type": "structure"}, - ], - "type": "structure", - }, - "GroundTruthJobOutputConfig": { - "members": [{"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}], - "type": "structure", - }, - "GroundTruthJobS3DataSource": { - "members": [{"name": "S3Uri", "shape": "S3Uri", "type": "string"}], - "type": "structure", - }, - "GroundTruthJobSummary": { - "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, - {"name": "GroundTruthWorkflowArn", "shape": "GroundTruthWorkflowArn", "type": "string"}, - {"name": "GroundTruthJobArn", "shape": "GroundTruthJobArn", "type": "string"}, - {"name": "GroundTruthJobName", "shape": "GroundTruthJobName", "type": "string"}, - {"name": "GroundTruthJobStatus", "shape": "GroundTruthJobStatus", "type": "string"}, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, ], "type": "structure", }, - "GroundTruthJobSummaryList": { - "member_shape": "GroundTruthJobSummary", - "member_type": "structure", - "type": "list", - }, - "GroundTruthProjectPointOfContact": { + "GetSearchSuggestionsRequest": { "members": [ - {"name": "Name", "shape": "Name", "type": "string"}, - {"name": "Email", "shape": "Email", "type": "string"}, + {"name": "Resource", "shape": "ResourceType", "type": "string"}, + {"name": "SuggestionQuery", "shape": "SuggestionQuery", "type": "structure"}, ], "type": "structure", }, - "GroundTruthProjectSummary": { + "GetSearchSuggestionsResponse": { "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - { - "name": "GroundTruthProjectDescription", - "shape": "GroundTruthProjectDescription", - "type": "string", - }, - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, { - "name": "GroundTruthProjectStatus", - "shape": "GroundTruthProjectStatus", - "type": "string", - }, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, + "name": "PropertyNameSuggestions", + "shape": "PropertyNameSuggestionList", + "type": "list", + } ], "type": "structure", }, - "GroundTruthProjectSummaryList": { - "member_shape": "GroundTruthProjectSummary", - "member_type": "structure", - "type": "list", - }, - "GroundTruthWorkflowSummary": { + "GitConfig": { "members": [ - {"name": "GroundTruthProjectArn", "shape": "GroundTruthProjectArn", "type": "string"}, - {"name": "GroundTruthWorkflowArn", "shape": "GroundTruthWorkflowArn", "type": "string"}, - { - "name": "GroundTruthWorkflowName", - "shape": "GroundTruthWorkflowName", - "type": "string", - }, - {"name": "CreatedAt", "shape": "Timestamp", "type": "timestamp"}, + {"name": "RepositoryUrl", "shape": "GitConfigUrl", "type": "string"}, + {"name": "Branch", "shape": "Branch", "type": "string"}, + {"name": "SecretArn", "shape": "SecretArn", "type": "string"}, ], "type": "structure", }, - "GroundTruthWorkflowSummaryList": { - "member_shape": "GroundTruthWorkflowSummary", - "member_type": "structure", - "type": "list", + "GitConfigForUpdate": { + "members": [{"name": "SecretArn", "shape": "SecretArn", "type": "string"}], + "type": "structure", }, "GroupPatternsList": { "member_shape": "GroupNamePattern", @@ -10897,22 +8762,6 @@ "type": "list", }, "Groups": {"member_shape": "Group", "member_type": "string", "type": "list"}, - "HealthCheckConfig": { - "members": [ - {"name": "NumPayload", "shape": "NumPayload", "type": "integer"}, - {"name": "NumFailuresAllowed", "shape": "NumFailuresAllowed", "type": "integer"}, - ], - "type": "structure", - }, - "HealthInfo": { - "members": [ - {"name": "HealthStatus", "shape": "HealthStatus", "type": "string"}, - {"name": "HealthStatusReason", "shape": "String", "type": "string"}, - {"name": "RepairAction", "shape": "ServiceRepairAction", "type": "string"}, - {"name": "Recommendation", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, "HiddenAppTypesList": {"member_shape": "AppType", "member_type": "string", "type": "list"}, "HiddenInstanceTypesList": { "member_shape": "AppInstanceType", @@ -10996,7 +8845,7 @@ "type": "list", }, "HubContentSearchKeywordList": { - "member_shape": "HubSearchKeyword", + "member_shape": "HubContentSearchKeyword", "member_type": "string", "type": "list", }, @@ -11035,16 +8884,11 @@ }, "HumanLoopActivationConfig": { "members": [ - { - "name": "HumanLoopRequestSource", - "shape": "HumanLoopRequestSource", - "type": "structure", - }, { "name": "HumanLoopActivationConditionsConfig", "shape": "HumanLoopActivationConditionsConfig", "type": "structure", - }, + } ], "type": "structure", }, @@ -11134,7 +8978,6 @@ "members": [ {"name": "HumanTaskUiName", "shape": "HumanTaskUiName", "type": "string"}, {"name": "HumanTaskUiArn", "shape": "HumanTaskUiArn", "type": "string"}, - {"name": "HumanTaskUiStatus", "shape": "HumanTaskUiStatus", "type": "string"}, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, ], "type": "structure", @@ -11157,7 +9000,6 @@ {"name": "IsTunable", "shape": "Boolean", "type": "boolean"}, {"name": "IsRequired", "shape": "Boolean", "type": "boolean"}, {"name": "DefaultValue", "shape": "HyperParameterValue", "type": "string"}, - {"name": "DefaultScalingType", "shape": "ParameterScalingType", "type": "string"}, ], "type": "structure", }, @@ -11180,11 +9022,6 @@ }, {"name": "HyperParameterRanges", "shape": "ParameterRanges", "type": "structure"}, {"name": "StaticHyperParameters", "shape": "HyperParameters", "type": "map"}, - { - "name": "InitialHyperParameterConfigurations", - "shape": "InitialHyperParameterConfigurations", - "type": "list", - }, { "name": "AlgorithmSpecification", "shape": "HyperParameterAlgorithmSpecification", @@ -11230,18 +9067,6 @@ "value_shape": "HyperParameterTrainingJobEnvironmentValue", "value_type": "string", }, - "HyperParameterTrainingJobInstancePool": { - "members": [ - {"name": "InstanceType", "shape": "TrainingInstanceType", "type": "string"}, - {"name": "PoolSize", "shape": "TrainingInstanceCount", "type": "integer"}, - ], - "type": "structure", - }, - "HyperParameterTrainingJobInstancePools": { - "member_shape": "HyperParameterTrainingJobInstancePool", - "member_type": "structure", - "type": "list", - }, "HyperParameterTrainingJobSummaries": { "member_shape": "HyperParameterTrainingJobSummary", "member_type": "structure", @@ -11285,29 +9110,6 @@ "member_type": "structure", "type": "list", }, - "HyperParameterTuningInstanceGroup": { - "members": [ - {"name": "InstanceType", "shape": "TrainingInstanceType", "type": "string"}, - {"name": "InstanceCount", "shape": "TrainingInstanceCount", "type": "integer"}, - {"name": "InstanceGroupName", "shape": "InstanceGroupName", "type": "string"}, - ], - "type": "structure", - }, - "HyperParameterTuningInstanceGroups": { - "member_shape": "HyperParameterTuningInstanceGroup", - "member_type": "structure", - "type": "list", - }, - "HyperParameterTuningJobCompletionConfig": { - "members": [ - { - "name": "InProgressTrainingJobsHandling", - "shape": "InProgressTrainingJobsHandling", - "type": "string", - } - ], - "type": "structure", - }, "HyperParameterTuningJobCompletionDetails": { "members": [ { @@ -11339,30 +9141,17 @@ "shape": "TrainingJobEarlyStoppingType", "type": "string", }, - { - "name": "TrainingJobInstancePools", - "shape": "HyperParameterTrainingJobInstancePools", - "type": "list", - }, { "name": "TuningJobCompletionCriteria", "shape": "TuningJobCompletionCriteria", "type": "structure", }, - { - "name": "CompletionConfig", - "shape": "HyperParameterTuningJobCompletionConfig", - "type": "structure", - }, {"name": "RandomSeed", "shape": "RandomSeed", "type": "integer"}, ], "type": "structure", }, "HyperParameterTuningJobConsumedResources": { - "members": [ - {"name": "RuntimeInSeconds", "shape": "Integer", "type": "integer"}, - {"name": "BillableTimeInSeconds", "shape": "Integer", "type": "integer"}, - ], + "members": [{"name": "RuntimeInSeconds", "shape": "Integer", "type": "integer"}], "type": "structure", }, "HyperParameterTuningJobObjective": { @@ -11523,11 +9312,6 @@ {"name": "InstanceCount", "shape": "TrainingInstanceCount", "type": "integer"}, {"name": "VolumeSizeInGB", "shape": "OptionalVolumeSizeInGB", "type": "integer"}, {"name": "VolumeKmsKeyId", "shape": "KmsKeyId", "type": "string"}, - { - "name": "InstanceGroups", - "shape": "HyperParameterTuningInstanceGroups", - "type": "list", - }, { "name": "AllocationStrategy", "shape": "HyperParameterTuningAllocationStrategy", @@ -11550,17 +9334,6 @@ }, "HyperbandStrategyConfig": { "members": [ - { - "name": "NumberOfBrackets", - "shape": "HyperbandStrategyNumberOfBrackets", - "type": "integer", - }, - { - "name": "ReductionFactor", - "shape": "HyperbandStrategyReductionFactor", - "type": "integer", - }, - {"name": "Variant", "shape": "HyperbandStrategyVariant", "type": "string"}, {"name": "MinResource", "shape": "HyperbandStrategyMinResource", "type": "integer"}, {"name": "MaxResource", "shape": "HyperbandStrategyMaxResource", "type": "integer"}, ], @@ -11581,15 +9354,6 @@ ], "type": "structure", }, - "IdentityCenterUserToken": { - "members": [ - {"name": "EncryptedRefreshToken", "shape": "EncryptedRefreshToken", "type": "string"}, - {"name": "ClientId", "shape": "IdcClientId", "type": "string"}, - {"name": "IdcUserId", "shape": "IdcUserId", "type": "string"}, - {"name": "SkipRevokeTokenAfterComplete", "shape": "Boolean", "type": "boolean"}, - ], - "type": "structure", - }, "IdentityProviderOAuthSetting": { "members": [ {"name": "DataSourceName", "shape": "DataSourceName", "type": "string"}, @@ -11631,8 +9395,7 @@ "name": "CompletionCriteria", "shape": "AutoMLJobCompletionCriteria", "type": "structure", - }, - {"name": "MultiLabelEnabled", "shape": "Boolean", "type": "boolean"}, + } ], "type": "structure", }, @@ -11648,39 +9411,6 @@ "member_type": "string", "type": "list", }, - "ImageMetadata": { - "members": [{"name": "ImageType", "shape": "ImageType", "type": "string"}], - "type": "structure", - }, - "ImageSearchShape": { - "members": [ - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Description", "shape": "ImageDescription", "type": "string"}, - {"name": "DisplayName", "shape": "ImageDisplayName", "type": "string"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "ImageArn", "shape": "ImageArn", "type": "string"}, - {"name": "ImageName", "shape": "ImageName", "type": "string"}, - {"name": "ImageStatus", "shape": "ImageStatus", "type": "string"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, - "ImageUrlOverrides": { - "members": [ - {"name": "DataBuilderImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "DataProcessingImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "PipelineRecommenderImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "AgtImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "MultimodalPretrainingImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "RobotorchImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "TimeSeriesPreTrainingImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "TimeSeriesTrainingImageUrl", "shape": "AlgorithmImage", "type": "string"}, - {"name": "ThunderaImageUrl", "shape": "AlgorithmImage", "type": "string"}, - ], - "type": "structure", - }, "ImageVersion": { "members": [ {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, @@ -11693,49 +9423,8 @@ ], "type": "structure", }, - "ImageVersionSearchShape": { - "members": [ - {"name": "BaseImage", "shape": "ImageBaseImage", "type": "string"}, - {"name": "ContainerImage", "shape": "ImageContainerImage", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "ImageArn", "shape": "ImageArn", "type": "string"}, - {"name": "ImageVersionArn", "shape": "ImageVersionArn", "type": "string"}, - {"name": "ImageVersionStatus", "shape": "ImageVersionStatus", "type": "string"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Version", "shape": "ImageVersionNumber", "type": "integer"}, - {"name": "VendorGuidance", "shape": "VendorGuidance", "type": "string"}, - {"name": "JobType", "shape": "JobType", "type": "string"}, - {"name": "MLFramework", "shape": "MLFramework", "type": "string"}, - {"name": "ProgrammingLang", "shape": "ProgrammingLang", "type": "string"}, - {"name": "Processor", "shape": "Processor", "type": "string"}, - {"name": "Horovod", "shape": "Horovod", "type": "boolean"}, - {"name": "SociImage", "shape": "SociImage", "type": "boolean"}, - {"name": "ReleaseNotes", "shape": "ReleaseNotes", "type": "string"}, - { - "name": "OverrideAliasImageVersion", - "shape": "OverrideAliasImageVersion", - "type": "boolean", - }, - ], - "type": "structure", - }, "ImageVersions": {"member_shape": "ImageVersion", "member_type": "structure", "type": "list"}, "Images": {"member_shape": "Image", "member_type": "structure", "type": "list"}, - "ImportCapacityScheduleRequest": { - "members": [ - {"name": "CapacityScheduleName", "shape": "CapacityScheduleName", "type": "string"}, - {"name": "CapacityResourceArn", "shape": "CapacityResourceArn", "type": "string"}, - {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, - ], - "type": "structure", - }, - "ImportCapacityScheduleResponse": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"} - ], - "type": "structure", - }, "ImportHubContentRequest": { "members": [ {"name": "HubContentName", "shape": "HubContentName", "type": "string"}, @@ -11764,18 +9453,21 @@ ], "type": "structure", }, - "ImportTrainingPlanRequest": { + "InferenceComponentAvailabilityZoneBalance": { "members": [ - {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, - {"name": "CapacityResourceArn", "shape": "CapacityResourceArn", "type": "string"}, - {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, + { + "name": "EnforcementMode", + "shape": "AvailabilityZoneBalanceEnforcementMode", + "type": "string", + }, + { + "name": "MaxImbalance", + "shape": "AvailabilityZoneBalanceMaxImbalance", + "type": "integer", + }, ], "type": "structure", }, - "ImportTrainingPlanResponse": { - "members": [{"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}], - "type": "structure", - }, "InferenceComponentCapacitySize": { "members": [ {"name": "Type", "shape": "InferenceComponentCapacitySizeType", "type": "string"}, @@ -11873,6 +9565,21 @@ ], "type": "structure", }, + "InferenceComponentSchedulingConfig": { + "members": [ + { + "name": "PlacementStrategy", + "shape": "InferenceComponentPlacementStrategy", + "type": "string", + }, + { + "name": "AvailabilityZoneBalance", + "shape": "InferenceComponentAvailabilityZoneBalance", + "type": "structure", + }, + ], + "type": "structure", + }, "InferenceComponentSpecification": { "members": [ {"name": "ModelName", "shape": "ModelName", "type": "string"}, @@ -11901,6 +9608,11 @@ "shape": "InferenceComponentDataCacheConfig", "type": "structure", }, + { + "name": "SchedulingConfig", + "shape": "InferenceComponentSchedulingConfig", + "type": "structure", + }, ], "type": "structure", }, @@ -11932,6 +9644,11 @@ "shape": "InferenceComponentDataCacheConfigSummary", "type": "structure", }, + { + "name": "SchedulingConfig", + "shape": "InferenceComponentSchedulingConfig", + "type": "structure", + }, ], "type": "structure", }, @@ -12008,7 +9725,6 @@ {"name": "CompletionTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - {"name": "Arn", "shape": "InferenceExperimentArn", "type": "string"}, ], "type": "structure", }, @@ -12016,29 +9732,10 @@ "members": [{"name": "HubContentArn", "shape": "HubContentArn", "type": "string"}], "type": "structure", }, - "InferenceInvocationTypes": { - "members": [ - {"name": "InvocationType", "shape": "RecommendationJobInvocationType", "type": "string"} - ], - "type": "structure", - }, "InferenceMetrics": { "members": [ {"name": "MaxInvocations", "shape": "Integer", "type": "integer"}, {"name": "ModelLatency", "shape": "Integer", "type": "integer"}, - { - "name": "InputTokensPerSecondPerRequest", - "shape": "InputTokensPerSecondPerRequest", - "type": "float", - }, - { - "name": "OutputTokensPerSecondPerRequest", - "shape": "OutputTokensPerSecondPerRequest", - "type": "float", - }, - {"name": "TimeToFirstToken", "shape": "TimeToFirstToken", "type": "float"}, - {"name": "IntertokenLatency", "shape": "IntertokenLatency", "type": "float"}, - {"name": "MaxConcurrency", "shape": "MaxConcurrency", "type": "integer"}, ], "type": "structure", }, @@ -12052,7 +9749,6 @@ "type": "structure", }, {"name": "ModelConfiguration", "shape": "ModelConfiguration", "type": "structure"}, - {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, {"name": "InvocationEndTime", "shape": "InvocationEndTime", "type": "timestamp"}, {"name": "InvocationStartTime", "shape": "InvocationStartTime", "type": "timestamp"}, ], @@ -12078,11 +9774,6 @@ {"name": "ModelName", "shape": "ModelName", "type": "string"}, {"name": "SamplePayloadUrl", "shape": "S3Uri", "type": "string"}, {"name": "ModelPackageVersionArn", "shape": "ModelPackageArn", "type": "string"}, - { - "name": "BenchmarkResultsOutputConfig", - "shape": "BenchmarkResultsOutputConfig", - "type": "structure", - }, ], "type": "structure", }, @@ -12109,13 +9800,6 @@ "member_type": "structure", "type": "list", }, - "InferenceServiceConfig": { - "members": [ - {"name": "RequestStatus", "shape": "RequestStatus", "type": "string"}, - {"name": "ExecutionRoleArn", "shape": "RoleArn", "type": "string"}, - ], - "type": "structure", - }, "InferenceSpecification": { "members": [ {"name": "Containers", "shape": "ModelPackageContainerDefinitionList", "type": "list"}, @@ -12138,18 +9822,6 @@ "members": [{"name": "EnableInfraCheck", "shape": "EnableInfraCheck", "type": "boolean"}], "type": "structure", }, - "InitialHyperParameterConfiguration": { - "key_shape": "ParameterKey", - "key_type": "string", - "type": "map", - "value_shape": "ParameterValue", - "value_type": "string", - }, - "InitialHyperParameterConfigurations": { - "member_shape": "InitialHyperParameterConfiguration", - "member_type": "map", - "type": "list", - }, "InputConfig": { "members": [ {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, @@ -12160,59 +9832,18 @@ "type": "structure", }, "InputDataConfig": {"member_shape": "Channel", "member_type": "structure", "type": "list"}, - "InputExperimentSource": { - "members": [{"name": "SourceArn", "shape": "ExperimentSourceArn", "type": "string"}], - "type": "structure", - }, "InputModes": {"member_shape": "TrainingInputMode", "member_type": "string", "type": "list"}, - "InputTrialComponentSource": { - "members": [{"name": "SourceArn", "shape": "TrialComponentSourceArn", "type": "string"}], - "type": "structure", - }, - "InputTrialSource": { - "members": [{"name": "SourceArn", "shape": "TrialSourceArn", "type": "string"}], - "type": "structure", - }, - "InstanceDeepHealthCheck": { - "members": [ - { - "name": "operationStatus", - "shape": "DeepHealthCheckOperationStatus", - "type": "string", - }, - {"name": "requestedChecks", "shape": "DeepHealthChecksList", "type": "list"}, - {"name": "completedChecks", "shape": "DeepHealthChecksList", "type": "list"}, - {"name": "message", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, "InstanceGroup": { "members": [ {"name": "InstanceType", "shape": "TrainingInstanceType", "type": "string"}, {"name": "InstanceCount", "shape": "TrainingInstanceCount", "type": "integer"}, - {"name": "InstanceGroupName", "shape": "InstanceGroupName", "type": "string"}, - ], - "type": "structure", - }, - "InstanceGroupDeepHealthCheck": { - "members": [ - { - "name": "operationStatus", - "shape": "DeepHealthCheckOperationStatus", - "type": "string", - }, - {"name": "requestedChecks", "shape": "DeepHealthChecksList", "type": "list"}, - ], - "type": "structure", - }, - "InstanceGroupFailureMessages": { - "member_shape": "String", - "member_type": "string", - "type": "list", + {"name": "InstanceGroupName", "shape": "InstanceGroupName", "type": "string"}, + ], + "type": "structure", }, "InstanceGroupHealthCheckConfiguration": { "members": [ - {"name": "InstanceGroupName", "shape": "InstanceGroupName", "type": "string"}, + {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, {"name": "InstanceIds", "shape": "InstanceIds", "type": "list"}, {"name": "DeepHealthChecks", "shape": "DeepHealthChecks", "type": "list"}, ], @@ -12226,11 +9857,6 @@ {"name": "SubnetId", "shape": "String", "type": "string"}, {"name": "SecurityGroupIds", "shape": "SecurityGroupIds", "type": "list"}, {"name": "AmiOverride", "shape": "String", "type": "string"}, - { - "name": "InstanceGroupDeepHealthCheck", - "shape": "InstanceGroupDeepHealthCheck", - "type": "structure", - }, ], "type": "structure", }, @@ -12249,14 +9875,7 @@ "type": "structure", }, "InstanceGroups": {"member_shape": "InstanceGroup", "member_type": "structure", "type": "list"}, - "InstanceHealthMetadata": { - "members": [ - {"name": "OrchestratorHealthState", "shape": "String", "type": "string"}, - {"name": "FailureMessage", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, - "InstanceIds": {"member_shape": "InstanceId", "member_type": "string", "type": "list"}, + "InstanceIds": {"member_shape": "ClusterNodeId", "member_type": "string", "type": "list"}, "InstanceMetadata": { "members": [ {"name": "CustomerEni", "shape": "String", "type": "string"}, @@ -12265,12 +9884,6 @@ {"name": "FailureMessage", "shape": "String", "type": "string"}, {"name": "LcsExecutionState", "shape": "String", "type": "string"}, {"name": "NodeLogicalId", "shape": "ClusterNodeLogicalId", "type": "string"}, - {"name": "NodeHealthInfo", "shape": "HealthInfo", "type": "structure"}, - { - "name": "InstanceDeepHealthCheck", - "shape": "InstanceDeepHealthCheck", - "type": "structure", - }, ], "type": "structure", }, @@ -12284,14 +9897,6 @@ ], "type": "structure", }, - "InstanceMonitorMetadata": { - "members": [ - {"name": "InstanceReadyCount", "shape": "InstanceReadyCount", "type": "integer"}, - {"name": "TargetCount", "shape": "TargetCount", "type": "integer"}, - {"name": "FailureMessage", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, "InstancePlacementConfig": { "members": [ {"name": "EnableMultipleJobs", "shape": "Boolean", "type": "boolean"}, @@ -12299,15 +9904,6 @@ ], "type": "structure", }, - "IntegerParameter": { - "members": [ - {"name": "Name", "shape": "String64", "type": "string"}, - {"name": "MinValue", "shape": "Integer", "type": "integer"}, - {"name": "MaxValue", "shape": "Integer", "type": "integer"}, - {"name": "ScalingType", "shape": "ScalingType", "type": "string"}, - ], - "type": "structure", - }, "IntegerParameterRange": { "members": [ {"name": "Name", "shape": "ParameterKey", "type": "string"}, @@ -12329,11 +9925,6 @@ "member_type": "structure", "type": "list", }, - "IntegerParameters": { - "member_shape": "IntegerParameter", - "member_type": "structure", - "type": "list", - }, "InternalDependencyException": { "members": [{"name": "Message", "shape": "Message", "type": "string"}], "type": "structure", @@ -12439,11 +10030,6 @@ ], "type": "structure", }, - "IterationNumbers": { - "member_shape": "NonNegativeInteger", - "member_type": "integer", - "type": "list", - }, "JsonContentTypes": { "member_shape": "JsonContentType", "member_type": "string", @@ -12484,12 +10070,8 @@ ], "type": "structure", }, - "KendraIndexIdList": {"member_shape": "KendraIndexId", "member_type": "string", "type": "list"}, "KendraSettings": { - "members": [ - {"name": "Status", "shape": "FeatureStatus", "type": "string"}, - {"name": "IndexIdList", "shape": "KendraIndexIdList", "type": "list"}, - ], + "members": [{"name": "Status", "shape": "FeatureStatus", "type": "string"}], "type": "structure", }, "KernelGatewayAppSettings": { @@ -12515,13 +10097,6 @@ "type": "structure", }, "KernelSpecs": {"member_shape": "KernelSpec", "member_type": "structure", "type": "list"}, - "KmsEncryptionContext": { - "key_shape": "ConfigKey", - "key_type": "string", - "type": "map", - "value_shape": "ConfigValue", - "value_type": "string", - }, "LabelCounters": { "members": [ {"name": "TotalLabeled", "shape": "LabelCounter", "type": "integer"}, @@ -12665,51 +10240,6 @@ "member_type": "structure", "type": "list", }, - "LabelingPortalPolicy": { - "members": [ - { - "name": "LabelingPortalPolicyStatements", - "shape": "LabelingPortalPolicyStatements", - "type": "list", - } - ], - "type": "structure", - }, - "LabelingPortalPolicyGroups": { - "member_shape": "LabelingPortalPolicyGroup", - "member_type": "string", - "type": "list", - }, - "LabelingPortalPolicyResources": { - "member_shape": "LabelingPortalPolicyResource", - "member_type": "string", - "type": "list", - }, - "LabelingPortalPolicyStatement": { - "members": [ - { - "name": "LabelingPortalPolicyGroups", - "shape": "LabelingPortalPolicyGroups", - "type": "list", - }, - { - "name": "LabelingPortalPolicyAction", - "shape": "LabelingPortalPolicyAction", - "type": "string", - }, - { - "name": "LabelingPortalPolicyResources", - "shape": "LabelingPortalPolicyResources", - "type": "list", - }, - ], - "type": "structure", - }, - "LabelingPortalPolicyStatements": { - "member_shape": "LabelingPortalPolicyStatement", - "member_type": "structure", - "type": "list", - }, "LambdaStepMetadata": { "members": [ {"name": "Arn", "shape": "String256", "type": "string"}, @@ -12760,6 +10290,69 @@ ], "type": "structure", }, + "ListAIBenchmarkJobsRequest": { + "members": [ + {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + {"name": "NameContains", "shape": "NameContains", "type": "string"}, + {"name": "StatusEquals", "shape": "AIBenchmarkJobStatus", "type": "string"}, + {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, + {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, + {"name": "SortBy", "shape": "ListAIBenchmarkJobsSortBy", "type": "string"}, + {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, + ], + "type": "structure", + }, + "ListAIBenchmarkJobsResponse": { + "members": [ + {"name": "AIBenchmarkJobs", "shape": "AIBenchmarkJobSummaryList", "type": "list"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + ], + "type": "structure", + }, + "ListAIRecommendationJobsRequest": { + "members": [ + {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + {"name": "NameContains", "shape": "NameContains", "type": "string"}, + {"name": "StatusEquals", "shape": "AIRecommendationJobStatus", "type": "string"}, + {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, + {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, + {"name": "SortBy", "shape": "ListAIRecommendationJobsSortBy", "type": "string"}, + {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, + ], + "type": "structure", + }, + "ListAIRecommendationJobsResponse": { + "members": [ + { + "name": "AIRecommendationJobs", + "shape": "AIRecommendationJobSummaryList", + "type": "list", + }, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + ], + "type": "structure", + }, + "ListAIWorkloadConfigsRequest": { + "members": [ + {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + {"name": "NameContains", "shape": "NameContains", "type": "string"}, + {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, + {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, + {"name": "SortBy", "shape": "ListAIWorkloadConfigsSortBy", "type": "string"}, + {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, + ], + "type": "structure", + }, + "ListAIWorkloadConfigsResponse": { + "members": [ + {"name": "AIWorkloadConfigs", "shape": "AIWorkloadConfigSummaryList", "type": "list"}, + {"name": "NextToken", "shape": "NextToken", "type": "string"}, + ], + "type": "structure", + }, "ListActionsRequest": { "members": [ {"name": "SourceUri", "shape": "SourceUri", "type": "string"}, @@ -12925,25 +10518,6 @@ ], "type": "structure", }, - "ListAutoMLTasksForAutoMLJobRequest": { - "members": [ - {"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}, - {"name": "AutoMLTaskStatusEquals", "shape": "AutoMLTaskStatus", "type": "string"}, - {"name": "AutoMLTaskTypeEquals", "shape": "AutoMLTaskType", "type": "string"}, - {"name": "SortBy", "shape": "AutoMLTaskSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "AutoMLSortOrder", "type": "string"}, - {"name": "MaxResults", "shape": "AutoMLMaxResultsForTasks", "type": "integer"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListAutoMLTasksForAutoMLJobResponse": { - "members": [ - {"name": "AutoMLTasks", "shape": "AutoMLTasks", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListCandidatesForAutoMLJobRequest": { "members": [ {"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}, @@ -12963,50 +10537,6 @@ ], "type": "structure", }, - "ListCapacityScheduleOfferingsRequest": { - "members": [ - {"name": "InstanceType", "shape": "CapacityScheduleInstanceType", "type": "string"}, - {"name": "InstanceCount", "shape": "CapacityScheduleInstanceCount", "type": "integer"}, - {"name": "StartTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "DurationInHours", "shape": "CapacityScheduleDurationInHours", "type": "long"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListCapacityScheduleOfferingsResponse": { - "members": [ - { - "name": "CapacityScheduleOfferings", - "shape": "CapacityScheduleOfferings", - "type": "list", - }, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListCapacitySchedulesRequest": { - "members": [ - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "RequestedStartTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedStartTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StartTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StartTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "SortBy", "shape": "CapacityScheduleSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "CapacityScheduleSortOrder", "type": "string"}, - {"name": "Filters", "shape": "CapacityScheduleFilters", "type": "list"}, - ], - "type": "structure", - }, - "ListCapacitySchedulesResponse": { - "members": [ - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "CapacityScheduleDetails", "shape": "CapacityScheduleDetails", "type": "list"}, - ], - "type": "structure", - }, "ListClusterEventsRequest": { "members": [ {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, @@ -13150,24 +10680,6 @@ ], "type": "structure", }, - "ListComponentJobsForAutoMLJobRequest": { - "members": [ - {"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}, - {"name": "StatusEquals", "shape": "ComponentJobStatus", "type": "string"}, - {"name": "SortBy", "shape": "AutoMLSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "AutoMLSortOrder", "type": "string"}, - {"name": "MaxResults", "shape": "AutoMLMaxResults", "type": "integer"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListComponentJobsForAutoMLJobResponse": { - "members": [ - {"name": "ComponentJobSummaries", "shape": "ComponentJobSummaries", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListComputeQuotasRequest": { "members": [ {"name": "CreatedAfter", "shape": "Timestamp", "type": "timestamp"}, @@ -13209,30 +10721,6 @@ ], "type": "structure", }, - "ListCustomMonitoringJobDefinitionsRequest": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "SortBy", "shape": "MonitoringJobDefinitionSortKey", "type": "string"}, - {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "NameContains", "shape": "NameContains", "type": "string"}, - {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "ListCustomMonitoringJobDefinitionsResponse": { - "members": [ - { - "name": "JobDefinitionSummaries", - "shape": "MonitoringJobDefinitionSummaryList", - "type": "list", - }, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListDataQualityJobDefinitionsRequest": { "members": [ {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, @@ -13403,26 +10891,6 @@ ], "type": "structure", }, - "ListEvaluationJobsRequest": { - "members": [ - {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "NameContains", "shape": "NameContains", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "SortBy", "shape": "EvaluationJobSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, - {"name": "StatusEquals", "shape": "EvaluationJobStatus", "type": "string"}, - ], - "type": "structure", - }, - "ListEvaluationJobsResponse": { - "members": [ - {"name": "EvaluationJobSummaries", "shape": "EvaluationJobSummaries", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListExperimentsRequest": { "members": [ {"name": "CreatedAfter", "shape": "Timestamp", "type": "timestamp"}, @@ -13469,72 +10937,16 @@ "ListFlowDefinitionsRequest": { "members": [ {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListFlowDefinitionsResponse": { - "members": [ - {"name": "FlowDefinitionSummaries", "shape": "FlowDefinitionSummaries", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListGroundTruthJobsRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListGroundTruthJobsResponse": { - "members": [ - { - "name": "GroundTruthJobSummaries", - "shape": "GroundTruthJobSummaryList", - "type": "list", - }, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListGroundTruthProjectsRequest": { - "members": [ - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListGroundTruthProjectsResponse": { - "members": [ - { - "name": "GroundTruthProjectSummaries", - "shape": "GroundTruthProjectSummaryList", - "type": "list", - }, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListGroundTruthWorkflowsRequest": { - "members": [ - {"name": "GroundTruthProjectName", "shape": "GroundTruthProjectName", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, + {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, + {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, {"name": "NextToken", "shape": "NextToken", "type": "string"}, + {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, ], "type": "structure", }, - "ListGroundTruthWorkflowsResponse": { + "ListFlowDefinitionsResponse": { "members": [ - { - "name": "GroundTruthWorkflowSummaries", - "shape": "GroundTruthWorkflowSummaryList", - "type": "list", - }, + {"name": "FlowDefinitionSummaries", "shape": "FlowDefinitionSummaries", "type": "list"}, {"name": "NextToken", "shape": "NextToken", "type": "string"}, ], "type": "structure", @@ -14106,7 +11518,6 @@ {"name": "NameContains", "shape": "NameContains", "type": "string"}, {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -14205,7 +11616,6 @@ "type": "string", }, {"name": "MonitoringTypeEquals", "shape": "MonitoringType", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -14239,7 +11649,6 @@ "type": "string", }, {"name": "MonitoringTypeEquals", "shape": "MonitoringType", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -14495,7 +11904,6 @@ {"name": "NextToken", "shape": "NextToken", "type": "string"}, {"name": "SortBy", "shape": "ProjectSortBy", "type": "string"}, {"name": "SortOrder", "shape": "ProjectSortOrder", "type": "string"}, - {"name": "ProjectStatus", "shape": "ProjectStatus", "type": "string"}, ], "type": "structure", }, @@ -14506,31 +11914,6 @@ ], "type": "structure", }, - "ListQuotaAllocationsRequest": { - "members": [ - {"name": "CreatedAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreatedBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "NameContains", "shape": "EntityName", "type": "string"}, - {"name": "QuotaAllocationStatus", "shape": "SchedulerResourceStatus", "type": "string"}, - {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, - {"name": "SortBy", "shape": "SortQuotaBy", "type": "string"}, - {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListQuotaAllocationsResponse": { - "members": [ - { - "name": "QuotaAllocationSummaries", - "shape": "QuotaAllocationSummaryList", - "type": "list", - }, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListResourceCatalogsRequest": { "members": [ {"name": "NameContains", "shape": "ResourceCatalogName", "type": "string"}, @@ -14550,59 +11933,6 @@ ], "type": "structure", }, - "ListSharedModelEventsRequest": { - "members": [ - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListSharedModelEventsResponse": { - "members": [ - {"name": "Events", "shape": "Events", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListSharedModelVersionsRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "SortBy", "shape": "SharedModelsSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "SharedModelsSortOrder", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListSharedModelVersionsResponse": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersions", "shape": "SharedModelVersions", "type": "list"}, - {"name": "Owner", "shape": "UserProfileName", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, - "ListSharedModelsRequest": { - "members": [ - {"name": "CreationTimeBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreationTimeAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "SortBy", "shape": "SharedModelsSortBy", "type": "string"}, - {"name": "SortOrder", "shape": "SharedModelsSortOrder", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListSharedModelsResponse": { - "members": [ - {"name": "SharedModels", "shape": "SharedModels", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListSpacesRequest": { "members": [ {"name": "NextToken", "shape": "NextToken", "type": "string"}, @@ -14691,21 +12021,6 @@ ], "type": "structure", }, - "ListTagsInternalInput": { - "members": [ - {"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "MaxResults", "shape": "ListTagsMaxResults", "type": "integer"}, - ], - "type": "structure", - }, - "ListTagsInternalOutput": { - "members": [ - {"name": "Tags", "shape": "TagList", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListTagsOutput": { "members": [ {"name": "Tags", "shape": "TagList", "type": "list"}, @@ -14809,28 +12124,6 @@ "member_type": "string", "type": "list", }, - "ListTrialComponentsInternalRequest": { - "members": [ - {"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "TrialName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "SourceArn", "shape": "String256", "type": "string"}, - {"name": "CreatedAfter", "shape": "Timestamp", "type": "timestamp"}, - {"name": "CreatedBefore", "shape": "Timestamp", "type": "timestamp"}, - {"name": "SortBy", "shape": "SortTrialComponentsBy", "type": "string"}, - {"name": "SortOrder", "shape": "SortOrder", "type": "string"}, - {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "ListTrialComponentsInternalResponse": { - "members": [ - {"name": "TrialComponentSummaries", "shape": "TrialComponentSummaries", "type": "list"}, - {"name": "NextToken", "shape": "NextToken", "type": "string"}, - ], - "type": "structure", - }, "ListTrialComponentsRequest": { "members": [ {"name": "ExperimentName", "shape": "ExperimentEntityName", "type": "string"}, @@ -14939,26 +12232,6 @@ ], "type": "structure", }, - "LocalAppLaunchConfiguration": { - "members": [ - {"name": "ParentAppArn", "shape": "AppArn", "type": "string"}, - {"name": "Services", "shape": "Services", "type": "list"}, - ], - "type": "structure", - }, - "LogRoutingConfig": { - "members": [ - {"name": "LogGroup", "shape": "CWLogGroup", "type": "string"}, - {"name": "LogStreamPrefix", "shape": "CWLogStream", "type": "string"}, - {"name": "MetricsNamespace", "shape": "CWMetricNamespace", "type": "string"}, - { - "name": "MetricsHostDimensionValue", - "shape": "MetricsHostDimensionValue", - "type": "string", - }, - ], - "type": "structure", - }, "MLflowConfiguration": { "members": [ {"name": "MlflowResourceArn", "shape": "MLflowArn", "type": "string"}, @@ -14977,13 +12250,6 @@ "value_shape": "String2048", "value_type": "string", }, - "MapString256": { - "key_shape": "String256", - "key_type": "string", - "type": "map", - "value_shape": "String256", - "value_type": "string", - }, "MemberDefinition": { "members": [ { @@ -15000,20 +12266,12 @@ "member_type": "structure", "type": "list", }, - "MembershipRule": { - "members": [ - {"name": "TargetMemberDefinition", "shape": "TargetMemberDefinition", "type": "string"}, - {"name": "FilterExpression", "shape": "FilterExpression", "type": "string"}, - ], - "type": "structure", - }, "MetadataProperties": { "members": [ {"name": "CommitId", "shape": "MetadataPropertyValue", "type": "string"}, {"name": "Repository", "shape": "MetadataPropertyValue", "type": "string"}, {"name": "GeneratedBy", "shape": "MetadataPropertyValue", "type": "string"}, {"name": "ProjectId", "shape": "MetadataPropertyValue", "type": "string"}, - {"name": "BranchName", "shape": "MetadataPropertyValue", "type": "string"}, ], "type": "structure", }, @@ -15054,10 +12312,8 @@ {"name": "MetricStat", "shape": "MetricStatistic", "type": "string"}, {"name": "Period", "shape": "Period", "type": "string"}, {"name": "XAxisType", "shape": "XAxisType", "type": "string"}, - {"name": "Start", "shape": "Timestamp", "type": "timestamp"}, - {"name": "End", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StartIterationNumber", "shape": "NonNegativeInteger", "type": "integer"}, - {"name": "EndIterationNumber", "shape": "NonNegativeInteger", "type": "integer"}, + {"name": "Start", "shape": "Long", "type": "long"}, + {"name": "End", "shape": "Long", "type": "long"}, ], "type": "structure", }, @@ -15065,9 +12321,8 @@ "MetricQueryResult": { "members": [ {"name": "Status", "shape": "MetricQueryResultStatus", "type": "string"}, - {"name": "Message", "shape": "String", "type": "string"}, - {"name": "IterationNumbers", "shape": "IterationNumbers", "type": "list"}, - {"name": "Timestamps", "shape": "Timestamps", "type": "list"}, + {"name": "Message", "shape": "Message", "type": "string"}, + {"name": "XAxisValues", "shape": "XAxisValues", "type": "list"}, {"name": "MetricValues", "shape": "MetricValues", "type": "list"}, ], "type": "structure", @@ -15122,7 +12377,6 @@ }, "MlflowConfig": { "members": [ - {"name": "MlflowTrackingServerArn", "shape": "MlFlowResourceArn", "type": "string"}, {"name": "MlflowResourceArn", "shape": "MlFlowResourceArn", "type": "string"}, {"name": "MlflowExperimentName", "shape": "MlflowExperimentName", "type": "string"}, {"name": "MlflowRunName", "shape": "MlflowRunName", "type": "string"}, @@ -15187,38 +12441,6 @@ ], "type": "structure", }, - "ModelBiasJobDefinition": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "ModelBiasBaselineConfig", - "shape": "ModelBiasBaselineConfig", - "type": "structure", - }, - { - "name": "ModelBiasAppSpecification", - "shape": "ModelBiasAppSpecification", - "type": "structure", - }, - {"name": "ModelBiasJobInput", "shape": "ModelBiasJobInput", "type": "structure"}, - { - "name": "ModelBiasJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - ], - "type": "structure", - }, "ModelBiasJobInput": { "members": [ {"name": "EndpointInput", "shape": "EndpointInput", "type": "structure"}, @@ -15345,7 +12567,6 @@ "shape": "RecommendationJobCompilationJobName", "type": "string", }, - {"name": "Image", "shape": "ContainerImage", "type": "string"}, ], "type": "structure", }, @@ -15424,31 +12645,6 @@ "shape": "MonitoringExecutionSummary", "type": "structure", }, - { - "name": "CustomMonitoringJobDefinition", - "shape": "CustomMonitoringJobDefinition", - "type": "structure", - }, - { - "name": "DataQualityJobDefinition", - "shape": "DataQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelQualityJobDefinition", - "shape": "ModelQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelBiasJobDefinition", - "shape": "ModelBiasJobDefinition", - "type": "structure", - }, - { - "name": "ModelExplainabilityJobDefinition", - "shape": "ModelExplainabilityJobDefinition", - "type": "structure", - }, {"name": "BatchTransformInput", "shape": "BatchTransformInput", "type": "structure"}, ], "type": "structure", @@ -15471,121 +12667,46 @@ }, "ModelDeployConfig": { "members": [ - {"name": "ModelDeployMode", "shape": "ModelDeployMode", "type": "string"}, { "name": "AutoGenerateEndpointName", "shape": "AutoGenerateEndpointName", "type": "boolean", }, {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - { - "name": "EndpointConfigDefinitions", - "shape": "AutoMLEndpointConfigDefinitionList", - "type": "list", - }, - { - "name": "EndpointDefinitions", - "shape": "AutoMLEndpointDefinitionList", - "type": "list", - }, - ], - "type": "structure", - }, - "ModelDeployEndpoint": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointArn", "shape": "EndpointArn", "type": "string"}, - ], - "type": "structure", - }, - "ModelDeployEndpointConfig": { - "members": [ - {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, - {"name": "EndpointConfigArn", "shape": "EndpointConfigArn", "type": "string"}, ], "type": "structure", }, - "ModelDeployEndpointConfigList": { - "member_shape": "ModelDeployEndpointConfig", - "member_type": "structure", - "type": "list", - }, - "ModelDeployEndpointList": { - "member_shape": "ModelDeployEndpoint", - "member_type": "structure", - "type": "list", - }, "ModelDeployResult": { - "members": [ - {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "EndpointConfigs", "shape": "ModelDeployEndpointConfigList", "type": "list"}, - {"name": "Endpoints", "shape": "ModelDeployEndpointList", "type": "list"}, - ], + "members": [{"name": "EndpointName", "shape": "EndpointName", "type": "string"}], "type": "structure", }, "ModelDigests": { "members": [{"name": "ArtifactDigest", "shape": "ArtifactDigest", "type": "string"}], - "type": "structure", - }, - "ModelError": { - "members": [ - {"name": "Message", "shape": "Message", "type": "string"}, - {"name": "OriginalStatusCode", "shape": "StatusCode", "type": "integer"}, - {"name": "OriginalMessage", "shape": "Message", "type": "string"}, - {"name": "LogStreamArn", "shape": "LogStreamArn", "type": "string"}, - ], - "type": "structure", - }, - "ModelExplainabilityAppSpecification": { - "members": [ - {"name": "ImageUri", "shape": "ImageUri", "type": "string"}, - {"name": "ConfigUri", "shape": "S3Uri", "type": "string"}, - {"name": "Environment", "shape": "MonitoringEnvironmentMap", "type": "map"}, - ], - "type": "structure", - }, - "ModelExplainabilityBaselineConfig": { - "members": [ - {"name": "BaseliningJobName", "shape": "ProcessingJobName", "type": "string"}, - { - "name": "ConstraintsResource", - "shape": "MonitoringConstraintsResource", - "type": "structure", - }, - ], - "type": "structure", - }, - "ModelExplainabilityJobDefinition": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "ModelExplainabilityBaselineConfig", - "shape": "ModelExplainabilityBaselineConfig", - "type": "structure", - }, - { - "name": "ModelExplainabilityAppSpecification", - "shape": "ModelExplainabilityAppSpecification", - "type": "structure", - }, - { - "name": "ModelExplainabilityJobInput", - "shape": "ModelExplainabilityJobInput", - "type": "structure", - }, - { - "name": "ModelExplainabilityJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, + "type": "structure", + }, + "ModelError": { + "members": [ + {"name": "Message", "shape": "Message", "type": "string"}, + {"name": "OriginalStatusCode", "shape": "StatusCode", "type": "integer"}, + {"name": "OriginalMessage", "shape": "Message", "type": "string"}, + {"name": "LogStreamArn", "shape": "LogStreamArn", "type": "string"}, + ], + "type": "structure", + }, + "ModelExplainabilityAppSpecification": { + "members": [ + {"name": "ImageUri", "shape": "ImageUri", "type": "string"}, + {"name": "ConfigUri", "shape": "S3Uri", "type": "string"}, + {"name": "Environment", "shape": "MonitoringEnvironmentMap", "type": "map"}, + ], + "type": "structure", + }, + "ModelExplainabilityBaselineConfig": { + "members": [ + {"name": "BaseliningJobName", "shape": "ProcessingJobName", "type": "string"}, { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", + "name": "ConstraintsResource", + "shape": "MonitoringConstraintsResource", "type": "structure", }, ], @@ -15613,10 +12734,6 @@ "members": [{"name": "DataInputConfig", "shape": "DataInputConfig", "type": "string"}], "type": "structure", }, - "ModelInsightsTaskContext": { - "members": [{"name": "CandidateName", "shape": "CandidateName", "type": "string"}], - "type": "structure", - }, "ModelLatencyThreshold": { "members": [ {"name": "Percentile", "shape": "String64", "type": "string"}, @@ -15637,7 +12754,6 @@ ], "type": "structure", }, - "ModelList": {"member_shape": "EvaluationJobModel", "member_type": "structure", "type": "list"}, "ModelMetadataFilter": { "members": [ {"name": "Name", "shape": "ModelMetadataFilterType", "type": "string"}, @@ -15721,11 +12837,6 @@ {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "MetadataProperties", "shape": "MetadataProperties", "type": "structure"}, {"name": "ModelMetrics", "shape": "ModelMetrics", "type": "structure"}, - { - "name": "DeploymentSpecification", - "shape": "DeploymentSpecification", - "type": "structure", - }, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, {"name": "ApprovalDescription", "shape": "ApprovalDescription", "type": "string"}, @@ -15773,7 +12884,11 @@ {"name": "Framework", "shape": "String", "type": "string"}, {"name": "FrameworkVersion", "shape": "ModelPackageFrameworkVersion", "type": "string"}, {"name": "NearestModelName", "shape": "String", "type": "string"}, - {"name": "SamplePayloadUrl", "shape": "Url", "type": "string"}, + { + "name": "AdditionalModelDataSources", + "shape": "AdditionalModelDataSources", + "type": "list", + }, { "name": "AdditionalS3DataSource", "shape": "AdditionalS3DataSource", @@ -15952,38 +13067,6 @@ ], "type": "structure", }, - "ModelQualityJobDefinition": { - "members": [ - {"name": "JobDefinitionArn", "shape": "MonitoringJobDefinitionArn", "type": "string"}, - {"name": "JobDefinitionName", "shape": "MonitoringJobDefinitionName", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - { - "name": "ModelQualityBaselineConfig", - "shape": "ModelQualityBaselineConfig", - "type": "structure", - }, - { - "name": "ModelQualityAppSpecification", - "shape": "ModelQualityAppSpecification", - "type": "structure", - }, - {"name": "ModelQualityJobInput", "shape": "ModelQualityJobInput", "type": "structure"}, - { - "name": "ModelQualityJobOutputConfig", - "shape": "MonitoringOutputConfig", - "type": "structure", - }, - {"name": "JobResources", "shape": "MonitoringResources", "type": "structure"}, - {"name": "NetworkConfig", "shape": "MonitoringNetworkConfig", "type": "structure"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - { - "name": "StoppingCondition", - "shape": "MonitoringStoppingCondition", - "type": "structure", - }, - ], - "type": "structure", - }, "ModelQualityJobInput": { "members": [ {"name": "EndpointInput", "shape": "EndpointInput", "type": "structure"}, @@ -16199,10 +13282,7 @@ "type": "list", }, "MonitoringCsvDatasetFormat": { - "members": [ - {"name": "Header", "shape": "Boolean", "type": "boolean"}, - {"name": "Compressed", "shape": "Boolean", "type": "boolean"}, - ], + "members": [{"name": "Header", "shape": "Boolean", "type": "boolean"}], "type": "structure", }, "MonitoringDatasetFormat": { @@ -16236,8 +13316,6 @@ "type": "string", }, {"name": "MonitoringType", "shape": "MonitoringType", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, - {"name": "MonitoringExecutionId", "shape": "MonitoringExecutionId", "type": "string"}, ], "type": "structure", }, @@ -16252,7 +13330,6 @@ }, "MonitoringInput": { "members": [ - {"name": "ProcessingInputs", "shape": "MonitoringProcessingInputs", "type": "list"}, {"name": "EndpointInput", "shape": "EndpointInput", "type": "structure"}, {"name": "BatchTransformInput", "shape": "BatchTransformInput", "type": "structure"}, ], @@ -16303,7 +13380,6 @@ }, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "EndpointName", "shape": "EndpointName", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -16313,10 +13389,7 @@ "type": "list", }, "MonitoringJsonDatasetFormat": { - "members": [ - {"name": "Line", "shape": "Boolean", "type": "boolean"}, - {"name": "Compressed", "shape": "Boolean", "type": "boolean"}, - ], + "members": [{"name": "Line", "shape": "Boolean", "type": "boolean"}], "type": "structure", }, "MonitoringNetworkConfig": { @@ -16348,11 +13421,6 @@ "type": "list", }, "MonitoringParquetDatasetFormat": {"members": [], "type": "structure"}, - "MonitoringProcessingInputs": { - "member_shape": "ProcessingInput", - "member_type": "structure", - "type": "list", - }, "MonitoringResources": { "members": [ {"name": "ClusterConfig", "shape": "MonitoringClusterConfig", "type": "structure"} @@ -16387,32 +13455,6 @@ "shape": "MonitoringExecutionSummary", "type": "structure", }, - { - "name": "CustomMonitoringJobDefinition", - "shape": "CustomMonitoringJobDefinition", - "type": "structure", - }, - { - "name": "DataQualityJobDefinition", - "shape": "DataQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelQualityJobDefinition", - "shape": "ModelQualityJobDefinition", - "type": "structure", - }, - { - "name": "ModelBiasJobDefinition", - "shape": "ModelBiasJobDefinition", - "type": "structure", - }, - { - "name": "ModelExplainabilityJobDefinition", - "shape": "ModelExplainabilityJobDefinition", - "type": "structure", - }, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -16453,7 +13495,6 @@ "type": "string", }, {"name": "MonitoringType", "shape": "MonitoringType", "type": "string"}, - {"name": "VariantName", "shape": "VariantName", "type": "string"}, ], "type": "structure", }, @@ -16477,18 +13518,7 @@ "type": "structure", }, "MultiModelConfig": { - "members": [ - {"name": "ModelCacheSetting", "shape": "ModelCacheSetting", "type": "string"}, - { - "name": "ModelLoadConcurrencyFactor", - "shape": "ModelLoadConcurrencyFactor", - "type": "integer", - }, - ], - "type": "structure", - }, - "NeoResourceConfig": { - "members": [{"name": "VolumeKmsKeyId", "shape": "KmsKeyId", "type": "string"}], + "members": [{"name": "ModelCacheSetting", "shape": "ModelCacheSetting", "type": "string"}], "type": "structure", }, "NeoVpcConfig": { @@ -16528,12 +13558,13 @@ ], "type": "structure", }, - "NetworkInterfaceTags": {"member_shape": "Tag", "member_type": "structure", "type": "list"}, "NodeAdditionResult": { "members": [ {"name": "NodeLogicalId", "shape": "ClusterNodeLogicalId", "type": "string"}, {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, {"name": "Status", "shape": "ClusterInstanceStatus", "type": "string"}, + {"name": "AvailabilityZones", "shape": "ClusterAvailabilityZones", "type": "list"}, + {"name": "InstanceTypes", "shape": "ClusterInstanceTypes", "type": "list"}, ], "type": "structure", }, @@ -16676,18 +13707,9 @@ "type": "structure", }, "OidcMemberDefinition": { - "members": [ - {"name": "Groups", "shape": "Groups", "type": "list"}, - {"name": "Group", "shape": "Group", "type": "string"}, - {"name": "MemberDefinitionId", "shape": "MemberDefinitionId", "type": "string"}, - ], + "members": [{"name": "Groups", "shape": "Groups", "type": "list"}], "type": "structure", }, - "OnStartDeepHealthCheck": { - "member_shape": "DeepHealthCheckType", - "member_type": "string", - "type": "list", - }, "OnStartDeepHealthChecks": { "member_shape": "DeepHealthCheckType", "member_type": "string", @@ -16706,55 +13728,6 @@ "members": [{"name": "TtlDuration", "shape": "TtlDuration", "type": "structure"}], "type": "structure", }, - "OnlineStoreMetadata": { - "members": [ - {"name": "StorageAccountId", "shape": "AccountId", "type": "string"}, - {"name": "IsOnlineStoreReplica", "shape": "Boolean", "type": "boolean"}, - { - "name": "OnlineStoreReplicaMetadata", - "shape": "OnlineStoreReplicaMetadata", - "type": "structure", - }, - ], - "type": "structure", - }, - "OnlineStoreReplica": { - "members": [ - {"name": "RegionName", "shape": "RegionName", "type": "string"}, - { - "name": "OnlineStoreReplicaStatus", - "shape": "OnlineStoreReplicaStatus", - "type": "structure", - }, - ], - "type": "structure", - }, - "OnlineStoreReplicaConfig": { - "members": [ - {"name": "SecurityConfig", "shape": "OnlineStoreSecurityConfig", "type": "structure"} - ], - "type": "structure", - }, - "OnlineStoreReplicaMetadata": { - "members": [ - {"name": "SourceRegionName", "shape": "RegionName", "type": "string"}, - {"name": "SourceTableName", "shape": "DynamoDBTableName", "type": "string"}, - {"name": "SourceFeatureGroupArn", "shape": "FeatureGroupArn", "type": "string"}, - ], - "type": "structure", - }, - "OnlineStoreReplicaStatus": { - "members": [ - {"name": "Status", "shape": "OnlineStoreReplicaStatusValue", "type": "string"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - ], - "type": "structure", - }, - "OnlineStoreReplicas": { - "member_shape": "OnlineStoreReplica", - "member_type": "structure", - "type": "list", - }, "OnlineStoreSecurityConfig": { "members": [{"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}], "type": "structure", @@ -16771,11 +13744,6 @@ "shape": "ModelCompilationConfig", "type": "structure", }, - { - "name": "SpeculativeDecodingConfig", - "shape": "SpeculativeDecodingConfig", - "type": "structure", - }, {"name": "ModelShardingConfig", "shape": "ModelShardingConfig", "type": "structure"}, { "name": "ModelSpeculativeDecodingConfig", @@ -16790,17 +13758,6 @@ "member_type": "structure", "type": "list", }, - "OptimizationJobDraftModel": { - "members": [ - {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, - { - "name": "ModelAccessConfig", - "shape": "OptimizationModelAccessConfig", - "type": "structure", - }, - ], - "type": "structure", - }, "OptimizationJobEnvironmentVariables": { "key_shape": "NonEmptyString256", "key_type": "string", @@ -16908,18 +13865,6 @@ "member_type": "string", "type": "list", }, - "OutputChannel": { - "members": [ - {"name": "ChannelName", "shape": "ChannelName", "type": "string"}, - {"name": "LocalPath", "shape": "DirectoryPath", "type": "string"}, - {"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}, - {"name": "ContinuousUpload", "shape": "ContinuousUpload", "type": "boolean"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "KmsEncryptionContext", "shape": "KmsEncryptionContext", "type": "map"}, - ], - "type": "structure", - }, - "OutputChannels": {"member_shape": "OutputChannel", "member_type": "structure", "type": "list"}, "OutputConfig": { "members": [ {"name": "S3OutputLocation", "shape": "S3Uri", "type": "string"}, @@ -16935,13 +13880,6 @@ {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}, {"name": "CompressionType", "shape": "OutputCompressionType", "type": "string"}, - { - "name": "RemoveJobNameFromS3OutputPath", - "shape": "RemoveJobNameFromS3OutputPath", - "type": "boolean", - }, - {"name": "DisableModelUpload", "shape": "DisableModelUpload", "type": "boolean"}, - {"name": "Channels", "shape": "OutputChannels", "type": "list"}, ], "type": "structure", }, @@ -16957,15 +13895,6 @@ "member_type": "structure", "type": "list", }, - "OverQuota": { - "members": [ - {"name": "AllowOverQuota", "shape": "Boolean", "type": "boolean"}, - {"name": "UseDedicatedCapacity", "shape": "Boolean", "type": "boolean"}, - {"name": "FairShareWeight", "shape": "Integer", "type": "integer"}, - {"name": "BurstLimit", "shape": "BurstLimit", "type": "structure"}, - ], - "type": "structure", - }, "OwnershipSettings": { "members": [{"name": "OwnerUserProfileName", "shape": "UserProfileName", "type": "string"}], "type": "structure", @@ -17103,13 +14032,6 @@ "members": [{"name": "Bytes", "shape": "PartBlob", "type": "blob"}], "type": "structure", }, - "PayloadSampling": { - "members": [ - {"name": "SamplingType", "shape": "PayloadSamplingType", "type": "string"}, - {"name": "SamplingSeed", "shape": "PayloadSamplingSeed", "type": "integer"}, - ], - "type": "structure", - }, "PendingDeploymentSummary": { "members": [ {"name": "EndpointConfigName", "shape": "EndpointConfigName", "type": "string"}, @@ -17124,7 +14046,6 @@ "shape": "PendingProductionVariantSummaryList", "type": "list", }, - {"name": "GraphConfigName", "shape": "GraphConfigName", "type": "string"}, ], "type": "structure", }, @@ -17163,16 +14084,6 @@ "shape": "ProductionVariantRoutingConfig", "type": "structure", }, - { - "name": "CapacitySchedulesConfig", - "shape": "ProductionVariantCapacitySchedulesConfig", - "type": "structure", - }, - { - "name": "CapacityReservationConfig", - "shape": "ProductionVariantCapacityReservationSummary", - "type": "structure", - }, ], "type": "structure", }, @@ -17181,15 +14092,6 @@ "member_type": "structure", "type": "list", }, - "PersistentVolumeConfiguration": { - "members": [{"name": "SizeInGB", "shape": "PersistentVolumeSizeInGB", "type": "integer"}], - "type": "structure", - }, - "PersistentVolumeNames": { - "member_shape": "PersistentVolumeName", - "member_type": "string", - "type": "list", - }, "Phase": { "members": [ {"name": "InitialNumberOfUsers", "shape": "InitialNumberOfUsers", "type": "integer"}, @@ -17275,7 +14177,6 @@ "shape": "PipelineVersionName", "type": "string", }, - {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", }, @@ -17310,7 +14211,6 @@ {"name": "ProcessingJob", "shape": "ProcessingJobStepMetadata", "type": "structure"}, {"name": "TransformJob", "shape": "TransformJobStepMetadata", "type": "structure"}, {"name": "TuningJob", "shape": "TuningJobStepMetaData", "type": "structure"}, - {"name": "CompilationJob", "shape": "CompilationJobStepMetadata", "type": "structure"}, {"name": "Model", "shape": "ModelStepMetadata", "type": "structure"}, {"name": "RegisterModel", "shape": "RegisterModelStepMetadata", "type": "structure"}, {"name": "Condition", "shape": "ConditionStepMetadata", "type": "structure"}, @@ -17409,7 +14309,6 @@ "members": [ {"name": "PipelineArn", "shape": "PipelineArn", "type": "string"}, {"name": "PipelineVersionId", "shape": "PipelineVersionId", "type": "long"}, - {"name": "PipelineVersionArn", "shape": "PipelineVersionArn", "type": "string"}, { "name": "PipelineVersionDisplayName", "shape": "PipelineVersionName", @@ -17486,10 +14385,6 @@ "members": [{"name": "PredefinedMetricType", "shape": "String", "type": "string"}], "type": "structure", }, - "PreemptionConfig": { - "members": [{"name": "AllowSameTeamPreemption", "shape": "Boolean", "type": "boolean"}], - "type": "structure", - }, "PresignedUrlAccessConfig": { "members": [ {"name": "AcceptEula", "shape": "Boolean", "type": "boolean"}, @@ -17538,30 +14433,11 @@ ], "type": "structure", }, - "ProcessingInputInternal": { - "members": [ - {"name": "InputName", "shape": "String", "type": "string"}, - {"name": "AppManaged", "shape": "AppManaged", "type": "boolean"}, - {"name": "S3Input", "shape": "ProcessingS3InputInternal", "type": "structure"}, - {"name": "DatasetDefinition", "shape": "DatasetDefinition", "type": "structure"}, - ], - "type": "structure", - }, "ProcessingInputs": { "member_shape": "ProcessingInput", "member_type": "structure", "type": "list", }, - "ProcessingInputsInternal": { - "member_shape": "ProcessingInputInternal", - "member_type": "structure", - "type": "list", - }, - "ProcessingInputsTraining": { - "member_shape": "ProcessingInputInternal", - "member_type": "structure", - "type": "list", - }, "ProcessingJob": { "members": [ {"name": "ProcessingInputs", "shape": "ProcessingInputs", "type": "list"}, @@ -17590,8 +14466,6 @@ {"name": "ProcessingStartTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "MonitoringScheduleArn", "shape": "MonitoringScheduleArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, @@ -17599,28 +14473,6 @@ ], "type": "structure", }, - "ProcessingJobConfig": { - "members": [ - {"name": "ProcessingInputs", "shape": "ProcessingInputsTraining", "type": "list"}, - { - "name": "ProcessingOutputConfig", - "shape": "ProcessingOutputConfigTraining", - "type": "structure", - }, - { - "name": "UpstreamProcessingOutputConfig", - "shape": "UpstreamProcessingOutputConfig", - "type": "structure", - }, - {"name": "ProcessingResult", "shape": "ProcessingResult", "type": "structure"}, - { - "name": "ProcessingUpstreamSvcConfig", - "shape": "ProcessingUpstreamSvcConfig", - "type": "structure", - }, - ], - "type": "structure", - }, "ProcessingJobStepMetadata": { "members": [{"name": "Arn", "shape": "ProcessingJobArn", "type": "string"}], "type": "structure", @@ -17663,73 +14515,23 @@ ], "type": "structure", }, - "ProcessingOutputConfigTraining": { - "members": [ - {"name": "Outputs", "shape": "ProcessingOutputsTraining", "type": "list"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, - "ProcessingOutputTraining": { - "members": [ - {"name": "OutputName", "shape": "String", "type": "string"}, - {"name": "S3Output", "shape": "ProcessingS3Output", "type": "structure"}, - { - "name": "FeatureStoreOutput", - "shape": "ProcessingFeatureStoreOutput", - "type": "structure", - }, - {"name": "AppManaged", "shape": "AppManaged", "type": "boolean"}, - ], - "type": "structure", - }, "ProcessingOutputs": { "member_shape": "ProcessingOutput", "member_type": "structure", "type": "list", }, - "ProcessingOutputsTraining": { - "member_shape": "ProcessingOutputTraining", - "member_type": "structure", - "type": "list", - }, "ProcessingResources": { - "members": [ - {"name": "ClusterConfig", "shape": "ProcessingClusterConfig", "type": "structure"} - ], - "type": "structure", - }, - "ProcessingResult": { - "members": [ - {"name": "ExitMessage", "shape": "ExitMessage", "type": "string"}, - {"name": "InternalFailureReason", "shape": "FailureReason", "type": "string"}, - {"name": "FaultEntity", "shape": "FaultEntity", "type": "string"}, - {"name": "Payer", "shape": "Payer", "type": "string"}, - ], - "type": "structure", - }, - "ProcessingS3Input": { - "members": [ - {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "LocalPath", "shape": "ProcessingLocalPath", "type": "string"}, - {"name": "S3DataType", "shape": "ProcessingS3DataType", "type": "string"}, - {"name": "S3InputMode", "shape": "ProcessingS3InputMode", "type": "string"}, - { - "name": "S3DataDistributionType", - "shape": "ProcessingS3DataDistributionType", - "type": "string", - }, - {"name": "S3CompressionType", "shape": "ProcessingS3CompressionType", "type": "string"}, + "members": [ + {"name": "ClusterConfig", "shape": "ProcessingClusterConfig", "type": "structure"} ], "type": "structure", }, - "ProcessingS3InputInternal": { + "ProcessingS3Input": { "members": [ {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, {"name": "LocalPath", "shape": "ProcessingLocalPath", "type": "string"}, - {"name": "S3DataType", "shape": "ProcessingS3DataTypeInternal", "type": "string"}, + {"name": "S3DataType", "shape": "ProcessingS3DataType", "type": "string"}, {"name": "S3InputMode", "shape": "ProcessingS3InputMode", "type": "string"}, - {"name": "S3DownloadMode", "shape": "ProcessingS3DownloadMode", "type": "string"}, { "name": "S3DataDistributionType", "shape": "ProcessingS3DataDistributionType", @@ -17757,23 +14559,6 @@ ], "type": "structure", }, - "ProcessingUpstreamS3Output": { - "members": [ - {"name": "S3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "LocalPath", "shape": "ProcessingLocalPath", "type": "string"}, - {"name": "S3UploadMode", "shape": "ProcessingS3UploadMode", "type": "string"}, - {"name": "RoleArn", "shape": "RoleArn", "type": "string"}, - ], - "type": "structure", - }, - "ProcessingUpstreamSvcConfig": { - "members": [ - {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "MonitoringScheduleArn", "shape": "MonitoringScheduleArn", "type": "string"}, - {"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}, - ], - "type": "structure", - }, "ProductListings": {"member_shape": "String", "member_type": "string", "type": "list"}, "ProductionVariant": { "members": [ @@ -17823,21 +14608,11 @@ "shape": "ProductionVariantRoutingConfig", "type": "structure", }, - { - "name": "CapacitySchedulesConfig", - "shape": "ProductionVariantCapacitySchedulesConfig", - "type": "structure", - }, { "name": "InferenceAmiVersion", "shape": "ProductionVariantInferenceAmiVersion", "type": "string", }, - { - "name": "HyperPodConfig", - "shape": "ProductionVariantHyperPodConfig", - "type": "structure", - }, { "name": "CapacityReservationConfig", "shape": "ProductionVariantCapacityReservationConfig", @@ -17848,11 +14623,6 @@ }, "ProductionVariantCapacityReservationConfig": { "members": [ - { - "name": "Ec2CapacityReservations", - "shape": "Ec2CapacityReservationsIdList", - "type": "list", - }, { "name": "CapacityReservationPreference", "shape": "CapacityReservationPreference", @@ -17881,17 +14651,6 @@ ], "type": "structure", }, - "ProductionVariantCapacitySchedulesConfig": { - "members": [ - { - "name": "CapacityFallbackStrategy", - "shape": "CapacityFallbackStrategy", - "type": "string", - }, - {"name": "CapacitySchedules", "shape": "CapacitySchedulesList", "type": "list"}, - ], - "type": "structure", - }, "ProductionVariantCoreDumpConfig": { "members": [ {"name": "DestinationS3Uri", "shape": "DestinationS3Uri", "type": "string"}, @@ -17899,10 +14658,6 @@ ], "type": "structure", }, - "ProductionVariantHyperPodConfig": { - "members": [{"name": "IngressAddress", "shape": "IngressAddress", "type": "string"}], - "type": "structure", - }, "ProductionVariantList": { "member_shape": "ProductionVariant", "member_type": "structure", @@ -17921,6 +14676,31 @@ "shape": "ManagedInstanceScalingMaxInstanceCount", "type": "integer", }, + { + "name": "ScaleInPolicy", + "shape": "ProductionVariantManagedInstanceScalingScaleInPolicy", + "type": "structure", + }, + ], + "type": "structure", + }, + "ProductionVariantManagedInstanceScalingScaleInPolicy": { + "members": [ + { + "name": "Strategy", + "shape": "ManagedInstanceScalingScaleInStrategy", + "type": "string", + }, + { + "name": "MaximumStepSize", + "shape": "ManagedInstanceScalingMaximumStepSize", + "type": "integer", + }, + { + "name": "CooldownInMinutes", + "shape": "ManagedInstanceScalingCooldownInMinutes", + "type": "integer", + }, ], "type": "structure", }, @@ -17993,16 +14773,6 @@ "shape": "ProductionVariantRoutingConfig", "type": "structure", }, - { - "name": "CapacitySchedulesConfig", - "shape": "ProductionVariantCapacitySchedulesConfig", - "type": "structure", - }, - { - "name": "HyperPodConfig", - "shape": "ProductionVariantHyperPodConfig", - "type": "structure", - }, { "name": "CapacityReservationConfig", "shape": "ProductionVariantCapacityReservationSummary", @@ -18156,44 +14926,10 @@ "members": [{"name": "AmountInUsd", "shape": "USD", "type": "structure"}], "type": "structure", }, - "PutLabelingPortalPolicyRequest": { - "members": [ - {"name": "WorkforceName", "shape": "WorkforceName", "type": "string"}, - {"name": "Policy", "shape": "LabelingPortalPolicy", "type": "structure"}, - ], - "type": "structure", - }, - "PutLabelingPortalPolicyResponse": { - "members": [{"name": "WorkforceArn", "shape": "WorkforceArn", "type": "string"}], - "type": "structure", - }, - "PutLineageGroupPolicyRequest": { - "members": [ - {"name": "LineageGroupName", "shape": "LineageGroupNameOrArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, - "PutLineageGroupPolicyResponse": { - "members": [{"name": "LineageGroupArn", "shape": "LineageGroupArn", "type": "string"}], - "type": "structure", - }, - "PutMlflowAppPolicyRequest": { - "members": [ - {"name": "Arn", "shape": "MlflowAppArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, - "PutMlflowAppPolicyResponse": { - "members": [{"name": "Arn", "shape": "MlflowAppArn", "type": "string"}], - "type": "structure", - }, "PutModelPackageGroupPolicyInput": { "members": [ {"name": "ModelPackageGroupName", "shape": "EntityName", "type": "string"}, {"name": "ResourcePolicy", "shape": "PolicyString", "type": "string"}, - {"name": "ModelPackageGroupArn", "shape": "ModelPackageGroupArn", "type": "string"}, ], "type": "structure", }, @@ -18203,30 +14939,6 @@ ], "type": "structure", }, - "PutPartnerAppPolicyRequest": { - "members": [ - {"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, - "PutPartnerAppPolicyResponse": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, - "PutPipelinePolicyRequest": { - "members": [ - {"name": "PipelineName", "shape": "PipelineNameOrArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "ClientRequestToken", "shape": "IdempotencyToken", "type": "string"}, - ], - "type": "structure", - }, - "PutPipelinePolicyResponse": { - "members": [{"name": "PipelineArn", "shape": "PipelineArn", "type": "string"}], - "type": "structure", - }, "PutRecordRequest": { "members": [ {"name": "FeatureGroupName", "shape": "FeatureGroupNameOrArn", "type": "string"}, @@ -18236,17 +14948,6 @@ ], "type": "structure", }, - "PutResourcePolicyRequest": { - "members": [ - {"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}, - {"name": "ResourcePolicy", "shape": "ResourcePolicyString", "type": "string"}, - ], - "type": "structure", - }, - "PutResourcePolicyResponse": { - "members": [{"name": "ResourceArn", "shape": "ResourceArn", "type": "string"}], - "type": "structure", - }, "QualityCheckStepMetadata": { "members": [ {"name": "CheckType", "shape": "String256", "type": "string"}, @@ -18316,57 +15017,6 @@ "value_type": "string", }, "QueryTypes": {"member_shape": "String40", "member_type": "string", "type": "list"}, - "QuotaAllocationSummary": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"}, - {"name": "QuotaId", "shape": "QuotaId", "type": "string"}, - {"name": "QuotaAllocationName", "shape": "EntityName", "type": "string"}, - {"name": "ClusterArn", "shape": "EksClusterArn", "type": "string"}, - {"name": "QuotaResources", "shape": "QuotaResourceConfigList", "type": "list"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "QuotaAllocationStatus", "shape": "SchedulerResourceStatus", "type": "string"}, - { - "name": "QuotaAllocationTarget", - "shape": "QuotaAllocationTarget", - "type": "structure", - }, - {"name": "ActivationState", "shape": "ActivationStateV1", "type": "structure"}, - {"name": "PreemptionConfig", "shape": "PreemptionConfig", "type": "structure"}, - {"name": "OverQuota", "shape": "OverQuota", "type": "structure"}, - ], - "type": "structure", - }, - "QuotaAllocationSummaryList": { - "member_shape": "QuotaAllocationSummary", - "member_type": "structure", - "type": "list", - }, - "QuotaAllocationTarget": { - "members": [ - {"name": "Id", "shape": "EntityName", "type": "string"}, - {"name": "Type", "shape": "QuotaAllocationTargetType", "type": "string"}, - {"name": "Roles", "shape": "QuotaAllocationTargetRoleList", "type": "list"}, - ], - "type": "structure", - }, - "QuotaAllocationTargetRoleList": { - "member_shape": "RoleArn", - "member_type": "string", - "type": "list", - }, - "QuotaResourceConfig": { - "members": [ - {"name": "InstanceType", "shape": "ClusterInstanceType", "type": "string"}, - {"name": "Count", "shape": "Integer", "type": "integer"}, - ], - "type": "structure", - }, - "QuotaResourceConfigList": { - "member_shape": "QuotaResourceConfig", - "member_type": "structure", - "type": "list", - }, "RSessionAppSettings": { "members": [ {"name": "DefaultResourceSpec", "shape": "ResourceSpec", "type": "structure"}, @@ -18403,7 +15053,7 @@ "members": [ {"name": "MetricName", "shape": "MetricName", "type": "string"}, {"name": "Timestamp", "shape": "Timestamp", "type": "timestamp"}, - {"name": "IterationNumber", "shape": "NonNegativeInteger", "type": "integer"}, + {"name": "Step", "shape": "Step", "type": "integer"}, {"name": "Value", "shape": "Double", "type": "double"}, ], "type": "structure", @@ -18481,28 +15131,6 @@ ], "type": "structure", }, - "RecommendationJobEndpointConfigurationTuning": { - "members": [ - { - "name": "WarmStartConfig", - "shape": "RecommendationJobTuningWarmStartConfig", - "type": "structure", - }, - {"name": "RandomSeed", "shape": "Integer", "type": "integer"}, - {"name": "Strategy", "shape": "RecommendationJobTuningStrategy", "type": "string"}, - { - "name": "CompletionCriteria", - "shape": "RecommendationJobTuningCompletionCriteria", - "type": "structure", - }, - { - "name": "ObjectiveMetric", - "shape": "RecommendationJobTuningObjectiveMetric", - "type": "structure", - }, - ], - "type": "structure", - }, "RecommendationJobInferenceBenchmark": { "members": [ {"name": "Metrics", "shape": "RecommendationMetrics", "type": "structure"}, @@ -18543,7 +15171,6 @@ }, {"name": "Endpoints", "shape": "Endpoints", "type": "list"}, {"name": "VpcConfig", "shape": "RecommendationJobVpcConfig", "type": "structure"}, - {"name": "TokenizerConfig", "shape": "TokenizerConfig", "type": "structure"}, ], "type": "structure", }, @@ -18555,11 +15182,6 @@ "shape": "RecommendationJobCompiledOutputConfig", "type": "structure", }, - { - "name": "BenchmarkResultsOutputConfig", - "shape": "BenchmarkResultsOutputConfig", - "type": "structure", - }, ], "type": "structure", }, @@ -18604,64 +15226,6 @@ "member_type": "string", "type": "list", }, - "RecommendationJobTuningBestObjectiveNotImproving": { - "members": [ - { - "name": "MaxNumberOfTestsNotImproving", - "shape": "RecommendationJobTuningMaxNumberOfTestsNotImproving", - "type": "integer", - } - ], - "type": "structure", - }, - "RecommendationJobTuningCompletionCriteria": { - "members": [ - { - "name": "ConvergenceDetected", - "shape": "RecommendationJobTuningConvergenceDetected", - "type": "structure", - }, - { - "name": "BestObjectiveNotImproving", - "shape": "RecommendationJobTuningBestObjectiveNotImproving", - "type": "structure", - }, - ], - "type": "structure", - }, - "RecommendationJobTuningConvergenceDetected": { - "members": [ - { - "name": "CompleteOnConvergence", - "shape": "RecommendationJobTuningCompleteOnConvergence", - "type": "string", - } - ], - "type": "structure", - }, - "RecommendationJobTuningJob": { - "members": [{"name": "JobName", "shape": "RecommendationJobName", "type": "string"}], - "type": "structure", - }, - "RecommendationJobTuningJobs": { - "member_shape": "RecommendationJobTuningJob", - "member_type": "structure", - "type": "list", - }, - "RecommendationJobTuningObjectiveMetric": { - "members": [ - { - "name": "Name", - "shape": "RecommendationJobTuningObjectiveMetricName", - "type": "string", - } - ], - "type": "structure", - }, - "RecommendationJobTuningWarmStartConfig": { - "members": [{"name": "Jobs", "shape": "RecommendationJobTuningJobs", "type": "list"}], - "type": "structure", - }, "RecommendationJobVpcConfig": { "members": [ { @@ -18692,30 +15256,6 @@ {"name": "CpuUtilization", "shape": "UtilizationMetric", "type": "float"}, {"name": "MemoryUtilization", "shape": "UtilizationMetric", "type": "float"}, {"name": "ModelSetupTime", "shape": "ModelSetupTime", "type": "integer"}, - { - "name": "InputTokensPerSecondPerRequest", - "shape": "InputTokensPerSecondPerRequest", - "type": "float", - }, - { - "name": "OutputTokensPerSecondPerRequest", - "shape": "OutputTokensPerSecondPerRequest", - "type": "float", - }, - {"name": "TimeToFirstToken", "shape": "TimeToFirstToken", "type": "float"}, - {"name": "CostPerMillionTokens", "shape": "CostPerMillionTokens", "type": "float"}, - { - "name": "CostPerMillionInputTokens", - "shape": "CostPerMillionInputTokens", - "type": "float", - }, - { - "name": "CostPerMillionOutputTokens", - "shape": "CostPerMillionOutputTokens", - "type": "float", - }, - {"name": "IntertokenLatency", "shape": "IntertokenLatency", "type": "float"}, - {"name": "MaxConcurrency", "shape": "MaxConcurrency", "type": "integer"}, ], "type": "structure", }, @@ -18729,7 +15269,6 @@ {"name": "QueryString", "shape": "RedshiftQueryString", "type": "string"}, {"name": "ClusterRoleArn", "shape": "RoleArn", "type": "string"}, {"name": "OutputS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "OutputDatasetS3Uri", "shape": "S3Uri", "type": "string"}, {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, {"name": "OutputFormat", "shape": "RedshiftResultFormat", "type": "string"}, { @@ -18761,14 +15300,6 @@ "members": [{"name": "EnableRemoteDebug", "shape": "EnableRemoteDebug", "type": "boolean"}], "type": "structure", }, - "RemoveSharedModelReviewersRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "ReviewerUserProfiles", "shape": "UserProfileNameList", "type": "list"}, - ], - "type": "structure", - }, - "RemoveSharedModelReviewersResponse": {"members": [], "type": "structure"}, "RenderUiTemplateRequest": { "members": [ {"name": "UiTemplate", "shape": "UiTemplate", "type": "structure"}, @@ -18801,18 +15332,6 @@ "member_type": "structure", "type": "list", }, - "RepairNodeItem": { - "members": [ - {"name": "NodeIds", "shape": "ClusterNodeIdsForBatchRepair", "type": "list"}, - {"name": "RepairAction", "shape": "RepairAction", "type": "string"}, - ], - "type": "structure", - }, - "RepairNodeList": { - "member_shape": "RepairNodeItem", - "member_type": "structure", - "type": "list", - }, "RepositoryAuthConfig": { "members": [ { @@ -18835,6 +15354,8 @@ {"name": "DurationMinutes", "shape": "ReservedCapacityDurationMinutes", "type": "long"}, {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "ExtensionStartTime", "shape": "Timestamp", "type": "timestamp"}, + {"name": "ExtensionEndTime", "shape": "Timestamp", "type": "timestamp"}, ], "type": "structure", }, @@ -18858,7 +15379,6 @@ {"name": "TotalInstanceCount", "shape": "TotalInstanceCount", "type": "integer"}, {"name": "Status", "shape": "ReservedCapacityStatus", "type": "string"}, {"name": "AvailabilityZone", "shape": "AvailabilityZone", "type": "string"}, - {"name": "AvailabilityZoneId", "shape": "AvailabilityZoneId", "type": "string"}, {"name": "DurationHours", "shape": "ReservedCapacityDurationHours", "type": "long"}, {"name": "DurationMinutes", "shape": "ReservedCapacityDurationMinutes", "type": "long"}, {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, @@ -18878,10 +15398,6 @@ ], "type": "structure", }, - "ResourceAlreadyExists": { - "members": [{"name": "Message", "shape": "FailureReason", "type": "string"}], - "type": "structure", - }, "ResourceCatalog": { "members": [ {"name": "ResourceCatalogArn", "shape": "ResourceCatalogArn", "type": "string"}, @@ -18907,13 +15423,7 @@ "shape": "KeepAlivePeriodInSeconds", "type": "integer", }, - {"name": "CapacityReservationIds", "shape": "CapacityReservationIds", "type": "list"}, {"name": "InstanceGroups", "shape": "InstanceGroups", "type": "list"}, - { - "name": "CapacitySchedulesConfig", - "shape": "CapacitySchedulesConfig", - "type": "structure", - }, {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, { "name": "InstancePlacementConfig", @@ -18953,26 +15463,11 @@ "shape": "MaxParallelTrainingJobs", "type": "integer", }, - { - "name": "MaxWallClockTimeInMinutes", - "shape": "MaxWallClockTimeInMinutes", - "type": "integer", - }, - { - "name": "MaxTotalComputeTimeInMinutes", - "shape": "MaxTotalComputeTimeInMinutes", - "type": "integer", - }, { "name": "MaxRuntimeInSeconds", "shape": "HyperParameterTuningMaxRuntimeInSeconds", "type": "integer", }, - { - "name": "MaxBillableTimeInSeconds", - "shape": "HyperParameterTuningMaxBillableTimeInSeconds", - "type": "integer", - }, ], "type": "structure", }, @@ -18984,13 +15479,16 @@ "members": [ {"name": "Strategy", "shape": "ResourceSharingStrategy", "type": "string"}, {"name": "BorrowLimit", "shape": "BorrowLimit", "type": "integer"}, + { + "name": "AbsoluteBorrowLimits", + "shape": "AbsoluteBorrowLimitResourceList", + "type": "list", + }, ], "type": "structure", }, "ResourceSpec": { "members": [ - {"name": "EnvironmentArn", "shape": "EnvironmentArn", "type": "string"}, - {"name": "EnvironmentVersionArn", "shape": "EnvironmentVersionArn", "type": "string"}, {"name": "SageMakerImageArn", "shape": "ImageArn", "type": "string"}, {"name": "SageMakerImageVersionArn", "shape": "ImageVersionArn", "type": "string"}, {"name": "SageMakerImageVersionAlias", "shape": "ImageVersionAlias", "type": "string"}, @@ -18999,12 +15497,6 @@ ], "type": "structure", }, - "ResourceTags": { - "members": [ - {"name": "NetworkInterfaceTags", "shape": "NetworkInterfaceTags", "type": "list"} - ], - "type": "structure", - }, "ResponseMIMETypes": { "member_shape": "ResponseMIMEType", "member_type": "string", @@ -19062,23 +15554,6 @@ "member_type": "structure", "type": "list", }, - "RollbackMlflowTrackingServerUpgradeRequest": { - "members": [ - {"name": "TrackingServerName", "shape": "TrackingServerName", "type": "string"} - ], - "type": "structure", - }, - "RollbackMlflowTrackingServerUpgradeResponse": { - "members": [ - {"name": "TrackingServerArn", "shape": "TrackingServerArn", "type": "string"}, - { - "name": "UpgradeRollbackVersionDetails", - "shape": "UpgradeRollbackVersionDetails", - "type": "structure", - }, - ], - "type": "structure", - }, "RollingDeploymentPolicy": { "members": [ {"name": "MaximumBatchSize", "shape": "CapacitySizeConfig", "type": "structure"}, @@ -19099,11 +15574,6 @@ "shape": "MaximumExecutionTimeoutInSeconds", "type": "integer", }, - { - "name": "WaitForInstanceTermination", - "shape": "WaitForInstanceTermination", - "type": "boolean", - }, {"name": "RollbackMaximumBatchSize", "shape": "CapacitySize", "type": "structure"}, ], "type": "structure", @@ -19138,13 +15608,6 @@ ], "type": "structure", }, - "S3JobProgress": { - "members": [ - {"name": "CompletedObjects", "shape": "CompletedObjects", "type": "long"}, - {"name": "FailedObjects", "shape": "FailedObjects", "type": "long"}, - ], - "type": "structure", - }, "S3ModelDataSource": { "members": [ {"name": "S3Uri", "shape": "S3ModelUri", "type": "string"}, @@ -19182,28 +15645,6 @@ "member_type": "string", "type": "list", }, - "SaviturAppImageConfig": { - "members": [ - {"name": "FileSystemConfig", "shape": "FileSystemConfig", "type": "structure"}, - {"name": "ContainerConfig", "shape": "ContainerConfig", "type": "structure"}, - ], - "type": "structure", - }, - "SaviturAppSettings": { - "members": [ - {"name": "DefaultResourceSpec", "shape": "ResourceSpec", "type": "structure"}, - {"name": "CustomImages", "shape": "CustomImages", "type": "list"}, - {"name": "LifecycleConfigArns", "shape": "LifecycleConfigArns", "type": "list"}, - {"name": "CodeRepositories", "shape": "CodeRepositories", "type": "list"}, - ], - "type": "structure", - }, - "ScalingConfig": { - "members": [ - {"name": "BestEffortProvisioning", "shape": "BestEffortProvisioning", "type": "boolean"} - ], - "type": "structure", - }, "ScalingPolicies": { "member_shape": "ScalingPolicy", "member_type": "structure", @@ -19252,6 +15693,7 @@ "members": [ {"name": "PriorityClasses", "shape": "PriorityClassList", "type": "list"}, {"name": "FairShare", "shape": "FairShare", "type": "string"}, + {"name": "IdleResourceSharing", "shape": "IdleResourceSharing", "type": "string"}, ], "type": "structure", }, @@ -19275,7 +15717,6 @@ {"name": "Experiment", "shape": "Experiment", "type": "structure"}, {"name": "Trial", "shape": "Trial", "type": "structure"}, {"name": "TrialComponent", "shape": "TrialComponent", "type": "structure"}, - {"name": "TransformJob", "shape": "TransformJob", "type": "structure"}, {"name": "Endpoint", "shape": "Endpoint", "type": "structure"}, {"name": "ModelPackage", "shape": "ModelPackage", "type": "structure"}, {"name": "ModelPackageGroup", "shape": "ModelPackageGroup", "type": "structure"}, @@ -19284,8 +15725,6 @@ {"name": "PipelineVersion", "shape": "PipelineVersion", "type": "structure"}, {"name": "FeatureGroup", "shape": "FeatureGroup", "type": "structure"}, {"name": "FeatureMetadata", "shape": "FeatureMetadata", "type": "structure"}, - {"name": "Image", "shape": "ImageSearchShape", "type": "structure"}, - {"name": "ImageVersion", "shape": "ImageVersionSearchShape", "type": "structure"}, {"name": "Project", "shape": "Project", "type": "structure"}, { "name": "HyperParameterTuningJob", @@ -19294,9 +15733,6 @@ }, {"name": "ModelCard", "shape": "ModelCard", "type": "structure"}, {"name": "Model", "shape": "ModelDashboardModel", "type": "structure"}, - {"name": "App", "shape": "App", "type": "structure"}, - {"name": "UserProfile", "shape": "UserProfile", "type": "structure"}, - {"name": "Domain", "shape": "Domain", "type": "structure"}, ], "type": "structure", }, @@ -19308,7 +15744,6 @@ {"name": "SortOrder", "shape": "SearchSortOrder", "type": "string"}, {"name": "NextToken", "shape": "NextToken", "type": "string"}, {"name": "MaxResults", "shape": "MaxResults", "type": "integer"}, - {"name": "IncludeCrossAccountResults", "shape": "Boolean", "type": "boolean"}, { "name": "CrossAccountFilterOption", "shape": "CrossAccountFilterOption", @@ -19337,17 +15772,22 @@ {"name": "InstanceCount", "shape": "ReservedCapacityInstanceCount", "type": "integer"}, {"name": "UltraServerType", "shape": "UltraServerType", "type": "string"}, {"name": "UltraServerCount", "shape": "UltraServerCount", "type": "integer"}, - {"name": "AvailabilityZone", "shape": "AvailabilityZone", "type": "string"}, {"name": "StartTimeAfter", "shape": "Timestamp", "type": "timestamp"}, {"name": "EndTimeBefore", "shape": "Timestamp", "type": "timestamp"}, {"name": "DurationHours", "shape": "TrainingPlanDurationHoursInput", "type": "long"}, {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, + {"name": "TrainingPlanArn", "shape": "String", "type": "string"}, ], "type": "structure", }, "SearchTrainingPlanOfferingsResponse": { "members": [ - {"name": "TrainingPlanOfferings", "shape": "TrainingPlanOfferings", "type": "list"} + {"name": "TrainingPlanOfferings", "shape": "TrainingPlanOfferings", "type": "list"}, + { + "name": "TrainingPlanExtensionOfferings", + "shape": "TrainingPlanExtensionOfferings", + "type": "list", + }, ], "type": "structure", }, @@ -19428,18 +15868,6 @@ ], "type": "structure", }, - "SendSharedModelEventRequest": { - "members": [ - {"name": "OriginalEventId", "shape": "EventId", "type": "string"}, - {"name": "EventType", "shape": "EventType", "type": "string"}, - {"name": "OriginalSender", "shape": "UserProfileName", "type": "string"}, - ], - "type": "structure", - }, - "SendSharedModelEventResponse": { - "members": [{"name": "EventId", "shape": "EventId", "type": "string"}], - "type": "structure", - }, "ServerlessJobConfig": { "members": [ {"name": "BaseModelArn", "shape": "ServerlessJobBaseModelArn", "type": "string"}, @@ -19449,24 +15877,6 @@ {"name": "Peft", "shape": "Peft", "type": "string"}, {"name": "EvaluationType", "shape": "EvaluationType", "type": "string"}, {"name": "EvaluatorArn", "shape": "EvaluatorArn", "type": "string"}, - {"name": "JobSpec", "shape": "ServerlessJobSpec", "type": "map"}, - ], - "type": "structure", - }, - "ServerlessJobSpec": { - "key_shape": "ServerlessJobSpecKey", - "key_type": "string", - "type": "map", - "value_shape": "ServerlessJobSpecValue", - "value_type": "string", - }, - "Service": { - "members": [ - {"name": "Environment", "shape": "Environment", "type": "map"}, - {"name": "ImageUri", "shape": "String2048", "type": "string"}, - {"name": "Volumes", "shape": "Volumes", "type": "map"}, - {"name": "Entrypoint", "shape": "Entrypoint", "type": "list"}, - {"name": "Command", "shape": "Command", "type": "list"}, ], "type": "structure", }, @@ -19501,7 +15911,6 @@ "members": [{"name": "Message", "shape": "Message", "type": "string"}], "type": "structure", }, - "Services": {"member_shape": "Service", "member_type": "structure", "type": "list"}, "SessionChainingConfig": { "members": [ { @@ -19535,52 +15944,6 @@ "member_type": "structure", "type": "list", }, - "SharedModelArtifacts": { - "key_shape": "ArtifactKey", - "key_type": "string", - "type": "map", - "value_shape": "ArtifactValue", - "value_type": "string", - }, - "SharedModelListEntity": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - {"name": "Owner", "shape": "UserProfileName", "type": "string"}, - {"name": "ModelName", "shape": "SharedModelName", "type": "string"}, - {"name": "ModelType", "shape": "SharedModelType", "type": "string"}, - {"name": "ProblemType", "shape": "SharedModelProblemType", "type": "string"}, - {"name": "Description", "shape": "SharedModelDescription", "type": "string"}, - {"name": "Shares", "shape": "SharedModelSharesCount", "type": "integer"}, - {"name": "ModelIdentifier", "shape": "SharedModelIdentifier", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "SharedModelVersionListEntity": { - "members": [ - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - {"name": "Creator", "shape": "UserProfileName", "type": "string"}, - {"name": "ModelType", "shape": "SharedModelType", "type": "string"}, - {"name": "ProblemType", "shape": "SharedModelProblemType", "type": "string"}, - {"name": "Description", "shape": "SharedModelDescription", "type": "string"}, - {"name": "ModelIdentifier", "shape": "SharedModelIdentifier", "type": "string"}, - {"name": "CreationTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "LastModifiedTime", "shape": "Timestamp", "type": "timestamp"}, - ], - "type": "structure", - }, - "SharedModelVersions": { - "member_shape": "SharedModelVersionListEntity", - "member_type": "structure", - "type": "list", - }, - "SharedModels": { - "member_shape": "SharedModelListEntity", - "member_type": "structure", - "type": "list", - }, "SharingSettings": { "members": [ {"name": "NotebookOutputOption", "shape": "NotebookOutputOption", "type": "string"}, @@ -19593,38 +15956,6 @@ "members": [{"name": "Seed", "shape": "Seed", "type": "long"}], "type": "structure", }, - "SnowflakeDatasetDefinition": { - "members": [ - {"name": "Warehouse", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "Database", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "Schema", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "SnowflakeRole", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "SecretArn", "shape": "ProcessingSecretArn", "type": "string"}, - {"name": "QueryString", "shape": "SnowflakeQueryString", "type": "string"}, - {"name": "QueryVariables", "shape": "SnowflakeQueryVariables", "type": "list"}, - {"name": "OutputS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "OutputDatasetS3Uri", "shape": "S3Uri", "type": "string"}, - {"name": "StorageIntegration", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "OutputFormatType", "shape": "SnowflakeOutputFormatType", "type": "string"}, - { - "name": "OutputCompression", - "shape": "SnowflakeOutputCompressionType", - "type": "string", - }, - {"name": "OutputFormatName", "shape": "SnowflakeObjectId", "type": "string"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, - "SnowflakeQueryVariable": { - "members": [{"name": "Value", "shape": "SnowflakeQueryVariableValue", "type": "string"}], - "type": "structure", - }, - "SnowflakeQueryVariables": { - "member_shape": "SnowflakeQueryVariable", - "member_type": "structure", - "type": "list", - }, "SourceAlgorithm": { "members": [ {"name": "ModelDataUrl", "shape": "Url", "type": "string"}, @@ -19715,8 +16046,6 @@ "shape": "KernelGatewayAppSettings", "type": "structure", }, - {"name": "VSCodeAppSettings", "shape": "VSCodeAppSettings", "type": "structure"}, - {"name": "SaviturAppSettings", "shape": "SaviturAppSettings", "type": "structure"}, { "name": "CodeEditorAppSettings", "shape": "SpaceCodeEditorAppSettings", @@ -19757,12 +16086,6 @@ ], "type": "structure", }, - "SpeculativeDecodingConfig": { - "members": [ - {"name": "DraftModel", "shape": "OptimizationJobDraftModel", "type": "structure"} - ], - "type": "structure", - }, "Stairs": { "members": [ {"name": "DurationInSeconds", "shape": "TrafficDurationInSeconds", "type": "integer"}, @@ -19779,7 +16102,6 @@ "shape": "DeepHealthCheckConfigurations", "type": "list", }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -19787,13 +16109,6 @@ "members": [{"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}], "type": "structure", }, - "StartClusterNodeRequest": { - "members": [ - {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, - {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, - ], - "type": "structure", - }, "StartEdgeDeploymentStageRequest": { "members": [ {"name": "EdgeDeploymentPlanName", "shape": "EntityName", "type": "string"}, @@ -19833,14 +16148,6 @@ ], "type": "structure", }, - "StartPartnerAppRequest": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, - "StartPartnerAppResponse": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, "StartPipelineExecutionRequest": { "members": [ {"name": "PipelineName", "shape": "PipelineNameOrArn", "type": "string"}, @@ -19895,30 +16202,35 @@ ], "type": "structure", }, - "StopAutoMLJobRequest": { - "members": [{"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}], + "StatusDetailsMap": { + "key_shape": "SchedulerConfigComponent", + "key_type": "string", + "type": "map", + "value_shape": "SchedulerResourceStatus", + "value_type": "string", + }, + "StopAIBenchmarkJobRequest": { + "members": [{"name": "AIBenchmarkJobName", "shape": "AIEntityName", "type": "string"}], "type": "structure", }, - "StopCapacityScheduleRequest": { - "members": [ - {"name": "CapacityScheduleName", "shape": "CapacityScheduleName", "type": "string"} - ], + "StopAIBenchmarkJobResponse": { + "members": [{"name": "AIBenchmarkJobArn", "shape": "AIBenchmarkJobArn", "type": "string"}], "type": "structure", }, - "StopCapacityScheduleResponse": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"}, - {"name": "Status", "shape": "CapacityScheduleStatus", "type": "string"}, - ], + "StopAIRecommendationJobRequest": { + "members": [{"name": "AIRecommendationJobName", "shape": "AIEntityName", "type": "string"}], "type": "structure", }, - "StopClusterNodeRequest": { + "StopAIRecommendationJobResponse": { "members": [ - {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, - {"name": "NodeId", "shape": "ClusterNodeId", "type": "string"}, + {"name": "AIRecommendationJobArn", "shape": "AIRecommendationJobArn", "type": "string"} ], "type": "structure", }, + "StopAutoMLJobRequest": { + "members": [{"name": "AutoMLJobName", "shape": "AutoMLJobName", "type": "string"}], + "type": "structure", + }, "StopCompilationJobRequest": { "members": [{"name": "CompilationJobName", "shape": "EntityName", "type": "string"}], "type": "structure", @@ -19934,21 +16246,6 @@ "members": [{"name": "EdgePackagingJobName", "shape": "EntityName", "type": "string"}], "type": "structure", }, - "StopEvaluationJobRequest": { - "members": [{"name": "EvaluationJobName", "shape": "EvaluationJobName", "type": "string"}], - "type": "structure", - }, - "StopHyperParameterTuningJobInternalRequest": { - "members": [ - { - "name": "HyperParameterTuningJobName", - "shape": "HyperParameterTuningJobName", - "type": "string", - }, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, "StopHyperParameterTuningJobRequest": { "members": [ { @@ -20013,14 +16310,6 @@ "members": [{"name": "OptimizationJobName", "shape": "EntityName", "type": "string"}], "type": "structure", }, - "StopPartnerAppRequest": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, - "StopPartnerAppResponse": { - "members": [{"name": "PartnerAppArn", "shape": "PartnerAppArn", "type": "string"}], - "type": "structure", - }, "StopPipelineExecutionRequest": { "members": [ {"name": "PipelineExecutionArn", "shape": "PipelineExecutionArn", "type": "string"}, @@ -20034,47 +16323,14 @@ ], "type": "structure", }, - "StopProcessingJobInternalRequest": { - "members": [ - {"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - {"name": "Payer", "shape": "Payer", "type": "string"}, - ], - "type": "structure", - }, "StopProcessingJobRequest": { "members": [{"name": "ProcessingJobName", "shape": "ProcessingJobName", "type": "string"}], "type": "structure", }, - "StopTrainingJobInternalRequest": { - "members": [ - {"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, "StopTrainingJobRequest": { "members": [{"name": "TrainingJobName", "shape": "TrainingJobName", "type": "string"}], "type": "structure", }, - "StopTrainingPlanRequest": { - "members": [{"name": "TrainingPlanName", "shape": "TrainingPlanName", "type": "string"}], - "type": "structure", - }, - "StopTrainingPlanResponse": { - "members": [ - {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, - {"name": "Status", "shape": "TrainingPlanStatus", "type": "string"}, - ], - "type": "structure", - }, - "StopTransformJobInternalRequest": { - "members": [ - {"name": "TransformJobName", "shape": "TransformJobName", "type": "string"}, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, "StopTransformJobRequest": { "members": [{"name": "TransformJobName", "shape": "TransformJobName", "type": "string"}], "type": "structure", @@ -20091,13 +16347,6 @@ ], "type": "structure", }, - "StsContextMap": { - "key_shape": "StsContextMapKey", - "key_type": "string", - "type": "map", - "value_shape": "StsContextMapValue", - "value_type": "string", - }, "StudioLifecycleConfigDetails": { "members": [ { @@ -20125,25 +16374,6 @@ "member_type": "structure", "type": "list", }, - "StudioUserSettings": { - "members": [ - {"name": "SpaceStorageSettings", "shape": "SpaceStorageSettings", "type": "structure"}, - {"name": "DefaultLandingUri", "shape": "LandingUri", "type": "string"}, - ], - "type": "structure", - }, - "StudioUserUpdateUserSettingsRequest": { - "members": [ - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "UserProfileName", "shape": "UserProfileName", "type": "string"}, - {"name": "UserSettings", "shape": "StudioUserSettings", "type": "structure"}, - ], - "type": "structure", - }, - "StudioUserUpdateUserSettingsResponse": { - "members": [{"name": "UserProfileArn", "shape": "UserProfileArn", "type": "string"}], - "type": "structure", - }, "StudioWebPortalSettings": { "members": [ {"name": "HiddenMlTools", "shape": "HiddenMlToolsList", "type": "list"}, @@ -20209,10 +16439,7 @@ "type": "structure", }, "TabularResolvedAttributes": { - "members": [ - {"name": "ProblemType", "shape": "ProblemType", "type": "string"}, - {"name": "LocalModeEnabled", "shape": "LocalModeEnabled", "type": "boolean"}, - ], + "members": [{"name": "ProblemType", "shape": "ProblemType", "type": "string"}], "type": "structure", }, "Tag": { @@ -20224,75 +16451,6 @@ }, "TagKeyList": {"member_shape": "TagKey", "member_type": "string", "type": "list"}, "TagList": {"member_shape": "Tag", "member_type": "structure", "type": "list"}, - "TagrisAccessDeniedException": { - "members": [{"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}], - "type": "structure", - }, - "TagrisInternalServiceException": { - "members": [{"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}], - "type": "structure", - }, - "TagrisInvalidArnException": { - "members": [ - {"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}, - {"name": "sweepListItem", "shape": "TagrisSweepListItem", "type": "structure"}, - ], - "type": "structure", - }, - "TagrisInvalidParameterException": { - "members": [{"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}], - "type": "structure", - }, - "TagrisPartialResourcesExistResultsException": { - "members": [ - {"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}, - { - "name": "resourceExistenceInformation", - "shape": "TagrisSweepListResult", - "type": "map", - }, - ], - "type": "structure", - }, - "TagrisSweepList": { - "member_shape": "TagrisSweepListItem", - "member_type": "structure", - "type": "list", - }, - "TagrisSweepListItem": { - "members": [ - {"name": "TagrisAccountId", "shape": "TagrisAccountId", "type": "string"}, - { - "name": "TagrisAmazonResourceName", - "shape": "TagrisAmazonResourceName", - "type": "string", - }, - {"name": "TagrisInternalId", "shape": "TagrisInternalId", "type": "string"}, - {"name": "TagrisVersion", "shape": "TagrisVersion", "type": "long"}, - ], - "type": "structure", - }, - "TagrisSweepListResult": { - "key_shape": "TagrisAmazonResourceName", - "key_type": "string", - "type": "map", - "value_shape": "TagrisStatus", - "value_type": "string", - }, - "TagrisThrottledException": { - "members": [{"name": "message", "shape": "TagrisExceptionMessage", "type": "string"}], - "type": "structure", - }, - "TagrisVerifyResourcesExistInput": { - "members": [{"name": "TagrisSweepList", "shape": "TagrisSweepList", "type": "list"}], - "type": "structure", - }, - "TagrisVerifyResourcesExistOutput": { - "members": [ - {"name": "TagrisSweepListResult", "shape": "TagrisSweepListResult", "type": "map"} - ], - "type": "structure", - }, "TargetPlatform": { "members": [ {"name": "Os", "shape": "TargetPlatformOs", "type": "string"}, @@ -20336,15 +16494,6 @@ ], "type": "structure", }, - "TestInput": { - "members": [ - {"name": "DataSource", "shape": "DataSource", "type": "structure"}, - {"name": "ContentType", "shape": "ContentType", "type": "string"}, - {"name": "CompressionType", "shape": "CompressionType", "type": "string"}, - {"name": "SplitType", "shape": "SplitType", "type": "string"}, - ], - "type": "structure", - }, "TextClassificationJobConfig": { "members": [ { @@ -20458,14 +16607,6 @@ ], "type": "structure", }, - "Timestamps": {"member_shape": "Timestamp", "member_type": "timestamp", "type": "list"}, - "TokenizerConfig": { - "members": [ - {"name": "ModelId", "shape": "RecommendationJobTokenizerModelId", "type": "string"}, - {"name": "AcceptEula", "shape": "RecommendationJobAcceptEula", "type": "boolean"}, - ], - "type": "structure", - }, "TotalHits": { "members": [ {"name": "Value", "shape": "Long", "type": "long"}, @@ -20495,13 +16636,6 @@ {"name": "TrafficType", "shape": "TrafficType", "type": "string"}, {"name": "Phases", "shape": "Phases", "type": "list"}, {"name": "Stairs", "shape": "Stairs", "type": "structure"}, - {"name": "Concurrencies", "shape": "Concurrencies", "type": "list"}, - { - "name": "InferenceInvocationTypes", - "shape": "InferenceInvocationTypes", - "type": "structure", - }, - {"name": "PayloadSampling", "shape": "PayloadSampling", "type": "structure"}, ], "type": "structure", }, @@ -20559,7 +16693,6 @@ {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, {"name": "ModelArtifacts", "shape": "ModelArtifacts", "type": "structure"}, - {"name": "TrainingJobOutput", "shape": "TrainingJobOutput", "type": "structure"}, {"name": "TrainingJobStatus", "shape": "TrainingJobStatus", "type": "string"}, {"name": "SecondaryStatus", "shape": "SecondaryStatus", "type": "string"}, {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, @@ -20610,17 +16743,9 @@ }, {"name": "OutputModelPackageArn", "shape": "ModelPackageArn", "type": "string"}, {"name": "ModelPackageConfig", "shape": "ModelPackageConfig", "type": "structure"}, - { - "name": "UpstreamPlatformConfig", - "shape": "UpstreamPlatformConfig", - "type": "structure", - }, {"name": "ProfilerConfig", "shape": "ProfilerConfig", "type": "structure"}, - {"name": "DisableEFA", "shape": "Boolean", "type": "boolean"}, {"name": "Environment", "shape": "TrainingEnvironmentMap", "type": "map"}, {"name": "RetryStrategy", "shape": "RetryStrategy", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -20636,10 +16761,6 @@ ], "type": "structure", }, - "TrainingJobOutput": { - "members": [{"name": "S3TrainingJobOutput", "shape": "S3Uri", "type": "string"}], - "type": "structure", - }, "TrainingJobStatusCounters": { "members": [ {"name": "Completed", "shape": "TrainingJobStatusCounter", "type": "integer"}, @@ -20669,18 +16790,67 @@ {"name": "TrainingJobStatus", "shape": "TrainingJobStatus", "type": "string"}, {"name": "SecondaryStatus", "shape": "SecondaryStatus", "type": "string"}, {"name": "WarmPoolStatus", "shape": "WarmPoolStatus", "type": "structure"}, + {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, + ], + "type": "structure", + }, + "TrainingPlanArns": { + "member_shape": "TrainingPlanArn", + "member_type": "string", + "type": "list", + }, + "TrainingPlanExtension": { + "members": [ + { + "name": "TrainingPlanExtensionOfferingId", + "shape": "TrainingPlanExtensionOfferingId", + "type": "string", + }, + {"name": "ExtendedAt", "shape": "Timestamp", "type": "timestamp"}, + {"name": "StartDate", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndDate", "shape": "Timestamp", "type": "timestamp"}, + {"name": "Status", "shape": "String256", "type": "string"}, + {"name": "PaymentStatus", "shape": "String256", "type": "string"}, + {"name": "AvailabilityZone", "shape": "String256", "type": "string"}, + {"name": "AvailabilityZoneId", "shape": "AvailabilityZoneId", "type": "string"}, + { + "name": "DurationHours", + "shape": "TrainingPlanExtensionDurationHours", + "type": "integer", + }, + {"name": "UpfrontFee", "shape": "String256", "type": "string"}, + {"name": "CurrencyCode", "shape": "CurrencyCode", "type": "string"}, + ], + "type": "structure", + }, + "TrainingPlanExtensionOffering": { + "members": [ { - "name": "KeepAlivePeriodInSeconds", - "shape": "KeepAlivePeriodInSeconds", + "name": "TrainingPlanExtensionOfferingId", + "shape": "TrainingPlanExtensionOfferingId", + "type": "string", + }, + {"name": "AvailabilityZone", "shape": "String256", "type": "string"}, + {"name": "StartDate", "shape": "Timestamp", "type": "timestamp"}, + {"name": "EndDate", "shape": "Timestamp", "type": "timestamp"}, + { + "name": "DurationHours", + "shape": "TrainingPlanExtensionDurationHours", "type": "integer", }, - {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, + {"name": "UpfrontFee", "shape": "String256", "type": "string"}, + {"name": "CurrencyCode", "shape": "CurrencyCode", "type": "string"}, ], "type": "structure", }, - "TrainingPlanArns": { - "member_shape": "TrainingPlanArn", - "member_type": "string", + "TrainingPlanExtensionOfferings": { + "member_shape": "TrainingPlanExtensionOffering", + "member_type": "structure", + "type": "list", + }, + "TrainingPlanExtensions": { + "member_shape": "TrainingPlanExtension", + "member_type": "structure", "type": "list", }, "TrainingPlanFilter": { @@ -20718,20 +16888,6 @@ "member_type": "structure", "type": "list", }, - "TrainingPlanStatusTransition": { - "members": [ - {"name": "Status", "shape": "TrainingPlanStatus", "type": "string"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "StatusMessage", "shape": "TrainingPlanStatusMessage", "type": "string"}, - ], - "type": "structure", - }, - "TrainingPlanStatusTransitions": { - "member_shape": "TrainingPlanStatusTransition", - "member_type": "structure", - "type": "list", - }, "TrainingPlanSummaries": { "member_shape": "TrainingPlanSummary", "member_type": "structure", @@ -20756,16 +16912,6 @@ "type": "integer", }, {"name": "InUseInstanceCount", "shape": "InUseInstanceCount", "type": "integer"}, - { - "name": "UnhealthyInstanceCount", - "shape": "UnhealthyInstanceCount", - "type": "integer", - }, - { - "name": "AvailableSpareInstanceCount", - "shape": "AvailableSpareInstanceCount", - "type": "integer", - }, {"name": "TotalUltraServerCount", "shape": "UltraServerCount", "type": "integer"}, {"name": "TargetResources", "shape": "SageMakerResourceNames", "type": "list"}, { @@ -20773,11 +16919,6 @@ "shape": "ReservedCapacitySummaries", "type": "list", }, - { - "name": "TrainingPlanStatusTransitions", - "shape": "TrainingPlanStatusTransitions", - "type": "list", - }, ], "type": "structure", }, @@ -20882,11 +17023,8 @@ {"name": "TransformEndTime", "shape": "Timestamp", "type": "timestamp"}, {"name": "LabelingJobArn", "shape": "LabelingJobArn", "type": "string"}, {"name": "AutoMLJobArn", "shape": "AutoMLJobArn", "type": "string"}, - {"name": "TransformJobProgress", "shape": "TransformJobProgress", "type": "structure"}, {"name": "DataProcessing", "shape": "DataProcessing", "type": "structure"}, {"name": "ExperimentConfig", "shape": "ExperimentConfig", "type": "structure"}, - {"name": "LastModifiedBy", "shape": "UserContext", "type": "structure"}, - {"name": "CreatedBy", "shape": "UserContext", "type": "structure"}, {"name": "Tags", "shape": "TagList", "type": "list"}, ], "type": "structure", @@ -20907,10 +17045,6 @@ ], "type": "structure", }, - "TransformJobProgress": { - "members": [{"name": "S3JobProgress", "shape": "S3JobProgress", "type": "structure"}], - "type": "structure", - }, "TransformJobStepMetadata": { "members": [{"name": "Arn", "shape": "TransformJobArn", "type": "string"}], "type": "structure", @@ -20938,8 +17072,6 @@ {"name": "Accept", "shape": "Accept", "type": "string"}, {"name": "AssembleWith", "shape": "AssemblyType", "type": "string"}, {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "OutputPrefix", "shape": "OutputPrefix", "type": "string"}, - {"name": "OutputSuffix", "shape": "OutputSuffix", "type": "string"}, ], "type": "structure", }, @@ -20959,11 +17091,6 @@ ], "type": "structure", }, - "Transformer": { - "members": [{"name": "Name", "shape": "AutoMLTransformer", "type": "string"}], - "type": "structure", - }, - "Transformers": {"member_shape": "Transformer", "member_type": "structure", "type": "list"}, "Trial": { "members": [ {"name": "TrialName", "shape": "ExperimentEntityName", "type": "string"}, @@ -21141,21 +17268,6 @@ ], "type": "structure", }, - "TrustedEnvironment": { - "members": [{"name": "Config", "shape": "TrustedEnvironmentConfig", "type": "structure"}], - "type": "structure", - }, - "TrustedEnvironmentConfig": { - "members": [{"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}], - "type": "structure", - }, - "TrustedEnvironmentDetails": { - "members": [ - {"name": "FSxLustreConfig", "shape": "FSxLustreConfig", "type": "structure"}, - {"name": "S3OutputPath", "shape": "S3Uri", "type": "string"}, - ], - "type": "structure", - }, "TrustedIdentityPropagationSettings": { "members": [{"name": "Status", "shape": "FeatureStatus", "type": "string"}], "type": "structure", @@ -21246,7 +17358,10 @@ "type": "structure", }, "UltraServerInfo": { - "members": [{"name": "Id", "shape": "String", "type": "string"}], + "members": [ + {"name": "Id", "shape": "String", "type": "string"}, + {"name": "Type", "shape": "String", "type": "string"}, + ], "type": "structure", }, "UltraServerSummary": { @@ -21316,11 +17431,6 @@ "shape": "KernelGatewayImageConfig", "type": "structure", }, - { - "name": "SaviturAppImageConfig", - "shape": "SaviturAppImageConfig", - "type": "structure", - }, { "name": "JupyterLabAppImageConfig", "shape": "JupyterLabAppImageConfig", @@ -21338,20 +17448,6 @@ "members": [{"name": "AppImageConfigArn", "shape": "AppImageConfigArn", "type": "string"}], "type": "structure", }, - "UpdateAppRequest": { - "members": [ - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "UserProfileName", "shape": "UserProfileName", "type": "string"}, - {"name": "SpaceName", "shape": "SpaceName", "type": "string"}, - {"name": "AppType", "shape": "AppType", "type": "string"}, - {"name": "AppName", "shape": "AppName", "type": "string"}, - ], - "type": "structure", - }, - "UpdateAppResponse": { - "members": [{"name": "AppArn", "shape": "AppArn", "type": "string"}], - "type": "structure", - }, "UpdateArtifactRequest": { "members": [ {"name": "ArtifactArn", "shape": "ArtifactArn", "type": "string"}, @@ -21369,43 +17465,6 @@ "members": [{"name": "ArtifactArn", "shape": "ArtifactArn", "type": "string"}], "type": "structure", }, - "UpdateCapacityScheduleRequest": { - "members": [ - {"name": "CapacityScheduleName", "shape": "CapacityScheduleName", "type": "string"}, - { - "name": "MaxWaitTimeInSeconds", - "shape": "CapacityScheduleMaxWaitTimeInSeconds", - "type": "integer", - }, - {"name": "RequestedStartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedEndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "InstanceCount", "shape": "CapacityScheduleInstanceCount", "type": "integer"}, - ], - "type": "structure", - }, - "UpdateCapacityScheduleResponse": { - "members": [ - {"name": "CapacityScheduleArn", "shape": "CapacityScheduleArn", "type": "string"}, - {"name": "Status", "shape": "CapacityScheduleStatus", "type": "string"}, - ], - "type": "structure", - }, - "UpdateClusterInferenceRequest": { - "members": [ - {"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}, - { - "name": "InferenceServiceConfig", - "shape": "InferenceServiceConfig", - "type": "structure", - }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, - ], - "type": "structure", - }, - "UpdateClusterInferenceResponse": { - "members": [{"name": "ClusterArn", "shape": "ClusterArn", "type": "string"}], - "type": "structure", - }, "UpdateClusterRequest": { "members": [ {"name": "ClusterName", "shape": "ClusterNameOrArn", "type": "string"}, @@ -21419,7 +17478,6 @@ "shape": "ClusterRestrictedInstanceGroupSpecifications", "type": "list", }, - {"name": "ResilienceConfig", "shape": "ClusterResilienceConfig", "type": "structure"}, { "name": "TieredStorageConfig", "shape": "ClusterTieredStorageConfig", @@ -21436,10 +17494,9 @@ "shape": "ClusterNodeProvisioningMode", "type": "string", }, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, {"name": "ClusterRole", "shape": "RoleArn", "type": "string"}, {"name": "AutoScaling", "shape": "ClusterAutoScalingConfig", "type": "structure"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, + {"name": "Orchestrator", "shape": "ClusterOrchestrator", "type": "structure"}, ], "type": "structure", }, @@ -21457,7 +17514,6 @@ {"name": "TargetVersion", "shape": "Integer", "type": "integer"}, {"name": "SchedulerConfig", "shape": "SchedulerConfig", "type": "structure"}, {"name": "Description", "shape": "EntityDescription", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -21474,8 +17530,7 @@ }, "UpdateClusterSoftwareInstanceGroupSpecification": { "members": [ - {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"}, - {"name": "CustomMetadata", "shape": "CustomMetadata", "type": "map"}, + {"name": "InstanceGroupName", "shape": "ClusterInstanceGroupName", "type": "string"} ], "type": "structure", }, @@ -21493,7 +17548,6 @@ "type": "list", }, {"name": "DeploymentConfig", "shape": "DeploymentConfiguration", "type": "structure"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, {"name": "ImageId", "shape": "ImageId", "type": "string"}, ], "type": "structure", @@ -21521,7 +17575,6 @@ {"name": "ComputeQuotaTarget", "shape": "ComputeQuotaTarget", "type": "structure"}, {"name": "ActivationState", "shape": "ActivationState", "type": "string"}, {"name": "Description", "shape": "EntityDescription", "type": "string"}, - {"name": "DryRun", "shape": "DryRun", "type": "boolean"}, ], "type": "structure", }, @@ -21641,14 +17694,8 @@ "UpdateFeatureGroupRequest": { "members": [ {"name": "FeatureGroupName", "shape": "FeatureGroupNameOrArn", "type": "string"}, - { - "name": "AddOnlineStoreReplica", - "shape": "AddOnlineStoreReplicaAction", - "type": "structure", - }, {"name": "FeatureAdditions", "shape": "FeatureAdditions", "type": "list"}, {"name": "OnlineStoreConfig", "shape": "OnlineStoreConfigUpdate", "type": "structure"}, - {"name": "Description", "shape": "Description", "type": "string"}, {"name": "ThroughputConfig", "shape": "ThroughputConfigUpdate", "type": "structure"}, ], "type": "structure", @@ -21721,17 +17768,6 @@ "members": [{"name": "HubArn", "shape": "HubArn", "type": "string"}], "type": "structure", }, - "UpdateHumanTaskUiRequest": { - "members": [ - {"name": "HumanTaskUiName", "shape": "HumanTaskUiName", "type": "string"}, - {"name": "UiTemplate", "shape": "UiTemplate", "type": "structure"}, - ], - "type": "structure", - }, - "UpdateHumanTaskUiResponse": { - "members": [{"name": "HumanTaskUiArn", "shape": "HumanTaskUiArn", "type": "string"}], - "type": "structure", - }, "UpdateImageRequest": { "members": [ {"name": "DeleteProperties", "shape": "ImageDeletePropertyList", "type": "list"}, @@ -21863,6 +17899,8 @@ "shape": "WeeklyMaintenanceWindowStart", "type": "string", }, + {"name": "S3BucketOwnerAccountId", "shape": "AccountId", "type": "string"}, + {"name": "S3BucketOwnerVerification", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -22142,7 +18180,6 @@ "shape": "UpdateTemplateProviderList", "type": "list", }, - {"name": "WorkflowDisabled", "shape": "Boolean", "type": "boolean"}, ], "type": "structure", }, @@ -22150,46 +18187,6 @@ "members": [{"name": "ProjectArn", "shape": "ProjectArn", "type": "string"}], "type": "structure", }, - "UpdateQuotaAllocationRequest": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"}, - {"name": "QuotaAllocationVersion", "shape": "Integer", "type": "integer"}, - {"name": "QuotaResources", "shape": "QuotaResourceConfigList", "type": "list"}, - {"name": "OverQuota", "shape": "OverQuota", "type": "structure"}, - {"name": "PreemptionConfig", "shape": "PreemptionConfig", "type": "structure"}, - {"name": "ActivationState", "shape": "ActivationStateV1", "type": "structure"}, - { - "name": "QuotaAllocationTarget", - "shape": "QuotaAllocationTarget", - "type": "structure", - }, - {"name": "QuotaAllocationDescription", "shape": "EntityDescription", "type": "string"}, - ], - "type": "structure", - }, - "UpdateQuotaAllocationResponse": { - "members": [ - {"name": "QuotaAllocationArn", "shape": "QuotaAllocationArn", "type": "string"} - ], - "type": "structure", - }, - "UpdateSharedModelRequest": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - {"name": "Comment", "shape": "Comment", "type": "string"}, - {"name": "ModelArtifacts", "shape": "SharedModelArtifacts", "type": "map"}, - {"name": "Origin", "shape": "Origin", "type": "string"}, - ], - "type": "structure", - }, - "UpdateSharedModelResponse": { - "members": [ - {"name": "SharedModelId", "shape": "SharedModelId", "type": "string"}, - {"name": "SharedModelVersion", "shape": "SharedModelVersion", "type": "string"}, - ], - "type": "structure", - }, "UpdateSpaceRequest": { "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, @@ -22240,52 +18237,6 @@ "members": [{"name": "TrainingJobArn", "shape": "TrainingJobArn", "type": "string"}], "type": "structure", }, - "UpdateTrainingPlanRequest": { - "members": [ - {"name": "TrainingPlanName", "shape": "TrainingPlanName", "type": "string"}, - { - "name": "MaxWaitTimeInSeconds", - "shape": "TrainingPlanMaxWaitTimeInSeconds", - "type": "integer", - }, - {"name": "RequestedStartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "RequestedEndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "InstanceCount", "shape": "TrainingPlanInstanceCount", "type": "integer"}, - ], - "type": "structure", - }, - "UpdateTrainingPlanResponse": { - "members": [ - {"name": "TrainingPlanArn", "shape": "TrainingPlanArn", "type": "string"}, - {"name": "Status", "shape": "TrainingPlanStatus", "type": "string"}, - ], - "type": "structure", - }, - "UpdateTrialComponentInternalRequest": { - "members": [ - {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "DisplayName", "shape": "ExperimentEntityName", "type": "string"}, - {"name": "Status", "shape": "TrialComponentStatus", "type": "structure"}, - {"name": "StartTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "EndTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "Parameters", "shape": "TrialComponentParameters", "type": "map"}, - {"name": "ParametersToRemove", "shape": "ListTrialComponentKey256", "type": "list"}, - {"name": "InputArtifacts", "shape": "TrialComponentArtifacts", "type": "map"}, - {"name": "InputArtifactsToRemove", "shape": "ListTrialComponentKey256", "type": "list"}, - {"name": "OutputArtifacts", "shape": "TrialComponentArtifacts", "type": "map"}, - { - "name": "OutputArtifactsToRemove", - "shape": "ListTrialComponentKey256", - "type": "list", - }, - {"name": "CustomerDetails", "shape": "CustomerDetails", "type": "structure"}, - ], - "type": "structure", - }, - "UpdateTrialComponentInternalResponse": { - "members": [{"name": "TrialComponentArn", "shape": "TrialComponentArn", "type": "string"}], - "type": "structure", - }, "UpdateTrialComponentRequest": { "members": [ {"name": "TrialComponentName", "shape": "ExperimentEntityName", "type": "string"}, @@ -22325,7 +18276,6 @@ "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, {"name": "UserProfileName", "shape": "UserProfileName", "type": "string"}, - {"name": "UserPolicy", "shape": "String2048", "type": "string"}, {"name": "UserSettings", "shape": "UserSettings", "type": "structure"}, ], "type": "structure", @@ -22356,8 +18306,6 @@ "members": [ {"name": "WorkteamName", "shape": "WorkteamName", "type": "string"}, {"name": "MemberDefinitions", "shape": "MemberDefinitions", "type": "list"}, - {"name": "MembershipRule", "shape": "MembershipRule", "type": "structure"}, - {"name": "MembershipType", "shape": "MembershipType", "type": "string"}, {"name": "Description", "shape": "String200", "type": "string"}, { "name": "NotificationConfiguration", @@ -22376,87 +18324,6 @@ "members": [{"name": "Workteam", "shape": "Workteam", "type": "structure"}], "type": "structure", }, - "UpgradeMlflowTrackingServerVersionRequest": { - "members": [ - {"name": "TrackingServerName", "shape": "TrackingServerName", "type": "string"}, - {"name": "MlflowVersion", "shape": "String", "type": "string"}, - ], - "type": "structure", - }, - "UpgradeMlflowTrackingServerVersionResponse": { - "members": [{"name": "TrackingServerArn", "shape": "TrackingServerArn", "type": "string"}], - "type": "structure", - }, - "UpgradeRollbackVersionDetails": { - "members": [ - {"name": "SnapshotTime", "shape": "Timestamp", "type": "timestamp"}, - {"name": "PreviousVersion", "shape": "MlflowVersion", "type": "string"}, - ], - "type": "structure", - }, - "UpstreamPlatformConfig": { - "members": [ - { - "name": "CredentialProxyConfig", - "shape": "CredentialProxyConfig", - "type": "structure", - }, - {"name": "LogRoutingConfig", "shape": "LogRoutingConfig", "type": "structure"}, - {"name": "VpcConfig", "shape": "VpcConfig", "type": "structure"}, - { - "name": "AgentsCredentialProvider", - "shape": "AgentsCredentialProvider", - "type": "structure", - }, - { - "name": "OutputDataConfig", - "shape": "UpstreamPlatformOutputDataConfig", - "type": "structure", - }, - {"name": "CheckpointConfig", "shape": "CheckpointConfig", "type": "structure"}, - {"name": "UpstreamCustomerAccountId", "shape": "AccountId", "type": "string"}, - {"name": "UpstreamCustomerArn", "shape": "UpstreamCustomerArn", "type": "string"}, - {"name": "EnableS3ContextKeysOnInputData", "shape": "Boolean", "type": "boolean"}, - {"name": "ExecutionRole", "shape": "RoleArn", "type": "string"}, - ], - "type": "structure", - }, - "UpstreamPlatformOutputChannels": { - "member_shape": "OutputChannel", - "member_type": "structure", - "type": "list", - }, - "UpstreamPlatformOutputDataConfig": { - "members": [ - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - {"name": "KmsEncryptionContext", "shape": "KmsEncryptionContext", "type": "map"}, - {"name": "Channels", "shape": "UpstreamPlatformOutputChannels", "type": "list"}, - ], - "type": "structure", - }, - "UpstreamProcessingOutput": { - "members": [ - {"name": "OutputName", "shape": "String", "type": "string"}, - { - "name": "UpstreamS3Output", - "shape": "ProcessingUpstreamS3Output", - "type": "structure", - }, - ], - "type": "structure", - }, - "UpstreamProcessingOutputConfig": { - "members": [ - {"name": "Outputs", "shape": "UpstreamProcessingOutputs", "type": "list"}, - {"name": "KmsKeyId", "shape": "KmsKeyId", "type": "string"}, - ], - "type": "structure", - }, - "UpstreamProcessingOutputs": { - "member_shape": "UpstreamProcessingOutput", - "member_type": "structure", - "type": "list", - }, "UserContext": { "members": [ {"name": "UserProfileArn", "shape": "String", "type": "string"}, @@ -22466,28 +18333,6 @@ ], "type": "structure", }, - "UserProfile": { - "members": [ - {"name": "DomainId", "shape": "DomainId", "type": "string"}, - {"name": "UserProfileArn", "shape": "UserProfileArn", "type": "string"}, - {"name": "UserProfileName", "shape": "UserProfileName", "type": "string"}, - {"name": "HomeEfsFileSystemUid", "shape": "EfsUid", "type": "string"}, - {"name": "Status", "shape": "UserProfileStatus", "type": "string"}, - {"name": "LastModifiedTime", "shape": "LastModifiedTime", "type": "timestamp"}, - {"name": "CreationTime", "shape": "CreationTime", "type": "timestamp"}, - {"name": "FailureReason", "shape": "FailureReason", "type": "string"}, - { - "name": "SingleSignOnUserIdentifier", - "shape": "SingleSignOnUserIdentifier", - "type": "string", - }, - {"name": "SingleSignOnUserValue", "shape": "String256", "type": "string"}, - {"name": "UserPolicy", "shape": "String2048", "type": "string"}, - {"name": "UserSettings", "shape": "UserSettings", "type": "structure"}, - {"name": "Tags", "shape": "TagList", "type": "list"}, - ], - "type": "structure", - }, "UserProfileDetails": { "members": [ {"name": "DomainId", "shape": "DomainId", "type": "string"}, @@ -22503,15 +18348,9 @@ "member_type": "structure", "type": "list", }, - "UserProfileNameList": { - "member_shape": "UserProfileName", - "member_type": "string", - "type": "list", - }, "UserSettings": { "members": [ {"name": "ExecutionRole", "shape": "RoleArn", "type": "string"}, - {"name": "EnvironmentSettings", "shape": "EnvironmentSettings", "type": "structure"}, {"name": "SecurityGroups", "shape": "SecurityGroupIds", "type": "list"}, {"name": "SharingSettings", "shape": "SharingSettings", "type": "structure"}, { @@ -22536,8 +18375,6 @@ }, {"name": "RSessionAppSettings", "shape": "RSessionAppSettings", "type": "structure"}, {"name": "CanvasAppSettings", "shape": "CanvasAppSettings", "type": "structure"}, - {"name": "VSCodeAppSettings", "shape": "VSCodeAppSettings", "type": "structure"}, - {"name": "SaviturAppSettings", "shape": "SaviturAppSettings", "type": "structure"}, { "name": "CodeEditorAppSettings", "shape": "CodeEditorAppSettings", @@ -22561,7 +18398,6 @@ "type": "structure", }, {"name": "CustomFileSystemConfigs", "shape": "CustomFileSystemConfigs", "type": "list"}, - {"name": "EmrSettings", "shape": "EmrSettings", "type": "structure"}, { "name": "StudioWebPortalSettings", "shape": "StudioWebPortalSettings", @@ -22571,14 +18407,6 @@ ], "type": "structure", }, - "VSCodeAppSettings": { - "members": [ - {"name": "DefaultResourceSpec", "shape": "ResourceSpec", "type": "structure"}, - {"name": "CustomImages", "shape": "CustomImages", "type": "list"}, - {"name": "LifecycleConfigArns", "shape": "LifecycleConfigArns", "type": "list"}, - ], - "type": "structure", - }, "ValidationError": { "members": [{"name": "Message", "shape": "Message", "type": "string"}], "type": "structure", @@ -22625,13 +18453,6 @@ "member_type": "structure", "type": "list", }, - "Volumes": { - "key_shape": "String2048", - "key_type": "string", - "type": "map", - "value_shape": "String2048", - "value_type": "string", - }, "VpcConfig": { "members": [ {"name": "SecurityGroupIds", "shape": "VpcSecurityGroupIds", "type": "list"}, @@ -22714,6 +18535,10 @@ "type": "structure", }, "Workforces": {"member_shape": "Workforce", "member_type": "structure", "type": "list"}, + "WorkloadSpec": { + "members": [{"name": "Inline", "shape": "String", "type": "string"}], + "type": "structure", + }, "WorkspaceSettings": { "members": [ {"name": "S3ArtifactPath", "shape": "S3Uri", "type": "string"}, @@ -22737,8 +18562,6 @@ "shape": "NotificationConfiguration", "type": "structure", }, - {"name": "MembershipRule", "shape": "MembershipRule", "type": "structure"}, - {"name": "MembershipType", "shape": "MembershipType", "type": "string"}, { "name": "WorkerAccessConfiguration", "shape": "WorkerAccessConfiguration", diff --git a/sagemaker-core/src/sagemaker/core/utils/exceptions.py b/sagemaker-core/src/sagemaker/core/utils/exceptions.py index 26443a2d9a..7f01ace25a 100644 --- a/sagemaker-core/src/sagemaker/core/utils/exceptions.py +++ b/sagemaker-core/src/sagemaker/core/utils/exceptions.py @@ -81,7 +81,13 @@ class TimeoutExceededError(WaiterError): fmt = "Timeout exceeded while waiting for {resource_type}. Final Resource State: {status}. {message}" - def __init__(self, resource_type="(Unkown)", status="(Unkown)", reason="(Unkown)", message="Increase the timeout and try again."): + def __init__( + self, + resource_type="(Unkown)", + status="(Unkown)", + reason="(Unkown)", + message="Increase the timeout and try again.", + ): """Initialize a TimeoutExceededError exception. Args: resource_type (str): The type of resource being waited on. diff --git a/sagemaker-core/src/sagemaker/core/utils/install_requirements.py b/sagemaker-core/src/sagemaker/core/utils/install_requirements.py index 9849ac3593..9756c08bc9 100644 --- a/sagemaker-core/src/sagemaker/core/utils/install_requirements.py +++ b/sagemaker-core/src/sagemaker/core/utils/install_requirements.py @@ -171,7 +171,9 @@ def configure_pip(auth_method=CodeArtifactAuthMethod.AUTO): def install_requirements( - requirements_file="requirements.txt", python_executable=None, auth_method=CodeArtifactAuthMethod.AUTO + requirements_file="requirements.txt", + python_executable=None, + auth_method=CodeArtifactAuthMethod.AUTO, ): """Install pip requirements with optional CodeArtifact authentication. diff --git a/sagemaker-core/src/sagemaker/core/utils/user_agent.py b/sagemaker-core/src/sagemaker/core/utils/user_agent.py index 2c24d0fb92..e854748e7e 100644 --- a/sagemaker-core/src/sagemaker/core/utils/user_agent.py +++ b/sagemaker-core/src/sagemaker/core/utils/user_agent.py @@ -101,6 +101,8 @@ def get_user_agent_extra_suffix() -> str: # Add created_by metadata if attribution has been set created_by = os.environ.get(_CREATED_BY_ENV_VAR) if created_by: - suffix = "{} md/{}#{}".format(suffix, "createdBy", sanitize_user_agent_string_component(created_by)) + suffix = "{} md/{}#{}".format( + suffix, "createdBy", sanitize_user_agent_string_component(created_by) + ) return suffix diff --git a/sagemaker-core/src/sagemaker/core/utils/utils.py b/sagemaker-core/src/sagemaker/core/utils/utils.py index 2881695969..28ae0ba990 100644 --- a/sagemaker-core/src/sagemaker/core/utils/utils.py +++ b/sagemaker-core/src/sagemaker/core/utils/utils.py @@ -365,17 +365,17 @@ def __init__( self.region_name = region_name # Read region from environment variable, default to us-west-2 import os - env_region = os.environ.get('SAGEMAKER_REGION', region_name) - env_stage = os.environ.get('SAGEMAKER_STAGE', 'prod') # default to gamma - logger.info(f"Runs on sagemaker {env_stage}, region:{env_region}") + env_region = os.environ.get("SAGEMAKER_REGION", region_name) + env_stage = os.environ.get("SAGEMAKER_STAGE", "prod") # default to gamma + logger.info(f"Runs on sagemaker {env_stage}, region:{env_region}") self.sagemaker_client = session.client( "sagemaker", region_name=env_region, config=self.config, ) - + self.sagemaker_runtime_client = session.client( "sagemaker-runtime", region_name, config=self.config ) diff --git a/sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py b/sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py index a6f3ffe171..2dcd7ace5c 100644 --- a/sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py +++ b/sagemaker-core/src/sagemaker/core/workflow/pipeline_context.py @@ -382,11 +382,12 @@ def retrieve_caller_name(job_instance): if isinstance(job_instance, Transformer): return "transform" - + # Duck typing for HyperparameterTuner: has 'tune' method and 'model_trainer' attribute # This covers both V2 (fit/best_estimator) and V3 (tune/model_trainer) implementations - if (hasattr(job_instance, 'fit') and hasattr(job_instance, 'best_estimator')) or \ - (hasattr(job_instance, 'tune') and hasattr(job_instance, 'model_trainer')): + if (hasattr(job_instance, "fit") and hasattr(job_instance, "best_estimator")) or ( + hasattr(job_instance, "tune") and hasattr(job_instance, "model_trainer") + ): return "tune" # if isinstance(job_instance, AutoML): # return "auto_ml" diff --git a/sagemaker-core/tests/integ/jumpstart/test_search_integ.py b/sagemaker-core/tests/integ/jumpstart/test_search_integ.py index 7b1354dc06..6bc90d28ed 100644 --- a/sagemaker-core/tests/integ/jumpstart/test_search_integ.py +++ b/sagemaker-core/tests/integ/jumpstart/test_search_integ.py @@ -74,10 +74,10 @@ def test_search_public_hub_models_safe_from_injection(): """Integration test to verify malicious queries don't execute code.""" # This would have executed code with the old eval() implementation malicious_query = "__import__('os').system('echo test')" - + # Should safely return empty results without executing code results = search_public_hub_models(malicious_query) - + # Verify it returns a list (even if empty) and doesn't crash assert isinstance(results, list) # Should not match any models since it's not a valid filter expression diff --git a/sagemaker-core/tests/integ/remote_function/conftest.py b/sagemaker-core/tests/integ/remote_function/conftest.py index 706376ea58..b1135c2407 100644 --- a/sagemaker-core/tests/integ/remote_function/conftest.py +++ b/sagemaker-core/tests/integ/remote_function/conftest.py @@ -150,42 +150,70 @@ def gpu_instance_type(): @pytest.fixture(scope="session") -def dummy_container_without_error(sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory): +def dummy_container_without_error( + sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory +): return _build_container_once( - "dummy_container_without_error", sagemaker_session, compatible_python_version, - DOCKERFILE_TEMPLATE, sagemaker_sdk_tar_path, tmp_path_factory, + "dummy_container_without_error", + sagemaker_session, + compatible_python_version, + DOCKERFILE_TEMPLATE, + sagemaker_sdk_tar_path, + tmp_path_factory, ) @pytest.fixture(scope="session") -def dummy_container_with_user_and_workdir(sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory): +def dummy_container_with_user_and_workdir( + sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory +): return _build_container_once( - "dummy_container_with_user_and_workdir", sagemaker_session, compatible_python_version, - DOCKERFILE_TEMPLATE_WITH_USER_AND_WORKDIR, sagemaker_sdk_tar_path, tmp_path_factory, + "dummy_container_with_user_and_workdir", + sagemaker_session, + compatible_python_version, + DOCKERFILE_TEMPLATE_WITH_USER_AND_WORKDIR, + sagemaker_sdk_tar_path, + tmp_path_factory, ) @pytest.fixture(scope="session") -def dummy_container_incompatible_python_runtime(sagemaker_session, incompatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory): +def dummy_container_incompatible_python_runtime( + sagemaker_session, incompatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory +): return _build_container_once( - "dummy_container_incompatible_python_runtime", sagemaker_session, incompatible_python_version, - DOCKERFILE_TEMPLATE, sagemaker_sdk_tar_path, tmp_path_factory, + "dummy_container_incompatible_python_runtime", + sagemaker_session, + incompatible_python_version, + DOCKERFILE_TEMPLATE, + sagemaker_sdk_tar_path, + tmp_path_factory, ) @pytest.fixture(scope="session") -def dummy_container_with_conda(sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory): +def dummy_container_with_conda( + sagemaker_session, compatible_python_version, sagemaker_sdk_tar_path, tmp_path_factory +): return _build_container_once( - "dummy_container_with_conda", sagemaker_session, compatible_python_version, - DOCKERFILE_TEMPLATE_WITH_CONDA, sagemaker_sdk_tar_path, tmp_path_factory, + "dummy_container_with_conda", + sagemaker_session, + compatible_python_version, + DOCKERFILE_TEMPLATE_WITH_CONDA, + sagemaker_sdk_tar_path, + tmp_path_factory, ) @pytest.fixture(scope="session") def auto_capture_test_container(sagemaker_session, sagemaker_sdk_tar_path, tmp_path_factory): return _build_container_once( - "auto_capture_test_container", sagemaker_session, "3.10", - AUTO_CAPTURE_CLIENT_DOCKER_TEMPLATE, sagemaker_sdk_tar_path, tmp_path_factory, + "auto_capture_test_container", + sagemaker_session, + "3.10", + AUTO_CAPTURE_CLIENT_DOCKER_TEMPLATE, + sagemaker_sdk_tar_path, + tmp_path_factory, is_auto_capture=True, ) @@ -193,8 +221,12 @@ def auto_capture_test_container(sagemaker_session, sagemaker_sdk_tar_path, tmp_p @pytest.fixture(scope="session") def spark_test_container(sagemaker_session, sagemaker_sdk_tar_path, tmp_path_factory): return _build_container_once( - "spark_test_container", sagemaker_session, "3.9", - DOCKERFILE_TEMPLATE, sagemaker_sdk_tar_path, tmp_path_factory, + "spark_test_container", + sagemaker_session, + "3.9", + DOCKERFILE_TEMPLATE, + sagemaker_sdk_tar_path, + tmp_path_factory, ) @@ -252,8 +284,13 @@ def _tmpdir(): def _build_container_once( - fixture_name, sagemaker_session, py_version, docker_template, sdk_tar_path, - tmp_path_factory, is_auto_capture=False, + fixture_name, + sagemaker_session, + py_version, + docker_template, + sdk_tar_path, + tmp_path_factory, + is_auto_capture=False, ): """Build and push a container image exactly once across all xdist workers. diff --git a/sagemaker-core/tests/unit/generated/test_user_agent.py b/sagemaker-core/tests/unit/generated/test_user_agent.py index 8ebb5721a9..7788a6c460 100644 --- a/sagemaker-core/tests/unit/generated/test_user_agent.py +++ b/sagemaker-core/tests/unit/generated/test_user_agent.py @@ -58,7 +58,10 @@ def test_process_studio_metadata_file_not_exists(tmp_path): # Test sanitize_user_agent_string_component function def test_sanitize_replaces_slash_with_dash(): - assert sanitize_user_agent_string_component("awslabs/agent-plugins/sagemaker-ai") == "awslabs-agent-plugins-sagemaker-ai" + assert ( + sanitize_user_agent_string_component("awslabs/agent-plugins/sagemaker-ai") + == "awslabs-agent-plugins-sagemaker-ai" + ) def test_sanitize_allows_alphanumeric(): diff --git a/sagemaker-core/tests/unit/generated/test_utils.py b/sagemaker-core/tests/unit/generated/test_utils.py index 44856d17d5..bf8473119f 100644 --- a/sagemaker-core/tests/unit/generated/test_utils.py +++ b/sagemaker-core/tests/unit/generated/test_utils.py @@ -375,7 +375,7 @@ def test_serialize_method_nested_shape(): class TestUnassignedBehavior: """Test Unassigned class methods for proper behavior. - + Bug fix: GetRecordResponse is not printable and cannot be parsed via iterator. Error: TypeError: 'Unassigned' object is not iterable """ @@ -411,10 +411,10 @@ def test_unassigned_singleton(self): def test_unassigned_in_conditional(self): """Test that Unassigned works correctly in conditionals.""" u = Unassigned() - + # Should evaluate to False if u: pytest.fail("Unassigned should be falsy") - + # Should work with not assert not u diff --git a/sagemaker-core/tests/unit/helper/test_session_helper.py b/sagemaker-core/tests/unit/helper/test_session_helper.py index 55589ee3ef..f825d27639 100644 --- a/sagemaker-core/tests/unit/helper/test_session_helper.py +++ b/sagemaker-core/tests/unit/helper/test_session_helper.py @@ -1370,7 +1370,9 @@ def test_expected_bucket_owner_check_with_prefix(self, session_with_prefix): Bucket="test-bucket", Prefix="sample-prefix", ExpectedBucketOwner="123456789012" ) - def test_expected_bucket_owner_check_without_prefix(self, mock_boto_session, mock_sagemaker_client): + def test_expected_bucket_owner_check_without_prefix( + self, mock_boto_session, mock_sagemaker_client + ): """Test expected bucket owner check uses head_bucket without prefix.""" session = Session( boto_session=mock_boto_session, diff --git a/sagemaker-core/tests/unit/jumpstart/test_search_unit.py b/sagemaker-core/tests/unit/jumpstart/test_search_unit.py index 1c6f4be02f..41faf4bd14 100644 --- a/sagemaker-core/tests/unit/jumpstart/test_search_unit.py +++ b/sagemaker-core/tests/unit/jumpstart/test_search_unit.py @@ -106,7 +106,7 @@ def test_filter_no_eval_execution(): # This would execute code if eval() was used dangerous_expr = "__import__('sys').exit(1)" f = _Filter(dangerous_expr) - + # Should not crash the program or execute the exit result = f.match(["test"]) assert result is False @@ -115,14 +115,15 @@ def test_filter_no_eval_execution(): def test_filter_safe_ast_parsing(): """Test that the filter uses AST parsing instead of eval().""" f = _Filter("test AND keyword") - + # Verify AST is created assert f._ast is None # Not parsed yet f.match(["test", "keyword"]) assert f._ast is not None # AST created after first match - + # Verify it's an AST node, not a string for eval from sagemaker.core.jumpstart.search import _ExpressionNode + assert isinstance(f._ast, _ExpressionNode) diff --git a/sagemaker-core/tests/unit/local/test_image.py b/sagemaker-core/tests/unit/local/test_image.py index 7a7962c19e..4ecf6b9069 100644 --- a/sagemaker-core/tests/unit/local/test_image.py +++ b/sagemaker-core/tests/unit/local/test_image.py @@ -613,7 +613,9 @@ def test_process_with_multiple_inputs(self, mock_session): "test-job", ) - @pytest.mark.skip(reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests" + ) def test_train_with_multiple_channels(self, mock_session): """Test train method with multiple input channels""" with patch( @@ -702,7 +704,9 @@ def test_train_with_multiple_channels(self, mock_session): == "/tmp/model.tar.gz" ) - @pytest.mark.skip(reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests" + ) def test_serve_with_environment_variables(self, mock_session): """Test serve method with environment variables""" with patch( @@ -861,7 +865,9 @@ def test_write_config_files(self, mock_session): assert mock_write.call_count == 3 # hyperparameters, resourceconfig, inputdataconfig - @pytest.mark.skip(reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-serve module which is not installed in sagemaker-core tests" + ) def test_prepare_training_volumes_with_local_code(self, mock_session): """Test _prepare_training_volumes with local code directory""" with patch( diff --git a/sagemaker-core/tests/unit/local/test_local_utils.py b/sagemaker-core/tests/unit/local/test_local_utils.py index e5d51e7e75..989833eff4 100644 --- a/sagemaker-core/tests/unit/local/test_local_utils.py +++ b/sagemaker-core/tests/unit/local/test_local_utils.py @@ -118,10 +118,12 @@ def test_get_child_process_ids(m_subprocess): get_child_process_ids("123") m_subprocess.Popen.assert_called_with(cmd, stdout=m_subprocess.PIPE, stderr=m_subprocess.PIPE) + def test_get_child_process_ids_exception(): with pytest.raises(ValueError, match="Invalid PID"): get_child_process_ids("abc") + @patch("sagemaker.core.local.utils.subprocess") def test_get_docker_host(m_subprocess): cmd = "docker context inspect".split() diff --git a/sagemaker-core/tests/unit/modules/local_core/test_local_container.py b/sagemaker-core/tests/unit/modules/local_core/test_local_container.py index a4c137484d..544e4a71c9 100644 --- a/sagemaker-core/tests/unit/modules/local_core/test_local_container.py +++ b/sagemaker-core/tests/unit/modules/local_core/test_local_container.py @@ -1029,6 +1029,7 @@ class TestRmtree: @patch(f"{MODULE}.shutil.rmtree") def test_rmtree_success(self, mock_rmtree): from sagemaker.core.modules.local_core.local_container import _rmtree + _rmtree("/tmp/test", RMTREE_IMAGE) mock_rmtree.assert_called_once_with("/tmp/test") @@ -1036,10 +1037,22 @@ def test_rmtree_success(self, mock_rmtree): @patch(f"{MODULE}.subprocess.run") def test_rmtree_permission_error_docker_chmod_fallback(self, mock_run, mock_rmtree): from sagemaker.core.modules.local_core.local_container import _rmtree + mock_rmtree.side_effect = [PermissionError("Permission denied"), None] _rmtree("/tmp/test", RMTREE_IMAGE) mock_run.assert_called_once_with( - ["docker", "run", "--rm", "-v", "/tmp/test:/delete", RMTREE_IMAGE, "chmod", "-R", "777", "/delete"], + [ + "docker", + "run", + "--rm", + "-v", + "/tmp/test:/delete", + RMTREE_IMAGE, + "chmod", + "-R", + "777", + "/delete", + ], check=True, capture_output=True, ) @@ -1049,14 +1062,23 @@ def test_rmtree_permission_error_docker_chmod_fallback(self, mock_run, mock_rmtr @patch(f"{MODULE}.subprocess.run") def test_rmtree_studio_adds_network(self, mock_run, mock_rmtree): from sagemaker.core.modules.local_core.local_container import _rmtree + mock_rmtree.side_effect = [PermissionError("Permission denied"), None] _rmtree("/tmp/test", RMTREE_IMAGE, is_studio=True) mock_run.assert_called_once_with( [ - "docker", "run", "--rm", - "--network", "sagemaker", - "-v", "/tmp/test:/delete", RMTREE_IMAGE, - "chmod", "-R", "777", "/delete", + "docker", + "run", + "--rm", + "--network", + "sagemaker", + "-v", + "/tmp/test:/delete", + RMTREE_IMAGE, + "chmod", + "-R", + "777", + "/delete", ], check=True, capture_output=True, @@ -1066,6 +1088,7 @@ def test_rmtree_studio_adds_network(self, mock_run, mock_rmtree): @patch(f"{MODULE}.subprocess.run") def test_rmtree_docker_fallback_fails_raises(self, mock_run, mock_rmtree): from sagemaker.core.modules.local_core.local_container import _rmtree + mock_rmtree.side_effect = PermissionError("Permission denied") mock_run.side_effect = Exception("docker failed") with pytest.raises(Exception, match="docker failed"): @@ -1074,6 +1097,7 @@ def test_rmtree_docker_fallback_fails_raises(self, mock_run, mock_rmtree): @patch(f"{MODULE}.shutil.rmtree") def test_rmtree_no_image_raises(self, mock_rmtree): from sagemaker.core.modules.local_core.local_container import _rmtree + mock_rmtree.side_effect = PermissionError("Permission denied") with pytest.raises(PermissionError): _rmtree("/tmp/test") diff --git a/sagemaker-core/tests/unit/remote_function/runtime_environment/test_runtime_environment_manager.py b/sagemaker-core/tests/unit/remote_function/runtime_environment/test_runtime_environment_manager.py index be2f1430d6..5f66085134 100644 --- a/sagemaker-core/tests/unit/remote_function/runtime_environment/test_runtime_environment_manager.py +++ b/sagemaker-core/tests/unit/remote_function/runtime_environment/test_runtime_environment_manager.py @@ -495,9 +495,9 @@ def test_run_shell_cmd_success(self, mock_log_error, mock_log_output, mock_popen mock_process.wait.return_value = 0 mock_popen.return_value = mock_process mock_log_error.return_value = "" - + _run_shell_cmd(["echo", "test"]) - + mock_popen.assert_called_once() @patch( diff --git a/sagemaker-core/tests/unit/remote_function/test_client.py b/sagemaker-core/tests/unit/remote_function/test_client.py index 8621b98063..167233cab9 100644 --- a/sagemaker-core/tests/unit/remote_function/test_client.py +++ b/sagemaker-core/tests/unit/remote_function/test_client.py @@ -64,7 +64,7 @@ def my_function(x): with pytest.raises(TypeError): RemoteExecutor._validate_submit_args(my_function, 1, 2) - + def test_validate_env_names_valid(self): """Test valid conda environment names""" valid_names = [ @@ -87,6 +87,7 @@ def test_validate_env_names_invalid(self): with pytest.raises(ValueError): RemoteExecutor._validate_env_name(name) + class TestWorkerFunctions: """Test worker thread functions""" diff --git a/sagemaker-core/tests/unit/telemetry/test_telemetry_logging.py b/sagemaker-core/tests/unit/telemetry/test_telemetry_logging.py index 04154e6ad7..455d2d0130 100644 --- a/sagemaker-core/tests/unit/telemetry/test_telemetry_logging.py +++ b/sagemaker-core/tests/unit/telemetry/test_telemetry_logging.py @@ -496,7 +496,6 @@ def test_construct_url_with_created_by(self): self.assertEqual(url, expected_url) self.assertIn("x-createdBy=awslabs%2Fagent-plugins%2Fsagemaker-ai", url) - @patch("sagemaker.core.telemetry.telemetry_logging._send_telemetry_request") @patch("sagemaker.core.telemetry.telemetry_logging.resolve_value_from_config") def test_telemetry_emitter_with_resource_arn( diff --git a/sagemaker-core/tests/unit/test_common_utils.py b/sagemaker-core/tests/unit/test_common_utils.py index 8aeb496922..efc4ceb30f 100644 --- a/sagemaker-core/tests/unit/test_common_utils.py +++ b/sagemaker-core/tests/unit/test_common_utils.py @@ -2226,7 +2226,6 @@ def test_nested_set_dict_multiple_keys(self): assert d["a"]["b"]["c"] == "value" - class TestValidateSourceDirectory: """Test _validate_source_directory function.""" diff --git a/sagemaker-core/tests/unit/test_jumpstart_utils.py b/sagemaker-core/tests/unit/test_jumpstart_utils.py index 73207e6963..9477319520 100644 --- a/sagemaker-core/tests/unit/test_jumpstart_utils.py +++ b/sagemaker-core/tests/unit/test_jumpstart_utils.py @@ -1479,7 +1479,9 @@ def test_add_instance_rate_stats_none_metrics(self): result = utils.add_instance_rate_stats_to_benchmark_metrics("us-west-2", None) assert result is None - @pytest.mark.skip(reason="Requires AWS Pricing API permissions which are not available in CI environment") + @pytest.mark.skip( + reason="Requires AWS Pricing API permissions which are not available in CI environment" + ) @patch("sagemaker.core.common_utils.get_instance_rate_per_hour") def test_add_instance_rate_stats_success(self, mock_get_rate): """Test successfully adding instance rate stats""" diff --git a/sagemaker-core/tests/unit/test_optional_torch_dependency.py b/sagemaker-core/tests/unit/test_optional_torch_dependency.py index 2b7efbc227..a4c001e43c 100644 --- a/sagemaker-core/tests/unit/test_optional_torch_dependency.py +++ b/sagemaker-core/tests/unit/test_optional_torch_dependency.py @@ -59,7 +59,8 @@ def test_serializer_module_imports_without_torch(): Runs in a subprocess to avoid polluting the current process's class hierarchy via importlib.reload (which breaks six.with_metaclass). """ - code = textwrap.dedent("""\ + code = textwrap.dedent( + """\ import sys # Block torch before any sagemaker imports sys.modules["torch"] = None @@ -76,15 +77,16 @@ def test_serializer_module_imports_without_torch(): assert JSONSerializer() is not None assert IdentitySerializer() is not None print("OK") - """) + """ + ) result = subprocess.run( [sys.executable, "-c", code], capture_output=True, text=True, ) - assert result.returncode == 0, ( - f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}" - ) + assert ( + result.returncode == 0 + ), f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}" def test_deserializer_module_imports_without_torch(): @@ -92,7 +94,8 @@ def test_deserializer_module_imports_without_torch(): Runs in a subprocess for the same reason as the serializer test above. """ - code = textwrap.dedent("""\ + code = textwrap.dedent( + """\ import sys sys.modules["torch"] = None @@ -110,15 +113,16 @@ def test_deserializer_module_imports_without_torch(): assert NumpyDeserializer() is not None assert JSONDeserializer() is not None print("OK") - """) + """ + ) result = subprocess.run( [sys.executable, "-c", code], capture_output=True, text=True, ) - assert result.returncode == 0, ( - f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}" - ) + assert ( + result.returncode == 0 + ), f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}" def test_torch_tensor_serializer_raises_import_error_without_torch(): diff --git a/sagemaker-core/tests/unit/test_processing.py b/sagemaker-core/tests/unit/test_processing.py index 3ff94b8adf..9e87755de7 100644 --- a/sagemaker-core/tests/unit/test_processing.py +++ b/sagemaker-core/tests/unit/test_processing.py @@ -238,8 +238,6 @@ def test_normalize_outputs_invalid_type(self, mock_session): processor._normalize_outputs(["invalid"]) - - class TestBugConditionFileUriReplacedInLocalMode: """Bug condition exploration test: file:// URIs should be preserved in local mode. @@ -444,7 +442,9 @@ def test_pipeline_variable_uri_skips_normalization(self, session_local_mode_fals [{"key": "value"}], ], ) - def test_non_processing_output_raises_type_error(self, invalid_output, session_local_mode_false): + def test_non_processing_output_raises_type_error( + self, invalid_output, session_local_mode_false + ): """Non-ProcessingOutput objects must raise TypeError. **Validates: Requirements 3.4** @@ -1155,7 +1155,6 @@ def test_package_code_source_dir_not_exists(self, mock_session): kms_key=None, ) - def test_package_code_with_code_location(self, mock_session): processor = FrameworkProcessor( role="arn:aws:iam::123456789012:role/SageMakerRole", @@ -1459,11 +1458,17 @@ def test_start_new_removes_tags_from_processing_job(self, mock_session): "tags": [{"Key": "Key", "Value": "Value"}], }, ): - with patch("sagemaker.core.processing.serialize", return_value={"tags": [{"Key": "Key", "Value": "Value"}]}): + with patch( + "sagemaker.core.processing.serialize", + return_value={"tags": [{"Key": "Key", "Value": "Value"}]}, + ): with patch("sagemaker.core.processing.ProcessingJob") as mock_job_class: with patch( "sagemaker.core.utils.code_injection.codec.transform", - return_value={"processing_job_name": "test-job", "tags": [{"Key": "Key", "Value": "Value"}]}, + return_value={ + "processing_job_name": "test-job", + "tags": [{"Key": "Key", "Value": "Value"}], + }, ): processor._start_new([], [], None) # Verify ProcessingJob was called without tags diff --git a/sagemaker-core/tests/unit/test_transformer.py b/sagemaker-core/tests/unit/test_transformer.py index 621df013f1..680d56628b 100644 --- a/sagemaker-core/tests/unit/test_transformer.py +++ b/sagemaker-core/tests/unit/test_transformer.py @@ -541,7 +541,9 @@ def test_load_config_with_transform_ami_version(self, mock_session): assert "resource_config" in config assert config["resource_config"]["instance_count"] == 2 assert config["resource_config"]["instance_type"] == "ml.g4dn.xlarge" - assert config["resource_config"]["transform_ami_version"] == "al2-ami-sagemaker-batch-gpu-535" + assert ( + config["resource_config"]["transform_ami_version"] == "al2-ami-sagemaker-batch-gpu-535" + ) def test_delete_model(self, mock_session): """Test delete_model method""" diff --git a/sagemaker-core/tests/unit/workflow/test_utilities.py b/sagemaker-core/tests/unit/workflow/test_utilities.py index 5e9ed7bbbd..fa8d459f77 100644 --- a/sagemaker-core/tests/unit/workflow/test_utilities.py +++ b/sagemaker-core/tests/unit/workflow/test_utilities.py @@ -44,7 +44,9 @@ def to_request(self): class TestWorkflowUtilities: """Test cases for workflow utility functions""" - @pytest.mark.skip(reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests" + ) def test_list_to_request_with_entities(self): """Test list_to_request with Entity objects""" entities = [MockEntity(), MockEntity()] @@ -54,7 +56,9 @@ def test_list_to_request_with_entities(self): assert len(result) == 2 assert all(item["Type"] == "MockEntity" for item in result) - @pytest.mark.skip(reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests" + ) def test_list_to_request_with_step_collection(self): """Test list_to_request with StepCollection""" from sagemaker.mlops.workflow.step_collections import StepCollection @@ -66,7 +70,9 @@ def test_list_to_request_with_step_collection(self): assert len(result) == 2 - @pytest.mark.skip(reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests") + @pytest.mark.skip( + reason="Requires sagemaker-mlops module which is not installed in sagemaker-core tests" + ) def test_list_to_request_mixed(self): """Test list_to_request with mixed entities and collections""" from sagemaker.mlops.workflow.step_collections import StepCollection @@ -276,7 +282,9 @@ def test_get_training_code_hash_with_source_dir(self): entry_point=str(entry_file), source_dir=temp_dir, dependencies=None ) result_with_deps = get_training_code_hash( - entry_point=str(entry_file), source_dir=temp_dir, dependencies=str(requirements_file) + entry_point=str(entry_file), + source_dir=temp_dir, + dependencies=str(requirements_file), ) assert result_no_deps is not None diff --git a/sagemaker-mlops/src/sagemaker/mlops/feature_store/feature_group_manager.py b/sagemaker-mlops/src/sagemaker/mlops/feature_store/feature_group_manager.py index ecd666f2be..45a4e0dec3 100644 --- a/sagemaker-mlops/src/sagemaker/mlops/feature_store/feature_group_manager.py +++ b/sagemaker-mlops/src/sagemaker/mlops/feature_store/feature_group_manager.py @@ -14,7 +14,6 @@ from sagemaker.core.resources import FeatureGroup from sagemaker.core.resources import Base from sagemaker.core.shapes import ( - AddOnlineStoreReplicaAction, FeatureDefinition, OfflineStoreConfig, OnlineStoreConfig, diff --git a/sagemaker-mlops/tests/unit/sagemaker/mlops/feature_store/test_iceberg_properties.py b/sagemaker-mlops/tests/unit/sagemaker/mlops/feature_store/test_iceberg_properties.py index 8103307cc7..4371e3dbcd 100644 --- a/sagemaker-mlops/tests/unit/sagemaker/mlops/feature_store/test_iceberg_properties.py +++ b/sagemaker-mlops/tests/unit/sagemaker/mlops/feature_store/test_iceberg_properties.py @@ -689,7 +689,7 @@ def test_no_iceberg_operations_when_none(self, mock_get_client, mock_refresh, mo mock_get_client.return_value = mock_client fg = FeatureGroupManager(feature_group_name="test-fg") - fg.update(description="new description") + fg.update(feature_additions=[]) mock_update_iceberg.assert_not_called() @@ -727,7 +727,7 @@ def test_iceberg_update_called_with_properties(self, mock_get_client, mock_refre table_format="Iceberg", ) iceberg_props = IcebergProperties(properties={"write.target-file-size-bytes": "536870912"}) - fg.update(description="new description", iceberg_properties=iceberg_props, session=None, region=None) + fg.update(feature_additions=[], iceberg_properties=iceberg_props, session=None, region=None) mock_update_iceberg.assert_called_once_with( iceberg_properties=iceberg_props, @@ -779,14 +779,14 @@ def test_parent_update_receives_only_standard_params(self, mock_get_client, mock table_format="Iceberg", ) fg.update( - description="new desc", + feature_additions=[], iceberg_properties=IcebergProperties(properties={"write.target-file-size-bytes": "val"}), ) # Verify the SageMaker API call does NOT contain iceberg_properties call_args = mock_client.update_feature_group.call_args assert "IcebergProperties" not in call_args[1] - assert "Description" in call_args[1] + assert "FeatureGroupName" in call_args[1] @patch.object(FeatureGroupManager, "_update_iceberg_properties") @patch.object(FeatureGroupManager, "refresh") @@ -812,7 +812,7 @@ def test_update_logs_and_reraises_when_iceberg_update_fails(self, mock_get_clien iceberg_props = IcebergProperties(properties={"write.target-file-size-bytes": "536870912"}) with pytest.raises(RuntimeError, match="Iceberg catalog error"): - fg.update(description="new desc", iceberg_properties=iceberg_props, session=None, region=None) + fg.update(feature_additions=[], iceberg_properties=iceberg_props, session=None, region=None) # Parent update was called successfully before iceberg update failed mock_client.update_feature_group.assert_called_once() diff --git a/sagemaker-train/src/sagemaker/train/common_utils/finetune_utils.py b/sagemaker-train/src/sagemaker/train/common_utils/finetune_utils.py index 90f0dfef52..4aa67e3d28 100644 --- a/sagemaker-train/src/sagemaker/train/common_utils/finetune_utils.py +++ b/sagemaker-train/src/sagemaker/train/common_utils/finetune_utils.py @@ -385,8 +385,7 @@ def _get_fine_tuning_options_and_model_arn(model_name: str, customization_techni def _create_input_channels(dataset: str, content_type: Optional[str] = None, input_compression_type: Optional[str] = None, record_wrapper_type: Optional[str] = None, - input_mode: Optional[str] = None, - enable_ffm: Optional[bool] = None): + input_mode: Optional[str] = None): """Create input channels from dataset (S3 URI or dataset ARN). Args: @@ -421,9 +420,8 @@ def _create_input_channels(dataset: str, content_type: Optional[str] = None, content_type=content_type, compression_type=input_compression_type, record_wrapper_type=record_wrapper_type, - input_mode=input_mode, - enable_ffm=enable_ffm, - ) + input_mode=input_mode + ) channels.append(channel) return channels diff --git a/sagemaker-train/tests/integ/jumpstart/test_jumpstart_train.py b/sagemaker-train/tests/integ/jumpstart/test_jumpstart_train.py index 2ee33f760c..298ea85e3e 100644 --- a/sagemaker-train/tests/integ/jumpstart/test_jumpstart_train.py +++ b/sagemaker-train/tests/integ/jumpstart/test_jumpstart_train.py @@ -30,7 +30,7 @@ }, # Override default instance type; the model's default # (ml.p3.2xlarge) is deprecated. - "compute": Compute(instance_type="ml.g5.xlarge"), + "compute": Compute(instance_type="ml.g4dn.xlarge"), }, {"model_id": "xgboost-classification-model"}, {"model_id": "catboost-regression-model"},