Skip to content

Commit 3d4ffa5

Browse files
authored
Merge branch 'aws:master' into master
2 parents 382d9dd + 76f0b78 commit 3d4ffa5

31 files changed

+101
-28
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## v2.55.0 (2021-08-25)
4+
5+
### Features
6+
7+
* Add information of Amazon-provided analysis image used by Model Monitor
8+
9+
### Bug Fixes and Other Changes
10+
11+
* Update Changelog to fix release
12+
* Fixing the order of populating container list
13+
* pass network isolation config to pipelineModel
14+
* Deference symbolic link when create tar file
15+
* multiprocess issue in feature_group.py
16+
* deprecate tag logic on Association
17+
18+
### Documentation Changes
19+
20+
* add dataset_definition to processing page
21+
322
## v2.54.0 (2021-08-16)
423

524
### Features
@@ -8,7 +27,7 @@
827

928
### Bug Fixes and Other Changes
1029

11-
* issue #2253 where Processing job in Local mode would call Describe
30+
* issue #2253 where Processing job in Local mode would call Describe API
1231

1332
## v2.53.0 (2021-08-12)
1433

VERSION

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

doc/api/utility/inputs.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ Inputs
55
:members:
66
:undoc-members:
77
:show-inheritance:
8-
:noindex:
8+
9+
.. automodule:: sagemaker.dataset_definition.inputs
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:

src/sagemaker/automl/automl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def create_model(
328328
predictor_cls=predictor_cls,
329329
name=name,
330330
vpc_config=vpc_config,
331+
enable_network_isolation=enable_network_isolation,
331332
sagemaker_session=sagemaker_session or self.sagemaker_session,
332333
)
333334
return pipeline

src/sagemaker/dataset_definition/inputs.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class RedshiftDatasetDefinition(ApiObject):
2727
2828
With this input, SQL queries will be executed using Redshift to generate datasets to S3.
2929
30-
Attributes:
30+
Parameters:
3131
cluster_id (str): The Redshift cluster Identifier.
3232
database (str): The name of the Redshift database used in Redshift query execution.
3333
db_user (str): The database user name used in Redshift query execution.
@@ -60,7 +60,7 @@ class AthenaDatasetDefinition(ApiObject):
6060
6161
With this input, SQL queries will be executed using Athena to generate datasets to S3.
6262
63-
Attributes:
63+
Parameters:
6464
catalog (str): The name of the data catalog used in Athena query execution.
6565
database (str): The name of the database used in the Athena query execution.
6666
query_string (str): The SQL query statements, to be executed.
@@ -87,7 +87,7 @@ class AthenaDatasetDefinition(ApiObject):
8787
class DatasetDefinition(ApiObject):
8888
"""DatasetDefinition input.
8989
90-
Attributes:
90+
Parameters:
9191
data_distribution_type (str): Whether the generated dataset is FullyReplicated or
9292
ShardedByS3Key (default).
9393
input_mode (str): Whether to use File or Pipe input mode. In File (default) mode, Amazon
@@ -98,9 +98,8 @@ class DatasetDefinition(ApiObject):
9898
local_path (str): The local path where you want Amazon SageMaker to download the Dataset
9999
Definition inputs to run a processing job. LocalPath is an absolute path to the input
100100
data. This is a required parameter when `AppManaged` is False (default).
101-
redshift_dataset_definition
102-
(:class:`~sagemaker.dataset_definition.inputs.RedshiftDatasetDefinition`): Redshift
103-
dataset definition.
101+
redshift_dataset_definition (:class:`~sagemaker.dataset_definition.inputs.RedshiftDatasetDefinition`):
102+
Configuration for Redshift Dataset Definition input.
104103
athena_dataset_definition (:class:`~sagemaker.dataset_definition.inputs.AthenaDatasetDefinition`):
105104
Configuration for Athena Dataset Definition input.
106105
"""
@@ -126,7 +125,7 @@ class S3Input(ApiObject):
126125
S3 list operations are not strongly consistent.
127126
Use ManifestFile if strong consistency is required.
128127
129-
Attributes:
128+
Parameters:
130129
s3_uri (str): the path to a specific S3 object or a S3 prefix
131130
local_path (str): the path to a local directory. If not provided, skips data download
132131
by SageMaker platform.

src/sagemaker/feature_store/feature_group.py

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ def _ingest_single_batch(
207207
for row in data_frame[start_index:end_index].itertuples():
208208
record = [
209209
FeatureValue(
210-
feature_name=data_frame.columns[index - 1], value_as_string=str(row[index])
210+
feature_name=data_frame.columns[index - 1],
211+
value_as_string=str(row[index]),
211212
)
212213
for index in range(1, len(row))
213214
if pd.notna(row[index])
@@ -270,13 +271,24 @@ def _run_multi_process(self, data_frame: DataFrame, wait=True, timeout=None):
270271
timeout (Union[int, float]): ``concurrent.futures.TimeoutError`` will be raised
271272
if timeout is reached.
272273
"""
274+
# pylint: disable=I1101
273275
batch_size = math.ceil(data_frame.shape[0] / self.max_processes)
276+
# pylint: enable=I1101
274277

275278
args = []
276279
for i in range(self.max_processes):
277280
start_index = min(i * batch_size, data_frame.shape[0])
278281
end_index = min(i * batch_size + batch_size, data_frame.shape[0])
279-
args += [(data_frame[start_index:end_index], start_index, timeout)]
282+
args += [
283+
(
284+
self.max_workers,
285+
self.feature_group_name,
286+
self.sagemaker_fs_runtime_client_config,
287+
data_frame[start_index:end_index],
288+
start_index,
289+
timeout,
290+
)
291+
]
280292

281293
def init_worker():
282294
# ignore keyboard interrupts in child processes.
@@ -285,13 +297,21 @@ def init_worker():
285297
self._processing_pool = ProcessingPool(self.max_processes, init_worker)
286298
self._processing_pool.restart(force=True)
287299

288-
f = lambda x: self._run_multi_threaded(*x) # noqa: E731
300+
f = lambda x: IngestionManagerPandas._run_multi_threaded(*x) # noqa: E731
289301
self._async_result = self._processing_pool.amap(f, args)
290302

291303
if wait:
292304
self.wait(timeout=timeout)
293305

294-
def _run_multi_threaded(self, data_frame: DataFrame, row_offset=0, timeout=None) -> List[int]:
306+
@staticmethod
307+
def _run_multi_threaded(
308+
max_workers: int,
309+
feature_group_name: str,
310+
sagemaker_fs_runtime_client_config: Config,
311+
data_frame: DataFrame,
312+
row_offset=0,
313+
timeout=None,
314+
) -> List[int]:
295315
"""Start the ingestion process.
296316
297317
Args:
@@ -305,21 +325,23 @@ def _run_multi_threaded(self, data_frame: DataFrame, row_offset=0, timeout=None)
305325
Returns:
306326
List of row indices that failed to be ingested.
307327
"""
308-
executor = ThreadPoolExecutor(max_workers=self.max_workers)
309-
batch_size = math.ceil(data_frame.shape[0] / self.max_workers)
328+
executor = ThreadPoolExecutor(max_workers=max_workers)
329+
# pylint: disable=I1101
330+
batch_size = math.ceil(data_frame.shape[0] / max_workers)
331+
# pylint: enable=I1101
310332

311333
futures = {}
312-
for i in range(self.max_workers):
334+
for i in range(max_workers):
313335
start_index = min(i * batch_size, data_frame.shape[0])
314336
end_index = min(i * batch_size + batch_size, data_frame.shape[0])
315337
futures[
316338
executor.submit(
317-
self._ingest_single_batch,
318-
feature_group_name=self.feature_group_name,
339+
IngestionManagerPandas._ingest_single_batch,
340+
feature_group_name=feature_group_name,
319341
data_frame=data_frame,
320342
start_index=start_index,
321343
end_index=end_index,
322-
client_config=self.sagemaker_fs_runtime_client_config,
344+
client_config=sagemaker_fs_runtime_client_config,
323345
)
324346
] = (start_index + row_offset, end_index + row_offset)
325347

src/sagemaker/image_uri_config/blazingtext.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "501404015308",
99
"ap-northeast-2": "306986355934",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "544295431143",

src/sagemaker/image_uri_config/factorization-machines.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/image-classification.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"ap-south-1": "991648021394",
1111
"ap-southeast-1": "475088953585",
1212
"ap-southeast-2": "544295431143",
13+
"ap-northeast-3": "867004704886",
1314
"ca-central-1": "469771592824",
1415
"cn-north-1": "390948362332",
1516
"cn-northwest-1": "387376663083",

src/sagemaker/image_uri_config/ipinsights.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/kmeans.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/knn.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"versions": {
44
"1": {
55
"registries": {
6-
"af-south-1": "455444449433",
6+
"af-south-1": "455444449433",
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/linear-learner.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/model-monitor.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "001633400207",
88
"ap-northeast-1": "574779866223",
99
"ap-northeast-2": "709848358524",
10+
"ap-northeast-3": "990339680094",
1011
"ap-south-1": "126357580389",
1112
"ap-southeast-1": "245545462676",
1213
"ap-southeast-2": "563025443158",

src/sagemaker/image_uri_config/ntm.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/object-detection.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "501404015308",
99
"ap-northeast-2": "306986355934",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "544295431143",

src/sagemaker/image_uri_config/object2vec.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/pca.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/randomcutforest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "351501993468",
99
"ap-northeast-2": "835164637446",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "712309505854",

src/sagemaker/image_uri_config/semantic-segmentation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "501404015308",
99
"ap-northeast-2": "306986355934",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "544295431143",

src/sagemaker/image_uri_config/seq2seq.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "286214385809",
88
"ap-northeast-1": "501404015308",
99
"ap-northeast-2": "306986355934",
10+
"ap-northeast-3": "867004704886",
1011
"ap-south-1": "991648021394",
1112
"ap-southeast-1": "475088953585",
1213
"ap-southeast-2": "544295431143",

src/sagemaker/image_uri_config/sklearn.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"ap-east-1": "651117190479",
1010
"ap-northeast-1": "354813040037",
1111
"ap-northeast-2": "366743142698",
12+
"ap-northeast-3": "867004704886",
1213
"ap-south-1": "720646828776",
1314
"ap-southeast-1": "121021644041",
1415
"ap-southeast-2": "783357654285",
@@ -39,6 +40,7 @@
3940
"ap-east-1": "651117190479",
4041
"ap-northeast-1": "354813040037",
4142
"ap-northeast-2": "366743142698",
43+
"ap-northeast-3": "867004704886",
4244
"ap-south-1": "720646828776",
4345
"ap-southeast-1": "121021644041",
4446
"ap-southeast-2": "783357654285",

src/sagemaker/image_uri_config/xgboost.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"ap-east-1": "286214385809",
1111
"ap-northeast-1": "501404015308",
1212
"ap-northeast-2": "306986355934",
13+
"ap-northeast-3": "867004704886",
1314
"ap-south-1": "991648021394",
1415
"ap-southeast-1": "475088953585",
1516
"ap-southeast-2": "544295431143",
@@ -41,6 +42,7 @@
4142
"ap-east-1": "651117190479",
4243
"ap-northeast-1": "354813040037",
4344
"ap-northeast-2": "366743142698",
45+
"ap-northeast-3": "867004704886",
4446
"ap-south-1": "720646828776",
4547
"ap-southeast-1": "121021644041",
4648
"ap-southeast-2": "783357654285",
@@ -72,6 +74,7 @@
7274
"ap-east-1": "651117190479",
7375
"ap-northeast-1": "354813040037",
7476
"ap-northeast-2": "366743142698",
77+
"ap-northeast-3": "867004704886",
7578
"ap-south-1": "720646828776",
7679
"ap-southeast-1": "121021644041",
7780
"ap-southeast-2": "783357654285",
@@ -103,6 +106,7 @@
103106
"ap-east-1": "651117190479",
104107
"ap-northeast-1": "354813040037",
105108
"ap-northeast-2": "366743142698",
109+
"ap-northeast-3": "867004704886",
106110
"ap-south-1": "720646828776",
107111
"ap-southeast-1": "121021644041",
108112
"ap-southeast-2": "783357654285",
@@ -132,6 +136,7 @@
132136
"ap-east-1": "651117190479",
133137
"ap-northeast-1": "354813040037",
134138
"ap-northeast-2": "366743142698",
139+
"ap-northeast-3": "867004704886",
135140
"ap-south-1": "720646828776",
136141
"ap-southeast-1": "121021644041",
137142
"ap-southeast-2": "783357654285",

src/sagemaker/inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, seed):
127127
class CreateModelInput(object):
128128
"""A class containing parameters which can be used to create a SageMaker Model
129129
130-
Attributes:
130+
Parameters:
131131
instance_type (str): type or EC2 instance will be used for model deployment.
132132
accelerator_type (str): elastic inference accelerator type.
133133
"""

0 commit comments

Comments
 (0)