Lightning-AI / Lightning-AI/pytorch-lightning

Provide a non-expert mode for the DeviceStatsMonitor

Open
#18,652 0 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

callback: device stats feature help wanted
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

The `DeviceStatsMonitor` currently dumps the entire `torch.cuda.memory_stats` into the logger. Beginner users might be overwhelmed by the amount of data logged and are confused which metrics matter to maximize their utilization.

### Pitch

Make the callback more user-friendly by logging only core metrics like GPU utilization and total memory usage. Provide an expert mode that when enabled logs what we see today.

### Alternatives

_No response_

### Additional context

This was proposed by user `magical_arjay` on our Discord.

cc @borda @awaelchli

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies DeviceStatsMonitor and torch.cuda.memory_stats but does not name a file or test. Locate the callback and inspect how its metrics are currently logged, then clarify which core metrics define non-expert mode and how expert mode preserves the existing output. Done means both logging modes are available and their behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.