mirror of
https://github.com/clearml/clearml
synced 2025-01-31 00:56:57 +00:00
Fix NVIDIA_VISIBLE_DEVICES=all env var value will result in no GPU metrics being reported
This commit is contained in:
parent
8746f34409
commit
7362955983
@ -52,7 +52,7 @@ class ResourceMonitor(BackgroundMonitor):
|
|||||||
try:
|
try:
|
||||||
active_gpus = os.environ.get('NVIDIA_VISIBLE_DEVICES', '') or \
|
active_gpus = os.environ.get('NVIDIA_VISIBLE_DEVICES', '') or \
|
||||||
os.environ.get('CUDA_VISIBLE_DEVICES', '')
|
os.environ.get('CUDA_VISIBLE_DEVICES', '')
|
||||||
if active_gpus:
|
if active_gpus != "all":
|
||||||
self._active_gpus = [g.strip() for g in active_gpus.split(',')]
|
self._active_gpus = [g.strip() for g in active_gpus.split(',')]
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user