Skip to content

Commit cf07ba7

Browse files
navinsoniahsan-z-khan
authored andcommitted
fix: validate requested transformers version and use the best available version
1 parent d64ad40 commit cf07ba7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/sagemaker/image_uris.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,16 @@ def retrieve(
118118
pt_or_tf_version = (
119119
re.compile("^(pytorch|tensorflow)(.*)$").match(base_framework_version).group(2)
120120
)
121-
tag_prefix = f"{pt_or_tf_version}-transformers{original_version}"
121+
122+
_version = original_version
123+
if repo in [
124+
"huggingface-pytorch-trcomp-training",
125+
"huggingface-tensorflow-trcomp-training",
126+
]:
127+
_version = version
128+
129+
tag_prefix = f"{pt_or_tf_version}-transformers{_version}"
130+
122131
else:
123132
tag_prefix = version_config.get("tag_prefix", version)
124133

0 commit comments

Comments
 (0)