Skip to content

Commit 5bb8ecb

Browse files
committed
update
1 parent 3c53c92 commit 5bb8ecb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/lightning/pytorch/callbacks/device_stats_monitor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ class DeviceStatsMonitor(Callback):
118118
cpu_stats: if ``None``, it will log CPU stats only if the accelerator is CPU.
119119
If ``True``, it will log CPU stats regardless of the accelerator.
120120
If ``False``, it will not log CPU stats regardless of the accelerator.
121-
verbose: if ``True``, logs all available device stats returned by the accelerator.
122-
If ``False``, logs only a core set of metrics (memory usage, CPU utilization)
123-
that are most relevant for monitoring training health. Defaults to ``True``.
124121
filter_keys: if ``None``, all stats returned by the accelerator are logged.
125122
If a ``set`` of strings is provided, only the keys present in the set will be logged.
126123
Keys are matched against the base metric names before prefixing (e.g.,
127124
``"cpu_percent"`` not ``"DeviceStatsMonitor.on_train_batch_end/cpu_percent"``).
128125
A ``rank_zero_warn`` is emitted for any key in ``filter_keys`` not found in the
129126
collected stats, which helps catch typos early.
127+
verbose: if ``True``, logs all available device stats returned by the accelerator.
128+
If ``False``, logs only a core set of metrics (memory usage, CPU utilization)
129+
that are most relevant for monitoring training health. Defaults to ``True``.
130130
131131
Raises:
132132
MisconfigurationException:

tests/tests_pytorch/callbacks/test_device_stats_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def log_metrics(self, metrics: dict[str, float], step: Optional[int] = None) ->
8080
has_cpu_metrics = any(f in h for h in metrics)
8181
assert has_cpu_metrics if enabled else not has_cpu_metrics
8282

83-
device_stats = DeviceStatsMonitor(cpu_stats=cpu_stats)
83+
device_stats = DeviceStatsMonitor(cpu_stats=cpu_stats, verbose=True)
8484
trainer = Trainer(
8585
default_root_dir=tmp_path,
8686
max_epochs=1,

0 commit comments

Comments
 (0)