Repository navigation
fix(training-session): drop the static model list now that the Hub capability keyword is live - #6568
Merged
mufaddal-rohawala merged 1 commit intoNov 6, 2026
Conversation
…pability keyword is live list_base_models() and base_model resolution now keep a Hub model only when it carries @capability:training_session. The Public Hub publishes that keyword in us-west-2, us-east-1 and ap-south-1, so the per-Region static fallback is no longer needed.
There was a problem hiding this comment.
🤖 AI code review
This PR removes the transitional _TRAINABLE_MODELS_BY_REGION static allow-list and its fallback in _is_trainable, now that the Public Hub publishes the @capability:training_session keyword in all serving Regions. This is exactly the follow-up that PR #6506's guidance called for ("Remove _TRAINABLE_MODELS_BY_REGION once the Public Hub publishes @capability:training_session keyword", Source: #6506). The _is_trainable signature is simplified, all call sites and the now-unused region local and FrozenSet import are cleaned up, and the three static-list tests are replaced by a negative test. The change is clean and I found no issues.
Reviewed commit cc15022. Automated review; verify before acting.
maheshxb
approved these changes
Nov 6, 2026
PeterCai7
approved these changes
Nov 6, 2026
mufaddal-rohawala
approved these changes
Nov 6, 2026
mufaddal-rohawala
approved these changes
Nov 6, 2026
This branch was previously deployed
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.
Description of changes:
list_base_models()and base-model resolution now list a Public Hub model only when itsHubContentSearchKeywordscarry@capability:training_session.#6506 added a per-Region static list (
_TRAINABLE_MODELS_BY_REGION) as a stand-in until the Public Hub published that keyword. The Hub now publishes it in every Region that serves Training Sessions, so this PR removes the list and its fallback in_is_trainable. A model enabled later shows up with no SDK change.Testing done:
sagemaker-train/tests/unit/train/training_session: 826 passed. The three static-list tests are replaced by one test: a model without the keyword is not listed.list_base_modelsfrom this branch against the live Public Hub:By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.