Lightning-AI / Lightning-AI/pytorch-lightning
Formatting for grouped metrics.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
🚀 Feature
Motivation
With Lightning, I use Tensorboard and ClearML, which allow you to group metrics in one tab. The "/" is used for grouping. In the screenshots from tb and ClearML you can see how they are grouped now.



Pitch
-
The first is that when you select
on_step=Trueandon_epoch=True, a postfix is appended to the end and the metrics by epoch and step are grouped into one in ClearML. I would like to split this group into two:loss_step/<train or valid>andloss_epoch/<train or valid>. Could the name parameter in self.log be formatted? What do you think? This would be something likename="loss_{interval}/valid". -
The second problem also involves formatting. When you pass a grouped metric to filename in ModelCheckpoint, Lightning will think "/" means to create a folder 🙂 See screenshot. Would it be possible to add an escaping for slash and replace it with a lower underscore?
Alternatives
Additional context
Similar problem, but with W&B in Lightning-Flash https://github.com/PyTorchLightning/lightning-flash/issues/818
If you enjoy Lightning, check out our other projects! ⚡
-
Metrics: Machine learning metrics for distributed, scalable PyTorch applications.
-
Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, finetuning and solving problems with deep learning
-
Bolts: Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch
-
Lightning Transformers: Flexible interface for high performance research using SOTA Transformers leveraging Pytorch Lightning, Transformers, and Hydra.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the self.log entry point and ModelCheckpoint filename handling mentioned in the issue. Trace how interval suffixes and slash-separated metric names are currently produced, then add focused tests showing the requested grouping and safe checkpoint filenames are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100