Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change trainer.should_stop to not stop in between an epoch and run until min_steps/min_epochs only #13890

Merged
merged 18 commits into from
Aug 27, 2022

Conversation

rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Jul 27, 2022

What does this PR do?

Fixes #13789

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved 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:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

cc @justusschock @awaelchli @rohitgr7 @Borda @carmocca @ananthsub @ninginthecloud @akihironitta

@rohitgr7 rohitgr7 added bug Something isn't working refactor breaking change Includes a breaking change loops Related to the Loop API labels Jul 27, 2022
@rohitgr7 rohitgr7 added this to the pl:1.6.x milestone Jul 27, 2022
@rohitgr7 rohitgr7 self-assigned this Jul 27, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jul 27, 2022
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #13890 (af15229) into master (0e30e4a) will increase coverage by 15%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master   #13890     +/-   ##
=========================================
+ Coverage      61%      76%    +15%     
=========================================
  Files         332      332             
  Lines       26849    26902     +53     
=========================================
+ Hits        16413    20438   +4025     
+ Misses      10436     6464   -3972     

Copy link
Member

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial comments, currently studying the loop changes and tests

docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
src/pytorch_lightning/CHANGELOG.md Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
src/pytorch_lightning/loops/epoch/training_epoch_loop.py Outdated Show resolved Hide resolved
src/pytorch_lightning/loops/fit_loop.py Show resolved Hide resolved
tests/tests_pytorch/trainer/test_trainer.py Show resolved Hide resolved
tests/tests_pytorch/callbacks/test_early_stopping.py Outdated Show resolved Hide resolved
@carmocca carmocca modified the milestones: pl:1.6.x, pl:1.8 Jul 28, 2022
@rohitgr7 rohitgr7 requested a review from awaelchli July 28, 2022 19:51
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Outdated Show resolved Hide resolved
docs/source-pytorch/common/trainer.rst Show resolved Hide resolved
src/pytorch_lightning/loops/fit_loop.py Show resolved Hide resolved
tests/tests_pytorch/loops/test_training_loop.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Aug 19, 2022
@rohitgr7 rohitgr7 enabled auto-merge (squash) August 21, 2022 18:26
@rohitgr7 rohitgr7 requested a review from otaj as a code owner August 22, 2022 08:26
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Aug 26, 2022
@mergify mergify bot added ready PRs ready to be merged has conflicts and removed has conflicts ready PRs ready to be merged labels Aug 26, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Aug 27, 2022
@rohitgr7 rohitgr7 merged commit f357417 into master Aug 27, 2022
@rohitgr7 rohitgr7 deleted the ref/min_es branch August 27, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change bug Something isn't working loops Related to the Loop API pl Generic label for PyTorch Lightning package ready PRs ready to be merged refactor
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

trainer.should_stop doesn't stop at min_epochs if it's set before
5 participants