Skip to content

Commit cd87800

Browse files
committed
catch cuda flag not existing
1 parent 9dfdfbd commit cd87800

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.111
1+
0.8.112

ml_logger/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ def instr(fn, *ARGS, __file=False, __create_job=True, __count=True, __diff=True,
182182
envs_ext = re.sub(r"CUDA_VISIBLE_DEVICES=([A-z0-9\-,]*)",
183183
f'CUDA_VISIBLE_DEVICES={RUN.CUDA_VISIBLE_DEVICES}',
184184
envs_str)
185+
if not re.match(r"CUDA_VISIBLE_DEVICES=([A-z0-9\-,]*)", envs_str):
186+
envs_str += f' CUDA_VISIBLE_DEVICES={RUN.CUDA_VISIBLE_DEVICES}'
187+
185188
# f" CUDA_VISIBLE_DEVICES={RUN.CUDA_VISIBLE_DEVICES}"
186189
jaynes.Jaynes.config(jaynes.Jaynes.mode,
187190
launch={'name': launch_name},

0 commit comments

Comments
 (0)