Skip to content

Commit 6f21b06

Browse files
author
Xichao Wang
committed
chore(core): sync the bundled SageMaker service model with botocore
Refreshes sagemaker-core's codegen input from the public botocore model and regenerates the layers built from it. The model file is the upstream bytes verbatim; everything else is the output of ``python -m sagemaker.core.tools.codegen``. Model: 403 -> 409 operations, 3005 -> 3084 shapes. What the refresh brings in -------------------------- * Six new operations: AttachClusterNodeNetworkInterface, and the five training-session operations (Create, Describe, List, Stop, Delete). * 79 new shapes, of which 19 belong to the training-session operations and 60 to other parts of the API. * 66 existing shapes whose definitions have moved upstream, spanning AIBenchmark, AIRecommendation, App and Cluster among others. * NotebookInstance gains the PendingMaintenance and InMaintenance states. * MlflowApp gains kms_key_id in the configuration schema. * A TrainingSession resource, derived from the standard CRUD naming with no registration needed: create / get / get_all, and delete / refresh / stop / wait_for_delete / wait_for_status. No caller is switched over to any newly generated resource here. This change only brings the generated layer back in line with the model. Notes for anyone regenerating ----------------------------- Two things about the generator are worth knowing, since both produce a diff that looks plausible but is wrong: * ``codegen`` needs two passes to converge. ``generate_resources()`` reads the existing config_schema.py to decide which resources get a ``populate_inputs_decorator``, and the schema is regenerated after it, so a single pass emits new resources without one. Those resources then silently ignore sagemaker_config defaults. A third pass is a no-op, so two is enough. * ``resources_extractor`` writes resource_plan.csv to the current working directory, so running the unit tests from sagemaker-core/ overwrites the tracked file with a partial plan. Regenerate before diffing, not after running tests. Separately, codegen does not emit the module docstring at the top of config_schema.py, which is not excluded from flake8 or docstyle. It is preserved here.
1 parent 8452734 commit 6f21b06

6 files changed

Lines changed: 3334 additions & 206 deletions

File tree

‎sagemaker-core/resource_plan.csv‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ModelQualityJobDefinition,resource,"['create', 'get', 'get_all']","['delete', 'r
5656
MonitoringAlert,resource,['get_all'],['update'],[],[],"['ListMonitoringAlerts', 'UpdateMonitoringAlert']",[],[]
5757
MonitoringExecution,resource,['get_all'],[],[],[],['ListMonitoringExecutions'],[],[]
5858
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']"
59-
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']"
59+
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', 'PendingMaintenance', 'InMaintenance']"
6060
NotebookInstanceLifecycleConfig,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",[],[],"['CreateNotebookInstanceLifecycleConfig', 'DeleteNotebookInstanceLifecycleConfig', 'DescribeNotebookInstanceLifecycleConfig', 'ListNotebookInstanceLifecycleConfigs', 'UpdateNotebookInstanceLifecycleConfig']",[],[]
6161
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']"
6262
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']"
@@ -77,6 +77,7 @@ SubscribedWorkteam,resource,"['get', 'get_all']",['refresh'],[],[],"['DescribeSu
7777
Tag,resource,['get_all'],[],[],[],['ListTags'],[],[]
7878
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']"
7979
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']"
80+
TrainingSession,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'stop', 'wait_for_delete', 'wait_for_status']",[],[],"['CreateTrainingSession', 'DeleteTrainingSession', 'DescribeTrainingSession', 'ListTrainingSessions', 'StopTrainingSession']","[{'name': 'TrainingSessionDetail', 'shape_name': 'TrainingSessionDetail'}, {'name': 'TrainingSessionStatus', 'shape_name': 'TrainingSessionStatus'}]","['Created', 'Blocked', 'Running', 'Failed', 'Scheduled', 'Stopping', 'Stopped', 'Expired', 'Deleting', 'DeletionFailed']"
8081
TransformJob,resource,"['create', 'get', 'get_all']","['refresh', 'stop', 'wait']",['Model'],[],"['CreateTransformJob', 'DescribeTransformJob', 'ListTransformJobs', 'StopTransformJob']","[{'name': 'TransformJobStatus', 'shape_name': 'TransformJobStatus'}]","['InProgress', 'Completed', 'Failed', 'Stopping', 'Stopped']"
8182
Trial,resource,"['create', 'get', 'get_all']","['delete', 'refresh', 'update']",['Experiment'],[],"['CreateTrial', 'DeleteTrial', 'DescribeTrial', 'ListTrials', 'UpdateTrial']",[],[]
8283
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']"

0 commit comments

Comments
 (0)