From 73629559833c483da0ae1ac0156ec1084197afae Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 15 Feb 2024 19:05:25 +0200 Subject: [PATCH] Fix NVIDIA_VISIBLE_DEVICES=all env var value will result in no GPU metrics being reported --- clearml/utilities/resource_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clearml/utilities/resource_monitor.py b/clearml/utilities/resource_monitor.py index dfe010eb..f0ea960a 100644 --- a/clearml/utilities/resource_monitor.py +++ b/clearml/utilities/resource_monitor.py @@ -52,7 +52,7 @@ class ResourceMonitor(BackgroundMonitor): try: active_gpus = os.environ.get('NVIDIA_VISIBLE_DEVICES', '') or \ os.environ.get('CUDA_VISIBLE_DEVICES', '') - if active_gpus: + if active_gpus != "all": self._active_gpus = [g.strip() for g in active_gpus.split(',')] except Exception: pass