Skip to content

Commit bff3a66

Browse files
authored
Merge branch 'master' into tf-2.9
2 parents 4884f68 + 90ede1b commit bff3a66

32 files changed

+847
-357
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
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+
16+
## v2.93.0 (2022-06-03)
17+
18+
### Features
19+
20+
* MxNet 1.9 support
21+
22+
### Bug Fixes and Other Changes
23+
24+
* bump importlib-metadata version upperbound to support TF2.9
25+
* fix pipeline doc code example where process.run only accepts argument
26+
* Fix Tensorflow default model_dir generation when output_path is pipeline variable
27+
* Support transformer data parameterization
28+
329
## v2.92.2 (2022-05-31)
430

531
### Bug Fixes and Other Changes

VERSION

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

doc/amazon_sagemaker_model_building_pipeline.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Referable Property List:
239239
ProcessingOutput(output_name="train", source="/opt/ml/processing/train"),
240240
],
241241
code="./local/preprocess.py",
242-
job_arguments=["--input-data", "s3://my-input"]
242+
arguments=["--input-data", "s3://my-input"]
243243
),
244244
)
245245
@@ -496,7 +496,7 @@ A :class:`sagemaker.workflow.properties.PropertyFile` is designed to store infor
496496
ProcessingOutput(output_name="hyperparam", source="/opt/ml/processing/evaluation"),
497497
],
498498
code="./local/preprocess.py",
499-
job_arguments=["--input-data", "s3://my-input"],
499+
arguments=["--input-data", "s3://my-input"],
500500
)
501501
502502
hyperparam_report = PropertyFile(
@@ -577,7 +577,7 @@ There are eight types of condition are supported, they are:
577577
ProcessingOutput(output_name="hyperparam", source="/opt/ml/processing/evaluation"),
578578
],
579579
code="./local/preprocess.py",
580-
job_arguments=["--input-data", "s3://my-input"],
580+
arguments=["--input-data", "s3://my-input"],
581581
)
582582
583583
eval_report = PropertyFile(
@@ -668,7 +668,7 @@ Use :class:`sagemaker.workflow.functions.JsonGet` to extract a Json property fro
668668
ProcessingOutput(output_name="hyperparam", source="/opt/ml/processing/evaluation"),
669669
],
670670
code="./local/preprocess.py",
671-
job_arguments=["--input-data", "s3://my-input"],
671+
arguments=["--input-data", "s3://my-input"],
672672
)
673673
674674
hyperparam_report = PropertyFile(

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def read_requirements(filename):
5454
"protobuf>=3.1,<4.0",
5555
"protobuf3-to-dict>=0.1.5,<1.0",
5656
"smdebug_rulesconfig==1.0.1",
57-
"importlib-metadata>=1.4.0,<2.0",
57+
"importlib-metadata>=1.4.0,<5.0",
5858
"packaging>=20.0",
5959
"pandas",
6060
"pathos",

src/sagemaker/estimator.py

+4-4
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

+5-5
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

+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
}

src/sagemaker/image_uri_config/mxnet.json

+68-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"1.4": "1.4.1",
1111
"1.6": "1.6.0",
1212
"1.7": "1.7.0",
13-
"1.8": "1.8.0"
13+
"1.8": "1.8.0",
14+
"1.9": "1.9.0"
1415
},
1516
"versions": {
1617
"0.12.1": {
@@ -346,6 +347,37 @@
346347
},
347348
"repository": "mxnet-training",
348349
"py_versions": ["py37"]
350+
},
351+
"1.9.0": {
352+
"registries": {
353+
"af-south-1": "626614931356",
354+
"ap-east-1": "871362719292",
355+
"ap-northeast-1": "763104351884",
356+
"ap-northeast-2": "763104351884",
357+
"ap-northeast-3": "364406365360",
358+
"ap-south-1": "763104351884",
359+
"ap-southeast-1": "763104351884",
360+
"ap-southeast-2": "763104351884",
361+
"ca-central-1": "763104351884",
362+
"cn-north-1": "727897471807",
363+
"cn-northwest-1": "727897471807",
364+
"eu-central-1": "763104351884",
365+
"eu-north-1": "763104351884",
366+
"eu-west-1": "763104351884",
367+
"eu-west-2": "763104351884",
368+
"eu-west-3": "763104351884",
369+
"eu-south-1": "692866216735",
370+
"me-south-1": "217643126080",
371+
"sa-east-1": "763104351884",
372+
"us-east-1": "763104351884",
373+
"us-east-2": "763104351884",
374+
"us-gov-west-1": "442386744353",
375+
"us-iso-east-1": "886529160074",
376+
"us-west-1": "763104351884",
377+
"us-west-2": "763104351884"
378+
},
379+
"repository": "mxnet-training",
380+
"py_versions": ["py38"]
349381
}
350382
}
351383
},
@@ -358,7 +390,10 @@
358390
"1.2": "1.2.1",
359391
"1.3": "1.3.0",
360392
"1.4": "1.4.1",
361-
"1.6": "1.6.0"
393+
"1.6": "1.6.0",
394+
"1.7": "1.7.0",
395+
"1.8": "1.8.0",
396+
"1.9": "1.9.0"
362397
},
363398
"versions": {
364399
"0.12.1": {
@@ -694,6 +729,37 @@
694729
},
695730
"repository": "mxnet-inference",
696731
"py_versions": ["py37"]
732+
},
733+
"1.9.0": {
734+
"registries": {
735+
"af-south-1": "626614931356",
736+
"ap-east-1": "871362719292",
737+
"ap-northeast-1": "763104351884",
738+
"ap-northeast-2": "763104351884",
739+
"ap-northeast-3": "364406365360",
740+
"ap-south-1": "763104351884",
741+
"ap-southeast-1": "763104351884",
742+
"ap-southeast-2": "763104351884",
743+
"ca-central-1": "763104351884",
744+
"cn-north-1": "727897471807",
745+
"cn-northwest-1": "727897471807",
746+
"eu-central-1": "763104351884",
747+
"eu-north-1": "763104351884",
748+
"eu-west-1": "763104351884",
749+
"eu-west-2": "763104351884",
750+
"eu-west-3": "763104351884",
751+
"eu-south-1": "692866216735",
752+
"me-south-1": "217643126080",
753+
"sa-east-1": "763104351884",
754+
"us-east-1": "763104351884",
755+
"us-east-2": "763104351884",
756+
"us-gov-west-1": "442386744353",
757+
"us-iso-east-1": "886529160074",
758+
"us-west-1": "763104351884",
759+
"us-west-2": "763104351884"
760+
},
761+
"repository": "mxnet-inference",
762+
"py_versions": ["py38"]
697763
}
698764
}
699765
},

src/sagemaker/model.py

+9-9
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,
@@ -501,13 +500,14 @@ def _upload_code(self, key_prefix: str, repack: bool = False) -> None:
501500
if is_pipeline_variable(self.model_data):
502501
# model is not yet there, defer repacking to later during pipeline execution
503502
if not isinstance(self.sagemaker_session, PipelineSession):
504-
# TODO: link the doc in the warning once ready
505503
logging.warning(
506504
"The model_data is a Pipeline variable of type %s, "
507505
"which should be used under `PipelineSession` and "
508506
"leverage `ModelStep` to create or register model. "
509507
"Otherwise some functionalities e.g. "
510-
"runtime repack may be missing",
508+
"runtime repack may be missing. For more, see: "
509+
"https://sagemaker.readthedocs.io/en/stable/"
510+
"amazon_sagemaker_model_building_pipeline.html#model-step",
511511
type(self.model_data),
512512
)
513513
return

0 commit comments

Comments
 (0)