Skip to content

Commit 8de81c1

Browse files
authored
Merge branch 'master' into fix-integ-tests
2 parents e59883a + b082eb4 commit 8de81c1

File tree

7 files changed

+51
-7
lines changed

7 files changed

+51
-7
lines changed

.githooks/pre-push

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
# this pre-push hook runs style checks and unit tests in python 3.6, 3.7, and 3.8 using tox.
3+
4+
set -e
5+
6+
TOX_PARALLEL_NO_SPINNER=1,
7+
PY_COLORS=0
8+
start_time=`date +%s`
9+
tox -e flake8,pylint,docstyle,black-check,twine --parallel all
10+
./ci-scripts/displaytime.sh 'flake8,pylint,docstyle,black-check,twine' $start_time
11+
start_time=`date +%s`
12+
tox -e sphinx,doc8 --parallel all
13+
./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time
14+
start_time=`date +%s`
15+
tox -e py36,py37,py38 --parallel all -- tests/unit
16+
./ci-scripts/displaytime.sh 'py36,py37,py38 unit' $start_time

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.63.2 (2021-10-18)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* Update timeouts for integ tests from 20 to 40
8+
9+
## v2.63.1 (2021-10-14)
10+
11+
### Bug Fixes and Other Changes
12+
13+
* HF estimator attach modified to work with py38
14+
315
## v2.63.0 (2021-10-13)
416

517
### Features

README.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ You can also run them in parallel:
154154
tox -- -n auto tests/integ
155155

156156

157+
Git Hooks
158+
~~~~~~~~~
159+
160+
to enable all git hooks in the .githooks directory, run these commands in the repository directory:
161+
162+
::
163+
164+
find .git/hooks -type l -exec rm {} \;
165+
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
166+
167+
To enable an individual git hook, simply move it from the .githooks/ directory to the .git/hooks/ directory.
168+
157169
Building Sphinx docs
158170
~~~~~~~~~~~~~~~~~~~~
159171

VERSION

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

src/sagemaker/huggingface/estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def _prepare_init_params_from_job_description(cls, job_details, model_channel_na
312312
framework_version = None
313313
else:
314314
framework, pt_or_tf = framework.split("-")
315-
tag_pattern = re.compile("^(.*)-transformers(.*)-(cpu|gpu)-(py2|py3[67]?)$")
315+
tag_pattern = re.compile(r"^(.*)-transformers(.*)-(cpu|gpu)-(py2|py3\d*)$")
316316
tag_match = tag_pattern.match(tag)
317317
pt_or_tf_version = tag_match.group(1)
318318
framework_version = tag_match.group(2)

tests/integ/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
DATA_DIR = os.path.join(os.path.dirname(__file__), "..", "data")
2121
TRAINING_DEFAULT_TIMEOUT_MINUTES = 40
22-
TUNING_DEFAULT_TIMEOUT_MINUTES = 20
23-
TRANSFORM_DEFAULT_TIMEOUT_MINUTES = 20
22+
TUNING_DEFAULT_TIMEOUT_MINUTES = 40
23+
TRANSFORM_DEFAULT_TIMEOUT_MINUTES = 40
2424
AUTO_ML_DEFAULT_TIMEMOUT_MINUTES = 60
2525

2626
# these regions have some p2 and p3 instances, but not enough for continuous testing

tests/unit/sagemaker/huggingface/test_estimator.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,16 @@ def test_huggingface(
253253

254254

255255
def test_attach(
256-
sagemaker_session, huggingface_training_version, huggingface_pytorch_training_version
256+
sagemaker_session,
257+
huggingface_training_version,
258+
huggingface_pytorch_training_version,
259+
huggingface_pytorch_training_py_version,
257260
):
258261
training_image = (
259262
f"1.dkr.ecr.us-east-1.amazonaws.com/huggingface-pytorch-training:"
260263
f"{huggingface_pytorch_training_version}-"
261-
f"transformers{huggingface_training_version}-gpu-py36-cu110-ubuntu18.04"
264+
f"transformers{huggingface_training_version}-gpu-"
265+
f"{huggingface_pytorch_training_py_version}-cu110-ubuntu20.04"
262266
)
263267
returned_job_description = {
264268
"AlgorithmSpecification": {"TrainingInputMode": "File", "TrainingImage": training_image},
@@ -290,7 +294,7 @@ def test_attach(
290294

291295
estimator = HuggingFace.attach(training_job_name="neo", sagemaker_session=sagemaker_session)
292296
assert estimator.latest_training_job.job_name == "neo"
293-
assert estimator.py_version == "py36"
297+
assert estimator.py_version == huggingface_pytorch_training_py_version
294298
assert estimator.framework_version == huggingface_training_version
295299
assert estimator.pytorch_version == huggingface_pytorch_training_version
296300
assert estimator.role == "arn:aws:iam::366:role/SageMakerRole"

0 commit comments

Comments
 (0)