Lightning-AI / Lightning-AI/pytorch-lightning
CLI for inspecting checkpoints
@awaelchli is already working on this.
Since Mar 8, 2021.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
## 🚀 Feature
A quick way to inspect checkpoint files.
### Motivation
We don't know what's inside a checkpoint. Loading one and checking the contents requires us to write a python script.
A command line tool could help us load and inspect these checkpoint files conveniently. Useful for debugging too.
### Pitch
My implementation is [here](https://github.com/awaelchli/pytorch-lightning-snippets/blob/master/checkpoint/peek.py).
[Docs](https://github.com/awaelchli/pytorch-lightning-snippets#inspect-checkpoint-files)
```
Usage:
> peek path/to/checkpoint.ckpt
displays all top-level variables in a checkpoint file
> peek -i path/to/checkpoint.ckpt
interactive mode, loads the contents in a python interactive shell and let's you modify the contents
```

Let me know if you want it
cc @borda @tchaton @justusschock @awaelchli @ananthsub @ninginthecloud @rohitgr7
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.
Assessment
This issue has not been assessed yet.