Lightning-AI / Lightning-AI/pytorch-lightning
ModelCheckpoint need monitor average loss
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
I know ModelCheckpoint can monitor like "train_loss" , "val_loss" , when the value is min and "every_n_train_steps" is true. but I want to cache "train_loss" or "val_loss" from "every_n_train_steps" to next "every_n_train_steps" ,when cache loss is lower than before, then save model.
Example:
every_n_train_steps = 50, monitor = "train_loss"
from step=50 to step=100, if average "train_loss" is lower than step=[0,50] then save model
### Pitch
_No response_
### Alternatives
_No response_
### Additional context
_No response_
cc @lantiga @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
Start with the ModelCheckpoint entry point and review how monitor and every_n_train_steps are currently handled. Clarify the intended train_loss or val_loss averaging window and comparison baseline, then identify the relevant checkpoint tests or add coverage showing when a model should be saved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100