Skip to content

Commit a72a337

Browse files
Merge branch 'master' into fix-spark-processor
2 parents b84a818 + 90ede1b commit a72a337

File tree

17 files changed

+341
-93
lines changed

17 files changed

+341
-93
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
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

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

src/sagemaker/estimator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,8 +1286,8 @@ def register(
12861286
self,
12871287
content_types,
12881288
response_types,
1289-
inference_instances,
1290-
transform_instances,
1289+
inference_instances=None,
1290+
transform_instances=None,
12911291
image_uri=None,
12921292
model_package_name=None,
12931293
model_package_group_name=None,
@@ -1309,9 +1309,9 @@ def register(
13091309
content_types (list): The supported MIME types for the input data.
13101310
response_types (list): The supported MIME types for the output data.
13111311
inference_instances (list): A list of the instance types that are used to
1312-
generate inferences in real-time.
1312+
generate inferences in real-time (default: None).
13131313
transform_instances (list): A list of the instance types on which a transformation
1314-
job can be run or on which an endpoint can be deployed.
1314+
job can be run or on which an endpoint can be deployed (default: None).
13151315
image_uri (str): The container image uri for Model Package, if not specified,
13161316
Estimator's training container image will be used (default: None).
13171317
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,

src/sagemaker/huggingface/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ def register(
293293
self,
294294
content_types,
295295
response_types,
296-
inference_instances,
297-
transform_instances,
296+
inference_instances=None,
297+
transform_instances=None,
298298
model_package_name=None,
299299
model_package_group_name=None,
300300
image_uri=None,
@@ -313,9 +313,9 @@ def register(
313313
content_types (list): The supported MIME types for the input data.
314314
response_types (list): The supported MIME types for the output data.
315315
inference_instances (list): A list of the instance types that are used to
316-
generate inferences in real-time.
316+
generate inferences in real-time (default: None).
317317
transform_instances (list): A list of the instance types on which a transformation
318-
job can be run or on which an endpoint can be deployed.
318+
job can be run or on which an endpoint can be deployed (default: None).
319319
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
320320
using `model_package_name` makes the Model Package un-versioned.
321321
Defaults to ``None``.
@@ -341,7 +341,7 @@ def register(
341341
Returns:
342342
A `sagemaker.model.ModelPackage` instance.
343343
"""
344-
instance_type = inference_instances[0]
344+
instance_type = inference_instances[0] if inference_instances else None
345345
self._init_sagemaker_session_if_does_not_exist(instance_type)
346346

347347
if image_uri:

src/sagemaker/image_uri_config/autogluon.json

Lines changed: 66 additions & 3 deletions
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
}

src/sagemaker/model.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ def register(
296296
self,
297297
content_types,
298298
response_types,
299-
inference_instances,
300-
transform_instances,
299+
inference_instances=None,
300+
transform_instances=None,
301301
model_package_name=None,
302302
model_package_group_name=None,
303303
image_uri=None,
@@ -317,9 +317,9 @@ def register(
317317
content_types (list): The supported MIME types for the input data.
318318
response_types (list): The supported MIME types for the output data.
319319
inference_instances (list): A list of the instance types that are used to
320-
generate inferences in real-time.
320+
generate inferences in real-time (default: None).
321321
transform_instances (list): A list of the instance types on which a transformation
322-
job can be run or on which an endpoint can be deployed.
322+
job can be run or on which an endpoint can be deployed (default: None).
323323
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
324324
using `model_package_name` makes the Model Package un-versioned (default: None).
325325
model_package_group_name (str): Model Package Group name, exclusive to
@@ -351,12 +351,11 @@ def register(
351351
container_def = self.prepare_container_def()
352352
else:
353353
container_def = {"Image": self.image_uri, "ModelDataUrl": self.model_data}
354-
355354
model_pkg_args = sagemaker.get_model_package_args(
356355
content_types,
357356
response_types,
358-
inference_instances,
359-
transform_instances,
357+
inference_instances=inference_instances,
358+
transform_instances=transform_instances,
360359
model_package_name=model_package_name,
361360
model_package_group_name=model_package_group_name,
362361
model_metrics=model_metrics,

src/sagemaker/mxnet/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def register(
146146
self,
147147
content_types,
148148
response_types,
149-
inference_instances,
150-
transform_instances,
149+
inference_instances=None,
150+
transform_instances=None,
151151
model_package_name=None,
152152
model_package_group_name=None,
153153
image_uri=None,
@@ -166,9 +166,9 @@ def register(
166166
content_types (list): The supported MIME types for the input data.
167167
response_types (list): The supported MIME types for the output data.
168168
inference_instances (list): A list of the instance types that are used to
169-
generate inferences in real-time.
169+
generate inferences in real-time (default: None).
170170
transform_instances (list): A list of the instance types on which a transformation
171-
job can be run or on which an endpoint can be deployed.
171+
job can be run or on which an endpoint can be deployed (default: None).
172172
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
173173
using `model_package_name` makes the Model Package un-versioned (default: None).
174174
model_package_group_name (str): Model Package Group name, exclusive to
@@ -192,7 +192,7 @@ def register(
192192
Returns:
193193
A `sagemaker.model.ModelPackage` instance.
194194
"""
195-
instance_type = inference_instances[0]
195+
instance_type = inference_instances[0] if inference_instances else None
196196
self._init_sagemaker_session_if_does_not_exist(instance_type)
197197

198198
if image_uri:

src/sagemaker/pipeline.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
self.enable_network_isolation = enable_network_isolation
8585
self.endpoint_name = None
8686

87-
def pipeline_container_def(self, instance_type):
87+
def pipeline_container_def(self, instance_type=None):
8888
"""The pipeline definition for deploying this model.
8989
9090
This is the dict created by ``sagemaker.pipeline_container_def()``.
@@ -266,8 +266,8 @@ def register(
266266
self,
267267
content_types: list,
268268
response_types: list,
269-
inference_instances: list,
270-
transform_instances: list,
269+
inference_instances: Optional[list] = None,
270+
transform_instances: Optional[list] = None,
271271
model_package_name: Optional[str] = None,
272272
model_package_group_name: Optional[str] = None,
273273
image_uri: Optional[str] = None,
@@ -286,9 +286,9 @@ def register(
286286
content_types (list): The supported MIME types for the input data.
287287
response_types (list): The supported MIME types for the output data.
288288
inference_instances (list): A list of the instance types that are used to
289-
generate inferences in real-time.
289+
generate inferences in real-time (default: None).
290290
transform_instances (list): A list of the instance types on which a transformation
291-
job can be run or on which an endpoint can be deployed.
291+
job can be run or on which an endpoint can be deployed (default: None).
292292
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
293293
using `model_package_name` makes the Model Package un-versioned (default: None).
294294
model_package_group_name (str): Model Package Group name, exclusive to
@@ -316,18 +316,23 @@ def register(
316316
if model.model_data is None:
317317
raise ValueError("SageMaker Model Package cannot be created without model data.")
318318
if model_package_group_name is not None:
319-
container_def = self.pipeline_container_def(inference_instances[0])
319+
container_def = self.pipeline_container_def(
320+
inference_instances[0] if inference_instances else None
321+
)
320322
else:
321323
container_def = [
322-
{"Image": image_uri or model.image_uri, "ModelDataUrl": model.model_data}
324+
{
325+
"Image": image_uri or model.image_uri,
326+
"ModelDataUrl": model.model_data,
327+
}
323328
for model in self.models
324329
]
325330

326331
model_pkg_args = sagemaker.get_model_package_args(
327332
content_types,
328333
response_types,
329-
inference_instances,
330-
transform_instances,
334+
inference_instances=inference_instances,
335+
transform_instances=transform_instances,
331336
model_package_name=model_package_name,
332337
model_package_group_name=model_package_group_name,
333338
model_metrics=model_metrics,

src/sagemaker/pytorch/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def register(
147147
self,
148148
content_types,
149149
response_types,
150-
inference_instances,
151-
transform_instances,
150+
inference_instances=None,
151+
transform_instances=None,
152152
model_package_name=None,
153153
model_package_group_name=None,
154154
image_uri=None,
@@ -167,9 +167,9 @@ def register(
167167
content_types (list): The supported MIME types for the input data.
168168
response_types (list): The supported MIME types for the output data.
169169
inference_instances (list): A list of the instance types that are used to
170-
generate inferences in real-time.
170+
generate inferences in real-time (default: None).
171171
transform_instances (list): A list of the instance types on which a transformation
172-
job can be run or on which an endpoint can be deployed.
172+
job can be run or on which an endpoint can be deployed (default: None).
173173
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
174174
using `model_package_name` makes the Model Package un-versioned (default: None).
175175
model_package_group_name (str): Model Package Group name, exclusive to
@@ -193,7 +193,7 @@ def register(
193193
Returns:
194194
A `sagemaker.model.ModelPackage` instance.
195195
"""
196-
instance_type = inference_instances[0]
196+
instance_type = inference_instances[0] if inference_instances else None
197197
self._init_sagemaker_session_if_does_not_exist(instance_type)
198198

199199
if image_uri:

src/sagemaker/session.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,8 +4206,8 @@ def _intercept_create_request(
42064206
def get_model_package_args(
42074207
content_types,
42084208
response_types,
4209-
inference_instances,
4210-
transform_instances,
4209+
inference_instances=None,
4210+
transform_instances=None,
42114211
model_package_name=None,
42124212
model_package_group_name=None,
42134213
model_data=None,
@@ -4230,9 +4230,9 @@ def get_model_package_args(
42304230
content_types (list): The supported MIME types for the input data.
42314231
response_types (list): The supported MIME types for the output data.
42324232
inference_instances (list): A list of the instance types that are used to
4233-
generate inferences in real-time.
4233+
generate inferences in real-time (default: None).
42344234
transform_instances (list): A list of the instance types on which a transformation
4235-
job can be run or on which an endpoint can be deployed.
4235+
job can be run or on which an endpoint can be deployed (default: None).
42364236
model_package_name (str): Model Package name, exclusive to `model_package_group_name`,
42374237
using `model_package_name` makes the Model Package un-versioned (default: None).
42384238
model_package_group_name (str): Model Package Group name, exclusive to
@@ -4377,10 +4377,9 @@ def get_create_model_package_request(
43774377
if domain is not None:
43784378
request_dict["Domain"] = domain
43794379
if containers is not None:
4380-
if not all([content_types, response_types, inference_instances, transform_instances]):
4380+
if not all([content_types, response_types]):
43814381
raise ValueError(
4382-
"content_types, response_types, inference_inferences and transform_instances "
4383-
"must be provided if containers is present."
4382+
"content_types and response_types " "must be provided if containers is present."
43844383
)
43854384
inference_specification = {
43864385
"Containers": containers,

0 commit comments

Comments
 (0)