Skip to content

Commit 4e1eb2a

Browse files
committed
fix subprocess invocation
Signed-off-by: Jack Luar <[email protected]>
1 parent 02dac9d commit 4e1eb2a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/AutoTuner/test/resume_check.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,17 @@ def test_tune_resume(self):
7171

7272
# Keep trying to stop the ray cluster until it is stopped
7373
while 1:
74-
proc = subprocess.run(["ray", "status"], shell=True)
74+
proc = subprocess.run(
75+
["ray", "status"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
76+
)
7577
no_nodes = proc.returncode != 0
76-
proc = subprocess.run(["ray", "stop"], shell=True)
78+
proc = subprocess.run(
79+
["ray", "stop"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
80+
)
7781
successful = proc.returncode == 0
7882

7983
if no_nodes and successful:
84+
print("Ray cluster successfully stopped with no remaining nodes.")
8085
break
8186
time.sleep(5)
8287

0 commit comments

Comments
 (0)