Skip to content

Commit f8e424f

Browse files
Merge branch 'master' into fix-processing-image-uri-param
2 parents 66db4ce + f5a9e28 commit f8e424f

File tree

4 files changed

+122
-37
lines changed

4 files changed

+122
-37
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v2.94.0 (2022-06-07)
4+
5+
### Features
6+
7+
* AutoGluon 0.4.2 image_uris support
8+
9+
## v2.93.1 (2022-06-06)
10+
11+
### Bug Fixes and Other Changes
12+
13+
* add input parameterization tests for workflow job steps
14+
* add parameterized tests to transformer
15+
316
## v2.93.0 (2022-06-03)
417

518
### Features

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.93.1.dev0
1+
2.94.1.dev0

src/sagemaker/image_uri_config/autogluon.json

+66-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"processors": ["cpu", "gpu"],
44
"version_aliases": {
55
"0.3": "0.3.2",
6-
"0.4": "0.4.0"
6+
"0.4": "0.4.2"
77
},
88
"versions": {
99
"0.3.1": {
@@ -92,14 +92,42 @@
9292
},
9393
"repository": "autogluon-training",
9494
"py_versions": ["py38"]
95+
},
96+
"0.4.2": {
97+
"registries": {
98+
"af-south-1": "626614931356",
99+
"ap-east-1": "871362719292",
100+
"ap-northeast-1": "763104351884",
101+
"ap-northeast-2": "763104351884",
102+
"ap-northeast-3": "364406365360",
103+
"ap-south-1": "763104351884",
104+
"ap-southeast-1": "763104351884",
105+
"ap-southeast-2": "763104351884",
106+
"ca-central-1": "763104351884",
107+
"eu-central-1": "763104351884",
108+
"eu-north-1": "763104351884",
109+
"eu-west-1": "763104351884",
110+
"eu-west-2": "763104351884",
111+
"eu-west-3": "763104351884",
112+
"eu-south-1": "692866216735",
113+
"me-south-1": "217643126080",
114+
"sa-east-1": "763104351884",
115+
"us-east-1": "763104351884",
116+
"us-east-2": "763104351884",
117+
"us-gov-west-1": "442386744353",
118+
"us-iso-east-1": "886529160074",
119+
"us-west-1": "763104351884",
120+
"us-west-2": "763104351884"
121+
},
122+
"repository": "autogluon-training",
123+
"py_versions": ["py38"]
95124
}
96125
}
97126
},
98127
"inference": {
99-
"processors": ["cpu"],
100128
"version_aliases": {
101129
"0.3": "0.3.2",
102-
"0.4": "0.4.0"
130+
"0.4": "0.4.2"
103131
},
104132
"versions": {
105133
"0.3.1": {
@@ -131,6 +159,7 @@
131159
"us-west-2": "763104351884"
132160
},
133161
"repository": "autogluon-inference",
162+
"processors": ["cpu"],
134163
"py_versions": ["py37"]
135164
},
136165
"0.3.2": {
@@ -162,6 +191,7 @@
162191
"us-west-2": "763104351884"
163192
},
164193
"repository": "autogluon-inference",
194+
"processors": ["cpu"],
165195
"py_versions": ["py38"]
166196
},
167197
"0.4.0": {
@@ -193,6 +223,39 @@
193223
"us-west-2": "763104351884"
194224
},
195225
"repository": "autogluon-inference",
226+
"processors": ["cpu"],
227+
"py_versions": ["py38"]
228+
},
229+
"0.4.2": {
230+
"registries": {
231+
"af-south-1": "626614931356",
232+
"ap-east-1": "871362719292",
233+
"ap-northeast-1": "763104351884",
234+
"ap-northeast-2": "763104351884",
235+
"ap-northeast-3": "364406365360",
236+
"ap-south-1": "763104351884",
237+
"ap-southeast-1": "763104351884",
238+
"ap-southeast-2": "763104351884",
239+
"ca-central-1": "763104351884",
240+
"cn-north-1": "727897471807",
241+
"cn-northwest-1": "727897471807",
242+
"eu-central-1": "763104351884",
243+
"eu-north-1": "763104351884",
244+
"eu-west-1": "763104351884",
245+
"eu-west-2": "763104351884",
246+
"eu-west-3": "763104351884",
247+
"eu-south-1": "692866216735",
248+
"me-south-1": "217643126080",
249+
"sa-east-1": "763104351884",
250+
"us-east-1": "763104351884",
251+
"us-east-2": "763104351884",
252+
"us-gov-west-1": "442386744353",
253+
"us-iso-east-1": "886529160074",
254+
"us-west-1": "763104351884",
255+
"us-west-2": "763104351884"
256+
},
257+
"repository": "autogluon-inference",
258+
"processors": ["cpu", "gpu"],
196259
"py_versions": ["py38"]
197260
}
198261
}

tests/unit/sagemaker/image_uris/test_autogluon.py

+42-33
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,53 @@
4242
"us-west-1": "763104351884",
4343
"us-west-2": "763104351884",
4444
}
45-
VERSIONS = ["0.3.1", "0.3.2", "0.4.0", "0.3", "0.4"]
45+
VERSIONS = ["0.3.1", "0.3.2", "0.4.0", "0.4.2", "0.3", "0.4"]
46+
SCOPES = ["training", "inference"]
47+
PROCESSORS = ["cpu", "gpu"]
4648

4749

4850
@pytest.mark.parametrize("version", VERSIONS)
49-
def test_valid_uris(version):
51+
@pytest.mark.parametrize("scope", SCOPES)
52+
@pytest.mark.parametrize("processor", PROCESSORS)
53+
def test_valid_uris_training(version, scope, processor):
54+
instance_type = "ml.c4.xlarge" if processor == "cpu" else "ml.p2.xlarge"
5055
py_version = "py37" if version == "0.3.1" else "py38"
51-
for region in ACCOUNTS.keys():
52-
uri = image_uris.retrieve(
53-
"autogluon",
54-
region=region,
55-
version=version,
56-
py_version=py_version,
57-
image_scope="training",
58-
instance_type="ml.c4.xlarge",
59-
)
56+
if (
57+
scope == "inference"
58+
and processor == "gpu"
59+
and version in ["0.3.1", "0.3.2", "0.4.0", "0.3"]
60+
):
61+
with pytest.raises(ValueError) as e:
62+
image_uris.retrieve(
63+
"autogluon",
64+
region="us-west-2",
65+
version=version,
66+
py_version=py_version,
67+
image_scope=scope,
68+
instance_type=instance_type,
69+
)
6070

61-
expected = expected_uris.framework_uri(
62-
"autogluon-training",
63-
version,
64-
ACCOUNTS[region],
65-
py_version=py_version,
66-
region=region,
67-
)
68-
assert uri == expected
71+
assert "Unsupported processor: gpu." in str(e.value)
72+
else:
73+
for region in ACCOUNTS.keys():
74+
uri = image_uris.retrieve(
75+
"autogluon",
76+
region=region,
77+
version=version,
78+
py_version=py_version,
79+
image_scope=scope,
80+
instance_type=instance_type,
81+
)
82+
83+
expected = expected_uris.framework_uri(
84+
f"autogluon-{scope}",
85+
version,
86+
ACCOUNTS[region],
87+
py_version=py_version,
88+
region=region,
89+
processor=processor,
90+
)
91+
assert uri == expected
6992

7093

7194
@pytest.mark.parametrize("version", VERSIONS)
@@ -81,17 +104,3 @@ def test_py3_error(version):
81104
)
82105

83106
assert "Unsupported Python version: py3." in str(e.value)
84-
85-
86-
@pytest.mark.parametrize("version", VERSIONS)
87-
def test_gpu_error(version):
88-
with pytest.raises(ValueError) as e:
89-
image_uris.retrieve(
90-
"autogluon",
91-
region="us-west-2",
92-
version=version,
93-
image_scope="inference",
94-
instance_type="ml.p2.xlarge",
95-
)
96-
97-
assert "Unsupported processor: gpu." in str(e.value)

0 commit comments

Comments
 (0)