Skip to content

Commit 2639a31

Browse files
author
Maxime
committed
Command format fix with backslashes
Signed-off-by: Maxime <[email protected]>
1 parent 2f16f01 commit 2639a31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

monai/apps/auto3dseg/bundle_gen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ def _run_cmd(self, cmd: str, devices_info: str):
180180
ps_environ = os.environ.copy()
181181
if devices_info:
182182
ps_environ["CUDA_VISIBLE_DEVICES"] = devices_info
183-
normal_out = subprocess.run(cmd.split(), env=ps_environ, check=True, capture_output=True)
183+
cmd = [f'{c}'.replace("\\", "/") for c in cmd.split()]
184+
normal_out = subprocess.run(cmd, env=ps_environ, check=True, capture_output=True)
184185
logger.info(repr(normal_out).replace("\\n", "\n").replace("\\t", "\t"))
185186
except subprocess.CalledProcessError as e:
186187
output = repr(e.stdout).replace("\\n", "\n").replace("\\t", "\t")

0 commit comments

Comments
 (0)