Skip to content

Commit 486377b

Browse files
authored
Merge branch 'master' into add-aws-batch
2 parents d41bd5a + 4055fcf commit 486377b

File tree

24 files changed

+1959
-1114
lines changed

24 files changed

+1959
-1114
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: File a report to help us reproduce and fix the problem
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**PySDK Version**
11+
- [ ] PySDK V2 (2.x)
12+
- [ ] PySDK V3 (3.x)
13+
14+
**Describe the bug**
15+
A clear and concise description of what the bug is.
16+
17+
**To reproduce**
18+
A clear, step-by-step set of instructions to reproduce the bug.
19+
The provided code need to be **complete** and **runnable**, if additional data is needed, please include them in the issue.
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Screenshots or logs**
25+
If applicable, add screenshots or logs to help explain your problem.
26+
27+
**System information**
28+
A description of your system. Please provide:
29+
- **SageMaker Python SDK version**:
30+
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**:
31+
- **Framework version**:
32+
- **Python version**:
33+
- **CPU or GPU**:
34+
- **Custom Docker image (Y/N)**:
35+
36+
**Additional context**
37+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/aws/sagemaker-python-sdk/discussions
5+
about: Use GitHub Discussions to ask and answer questions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Documentation request
3+
about: Request improved documentation
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**What did you find confusing? Please describe.**
11+
A clear and concise description of what you found confusing. Ex. I tried to [...] but I didn't understand how to [...]
12+
13+
**Describe how documentation can be improved**
14+
A clear and concise description of where documentation was lacking and how it can be improved.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the documentation request here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest new functionality for this library
4+
title: ''
5+
labels: 'feature request'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the feature you'd like**
11+
A clear and concise description of the functionality you want.
12+
13+
**How would this feature be used? Please describe.**
14+
A clear and concise description of the use case for this feature. Please provide an example, if possible.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

sagemaker-core/src/sagemaker/core/local/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ def get_child_process_ids(pid):
137137
Returns:
138138
(List[int]): Child process ids
139139
"""
140-
cmd = f"pgrep -P {pid}".split()
140+
if not str(pid).isdigit():
141+
raise ValueError("Invalid PID")
142+
143+
cmd = ["pgrep", "-P", str(pid)]
144+
141145
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
142146
output, err = process.communicate()
143147
if err:

sagemaker-core/src/sagemaker/core/remote_function/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def wrapper(*args, **kwargs):
366366
s3_uri=s3_path_join(
367367
job_settings.s3_root_uri, job.job_name, EXCEPTION_FOLDER
368368
),
369-
hmac_key=job.hmac_key,
369+
370370
)
371371
except ServiceError as serr:
372372
chained_e = serr.__cause__
@@ -403,7 +403,7 @@ def wrapper(*args, **kwargs):
403403
return serialization.deserialize_obj_from_s3(
404404
sagemaker_session=job_settings.sagemaker_session,
405405
s3_uri=s3_path_join(job_settings.s3_root_uri, job.job_name, RESULTS_FOLDER),
406-
hmac_key=job.hmac_key,
406+
407407
)
408408

409409
if job.describe()["TrainingJobStatus"] == "Stopped":
@@ -983,7 +983,7 @@ def from_describe_response(describe_training_job_response, sagemaker_session):
983983
job_return = serialization.deserialize_obj_from_s3(
984984
sagemaker_session=sagemaker_session,
985985
s3_uri=s3_path_join(job.s3_uri, RESULTS_FOLDER),
986-
hmac_key=job.hmac_key,
986+
987987
)
988988
except DeserializationError as e:
989989
client_exception = e
@@ -995,7 +995,7 @@ def from_describe_response(describe_training_job_response, sagemaker_session):
995995
job_exception = serialization.deserialize_exception_from_s3(
996996
sagemaker_session=sagemaker_session,
997997
s3_uri=s3_path_join(job.s3_uri, EXCEPTION_FOLDER),
998-
hmac_key=job.hmac_key,
998+
999999
)
10001000
except ServiceError as serr:
10011001
chained_e = serr.__cause__
@@ -1085,7 +1085,7 @@ def result(self, timeout: float = None) -> Any:
10851085
self._return = serialization.deserialize_obj_from_s3(
10861086
sagemaker_session=self._job.sagemaker_session,
10871087
s3_uri=s3_path_join(self._job.s3_uri, RESULTS_FOLDER),
1088-
hmac_key=self._job.hmac_key,
1088+
10891089
)
10901090
self._state = _FINISHED
10911091
return self._return
@@ -1094,7 +1094,7 @@ def result(self, timeout: float = None) -> Any:
10941094
self._exception = serialization.deserialize_exception_from_s3(
10951095
sagemaker_session=self._job.sagemaker_session,
10961096
s3_uri=s3_path_join(self._job.s3_uri, EXCEPTION_FOLDER),
1097-
hmac_key=self._job.hmac_key,
1097+
10981098
)
10991099
except ServiceError as serr:
11001100
chained_e = serr.__cause__

sagemaker-core/src/sagemaker/core/remote_function/core/pipeline_variables.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ class _DelayedReturnResolver:
164164
def __init__(
165165
self,
166166
delayed_returns: List[_DelayedReturn],
167-
hmac_key: str,
168167
properties_resolver: _PropertiesResolver,
169168
parameter_resolver: _ParameterResolver,
170169
execution_variable_resolver: _ExecutionVariableResolver,
@@ -175,7 +174,6 @@ def __init__(
175174
176175
Args:
177176
delayed_returns: list of delayed returns to resolve.
178-
hmac_key: key used to encrypt serialized and deserialized function and arguments.
179177
properties_resolver: resolver used to resolve step properties.
180178
parameter_resolver: resolver used to pipeline parameters.
181179
execution_variable_resolver: resolver used to resolve execution variables.
@@ -197,7 +195,6 @@ def deserialization_task(uri):
197195
return uri, deserialize_obj_from_s3(
198196
sagemaker_session=settings["sagemaker_session"],
199197
s3_uri=uri,
200-
hmac_key=hmac_key,
201198
)
202199

203200
with ThreadPoolExecutor() as executor:
@@ -247,7 +244,6 @@ def resolve_pipeline_variables(
247244
context: Context,
248245
func_args: Tuple,
249246
func_kwargs: Dict,
250-
hmac_key: str,
251247
s3_base_uri: str,
252248
**settings,
253249
):
@@ -257,7 +253,6 @@ def resolve_pipeline_variables(
257253
context: context for the execution.
258254
func_args: function args.
259255
func_kwargs: function kwargs.
260-
hmac_key: key used to encrypt serialized and deserialized function and arguments.
261256
s3_base_uri: the s3 base uri of the function step that the serialized artifacts
262257
will be uploaded to. The s3_base_uri = s3_root_uri + pipeline_name.
263258
**settings: settings to pass to the deserialization function.
@@ -280,7 +275,6 @@ def resolve_pipeline_variables(
280275
properties_resolver = _PropertiesResolver(context)
281276
delayed_return_resolver = _DelayedReturnResolver(
282277
delayed_returns=delayed_returns,
283-
hmac_key=hmac_key,
284278
properties_resolver=properties_resolver,
285279
parameter_resolver=parameter_resolver,
286280
execution_variable_resolver=execution_variable_resolver,

0 commit comments

Comments
 (0)