Skip to content

Commit 472b68f

Browse files
authored
Merge branch 'master' into training-inputs-doc-fix
2 parents fd1f67d + 529256d commit 472b68f

File tree

10 files changed

+297
-15
lines changed

10 files changed

+297
-15
lines changed

CHANGELOG.md

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

3+
## v2.60.0 (2021-10-08)
4+
5+
### Features
6+
7+
* Add support for Hugging Face 4.10.2
8+
9+
## v2.59.8 (2021-10-07)
10+
11+
### Bug Fixes and Other Changes
12+
13+
* fix feature store ingestion via data wrangler test
14+
315
## v2.59.7 (2021-10-04)
416

517
### Bug Fixes and Other Changes

VERSION

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

src/sagemaker/huggingface/estimator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ def __init__(
178178
if "enable_sagemaker_metrics" not in kwargs:
179179
kwargs["enable_sagemaker_metrics"] = True
180180

181+
kwargs["py_version"] = self.py_version
182+
181183
super(HuggingFace, self).__init__(
182184
entry_point, source_dir, hyperparameters, image_uri=image_uri, **kwargs
183185
)

src/sagemaker/image_uri_config/huggingface.json

Lines changed: 144 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"version_aliases": {
55
"4.4": "4.4.2",
66
"4.5": "4.5.0",
7-
"4.6": "4.6.1"
7+
"4.6": "4.6.1",
8+
"4.10": "4.10.2"
89
},
910
"versions": {
1011
"4.4.2": {
@@ -278,14 +279,85 @@
278279
"repository": "huggingface-tensorflow-training",
279280
"container_version": {"gpu":"cu110-ubuntu18.04"}
280281
}
282+
},
283+
"4.10.2": {
284+
"version_aliases": {
285+
"pytorch1.9": "pytorch1.9.0",
286+
"tensorflow2.5": "tensorflow2.5.1"
287+
},
288+
"pytorch1.9.0": {
289+
"py_versions": ["py38"],
290+
"registries": {
291+
"af-south-1": "626614931356",
292+
"ap-east-1": "871362719292",
293+
"ap-northeast-1": "763104351884",
294+
"ap-northeast-2": "763104351884",
295+
"ap-northeast-3": "364406365360",
296+
"ap-south-1": "763104351884",
297+
"ap-southeast-1": "763104351884",
298+
"ap-southeast-2": "763104351884",
299+
"ca-central-1": "763104351884",
300+
"cn-north-1": "727897471807",
301+
"cn-northwest-1": "727897471807",
302+
"eu-central-1": "763104351884",
303+
"eu-north-1": "763104351884",
304+
"eu-west-1": "763104351884",
305+
"eu-west-2": "763104351884",
306+
"eu-west-3": "763104351884",
307+
"eu-south-1": "692866216735",
308+
"me-south-1": "217643126080",
309+
"sa-east-1": "763104351884",
310+
"us-east-1": "763104351884",
311+
"us-east-2": "763104351884",
312+
"us-gov-west-1": "442386744353",
313+
"us-iso-east-1": "886529160074",
314+
"us-west-1": "763104351884",
315+
"us-west-2": "763104351884"
316+
},
317+
"repository": "huggingface-pytorch-training",
318+
"container_version": {"gpu": "cu111-ubuntu20.04"}
319+
},
320+
"tensorflow2.5.1": {
321+
"py_versions": ["py37"],
322+
"registries": {
323+
"af-south-1": "626614931356",
324+
"ap-east-1": "871362719292",
325+
"ap-northeast-1": "763104351884",
326+
"ap-northeast-2": "763104351884",
327+
"ap-northeast-3": "364406365360",
328+
"ap-south-1": "763104351884",
329+
"ap-southeast-1": "763104351884",
330+
"ap-southeast-2": "763104351884",
331+
"ca-central-1": "763104351884",
332+
"cn-north-1": "727897471807",
333+
"cn-northwest-1": "727897471807",
334+
"eu-central-1": "763104351884",
335+
"eu-north-1": "763104351884",
336+
"eu-south-1": "692866216735",
337+
"eu-west-1": "763104351884",
338+
"eu-west-2": "763104351884",
339+
"eu-west-3": "763104351884",
340+
"me-south-1": "217643126080",
341+
"sa-east-1": "763104351884",
342+
"us-east-1": "763104351884",
343+
"us-east-2": "763104351884",
344+
"us-gov-west-1": "442386744353",
345+
"us-iso-east-1": "886529160074",
346+
"us-west-1": "763104351884",
347+
"us-west-2": "763104351884"
348+
},
349+
"repository": "huggingface-tensorflow-training",
350+
"container_version": {"gpu": "cu112-ubuntu18.04"}
351+
}
281352
}
282353
}
283354
},
284355

285356
"inference": {
286357
"processors": ["gpu", "cpu"],
287358
"version_aliases": {
288-
"4.6": "4.6.1"
359+
"4.6": "4.6.1",
360+
"4.10": "4.10.2"
289361
},
290362
"versions": {
291363
"4.6.1": {
@@ -389,6 +461,76 @@
389461
"repository": "huggingface-tensorflow-inference",
390462
"container_version": {"gpu":"cu110-ubuntu18.04", "cpu":"ubuntu18.04" }
391463
}
464+
},
465+
"4.10.2": {
466+
"version_aliases": {
467+
"pytorch1.9": "pytorch1.9.0",
468+
"tensorflow2.5": "tensorflow2.5.1"
469+
},
470+
"pytorch1.9.0": {
471+
"py_versions": ["py38"],
472+
"registries": {
473+
"af-south-1": "626614931356",
474+
"ap-east-1": "871362719292",
475+
"ap-northeast-1": "763104351884",
476+
"ap-northeast-2": "763104351884",
477+
"ap-northeast-3": "364406365360",
478+
"ap-south-1": "763104351884",
479+
"ap-southeast-1": "763104351884",
480+
"ap-southeast-2": "763104351884",
481+
"ca-central-1": "763104351884",
482+
"cn-north-1": "727897471807",
483+
"cn-northwest-1": "727897471807",
484+
"eu-central-1": "763104351884",
485+
"eu-north-1": "763104351884",
486+
"eu-west-1": "763104351884",
487+
"eu-west-2": "763104351884",
488+
"eu-west-3": "763104351884",
489+
"eu-south-1": "692866216735",
490+
"me-south-1": "217643126080",
491+
"sa-east-1": "763104351884",
492+
"us-east-1": "763104351884",
493+
"us-east-2": "763104351884",
494+
"us-gov-west-1": "442386744353",
495+
"us-iso-east-1": "886529160074",
496+
"us-west-1": "763104351884",
497+
"us-west-2": "763104351884"
498+
},
499+
"repository": "huggingface-pytorch-inference",
500+
"container_version": {"gpu": "cu111-ubuntu20.04", "cpu": "ubuntu20.04" }
501+
},
502+
"tensorflow2.5.1": {
503+
"py_versions": ["py37"],
504+
"registries": {
505+
"af-south-1": "626614931356",
506+
"ap-east-1": "871362719292",
507+
"ap-northeast-1": "763104351884",
508+
"ap-northeast-2": "763104351884",
509+
"ap-northeast-3": "364406365360",
510+
"ap-south-1": "763104351884",
511+
"ap-southeast-1": "763104351884",
512+
"ap-southeast-2": "763104351884",
513+
"ca-central-1": "763104351884",
514+
"cn-north-1": "727897471807",
515+
"cn-northwest-1": "727897471807",
516+
"eu-central-1": "763104351884",
517+
"eu-north-1": "763104351884",
518+
"eu-south-1": "692866216735",
519+
"eu-west-1": "763104351884",
520+
"eu-west-2": "763104351884",
521+
"eu-west-3": "763104351884",
522+
"me-south-1": "217643126080",
523+
"sa-east-1": "763104351884",
524+
"us-east-1": "763104351884",
525+
"us-east-2": "763104351884",
526+
"us-gov-west-1": "442386744353",
527+
"us-iso-east-1": "886529160074",
528+
"us-west-1": "763104351884",
529+
"us-west-2": "763104351884"
530+
},
531+
"repository": "huggingface-tensorflow-inference",
532+
"container_version": {"gpu": "cu112-ubuntu18.04", "cpu": "ubuntu18.04" }
533+
}
392534
}
393535
}
394536
}

tests/conftest.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,32 @@ def huggingface_pytorch_training_version(huggingface_training_version):
207207
)[0]
208208

209209

210+
@pytest.fixture(scope="module")
211+
def huggingface_pytorch_training_py_version(huggingface_pytorch_training_version):
212+
return "py38" if Version(huggingface_pytorch_training_version) >= Version("1.9") else "py36"
213+
214+
215+
@pytest.fixture(scope="module")
216+
def huggingface_pytorch_latest_training_py_version(huggingface_training_pytorch_latest_version):
217+
return (
218+
"py38" if Version(huggingface_training_pytorch_latest_version) >= Version("1.9") else "py36"
219+
)
220+
221+
222+
@pytest.fixture(scope="module")
223+
def huggingface_pytorch_latest_inference_py_version(huggingface_inference_pytorch_latest_version):
224+
return (
225+
"py38"
226+
if Version(huggingface_inference_pytorch_latest_version) >= Version("1.9")
227+
else "py36"
228+
)
229+
230+
231+
@pytest.fixture(scope="module")
232+
def huggingface_tensorflow_latest_training_py_version():
233+
return "py37"
234+
235+
210236
@pytest.fixture(scope="module")
211237
def pytorch_eia_py_version():
212238
return "py3"

tests/integ/test_huggingface.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_framework_processing_job_with_deps(
3636
gpu_instance_type,
3737
huggingface_training_latest_version,
3838
huggingface_training_pytorch_latest_version,
39+
huggingface_pytorch_latest_training_py_version,
3940
):
4041
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
4142
code_path = os.path.join(DATA_DIR, "dummy_code_bundle_with_reqs")
@@ -44,7 +45,7 @@ def test_framework_processing_job_with_deps(
4445
processor = HuggingFaceProcessor(
4546
transformers_version=huggingface_training_latest_version,
4647
pytorch_version=huggingface_training_pytorch_latest_version,
47-
py_version="py36",
48+
py_version=huggingface_pytorch_latest_training_py_version,
4849
role=ROLE,
4950
instance_count=1,
5051
instance_type=gpu_instance_type,
@@ -70,12 +71,13 @@ def test_huggingface_training(
7071
gpu_instance_type,
7172
huggingface_training_latest_version,
7273
huggingface_training_pytorch_latest_version,
74+
huggingface_pytorch_latest_training_py_version,
7375
):
7476
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
7577
data_path = os.path.join(DATA_DIR, "huggingface")
7678

7779
hf = HuggingFace(
78-
py_version="py36",
80+
py_version=huggingface_pytorch_latest_training_py_version,
7981
entry_point=os.path.join(data_path, "run_glue.py"),
8082
role="SageMakerRole",
8183
transformers_version=huggingface_training_latest_version,
@@ -113,12 +115,13 @@ def test_huggingface_training_tf(
113115
gpu_instance_type,
114116
huggingface_training_latest_version,
115117
huggingface_training_tensorflow_latest_version,
118+
huggingface_tensorflow_latest_training_py_version,
116119
):
117120
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
118121
data_path = os.path.join(DATA_DIR, "huggingface")
119122

120123
hf = HuggingFace(
121-
py_version="py37",
124+
py_version=huggingface_tensorflow_latest_training_py_version,
122125
entry_point=os.path.join(data_path, "run_tf.py"),
123126
role=ROLE,
124127
transformers_version=huggingface_training_latest_version,
@@ -152,6 +155,7 @@ def test_huggingface_inference(
152155
gpu_instance_type,
153156
huggingface_inference_latest_version,
154157
huggingface_inference_pytorch_latest_version,
158+
huggingface_pytorch_latest_inference_py_version,
155159
):
156160
env = {
157161
"HF_MODEL_ID": "sshleifer/tiny-distilbert-base-uncased-finetuned-sst-2-english",
@@ -163,7 +167,7 @@ def test_huggingface_inference(
163167
sagemaker_session=sagemaker_session,
164168
role="SageMakerRole",
165169
env=env,
166-
py_version="py36",
170+
py_version=huggingface_pytorch_latest_inference_py_version,
167171
transformers_version=huggingface_inference_latest_version,
168172
pytorch_version=huggingface_inference_pytorch_latest_version,
169173
)

0 commit comments

Comments
 (0)