Skip to content

Commit 95b38ce

Browse files
authored
feat: Update Transformers 4.28 - PyTorch 2.0.0 Training and Inference Image URI (#3885)
1 parent 7932c3c commit 95b38ce

File tree

2 files changed

+99
-5
lines changed

2 files changed

+99
-5
lines changed

src/sagemaker/image_uri_config/huggingface.json

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"4.11": "4.11.0",
1010
"4.12": "4.12.3",
1111
"4.17": "4.17.0",
12-
"4.26": "4.26.0"
12+
"4.26": "4.26.0",
13+
"4.28": "4.28.1"
1314
},
1415
"versions": {
1516
"4.4.2": {
@@ -814,6 +815,47 @@
814815
"repository": "huggingface-pytorch-training",
815816
"container_version": {"gpu": "cu117-ubuntu20.04"}
816817
}
818+
},
819+
"4.28.1": {
820+
"version_aliases": {
821+
"pytorch2.0": "pytorch2.0.0"
822+
},
823+
"pytorch2.0.0": {
824+
"py_versions": ["py310"],
825+
"registries": {
826+
"af-south-1": "626614931356",
827+
"ap-east-1": "871362719292",
828+
"ap-northeast-1": "763104351884",
829+
"ap-northeast-2": "763104351884",
830+
"ap-northeast-3": "364406365360",
831+
"ap-south-1": "763104351884",
832+
"ap-southeast-1": "763104351884",
833+
"ap-southeast-2": "763104351884",
834+
"ap-southeast-3": "907027046896",
835+
"ca-central-1": "763104351884",
836+
"cn-north-1": "727897471807",
837+
"cn-northwest-1": "727897471807",
838+
"eu-central-1": "763104351884",
839+
"eu-north-1": "763104351884",
840+
"eu-west-1": "763104351884",
841+
"eu-west-2": "763104351884",
842+
"eu-west-3": "763104351884",
843+
"eu-south-1": "692866216735",
844+
"me-south-1": "217643126080",
845+
"me-central-1": "914824155844",
846+
"sa-east-1": "763104351884",
847+
"us-east-1": "763104351884",
848+
"us-east-2": "763104351884",
849+
"us-gov-east-1": "446045086412",
850+
"us-gov-west-1": "442386744353",
851+
"us-iso-east-1": "886529160074",
852+
"us-isob-east-1": "094389454867",
853+
"us-west-1": "763104351884",
854+
"us-west-2": "763104351884"
855+
},
856+
"repository": "huggingface-pytorch-training",
857+
"container_version": {"gpu": "cu118-ubuntu20.04"}
858+
}
817859
}
818860
}
819861
},
@@ -826,7 +868,8 @@
826868
"4.11": "4.11.0",
827869
"4.12": "4.12.3",
828870
"4.17": "4.17.0",
829-
"4.26": "4.26.0"
871+
"4.26": "4.26.0",
872+
"4.28": "4.28.1"
830873
},
831874
"versions": {
832875
"4.6.1": {
@@ -1466,6 +1509,51 @@
14661509
"repository": "huggingface-tensorflow-inference",
14671510
"container_version": {"gpu": "cu112-ubuntu20.04", "cpu": "ubuntu20.04" }
14681511
}
1512+
},
1513+
"4.28.1": {
1514+
"version_aliases": {
1515+
"pytorch2.0": "pytorch2.0.0"
1516+
},
1517+
"pytorch2.0.0": {
1518+
"py_versions": ["py310"],
1519+
"registries": {
1520+
"af-south-1": "626614931356",
1521+
"ap-east-1": "871362719292",
1522+
"ap-northeast-1": "763104351884",
1523+
"ap-northeast-2": "763104351884",
1524+
"ap-northeast-3": "364406365360",
1525+
"ap-south-1": "763104351884",
1526+
"ap-south-2": "772153158452",
1527+
"ap-southeast-1": "763104351884",
1528+
"ap-southeast-2": "763104351884",
1529+
"ap-southeast-3": "907027046896",
1530+
"ap-southeast-4": "457447274322",
1531+
"ca-central-1": "763104351884",
1532+
"cn-north-1": "727897471807",
1533+
"cn-northwest-1": "727897471807",
1534+
"eu-central-1": "763104351884",
1535+
"eu-central-2": "380420809688",
1536+
"eu-north-1": "763104351884",
1537+
"eu-west-1": "763104351884",
1538+
"eu-west-2": "763104351884",
1539+
"eu-west-3": "763104351884",
1540+
"eu-south-1": "692866216735",
1541+
"eu-south-2": "503227376785",
1542+
"me-south-1": "217643126080",
1543+
"me-central-1": "914824155844",
1544+
"sa-east-1": "763104351884",
1545+
"us-east-1": "763104351884",
1546+
"us-east-2": "763104351884",
1547+
"us-gov-east-1": "446045086412",
1548+
"us-gov-west-1": "442386744353",
1549+
"us-iso-east-1": "886529160074",
1550+
"us-isob-east-1": "094389454867",
1551+
"us-west-1": "763104351884",
1552+
"us-west-2": "763104351884"
1553+
},
1554+
"repository": "huggingface-pytorch-inference",
1555+
"container_version": {"gpu": "cu118-ubuntu20.04", "cpu": "ubuntu20.04" }
1556+
}
14691557
}
14701558
}
14711559
}

tests/conftest.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ def huggingface_pytorch_training_version(huggingface_training_version):
277277

278278
@pytest.fixture(scope="module")
279279
def huggingface_pytorch_training_py_version(huggingface_pytorch_training_version):
280-
if Version(huggingface_pytorch_training_version) >= Version("1.13"):
280+
if Version(huggingface_pytorch_training_version) >= Version("2.0"):
281+
return "py310"
282+
elif Version(huggingface_pytorch_training_version) >= Version("1.13"):
281283
return "py39"
282284
elif Version(huggingface_pytorch_training_version) >= Version("1.9"):
283285
return "py38"
@@ -337,7 +339,9 @@ def huggingface_training_compiler_pytorch_py_version(
337339
def huggingface_pytorch_latest_training_py_version(
338340
huggingface_training_pytorch_latest_version,
339341
):
340-
if Version(huggingface_training_pytorch_latest_version) >= Version("1.13"):
342+
if Version(huggingface_training_pytorch_latest_version) >= Version("2.0"):
343+
return "py310"
344+
elif Version(huggingface_training_pytorch_latest_version) >= Version("1.13"):
341345
return "py39"
342346
elif Version(huggingface_training_pytorch_latest_version) >= Version("1.9"):
343347
return "py38"
@@ -359,7 +363,9 @@ def pytorch_training_compiler_py_version(
359363
def huggingface_pytorch_latest_inference_py_version(
360364
huggingface_inference_pytorch_latest_version,
361365
):
362-
if Version(huggingface_inference_pytorch_latest_version) >= Version("1.13"):
366+
if Version(huggingface_inference_pytorch_latest_version) >= Version("2.0"):
367+
return "py310"
368+
elif Version(huggingface_inference_pytorch_latest_version) >= Version("1.13"):
363369
return "py39"
364370
elif Version(huggingface_inference_pytorch_latest_version) >= Version("1.9"):
365371
return "py38"

0 commit comments

Comments
 (0)