Lightning-AI / Lightning-AI/pytorch-lightning
Add Average Callback
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
Create a callback to allow creating an average (smoothing) of a logged metrics and log it.
Why directly in lightning ? This feature could be useful for Early Stopping, Now in some training the loss (for example) is very unstable and you could get an exceptional minimum, but because it's very unstable, it's not the best epochs to stop.
Get an log average feature could smooth the loss (for example again) and allow better EarlyStopping, so better training
### Pitch
Create Callback class that get in parameter : the metrics to smooth, the name of the smoothed metric and the callable function to use to smooth the metric, the window, (how many previous values to consider).
The callable function could be mean by default and window set to 5 by default.
### 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
The issue names no files, tests, or entry points. Start by locating the callback and metric-logging APIs; done means a configurable smoothing callback logs a named metric from the requested input metric, callable, and window, with mean and a window of 5 as defaults.
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
- Mostly clear
- Newbie friendliness
- 35/100