Skip to content

Commit 85a1374

Browse files
Sergey TsimferSergey Tsimfer
authored andcommitted
Fix verbosity
1 parent 217635f commit 85a1374

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nbtools/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,5 +222,6 @@ def set_gpus(n=1, min_free_memory=0.9, max_processes=2, verbose=False, raise_err
222222
os.environ['CUDA_VISIBLE_DEVICES'] = str_devices
223223

224224
newline = "\n" if verbose==2 else ""
225-
print(f'{newline}`CUDA_VISIBLE_DEVICES` set to "{str_devices}"')
225+
if verbose:
226+
print(f'{newline}`CUDA_VISIBLE_DEVICES` set to "{str_devices}"')
226227
return devices

0 commit comments

Comments
 (0)