fix: resolve HuggingFace version alias in image URI tag by giangle-AI · Pull Request #5722 · aws/sagemaker-python-sdk

added 2 commits

April 7, 2026 16:28
When constructing the image URI tag for HuggingFace framework containers,
the code used `original_version` (the raw user input, e.g. "4.49") instead
of resolving it through the version alias mapping (e.g. "4.49" → "4.49.0").

This caused image URIs to contain truncated transformer versions like
`transformers4.49` instead of the correct `transformers4.49.0`, resulting
in references to non-existent container images.

Use `_version_for_config(version, config)` to properly resolve the version
alias before embedding it in the image tag.

Made-with: Cursor
- Fix existing test_retrieve_huggingface assertions to expect resolved
  versions (4.2.1) instead of raw aliases (4.2) in image tags
- Add parametrized test covering all 25 version aliases across training
  and inference scopes to verify aliases resolve correctly in tags
- Add parametrized test covering all 26 non-aliased (full) versions to
  confirm no regression when passing complete version strings directly

Made-with: Cursor