Lightning-AI / Lightning-AI/pytorch-lightning
is it possible to make iterations start from 1 and not 0
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
(disclaimer: I hope this is about PTL proper and not Nemo's overrides - if it is I will re-post it in Nemo)
---------------
Iteration counter is a human facing value - it's not an index that needs to start from 0 and I don't think there are typically any indices whose keys are iterations. when we talk to humans we don't usually write instructions that start from Step 0. We start from Step 1.
Now:
- if I tell to save a checkpoint every 10 steps it'll save files marked 10, 20, 30
- if I tell to log every 10 steps it'll log iterations 9, 19, 29
It's very confusing. Did the checkpoint save one extra iteration? Or did it do the right thing but it counts from 1 and not 0?
Could the iteration counting start from 1 and not 0?
Thank you.
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 does not name files, tests, or entry points. Start by tracing how training iterations are represented in checkpoint saving and logging, then compare their current numbering against the configured intervals. Done means agreeing on the counter semantics and updating all affected behavior and tests consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100