Update service-2.json with latest public botocore service model#5809
Merged
Conversation
Replaced the bundled service-2.json with the latest public botocore SageMaker service model and updated codegen tooling to handle differences in the public model: - Added PIPE_VAR_OVERRIDES for ResourceConfig fields (IntPipeVar) - Added REQUIRED_TO_OPTIONAL_OVERRIDES for ModelPackage/SecurityConfig - Added EXCLUDED_RESOURCES for Session to avoid name collision - Updated shapes output path to shapes/ directory
Re-ran codegen to regenerate resources.py, shapes.py, config_schema.py, resource_plan.csv, and shape_dag.py.
nargokul
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaced the bundled
service-2.jsonwith the latest public botocore SageMaker service model and updated codegen tooling + downstream packages to accommodate differences in the new model.Changes
sample/sagemaker/2017-07-24/service-2.jsontools/constants.pyPIPE_VAR_OVERRIDESfor ResourceConfig fields; extendedREQUIRED_TO_OPTIONAL_OVERRIDESfor ModelPackage/SecurityConfig; addedIntPipeVarmapping; addedSHAPES_CODEGEN_OUTPUT_DIRInstanceCount,VolumeSizeInGB) as plain integers that need to be pipeline-variable-aware; some members marked required in the model are optional in practicetools/resources_extractor.pyEXCLUDED_RESOURCESset to excludeSessionSessionresource that collides withboto3.session.Sessionimporttools/shapes_extractor.pyPIPE_VAR_OVERRIDESinto shape member type resolutionIntPipeVarinstead ofintfor overridden fieldstools/shapes_codegen.pyIntPipeVarimport in generated code; updated default output dir toshapes/tools/resources_codegen.pyIntPipeVartoPYTHON_TYPESlistIntPipeVarfields are recognized as configurable attributesresources.py,shapes.py,config_schema.py,shape_dag.py,resource_plan.csvsagemaker-mlops/andsagemaker-train/Testing