Skip to content

Commit 163248d

Browse files
authored
Merge branch 'master' into update-return-values
2 parents b4d72f3 + 6948f17 commit 163248d

36 files changed

+184
-268
lines changed

CHANGELOG.md

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

3+
## v2.24.5 (2021-02-12)
4+
5+
### Bug Fixes and Other Changes
6+
7+
* test_tag/test_tags method assert fix in association tests
8+
9+
### Documentation Changes
10+
11+
* removing mention of TF 2.4 from SM distributed model parallel docs
12+
* adding details about mpi options, other small updates
13+
314
## v2.24.4 (2021-02-09)
415

516
### Bug Fixes and Other Changes

VERSION

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

buildspec-deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@ version: 0.2
33
phases:
44
build:
55
commands:
6-
- PACKAGE_FILE="$CODEBUILD_SRC_DIR_ARTIFACT_1/sagemaker-*.tar.gz"
6+
# prepare the release (update versions, changelog etc.)
7+
- git-release --prepare
8+
9+
# generate the distribution package
10+
- python3 setup.py sdist
11+
12+
# publish the release to github
13+
- git-release --publish
14+
15+
- PACKAGE_FILE="dist/sagemaker-*.tar.gz"
716
- PYPI_USER=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/user --query SecretString --output text)
817
- PYPI_PASSWORD=$(aws secretsmanager get-secret-value --secret-id /codebuild/pypi/password --query SecretString --output text)
918
- GPG_PRIVATE_KEY=$(aws secretsmanager get-secret-value --secret-id /codebuild/gpg/private_key --query SecretString --output text)

buildspec-localmodetests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ phases:
1111

1212
# local mode tests
1313
- start_time=`date +%s`
14-
- execute-command-if-has-matching-changes "tox -e py38 -- tests/integ -m local_mode --durations 50" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-localmodetests.yml"
15-
- ./ci-scripts/displaytime.sh 'py38 local mode' $start_time
14+
- execute-command-if-has-matching-changes "tox -e py37 -- tests/integ -m local_mode --durations 50" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-localmodetests.yml"
15+
- ./ci-scripts/displaytime.sh 'py37 local mode' $start_time

buildspec-release.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ version: 0.2
33
phases:
44
build:
55
commands:
6-
# prepare the release (update versions, changelog etc.)
7-
- git-release --prepare
8-
96
# run linters
107
- tox -e flake8,pylint
118

@@ -18,19 +15,7 @@ phases:
1815
# run unit tests
1916
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
2017
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
21-
tox -e py36,py37,py38 -- tests/unit
18+
tox -e py36,py37 -- tests/unit
2219

2320
# run a subset of the integration tests
24-
- IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m canary_quick -n 64 --boxed --reruns 2
25-
26-
# generate the distribution package
27-
- python3 setup.py sdist
28-
29-
# publish the release to github
30-
- git-release --publish
31-
32-
artifacts:
33-
files:
34-
- dist/sagemaker-*.tar.gz
35-
name: ARTIFACT_1
36-
discard-paths: yes
21+
- IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m "not (local_mode or slow_test)" -n 32 --boxed --reruns 2

buildspec-slowtests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 0.2
2+
3+
phases:
4+
pre_build:
5+
commands:
6+
- start-dockerd
7+
8+
build:
9+
commands:
10+
- IGNORE_COVERAGE=-
11+
12+
# slow tests
13+
- start_time=`date +%s`
14+
- execute-command-if-has-matching-changes "tox -e py37 -- tests/integ -m slow_test -n 16 --durations 0" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-slowtests.yml"
15+
- ./ci-scripts/displaytime.sh 'py37 slow tests' $start_time

buildspec-unittests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ phases:
1818
- start_time=`date +%s`
1919
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
2020
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
21-
tox -e py36,py37,py38 --parallel all -- tests/unit
22-
- ./ci-scripts/displaytime.sh 'py36,py37,py38 unit' $start_time
21+
tox -e py36,py37 --parallel all -- tests/unit
22+
- ./ci-scripts/displaytime.sh 'py36,py37 unit' $start_time

buildspec.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ phases:
1616

1717
- start_time=`date +%s`
1818
- |
19-
execute-command-if-has-matching-changes "env -u AWS_DEFAULT_REGION tox -e py38 -- tests/integ -m \"not local_mode and not cron\" -n 384 --reruns 3 --reruns-delay 15 --durations 50 --boto-config '{\"region_name\": \"us-east-2\"}'" "tests/integ" "tests/scripts" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "src/sagemaker/image_uri_config/*.json" "setup.py" "setup.cfg" "buildspec.yml"
20-
- ./ci-scripts/displaytime.sh 'py38 tests/integ' $start_time
19+
execute-command-if-has-matching-changes "env -u AWS_DEFAULT_REGION tox -e py37 -- tests/integ -m \"not local_mode and not cron and not slow_test\" -n 384 --reruns 3 --reruns-delay 15 --durations 50 --boto-config '{\"region_name\": \"us-east-2\"}'" "tests/integ" "tests/scripts" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "src/sagemaker/image_uri_config/*.json" "setup.py" "setup.cfg" "buildspec.yml"
20+
- ./ci-scripts/displaytime.sh 'py37 tests/integ' $start_time
2121

2222
post_build:
2323
finally:

doc/workflows/pipelines/sagemaker.workflow.pipelines.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ Steps
110110

111111
.. autoclass:: sagemaker.workflow.steps.ProcessingStep
112112

113-
.. autoclass:: sagemaker.workflow.steps.FailStep
114-
115113
Utilities
116114
---------
117115

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def read_version():
6666
"pytest<6.1.0",
6767
"pytest-cov",
6868
"pytest-rerunfailures",
69+
"pytest-timeout",
6970
"pytest-xdist",
7071
"mock",
7172
"contextlib2",

src/sagemaker/analytics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class AnalyticsMetricsBase(with_metaclass(ABCMeta, object)):
4343
"""
4444

4545
def __init__(self):
46+
"""Initializes ``AnalyticsMetricsBase`` instance."""
4647
self._dataframe = None
4748

4849
def export_csv(self, filename):

src/sagemaker/image_uri_config/inferentia-mxnet.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,29 @@
55
"1.5.1": {
66
"py_versions": ["py3"],
77
"registries": {
8+
"af-south-1": "774647643957",
9+
"ap-east-1": "110948597952",
10+
"ap-northeast-1": "941853720454",
11+
"ap-northeast-2": "151534178276",
12+
"ap-south-1": "763008648453",
13+
"ap-southeast-1": "324986816169",
14+
"ap-southeast-2": "355873309152",
15+
"ca-central-1": "464438896020",
16+
"cn-north-1": "472730292857",
17+
"cn-northwest-1": "474822919863",
18+
"eu-central-1": "746233611703",
19+
"eu-north-1": "601324751636",
20+
"eu-south-1": "966458181534",
21+
"eu-west-1": "802834080501",
22+
"eu-west-2": "205493899709",
23+
"eu-west-3": "254080097072",
24+
"me-south-1": "836785723513",
25+
"sa-east-1": "756306329178",
826
"us-east-1": "785573368785",
9-
"us-west-2": "301217895009"
27+
"us-east-2": "007439368137",
28+
"us-gov-west-1": "263933020539",
29+
"us-west-1": "710691900526",
30+
"us-west-2": "301217895009"
1031
},
1132
"repository": "sagemaker-neo-mxnet"
1233
}

src/sagemaker/image_uri_config/inferentia-pytorch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55
"1.5.1": {
66
"py_versions": ["py3"],
77
"registries": {
8+
"af-south-1": "774647643957",
9+
"ap-east-1": "110948597952",
10+
"ap-northeast-1": "941853720454",
11+
"ap-northeast-2": "151534178276",
12+
"ap-south-1": "763008648453",
13+
"ap-southeast-1": "324986816169",
14+
"ap-southeast-2": "355873309152",
15+
"ca-central-1": "464438896020",
16+
"cn-north-1": "472730292857",
17+
"cn-northwest-1": "474822919863",
18+
"eu-central-1": "746233611703",
19+
"eu-north-1": "601324751636",
20+
"eu-south-1": "966458181534",
21+
"eu-west-1": "802834080501",
22+
"eu-west-2": "205493899709",
23+
"eu-west-3": "254080097072",
24+
"me-south-1": "836785723513",
25+
"sa-east-1": "756306329178",
826
"us-east-1": "785573368785",
27+
"us-east-2": "007439368137",
28+
"us-gov-west-1": "263933020539",
29+
"us-west-1": "710691900526",
930
"us-west-2": "301217895009"
1031
},
1132
"repository": "sagemaker-neo-pytorch"

src/sagemaker/image_uri_config/inferentia-tensorflow.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,29 @@
55
"1.15.0": {
66
"py_versions": ["py3"],
77
"registries": {
8+
"af-south-1": "774647643957",
9+
"ap-east-1": "110948597952",
10+
"ap-northeast-1": "941853720454",
11+
"ap-northeast-2": "151534178276",
12+
"ap-south-1": "763008648453",
13+
"ap-southeast-1": "324986816169",
14+
"ap-southeast-2": "355873309152",
15+
"ca-central-1": "464438896020",
16+
"cn-north-1": "472730292857",
17+
"cn-northwest-1": "474822919863",
18+
"eu-central-1": "746233611703",
19+
"eu-north-1": "601324751636",
20+
"eu-south-1": "966458181534",
21+
"eu-west-1": "802834080501",
22+
"eu-west-2": "205493899709",
23+
"eu-west-3": "254080097072",
24+
"me-south-1": "836785723513",
25+
"sa-east-1": "756306329178",
826
"us-east-1": "785573368785",
9-
"us-west-2": "301217895009"
27+
"us-east-2": "007439368137",
28+
"us-gov-west-1": "263933020539",
29+
"us-west-1": "710691900526",
30+
"us-west-2": "301217895009"
1031
},
1132
"repository": "sagemaker-neo-tensorflow"
1233
}

src/sagemaker/image_uris.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def retrieve(
9898
"mxnet-1.8.0-gpu-py37": "cu110-ubuntu16.04",
9999
"pytorch-1.6-gpu-py36": "cu110-ubuntu18.04-v3",
100100
"pytorch-1.6.0-gpu-py36": "cu110-ubuntu18.04",
101+
"pytorch-1.6-gpu-py3": "cu110-ubuntu18.04-v3",
102+
"pytorch-1.6.0-gpu-py3": "cu110-ubuntu18.04",
101103
}
102104
key = "-".join([framework, tag])
103105
if key in container_versions:

src/sagemaker/workflow/steps.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class StepTypeEnum(Enum, metaclass=DefaultEnumMeta):
5050

5151
CONDITION = "Condition"
5252
CREATE_MODEL = "Model"
53-
FAIL = "Fail"
5453
PROCESSING = "Processing"
5554
REGISTER_MODEL = "RegisterModel"
5655
TRAINING = "Training"
@@ -341,44 +340,3 @@ def to_request(self) -> RequestType:
341340
property_file.expr for property_file in self.property_files
342341
]
343342
return request_dict
344-
345-
346-
class FailStep(Step):
347-
"""Pipeline step to indicate failure."""
348-
349-
def __init__(self, name: str = "Fail"):
350-
"""Construct a FailStep.
351-
352-
Causes the pipeline execution to terminate in a failed state.
353-
354-
Args:
355-
name (str): The name of the step.
356-
"""
357-
super(FailStep, self).__init__(name, StepTypeEnum.FAIL)
358-
root_path = f"Steps.{name}"
359-
root_prop = Properties(path=root_path)
360-
root_prop.__dict__["Fail"] = Properties(f"{root_path}.Fail")
361-
self._properties = root_prop
362-
363-
@property
364-
def arguments(self) -> RequestType:
365-
"""The arguments to the particular step service call."""
366-
return {}
367-
368-
@property
369-
def properties(self):
370-
"""The properties of the particular step."""
371-
return self._properties
372-
373-
def to_request(self) -> RequestType:
374-
"""Get the request structure for workflow service calls."""
375-
return {
376-
"Name": self.name,
377-
"Type": self.step_type.value,
378-
"Arguments": self.arguments,
379-
}
380-
381-
@property
382-
def ref(self) -> Dict[str, str]:
383-
"""Get a reference dict for steps"""
384-
return {"Name": self.name}

tests/data/multimodel/container/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM 142577830533.dkr.ecr.us-east-2.amazonaws.com/ubuntu:16.04
1+
FROM public.ecr.aws/ubuntu/ubuntu:18.04
22

33
# Set a docker label to advertise multi-model support on the container
44
LABEL com.amazonaws.sagemaker.capabilities.multi-models=true
@@ -15,7 +15,7 @@ RUN apt-get update && \
1515
curl \
1616
vim \
1717
&& rm -rf /var/lib/apt/lists/* \
18-
&& curl -O https://bootstrap.pypa.io/3.5/get-pip.py \
18+
&& curl -O https://bootstrap.pypa.io/get-pip.py \
1919
&& python3 get-pip.py
2020

2121
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

tests/integ/sagemaker/lineage/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def artifact_obj_with_association(sagemaker_session, artifact_obj):
155155
@pytest.fixture
156156
def trial_component_obj(sagemaker_session):
157157
trial_component_obj = trial_component.TrialComponent.create(
158-
trial_component_name=name(), sagemaker_boto_client=sagemaker_session.sagemaker_client
158+
trial_component_name=name(),
159+
sagemaker_boto_client=sagemaker_session.sagemaker_client,
159160
)
160161
yield trial_component_obj
161162
time.sleep(0.5)

tests/integ/sagemaker/lineage/test_action.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
import datetime
1717
import logging
18+
import time
19+
20+
import pytest
1821

1922
from sagemaker.lineage import action
2023

@@ -80,6 +83,7 @@ def test_list(action_objs, sagemaker_session):
8083
assert action_names
8184

8285

86+
@pytest.mark.timeout(30)
8387
def test_tag(action_obj, sagemaker_session):
8488
tag = {"Key": "foo", "Value": "bar"}
8589
action_obj.set_tag(tag)
@@ -90,12 +94,14 @@ def test_tag(action_obj, sagemaker_session):
9094
)["Tags"]
9195
if actual_tags:
9296
break
97+
time.sleep(5)
9398
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
9499
# length of actual tags will be greater than 1
95100
assert len(actual_tags) > 0
96101
assert actual_tags[0] == tag
97102

98103

104+
@pytest.mark.timeout(30)
99105
def test_tags(action_obj, sagemaker_session):
100106
tags = [{"Key": "foo1", "Value": "bar1"}]
101107
action_obj.set_tags(tags)
@@ -106,6 +112,7 @@ def test_tags(action_obj, sagemaker_session):
106112
)["Tags"]
107113
if actual_tags:
108114
break
115+
time.sleep(5)
109116
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
110117
# length of actual tags will be greater than 1
111118
assert len(actual_tags) > 0

tests/integ/sagemaker/lineage/test_artifact.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import logging
1818
import time
1919

20+
import pytest
21+
2022
from sagemaker.lineage import artifact
2123

2224

@@ -111,6 +113,7 @@ def test_downstream_trials(trial_associated_artifact, trial_obj, sagemaker_sessi
111113
assert trial_obj.trial_name in trials
112114

113115

116+
@pytest.mark.timeout(30)
114117
def test_tag(artifact_obj, sagemaker_session):
115118
tag = {"Key": "foo", "Value": "bar"}
116119
artifact_obj.set_tag(tag)
@@ -121,12 +124,14 @@ def test_tag(artifact_obj, sagemaker_session):
121124
)["Tags"]
122125
if actual_tags:
123126
break
127+
time.sleep(5)
124128
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
125129
# length of actual tags will be greater than 1
126130
assert len(actual_tags) > 0
127131
assert actual_tags[0] == tag
128132

129133

134+
@pytest.mark.timeout(30)
130135
def test_tags(artifact_obj, sagemaker_session):
131136
tags = [{"Key": "foo1", "Value": "bar1"}]
132137
artifact_obj.set_tags(tags)
@@ -137,6 +142,7 @@ def test_tags(artifact_obj, sagemaker_session):
137142
)["Tags"]
138143
if actual_tags:
139144
break
145+
time.sleep(5)
140146
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
141147
# length of actual tags will be greater than 1
142148
assert len(actual_tags) > 0

0 commit comments

Comments
 (0)