Lightning-AI / Lightning-AI/pytorch-lightning
Allow epochs with different size
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
Currently there is no support for epochs of different lengths.
The reason is for example what if I want use augmentation that makes dataset shorter.
For example my usacase is to offset timeseries data in each epoch differently.
### Pitch
For timeseries data it would be very useful if logging didnt break, when there are epochs of different lengths.
So far logging completely breaks when u dynamically change epoch length.
### Alternatives
Sure i could make it work by merging everything into one epoch. But that would disallow me to use on-epoch hooks, which I want to utilize.
So far Iam going to inspect logging logic, because it seems there is an issue. Or hook trigger logic, since so far iam not sure if hooks even trigger for epoch end.
### Additional context
_No response_
cc @lantiga
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 by inspecting the logging logic and hook trigger logic, as suggested in the issue, and reproduce training with dynamically changing epoch lengths. Check whether logging breaks and whether end-of-epoch hooks trigger correctly when epochs differ in size. Done means variable-length epochs no longer break logging while preserving the requested on-epoch hooks.
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
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100