Skip to content

Commit 992f16d

Browse files
authored
Merge branch 'master' into sdk-defaults-logging-behavior-quick-fix
2 parents 8d61a36 + c56a7d1 commit 992f16d

File tree

16 files changed

+74
-36
lines changed

16 files changed

+74
-36
lines changed

.githooks/pre-push

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ start_time=`date +%s`
1212
tox -e sphinx,doc8 --parallel all
1313
./ci-scripts/displaytime.sh 'sphinx,doc8' $start_time
1414
start_time=`date +%s`
15-
tox -e py37,py38,py39 --parallel all -- tests/unit
16-
./ci-scripts/displaytime.sh 'py37,py38,py39 unit' $start_time
15+
tox -e py38,py39,py310 --parallel all -- tests/unit
16+
./ci-scripts/displaytime.sh 'py38,py39,py310 unit' $start_time

README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ Supported Python Versions
8787

8888
SageMaker Python SDK is tested on:
8989

90-
- Python 3.7
9190
- Python 3.8
9291
- Python 3.9
9392
- Python 3.10

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,13 @@ def read_requirements(filename):
9292
url="https://github.com/aws/sagemaker-python-sdk/",
9393
license="Apache License 2.0",
9494
keywords="ML Amazon AWS AI Tensorflow MXNet",
95-
python_requires=">= 3.6",
95+
python_requires=">= 3.7",
9696
classifiers=[
9797
"Development Status :: 5 - Production/Stable",
9898
"Intended Audience :: Developers",
9999
"Natural Language :: English",
100100
"License :: OSI Approved :: Apache Software License",
101101
"Programming Language :: Python",
102-
"Programming Language :: Python :: 3.7",
103102
"Programming Language :: Python :: 3.8",
104103
"Programming Language :: Python :: 3.9",
105104
"Programming Language :: Python :: 3.10",

src/sagemaker/image_uri_config/image-classification-neo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"us-iso-east-1": "167761179201",
2929
"us-isob-east-1": "406031935815",
3030
"us-west-1": "710691900526",
31-
"us-west-2": "301217895009"
31+
"us-west-2": "301217895009",
32+
"il-central-1": "275950707576"
3233
},
3334
"repository": "image-classification-neo"
3435
}

src/sagemaker/image_uri_config/inferentia-mxnet.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"us-iso-east-1": "167761179201",
3131
"us-isob-east-1": "406031935815",
3232
"us-west-1": "710691900526",
33-
"us-west-2": "301217895009"
33+
"us-west-2": "301217895009",
34+
"il-central-1": "275950707576"
3435
},
3536
"repository": "sagemaker-neo-mxnet"
3637
},
@@ -62,7 +63,8 @@
6263
"us-iso-east-1": "167761179201",
6364
"us-isob-east-1": "406031935815",
6465
"us-west-1": "710691900526",
65-
"us-west-2": "301217895009"
66+
"us-west-2": "301217895009",
67+
"il-central-1": "275950707576"
6668
},
6769
"repository": "sagemaker-neo-mxnet"
6870
}

src/sagemaker/image_uri_config/inferentia-pytorch.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"us-iso-east-1": "167761179201",
3131
"us-isob-east-1": "406031935815",
3232
"us-west-1": "710691900526",
33-
"us-west-2": "301217895009"
33+
"us-west-2": "301217895009",
34+
"il-central-1": "275950707576"
3435
},
3536
"repository": "sagemaker-neo-pytorch"
3637
},
@@ -62,7 +63,8 @@
6263
"us-iso-east-1": "167761179201",
6364
"us-isob-east-1": "406031935815",
6465
"us-west-1": "710691900526",
65-
"us-west-2": "301217895009"
66+
"us-west-2": "301217895009",
67+
"il-central-1": "275950707576"
6668
},
6769
"repository": "sagemaker-neo-pytorch"
6870
},
@@ -94,7 +96,8 @@
9496
"us-iso-east-1": "167761179201",
9597
"us-isob-east-1": "406031935815",
9698
"us-west-1": "710691900526",
97-
"us-west-2": "301217895009"
99+
"us-west-2": "301217895009",
100+
"il-central-1": "275950707576"
98101
},
99102
"repository": "sagemaker-neo-pytorch"
100103
}

src/sagemaker/image_uri_config/inferentia-tensorflow.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"us-iso-east-1": "167761179201",
3131
"us-isob-east-1": "406031935815",
3232
"us-west-1": "710691900526",
33-
"us-west-2": "301217895009"
33+
"us-west-2": "301217895009",
34+
"il-central-1": "275950707576"
3435
},
3536
"repository": "sagemaker-neo-tensorflow"
3637
},
@@ -62,7 +63,8 @@
6263
"us-iso-east-1": "167761179201",
6364
"us-isob-east-1": "406031935815",
6465
"us-west-1": "710691900526",
65-
"us-west-2": "301217895009"
66+
"us-west-2": "301217895009",
67+
"il-central-1": "275950707576"
6668
},
6769
"repository": "sagemaker-neo-tensorflow"
6870
}

src/sagemaker/image_uri_config/neo-mxnet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"us-iso-east-1": "167761179201",
4545
"us-isob-east-1": "406031935815",
4646
"us-west-1": "710691900526",
47-
"us-west-2": "301217895009"
47+
"us-west-2": "301217895009",
48+
"il-central-1": "275950707576"
4849
},
4950
"repository": "sagemaker-inference-mxnet"
5051
}

src/sagemaker/image_uri_config/neo-pytorch.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"us-iso-east-1": "167761179201",
4949
"us-isob-east-1": "406031935815",
5050
"us-west-1": "710691900526",
51-
"us-west-2": "301217895009"
51+
"us-west-2": "301217895009",
52+
"il-central-1": "275950707576"
5253
},
5354
"repository": "sagemaker-inference-pytorch"
5455
},
@@ -80,7 +81,8 @@
8081
"us-iso-east-1": "167761179201",
8182
"us-isob-east-1": "406031935815",
8283
"us-west-1": "710691900526",
83-
"us-west-2": "301217895009"
84+
"us-west-2": "301217895009",
85+
"il-central-1": "275950707576"
8486
},
8587
"repository": "sagemaker-inference-pytorch"
8688
},
@@ -112,7 +114,8 @@
112114
"us-iso-east-1": "167761179201",
113115
"us-isob-east-1": "406031935815",
114116
"us-west-1": "710691900526",
115-
"us-west-2": "301217895009"
117+
"us-west-2": "301217895009",
118+
"il-central-1": "275950707576"
116119
},
117120
"repository": "sagemaker-inference-pytorch"
118121
},
@@ -144,7 +147,8 @@
144147
"us-iso-east-1": "167761179201",
145148
"us-isob-east-1": "406031935815",
146149
"us-west-1": "710691900526",
147-
"us-west-2": "301217895009"
150+
"us-west-2": "301217895009",
151+
"il-central-1": "275950707576"
148152
},
149153
"repository": "sagemaker-inference-pytorch"
150154
},
@@ -176,7 +180,8 @@
176180
"us-iso-east-1": "167761179201",
177181
"us-isob-east-1": "406031935815",
178182
"us-west-1": "710691900526",
179-
"us-west-2": "301217895009"
183+
"us-west-2": "301217895009",
184+
"il-central-1": "275950707576"
180185
},
181186
"repository": "sagemaker-inference-pytorch"
182187
},
@@ -208,7 +213,8 @@
208213
"us-iso-east-1": "167761179201",
209214
"us-isob-east-1": "406031935815",
210215
"us-west-1": "710691900526",
211-
"us-west-2": "301217895009"
216+
"us-west-2": "301217895009",
217+
"il-central-1": "275950707576"
212218
},
213219
"repository": "sagemaker-inference-pytorch"
214220
},
@@ -240,7 +246,8 @@
240246
"us-iso-east-1": "167761179201",
241247
"us-isob-east-1": "406031935815",
242248
"us-west-1": "710691900526",
243-
"us-west-2": "301217895009"
249+
"us-west-2": "301217895009",
250+
"il-central-1": "275950707576"
244251
},
245252
"repository": "sagemaker-inference-pytorch"
246253
},
@@ -272,7 +279,8 @@
272279
"us-iso-east-1": "167761179201",
273280
"us-isob-east-1": "406031935815",
274281
"us-west-1": "710691900526",
275-
"us-west-2": "301217895009"
282+
"us-west-2": "301217895009",
283+
"il-central-1": "275950707576"
276284
},
277285
"repository": "sagemaker-inference-pytorch"
278286
}

src/sagemaker/image_uri_config/neo-tensorflow.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"us-iso-east-1": "167761179201",
5151
"us-isob-east-1": "406031935815",
5252
"us-west-1": "710691900526",
53-
"us-west-2": "301217895009"
53+
"us-west-2": "301217895009",
54+
"il-central-1": "275950707576"
5455
},
5556
"repository": "sagemaker-inference-tensorflow"
5657
},
@@ -82,7 +83,8 @@
8283
"us-iso-east-1": "167761179201",
8384
"us-isob-east-1": "406031935815",
8485
"us-west-1": "710691900526",
85-
"us-west-2": "301217895009"
86+
"us-west-2": "301217895009",
87+
"il-central-1": "275950707576"
8688
},
8789
"repository": "sagemaker-inference-tensorflow"
8890
}

src/sagemaker/image_uri_config/xgboost-neo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"us-iso-east-1": "167761179201",
2929
"us-isob-east-1": "406031935815",
3030
"us-west-1": "710691900526",
31-
"us-west-2": "301217895009"
31+
"us-west-2": "301217895009",
32+
"il-central-1": "275950707576"
3233
},
3334
"repository": "xgboost-neo"
3435
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pandas==1.1.0
1+
pandas==1.3.4

tests/integ/sagemaker/remote_function/conftest.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import pytest
2020
import docker
2121
import re
22+
import sys
2223

2324
from sagemaker.utils import sagemaker_timestamp, _tmpdir, sts_regional_endpoint
2425

@@ -87,21 +88,32 @@
8788

8889

8990
@pytest.fixture(scope="package")
90-
def dummy_container_without_error(sagemaker_session):
91-
# TODO: the python version should be dynamically specified instead of hardcoding
92-
ecr_uri = _build_container(sagemaker_session, "3.7", DOCKERFILE_TEMPLATE)
91+
def compatible_python_version():
92+
return "{}.{}".format(sys.version_info.major, sys.version_info.minor)
93+
94+
95+
@pytest.fixture(scope="package")
96+
def incompatible_python_version():
97+
return "{}.{}".format(sys.version_info.major, sys.version_info.minor + 1)
98+
99+
100+
@pytest.fixture(scope="package")
101+
def dummy_container_without_error(sagemaker_session, compatible_python_version):
102+
ecr_uri = _build_container(sagemaker_session, compatible_python_version, DOCKERFILE_TEMPLATE)
93103
return ecr_uri
94104

95105

96106
@pytest.fixture(scope="package")
97-
def dummy_container_incompatible_python_runtime(sagemaker_session):
98-
ecr_uri = _build_container(sagemaker_session, "3.10", DOCKERFILE_TEMPLATE)
107+
def dummy_container_incompatible_python_runtime(sagemaker_session, incompatible_python_version):
108+
ecr_uri = _build_container(sagemaker_session, incompatible_python_version, DOCKERFILE_TEMPLATE)
99109
return ecr_uri
100110

101111

102112
@pytest.fixture(scope="package")
103-
def dummy_container_with_conda(sagemaker_session):
104-
ecr_uri = _build_container(sagemaker_session, "3.7", DOCKERFILE_TEMPLATE_WITH_CONDA)
113+
def dummy_container_with_conda(sagemaker_session, compatible_python_version):
114+
ecr_uri = _build_container(
115+
sagemaker_session, compatible_python_version, DOCKERFILE_TEMPLATE_WITH_CONDA
116+
)
105117
return ecr_uri
106118

107119

tests/integ/sagemaker/remote_function/test_decorator.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ def divide(x, y):
272272
def test_with_incompatible_dependencies(
273273
sagemaker_session, dummy_container_without_error, cpu_instance_type
274274
):
275+
"""
276+
This test is limited by the python version it is run with.
277+
It is currently working with python 3.8+. However, running it with older versions
278+
or versions in the future may require changes to 'old_deps_requirements.txt'
279+
to fulfill testing scenario.
280+
281+
"""
275282

276283
dependencies_path = os.path.join(DATA_DIR, "remote_function", "old_deps_requirements.txt")
277284

tests/unit/sagemaker/image_uris/test_neo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"us-isob-east-1": "406031935815",
4747
"us-west-1": "710691900526",
4848
"us-west-2": "301217895009",
49+
"il-central-1": "275950707576",
4950
}
5051

5152
INFERENTIA_REGIONS = ACCOUNTS.keys()

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = black-format,flake8,pylint,docstyle,sphinx,doc8,twine,py37,py38,py39,py310
7+
envlist = black-format,flake8,pylint,docstyle,sphinx,doc8,twine,py38,py39,py310
88

99
skip_missing_interpreters = False
1010

@@ -73,13 +73,13 @@ passenv =
7373
# Can be used to specify which tests to run, e.g.: tox -- -s
7474
commands =
7575
python -c "import os; os.system('install-custom-pkgs --install-boto-wheels')"
76-
pip install 'apache-airflow==2.6.3' --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.6.3/constraints-3.7.txt"
76+
pip install 'apache-airflow==2.7.0' --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.7.0/constraints-3.8.txt"
7777

7878
pytest --cov=sagemaker --cov-append {posargs}
7979
{env:IGNORE_COVERAGE:} coverage report -i --fail-under=86
8080
deps = .[test]
8181
depends =
82-
{py37,py38,py39,py310}: clean
82+
{py38,py39,py310}: clean
8383

8484
[testenv:flake8]
8585
skipdist = true

0 commit comments

Comments
 (0)