File tree 4 files changed +58
-2
lines changed
4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v2.67.0 (2021-11-01)
4
+
5
+ ### Deprecations and Removals
6
+
7
+ * deprecate Serverless Lambda model-predictor
8
+
9
+ ### Features
10
+
11
+ * add joinsource to DataConfig
12
+ * Add support for Partial Dependence Plots(PDP) in SageMaker Clarify
13
+
14
+ ### Bug Fixes and Other Changes
15
+
16
+ * localmode subprocess parent process not sending SIGTERM to child
17
+ * remove buildspec from repo
18
+
3
19
## v2.66.2.post0 (2021-10-28)
4
20
5
21
### Documentation Changes
Original file line number Diff line number Diff line change 1
- 2.66.3 .dev0
1
+ 2.67.1 .dev0
Original file line number Diff line number Diff line change 32
32
33
33
from distutils .spawn import find_executable
34
34
from threading import Thread
35
-
36
35
from six .moves .urllib .parse import urlparse
37
36
38
37
import sagemaker
@@ -841,6 +840,8 @@ def run(self):
841
840
842
841
def down (self ):
843
842
"""Placeholder docstring"""
843
+ if os .name != "nt" :
844
+ sagemaker .local .utils .kill_child_processes (self .process .pid )
844
845
self .process .terminate ()
845
846
846
847
Original file line number Diff line number Diff line change 15
15
16
16
import os
17
17
import shutil
18
+ import subprocess
18
19
19
20
from distutils .dir_util import copy_tree
20
21
from six .moves .urllib .parse import urlparse
@@ -88,3 +89,41 @@ def recursive_copy(source, destination):
88
89
"""
89
90
if os .path .isdir (source ):
90
91
copy_tree (source , destination )
92
+
93
+
94
+ def kill_child_processes (pid ):
95
+ """Kill child processes
96
+
97
+ Kills all nested child process ids for a specific pid
98
+
99
+ Args:
100
+ pid (int): process id
101
+ """
102
+ child_pids = get_child_process_ids (pid )
103
+ for child_pid in child_pids :
104
+ os .kill (child_pid , 15 )
105
+
106
+
107
+ def get_child_process_ids (pid ):
108
+ """Retrieve all child pids for a certain pid
109
+
110
+ Recursively scan each childs process tree and add it to the output
111
+
112
+ Args:
113
+ pid (int): process id
114
+
115
+ Returns:
116
+ (List[int]): Child process ids
117
+ """
118
+ cmd = f"pgrep -P { pid } " .split ()
119
+ output , err = subprocess .Popen (
120
+ cmd , stdout = subprocess .PIPE , stderr = subprocess .PIPE
121
+ ).communicate ()
122
+ if err :
123
+ return []
124
+ pids = [int (pid ) for pid in output .decode ("utf-8" ).split ()]
125
+ if pids :
126
+ for child_pid in pids :
127
+ return pids + get_child_process_ids (child_pid )
128
+ else :
129
+ return []
You can’t perform that action at this time.
0 commit comments