Lightning-AI / Lightning-AI/pytorch-lightning
Integrating a tool to debug neural networks more efficiently
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
### Description & Motivation
As an ML researcher, I find it difficult to debug neural networks efficiently when designing new architectures. There are a lot of internal states that can become anomalous, and standard inspection tools are not sufficient.
### Pitch
I recently wrote a library that can help with this, and it is already seeing use [(comgra)](https://github.com/FlorianDietz/comgra). However, it is a standalone tool and it has been suggested to me that integrating it into pytorch lightning would make it much more useful. The library I wrote extracts all relevant information from a neural network at runtime, and then visualizes it graphically and interactively in a browser. Currently, adding this library to your code requires multiple lines of code in the appropriate places. Integrating it into pytorch-lightning would make it more user friendly.
### Alternatives
The standard way to debug neural network internals is either to use tensorboard and log everything your can think of. Tensorboard is not granular enough and gets very confusing and slow when you visualize hundreds of different KPIs.
### Additional context
The library allows for a much more detailed analysis of what is happening than the usual approach of using tensorboard. You can go investigate tensors as training proceeds, drill down into individual neurons, inspect single data sets that are of special interest to you, track gradients, compare statistics between different training runs, and more.
This tool has saved me a ton of time in my research by letting me check my hypotheses much more quickly than normal and by helping me understand how the different parts of my network really interact.
cc @borda
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
The issue names the standalone comgra library but no PyTorch Lightning files, tests, or entry points. Start by reviewing comgra and the project’s integration boundaries, then clarify the supported debugging workflow and scope with maintainers. Done would mean an agreed, maintainable integration that provides the described runtime visualization capabilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- ai, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100