pytorch-lightning
Added warmup parameter to early stopping cb
#20778
Open

Added warmup parameter to early stopping cb #20778

Furkan-rgb
Furkan-rgb42 days ago (edited 42 days ago)

What does this PR do?

This pull request introduces a new feature to the EarlyStopping callback in PyTorch Lightning, allowing users to specify the starting epoch for monitoring early stopping. Additionally, it updates imports to use the pytorch_lightning namespace and improves example documentation. Below is a summary of the most important changes:

New Feature: Starting Epoch for Early Stopping

  • Added a new parameter start_from_epoch to the EarlyStopping callback, allowing users to specify the epoch from which early stopping monitoring begins. Defaults to 0. [1] [2] [3]
  • Updated the _run_early_stopping_check method to skip the early stopping check if the current epoch is less than start_from_epoch.

Namespace Update

  • Updated all imports from lightning.pytorch to pytorch_lightning for consistency with the latest namespace conventions. [1] [2]

Documentation Improvements

  • Enhanced the example in the docstring to demonstrate how to use the new start_from_epoch parameter.

Fixes #<issue_number>

No breaking changes!

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

πŸ“š Documentation preview πŸ“š: https://pytorch-lightning--20778.org.readthedocs.build/en/20778/

Furkan-rgb Added 'start_from_epoch' parameter to early stopping cb for cases whe…
3858050b
Furkan-rgb test: add early stopping test for start_from_epoch functionality
014d3da7
Furkan-rgb Furkan-rgb requested a review from lantiga lantiga 42 days ago
Furkan-rgb Furkan-rgb requested a review from Borda Borda 42 days ago
Furkan-rgb Furkan-rgb requested a review from tchaton tchaton 42 days ago
Furkan-rgb Furkan-rgb requested a review from justusschock justusschock 42 days ago
Furkan-rgb Furkan-rgb requested a review from ethanwharris ethanwharris 42 days ago
github-actions github-actions added pl
pre-commit-ci[bot] [pre-commit.ci] auto fixes from pre-commit.com hooks
8bbb6d52

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone