From 471eabcc912a9572ddf25afdae7dbf61ddcc7955 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:45:29 +0000 Subject: [PATCH 1/2] Initial plan From 6d8e6021db1973ad9bca6ce3ea432d1aa4dba725 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Sep 2025 15:56:06 +0000 Subject: [PATCH 2/2] Replace pynvml with nvidia-ml-py to fix deprecation warning Co-authored-by: AlexeyKozhevin <19620584+AlexeyKozhevin@users.noreply.github.com> --- batchflow/monitor.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/batchflow/monitor.py b/batchflow/monitor.py index 938accb20..974314341 100644 --- a/batchflow/monitor.py +++ b/batchflow/monitor.py @@ -318,7 +318,7 @@ class GPUResourceMonitor(ResourceMonitor): """ If the `CUDA_VISIBLE_DEVICES` is set, check it and return device numbers. Otherwise, return [0]. """ def __init__(self, function=None, frequency=0.1, gpu_list=None, **kwargs): if pynvml is None: - raise ImportError('Install Python interface for pynvml') + raise ImportError('Install nvidia-ml-py to use GPU monitoring functionality') super().__init__(function=function, frequency=frequency, **kwargs) # Fallback to env variable diff --git a/pyproject.toml b/pyproject.toml index 107439e8d..0afcf2784 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ research = [ monitor = [ "psutil", - "pynvml" + "nvidia-ml-py" ] nn = [