Lightning-AI / Lightning-AI/pytorch-lightning
Save checkpoint version dirs as `version_003` so that they sort lexicographically
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
Lightning saves checkpoint version dirs as version_3, version_21, etc. The problem with this is that when you do a listing, version_21 is between version_2 and version_3, making it easy to miss.
A simple solution, which is commonly used for these situations, is to name them version_002, version_003,... version_021, which solves the problem completely.
Note: If there's interest for this, this seems like a great first issue, and I'd be happy to write the patch.
Pitch
No response
Alternatives
No response
Additional context
No response
cc @lantiga @borda @justusschock
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
Locate the checkpoint-saving entry point that creates directories such as version_3 and version_21. Trace how the version number is formatted, then add coverage showing that saved directories use zero-padded names and sort lexicographically.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100