Lightning-AI / Lightning-AI/pytorch-lightning
EarlyStopping Callback relative threshold mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 31.4k
- Forks
- 3.8k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 6
Description
🚀 Feature
Provide the option to evaluate relative changes to the tracked metric in the EarlyStoppingCallback instead of the absolute difference.
Motivation
I'm working on keypoint detection for robot manipulation and use a BCELoss in which the optimal value is the entropy of the ground truth heatmaps, which can change depending on the number of keypoints, number of channels, size of the gaussian blobs... Hence it is hard to specify the desired minimal absolute delta. It would be nice if we could specify a relative delta.
Additional context
Inspired by the Torch learning rate schedulers.
cc @borda @tchaton @justusschock @awaelchli @carmocca @rohitgr7
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 locating the EarlyStoppingCallback implementation and read the linked PyTorch ReduceLROnPlateau documentation for its relative-threshold behavior. Trace how the callback currently evaluates absolute metric changes, then define the configuration and verification needed so relative changes are evaluated correctly alongside the existing mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100