Skip to content

Commit b87f794

Browse files
authored
Merge branch 'master' into feat/model-uri-with-script
2 parents 939c77c + 9d9a74c commit b87f794

File tree

14 files changed

+385
-28
lines changed

14 files changed

+385
-28
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
## v2.140.0 (2023-03-17)
4+
5+
### Features
6+
7+
* SDK changes for TRCOMP support
8+
9+
### Bug Fixes and Other Changes
10+
11+
* [Feature - Hugging Face] Update Transformers 4.26 - PyTorch 1.13.1 Image uri
12+
13+
## v2.139.0 (2023-03-15)
14+
15+
### Features
16+
17+
* Add XGBoost framework 1.7-1 version
18+
19+
### Bug Fixes and Other Changes
20+
21+
* Fix image_uris.retrieve() function to return ValueError when framework is not allowed for an instance_type
22+
23+
## v2.138.0 (2023-03-13)
24+
25+
### Features
26+
27+
* Jumpstart training metrics
28+
29+
### Bug Fixes and Other Changes
30+
31+
* Add new region support for MX, PT, TF on SM Training
32+
333
## v2.137.0 (2023-03-10)
434

535
### Features

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.137.1.dev0
1+
2.140.1.dev0

src/sagemaker/huggingface/training_compiler/config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ def validate(cls, estimator):
102102

103103
super(TrainingCompilerConfig, cls).validate(estimator)
104104

105+
if estimator.pytorch_version:
106+
if (Version(estimator.pytorch_version) in SpecifierSet("< 1.9")) or (
107+
Version(estimator.pytorch_version) in SpecifierSet("> 1.11")
108+
):
109+
error_helper_string = (
110+
"SageMaker Training Compiler is only supported "
111+
"with HuggingFace PyTorch 1.9-1.11. "
112+
"Received pytorch_version={} which is unsupported."
113+
)
114+
raise ValueError(error_helper_string.format(estimator.pytorch_version))
115+
105116
if estimator.image_uri:
106117
error_helper_string = (
107118
"Overriding the image URI is currently not supported "

src/sagemaker/image_uri_config/huggingface.json

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"4.10": "4.10.2",
99
"4.11": "4.11.0",
1010
"4.12": "4.12.3",
11-
"4.17": "4.17.0"
11+
"4.17": "4.17.0",
12+
"4.26": "4.26.0"
1213
},
1314
"versions": {
1415
"4.4.2": {
@@ -772,6 +773,47 @@
772773
"repository": "huggingface-tensorflow-training",
773774
"container_version": {"gpu": "cu112-ubuntu20.04"}
774775
}
776+
},
777+
"4.26.0": {
778+
"version_aliases": {
779+
"pytorch1.13": "pytorch1.13.1"
780+
},
781+
"pytorch1.13.1": {
782+
"py_versions": ["py39"],
783+
"registries": {
784+
"af-south-1": "626614931356",
785+
"ap-east-1": "871362719292",
786+
"ap-northeast-1": "763104351884",
787+
"ap-northeast-2": "763104351884",
788+
"ap-northeast-3": "364406365360",
789+
"ap-south-1": "763104351884",
790+
"ap-southeast-1": "763104351884",
791+
"ap-southeast-2": "763104351884",
792+
"ap-southeast-3": "907027046896",
793+
"ca-central-1": "763104351884",
794+
"cn-north-1": "727897471807",
795+
"cn-northwest-1": "727897471807",
796+
"eu-central-1": "763104351884",
797+
"eu-north-1": "763104351884",
798+
"eu-west-1": "763104351884",
799+
"eu-west-2": "763104351884",
800+
"eu-west-3": "763104351884",
801+
"eu-south-1": "692866216735",
802+
"me-south-1": "217643126080",
803+
"me-central-1": "914824155844",
804+
"sa-east-1": "763104351884",
805+
"us-east-1": "763104351884",
806+
"us-east-2": "763104351884",
807+
"us-gov-east-1": "446045086412",
808+
"us-gov-west-1": "442386744353",
809+
"us-iso-east-1": "886529160074",
810+
"us-isob-east-1": "094389454867",
811+
"us-west-1": "763104351884",
812+
"us-west-2": "763104351884"
813+
},
814+
"repository": "huggingface-pytorch-training",
815+
"container_version": {"gpu": "cu117-ubuntu20.04"}
816+
}
775817
}
776818
}
777819
},
@@ -783,7 +825,8 @@
783825
"4.10": "4.10.2",
784826
"4.11": "4.11.0",
785827
"4.12": "4.12.3",
786-
"4.17": "4.17.0"
828+
"4.17": "4.17.0",
829+
"4.26": "4.26.0"
787830
},
788831
"versions": {
789832
"4.6.1": {
@@ -1337,6 +1380,51 @@
13371380
"repository": "huggingface-tensorflow-inference",
13381381
"container_version": {"gpu": "cu112-ubuntu20.04", "cpu": "ubuntu20.04" }
13391382
}
1383+
},
1384+
"4.26.0": {
1385+
"version_aliases": {
1386+
"pytorch1.13": "pytorch1.13.1"
1387+
},
1388+
"pytorch1.13.1": {
1389+
"py_versions": ["py39"],
1390+
"registries": {
1391+
"af-south-1": "626614931356",
1392+
"ap-east-1": "871362719292",
1393+
"ap-northeast-1": "763104351884",
1394+
"ap-northeast-2": "763104351884",
1395+
"ap-northeast-3": "364406365360",
1396+
"ap-south-1": "763104351884",
1397+
"ap-south-2": "772153158452",
1398+
"ap-southeast-1": "763104351884",
1399+
"ap-southeast-2": "763104351884",
1400+
"ap-southeast-3": "907027046896",
1401+
"ap-southeast-4": "457447274322",
1402+
"ca-central-1": "763104351884",
1403+
"cn-north-1": "727897471807",
1404+
"cn-northwest-1": "727897471807",
1405+
"eu-central-1": "763104351884",
1406+
"eu-central-2": "380420809688",
1407+
"eu-north-1": "763104351884",
1408+
"eu-west-1": "763104351884",
1409+
"eu-west-2": "763104351884",
1410+
"eu-west-3": "763104351884",
1411+
"eu-south-1": "692866216735",
1412+
"eu-south-2": "503227376785",
1413+
"me-south-1": "217643126080",
1414+
"me-central-1": "914824155844",
1415+
"sa-east-1": "763104351884",
1416+
"us-east-1": "763104351884",
1417+
"us-east-2": "763104351884",
1418+
"us-gov-east-1": "446045086412",
1419+
"us-gov-west-1": "442386744353",
1420+
"us-iso-east-1": "886529160074",
1421+
"us-isob-east-1": "094389454867",
1422+
"us-west-1": "763104351884",
1423+
"us-west-2": "763104351884"
1424+
},
1425+
"repository": "huggingface-pytorch-inference",
1426+
"container_version": {"gpu": "cu117-ubuntu20.04", "cpu": "ubuntu20.04" }
1427+
}
13401428
}
13411429
}
13421430
}

src/sagemaker/image_uri_config/sklearn.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,42 @@
108108
"us-west-2": "246618743249"
109109
},
110110
"repository": "sagemaker-scikit-learn"
111+
},
112+
"1.2-1": {
113+
"processors": ["cpu"],
114+
"py_versions": ["py3"],
115+
"registries": {
116+
"af-south-1": "510948584623",
117+
"ap-east-1": "651117190479",
118+
"ap-northeast-1": "354813040037",
119+
"ap-northeast-2": "366743142698",
120+
"ap-northeast-3": "867004704886",
121+
"ap-south-1": "720646828776",
122+
"ap-southeast-1": "121021644041",
123+
"ap-southeast-2": "783357654285",
124+
"ap-southeast-3": "951798379941",
125+
"ca-central-1": "341280168497",
126+
"cn-north-1": "450853457545",
127+
"cn-northwest-1": "451049120500",
128+
"eu-central-1": "492215442770",
129+
"eu-north-1": "662702820516",
130+
"eu-west-1": "141502667606",
131+
"eu-west-2": "764974769150",
132+
"eu-west-3": "659782779980",
133+
"eu-south-1": "978288397137",
134+
"me-south-1": "801668240914",
135+
"me-central-1": "272398656194",
136+
"sa-east-1": "737474898029",
137+
"us-east-1": "683313688378",
138+
"us-east-2": "257758044811",
139+
"us-gov-west-1": "414596584902",
140+
"us-gov-east-1": "237065988967",
141+
"us-iso-east-1": "833128469047",
142+
"us-isob-east-1": "281123927165",
143+
"us-west-1": "746614075791",
144+
"us-west-2": "246618743249"
145+
},
146+
"repository": "sagemaker-scikit-learn"
111147
}
112148
}
113149
},
@@ -220,6 +256,42 @@
220256
"us-west-2": "246618743249"
221257
},
222258
"repository": "sagemaker-scikit-learn"
259+
},
260+
"1.2-1": {
261+
"processors": ["cpu"],
262+
"py_versions": ["py3"],
263+
"registries": {
264+
"af-south-1": "510948584623",
265+
"ap-east-1": "651117190479",
266+
"ap-northeast-1": "354813040037",
267+
"ap-northeast-2": "366743142698",
268+
"ap-northeast-3": "867004704886",
269+
"ap-south-1": "720646828776",
270+
"ap-southeast-1": "121021644041",
271+
"ap-southeast-2": "783357654285",
272+
"ap-southeast-3": "951798379941",
273+
"ca-central-1": "341280168497",
274+
"cn-north-1": "450853457545",
275+
"cn-northwest-1": "451049120500",
276+
"eu-central-1": "492215442770",
277+
"eu-north-1": "662702820516",
278+
"eu-west-1": "141502667606",
279+
"eu-west-2": "764974769150",
280+
"eu-west-3": "659782779980",
281+
"eu-south-1": "978288397137",
282+
"me-south-1": "801668240914",
283+
"me-central-1": "272398656194",
284+
"sa-east-1": "737474898029",
285+
"us-east-1": "683313688378",
286+
"us-east-2": "257758044811",
287+
"us-gov-west-1": "414596584902",
288+
"us-gov-east-1": "237065988967",
289+
"us-iso-east-1": "833128469047",
290+
"us-isob-east-1": "281123927165",
291+
"us-west-1": "746614075791",
292+
"us-west-2": "246618743249"
293+
},
294+
"repository": "sagemaker-scikit-learn"
223295
}
224296
}
225297
},

src/sagemaker/image_uri_config/xgboost.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,40 @@
281281
"us-west-2": "246618743249"
282282
},
283283
"repository": "sagemaker-xgboost"
284+
},
285+
"1.7-1": {
286+
"registries": {
287+
"af-south-1": "510948584623",
288+
"ap-east-1": "651117190479",
289+
"ap-northeast-1": "354813040037",
290+
"ap-northeast-2": "366743142698",
291+
"ap-northeast-3": "867004704886",
292+
"ap-south-1": "720646828776",
293+
"ap-southeast-1": "121021644041",
294+
"ap-southeast-2": "783357654285",
295+
"ap-southeast-3": "951798379941",
296+
"ca-central-1": "341280168497",
297+
"cn-north-1": "450853457545",
298+
"cn-northwest-1": "451049120500",
299+
"eu-central-1": "492215442770",
300+
"eu-north-1": "662702820516",
301+
"eu-west-1": "141502667606",
302+
"eu-west-2": "764974769150",
303+
"eu-west-3": "659782779980",
304+
"eu-south-1": "978288397137",
305+
"me-south-1": "801668240914",
306+
"me-central-1": "272398656194",
307+
"sa-east-1": "737474898029",
308+
"us-east-1": "683313688378",
309+
"us-east-2": "257758044811",
310+
"us-gov-west-1": "414596584902",
311+
"us-gov-east-1": "237065988967",
312+
"us-iso-east-1": "833128469047",
313+
"us-isob-east-1": "281123927165",
314+
"us-west-1": "746614075791",
315+
"us-west-2": "246618743249"
316+
},
317+
"repository": "sagemaker-xgboost"
284318
}
285319
}
286320
},
@@ -566,6 +600,40 @@
566600
"us-west-2": "246618743249"
567601
},
568602
"repository": "sagemaker-xgboost"
603+
},
604+
"1.7-1": {
605+
"registries": {
606+
"af-south-1": "510948584623",
607+
"ap-east-1": "651117190479",
608+
"ap-northeast-1": "354813040037",
609+
"ap-northeast-2": "366743142698",
610+
"ap-northeast-3": "867004704886",
611+
"ap-south-1": "720646828776",
612+
"ap-southeast-1": "121021644041",
613+
"ap-southeast-2": "783357654285",
614+
"ap-southeast-3": "951798379941",
615+
"ca-central-1": "341280168497",
616+
"cn-north-1": "450853457545",
617+
"cn-northwest-1": "451049120500",
618+
"eu-central-1": "492215442770",
619+
"eu-north-1": "662702820516",
620+
"eu-west-1": "141502667606",
621+
"eu-west-2": "764974769150",
622+
"eu-west-3": "659782779980",
623+
"eu-south-1": "978288397137",
624+
"me-south-1": "801668240914",
625+
"me-central-1": "272398656194",
626+
"sa-east-1": "737474898029",
627+
"us-east-1": "683313688378",
628+
"us-east-2": "257758044811",
629+
"us-gov-west-1": "414596584902",
630+
"us-gov-east-1": "237065988967",
631+
"us-iso-east-1": "833128469047",
632+
"us-isob-east-1": "281123927165",
633+
"us-west-1": "746614075791",
634+
"us-west-2": "246618743249"
635+
},
636+
"repository": "sagemaker-xgboost"
569637
}
570638
}
571639
},

src/sagemaker/image_uris.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,23 @@ def _validate_instance_deprecation(framework, instance_type, version):
381381
)
382382

383383

384-
def _validate_for_suppported_frameworks_and_instance_type(framework, instace_type):
384+
def _validate_for_suppported_frameworks_and_instance_type(framework, instance_type):
385385
"""Validate if framework is supported for the instance_type"""
386+
# Validate for Trainium allowed frameworks
386387
if (
387-
instace_type is not None
388-
and "trn" in instace_type
388+
instance_type is not None
389+
and "trn" in instance_type
389390
and framework not in TRAINIUM_ALLOWED_FRAMEWORKS
390391
):
391-
_validate_framework(framework, TRAINIUM_ALLOWED_FRAMEWORKS, "framework")
392+
_validate_framework(framework, TRAINIUM_ALLOWED_FRAMEWORKS, "framework", "Trainium")
393+
394+
# Validate for Graviton allowed frameowrks
395+
if (
396+
instance_type is not None
397+
and _get_instance_type_family(instance_type) in GRAVITON_ALLOWED_TARGET_INSTANCE_FAMILY
398+
and framework not in GRAVITON_ALLOWED_FRAMEWORKS
399+
):
400+
_validate_framework(framework, GRAVITON_ALLOWED_FRAMEWORKS, "framework", "Graviton")
392401

393402

394403
def config_for_framework(framework):
@@ -572,12 +581,12 @@ def _validate_arg(arg, available_options, arg_name):
572581
)
573582

574583

575-
def _validate_framework(framework, allowed_frameworks, arg_name):
584+
def _validate_framework(framework, allowed_frameworks, arg_name, hardware_name):
576585
"""Checks if the framework is in the allowed frameworks, and raises a ``ValueError`` if not."""
577586
if framework not in allowed_frameworks:
578587
raise ValueError(
579588
f"Unsupported {arg_name}: {framework}. "
580-
f"Supported {arg_name}(s) for trainium instances: {allowed_frameworks}."
589+
f"Supported {arg_name}(s) for {hardware_name} instances: {allowed_frameworks}."
581590
)
582591

583592

0 commit comments

Comments
 (0)