Repository navigation
Commit 4ff8e11
fix: resolve HuggingFace version alias in image URI tag (#5722)
* fix: resolve HuggingFace version alias in image URI tag
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
* test: add comprehensive version alias tests for HuggingFace image URIs
- 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
* style: apply black formatting to HuggingFace alias tests
The new parametrized HuggingFace version-alias tests were not formatted
with the repo's pinned black (26.3.1), failing the codestyle-doc-tests
(sagemaker-core) check. Formatting only - no behavior change.
---------
Co-authored-by: Mohamed Zeidan <zeidmo@amazon.com>1 parent 6714174 commit 4ff8e11
2 files changed
Lines changed: 83 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
835 | 915 | | |
836 | 916 | | |
837 | 917 | | |
| |||
0 commit comments