Skip to content

Commit

Permalink
Updated GpuInfo metric, pynvml<12 (#3311)
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored Dec 3, 2024
1 parent 1c3b9e9 commit 4f46210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ignite/contrib/engines/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def setup_common_training_handlers(
lr_scheduler: learning rate scheduler
as native torch LRScheduler or ignite's parameter scheduler.
with_gpu_stats: if True, :class:`~ignite.metrics.GpuInfo` is attached to the
trainer. This requires `pynvml` package to be installed.
trainer. This requires `pynvml<12` package to be installed.
output_names: list of names associated with `update_function` output dictionary.
with_pbars: if True, two progress bars on epochs and optionally on iterations are attached.
Default, True.
Expand Down
4 changes: 2 additions & 2 deletions ignite/metrics/gpu_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class GpuInfo(Metric):
"""Provides GPU information: a) used memory percentage, b) gpu utilization percentage values as Metric
on each iterations.
on each iterations. This metric requires `pynvml <https://pypi.org/project/pynvml/>`_ package of version `<12`.
.. Note ::
Expand Down Expand Up @@ -39,7 +39,7 @@ def __init__(self) -> None:
except ImportError:
raise ModuleNotFoundError(
"This contrib module requires pynvml to be installed. "
"Please install it with command: \n pip install pynvml"
"Please install it with command: \n pip install 'pynvml<12'"
)
# Let's check available devices
if not torch.cuda.is_available():
Expand Down

0 comments on commit 4f46210

Please # to comment.