Skip to content

Commit 195b5a5

Browse files
authored
Merge branch 'master' into algo_kix_region
2 parents 980dea6 + 0171bf5 commit 195b5a5

File tree

17 files changed

+196
-26
lines changed

17 files changed

+196
-26
lines changed

CHANGELOG.md

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

3+
## v2.57.0 (2021-08-30)
4+
5+
### Deprecations and Removals
6+
7+
* Remove stale S3DownloadMode from test_session.py
8+
9+
### Features
10+
11+
* update clarify imageURI for KIX
12+
13+
### Bug Fixes and Other Changes
14+
15+
* propagate KMS key to model.deploy
16+
* Propagate tags and VPC configs to repack model steps
17+
318
## v2.56.0 (2021-08-26)
419

520
### Features

VERSION

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

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def read_version():
5252
"urllib3>=1.21.1,!=1.25,!=1.25.1",
5353
"docker-compose>=1.25.2",
5454
"PyYAML>=5.3, <6", # PyYAML version has to match docker-compose requirements
55+
"psutil",
5556
],
5657
"scipy": ["scipy>=0.19.0"],
5758
}

src/sagemaker/image_uri_config/debugger.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"ap-east-1": "199566480951",
88
"ap-northeast-1": "430734990657",
99
"ap-northeast-2": "578805364391",
10+
"ap-northeast-3": "479947661362",
1011
"ap-south-1": "904829902805",
1112
"ap-southeast-1": "972752614525",
1213
"ap-southeast-2": "184798709955",

src/sagemaker/local/image.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
import tempfile
3232

3333
from distutils.spawn import find_executable
34+
from signal import SIGTERM
3435
from threading import Thread
36+
37+
import psutil
3538
from six.moves.urllib.parse import urlparse
3639

3740
import sagemaker
@@ -840,6 +843,8 @@ def run(self):
840843

841844
def down(self):
842845
"""Placeholder docstring"""
846+
for process in psutil.Process(self.process.pid).children():
847+
process.send_signal(SIGTERM)
843848
self.process.terminate()
844849

845850

src/sagemaker/workflow/_utils.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def __init__(
5555
role,
5656
model_data: str,
5757
entry_point: str,
58+
display_name: str = None,
59+
description: str = None,
5860
source_dir: str = None,
5961
dependencies: List = None,
6062
depends_on: Union[List[str], List[Step]] = None,
@@ -165,7 +167,12 @@ def __init__(
165167

166168
# super!
167169
super(_RepackModelStep, self).__init__(
168-
name=name, depends_on=depends_on, estimator=repacker, inputs=inputs
170+
name=name,
171+
display_name=display_name,
172+
description=description,
173+
depends_on=depends_on,
174+
estimator=repacker,
175+
inputs=inputs,
169176
)
170177

171178
def _prepare_for_repacking(self):
@@ -285,6 +292,7 @@ def __init__(
285292
approval_status="PendingManualApproval",
286293
image_uri=None,
287294
compile_model_family=None,
295+
display_name: str = None,
288296
description=None,
289297
depends_on: Union[List[str], List[Step]] = None,
290298
tags=None,
@@ -326,7 +334,9 @@ def __init__(
326334
this step depends on
327335
**kwargs: additional arguments to `create_model`.
328336
"""
329-
super(_RegisterModelStep, self).__init__(name, StepTypeEnum.REGISTER_MODEL, depends_on)
337+
super(_RegisterModelStep, self).__init__(
338+
name, display_name, description, StepTypeEnum.REGISTER_MODEL, depends_on
339+
)
330340
self.estimator = estimator
331341
self.model_data = model_data
332342
self.content_types = content_types

src/sagemaker/workflow/callback_step.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383
sqs_queue_url: str,
8484
inputs: dict,
8585
outputs: List[CallbackOutput],
86+
display_name: str = None,
87+
description: str = None,
8688
cache_config: CacheConfig = None,
8789
depends_on: Union[List[str], List[Step]] = None,
8890
):
@@ -94,11 +96,15 @@ def __init__(
9496
inputs (dict): Input arguments that will be provided
9597
in the SQS message body of callback messages.
9698
outputs (List[CallbackOutput]): Outputs that can be provided when completing a callback.
99+
display_name (str): The display name of the callback step.
100+
description (str): The description of the callback step.
97101
cache_config (CacheConfig): A `sagemaker.workflow.steps.CacheConfig` instance.
98102
depends_on (List[str] or List[Step]): A list of step names or step instances
99103
this `sagemaker.workflow.steps.CallbackStep` depends on
100104
"""
101-
super(CallbackStep, self).__init__(name, StepTypeEnum.CALLBACK, depends_on)
105+
super(CallbackStep, self).__init__(
106+
name, display_name, description, StepTypeEnum.CALLBACK, depends_on
107+
)
102108
self.sqs_queue_url = sqs_queue_url
103109
self.outputs = outputs
104110
self.cache_config = cache_config

src/sagemaker/workflow/condition_step.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def __init__(
4242
self,
4343
name: str,
4444
depends_on: Union[List[str], List[Step]] = None,
45+
display_name: str = None,
46+
description: str = None,
4547
conditions: List[Condition] = None,
4648
if_steps: List[Union[Step, StepCollection]] = None,
4749
else_steps: List[Union[Step, StepCollection]] = None,
@@ -53,6 +55,9 @@ def __init__(
5355
execution.
5456
5557
Args:
58+
name (str): The name of the condition step.
59+
display_name (str): The display name of the condition step.
60+
description (str): The description of the condition step.
5661
conditions (List[Condition]): A list of `sagemaker.workflow.conditions.Condition`
5762
instances.
5863
if_steps (List[Union[Step, StepCollection]]): A list of `sagemaker.workflow.steps.Step`
@@ -62,7 +67,9 @@ def __init__(
6267
or `sagemaker.workflow.step_collections.StepCollection` instances that are
6368
marked as ready for execution if the list of conditions evaluates to False.
6469
"""
65-
super(ConditionStep, self).__init__(name, StepTypeEnum.CONDITION, depends_on)
70+
super(ConditionStep, self).__init__(
71+
name, display_name, description, StepTypeEnum.CONDITION, depends_on
72+
)
6673
self.conditions = conditions or []
6774
self.if_steps = if_steps or []
6875
self.else_steps = else_steps or []

src/sagemaker/workflow/lambda_step.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def __init__(
8282
self,
8383
name: str,
8484
lambda_func: Lambda,
85+
display_name: str = None,
86+
description: str = None,
8587
inputs: dict = None,
8688
outputs: List[LambdaOutput] = None,
8789
cache_config: CacheConfig = None,
@@ -91,6 +93,8 @@ def __init__(
9193
9294
Args:
9395
name (str): The name of the lambda step.
96+
display_name (str): The display name of the Lambda step.
97+
description (str): The description of the Lambda step.
9498
lambda_func (str): An instance of sagemaker.lambda_helper.Lambda.
9599
If lambda arn is specified in the instance, LambdaStep just invokes the function,
96100
else lambda function will be created while creating the pipeline.
@@ -101,7 +105,9 @@ def __init__(
101105
depends_on (List[str]): A list of step names this `sagemaker.workflow.steps.LambdaStep`
102106
depends on
103107
"""
104-
super(LambdaStep, self).__init__(name, StepTypeEnum.LAMBDA, depends_on)
108+
super(LambdaStep, self).__init__(
109+
name, display_name, description, StepTypeEnum.LAMBDA, depends_on
110+
)
105111
self.lambda_func = lambda_func
106112
self.outputs = outputs if outputs is not None else []
107113
self.cache_config = cache_config

src/sagemaker/workflow/step_collections.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(
6767
approval_status=None,
6868
image_uri=None,
6969
compile_model_family=None,
70+
display_name=None,
7071
description=None,
7172
tags=None,
7273
model: Union[Model, PipelineModel] = None,
@@ -138,6 +139,8 @@ def __init__(
138139
tags=tags,
139140
subnets=subnets,
140141
security_group_ids=security_group_ids,
142+
description=description,
143+
display_name=display_name,
141144
**kwargs,
142145
)
143146
steps.append(repack_model_step)
@@ -179,6 +182,8 @@ def __init__(
179182
tags=tags,
180183
subnets=subnets,
181184
security_group_ids=security_group_ids,
185+
description=description,
186+
display_name=display_name,
182187
**kwargs,
183188
)
184189
steps.append(repack_model_step)
@@ -208,6 +213,7 @@ def __init__(
208213
image_uri=image_uri,
209214
compile_model_family=compile_model_family,
210215
description=description,
216+
display_name=display_name,
211217
tags=tags,
212218
container_def_list=self.container_def_list,
213219
**kwargs,
@@ -231,6 +237,8 @@ def __init__(
231237
instance_count,
232238
instance_type,
233239
transform_inputs,
240+
description: str = None,
241+
display_name: str = None,
234242
# model arguments
235243
image_uri=None,
236244
predictor_cls=None,
@@ -302,6 +310,8 @@ def __init__(
302310
tags=tags,
303311
subnets=estimator.subnets,
304312
security_group_ids=estimator.security_group_ids,
313+
description=description,
314+
display_name=display_name,
305315
)
306316
steps.append(repack_model_step)
307317
model_data = repack_model_step.properties.ModelArtifacts.S3ModelArtifacts
@@ -324,6 +334,8 @@ def predict_wrapper(endpoint, session):
324334
name=f"{name}CreateModelStep",
325335
model=model,
326336
inputs=model_inputs,
337+
description=description,
338+
display_name=display_name,
327339
)
328340
if "entry_point" not in kwargs and depends_on:
329341
# if the CreateModelStep is the first step in the collection
@@ -351,6 +363,8 @@ def predict_wrapper(endpoint, session):
351363
name=f"{name}TransformStep",
352364
transformer=transformer,
353365
inputs=transform_inputs,
366+
description=description,
367+
display_name=display_name,
354368
)
355369
steps.append(transform_step)
356370

0 commit comments

Comments
 (0)