Skip to content

fix(training-session): drop the static model list now that the Hub capability keyword is live - #6568

Merged
mufaddal-rohawala merged 1 commit into
aws:masterfrom
992X:training-session-remove-static-models
Nov 6, 2026
Merged

mufaddal-rohawala merged 1 commit into
aws:masterfrom
992X:training-session-remove-static-models

Conversation

@992X

@992X 992X commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Description of changes:
list_base_models() and base-model resolution now list a Public Hub model only when its HubContentSearchKeywords carry @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.
  • Ran list_base_models from this branch against the live Public Hub:
us-west-2  ['google/gemma-4-31b-it', 'google/gemma-4-E2B-it', 'openai/gpt-oss-20b', 'Qwen/Qwen3.6-27B', 'Qwen/Qwen3.8-27B']
us-east-1  ['openai/gpt-oss-20b']
ap-south-1 ['google/gemma-4-31b-it', 'openai/gpt-oss-20b', 'Qwen/Qwen3.6-27B']

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

@mufaddal-rohawala
mufaddal-rohawala merged commit 7fff227 into aws:master Nov 6, 2026
24 of 27 checks passed

This branch was previously deployed

1 inactive deployment
auto-approve — cc150224 Deployed Nov 6, 2026 by 992X via wait-for-approval #1911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants