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

Raise a warning if evaulation is triggered with best ckpt in case of multiple checkpoint callbacks #11274

Merged
merged 10 commits into from
Jan 4, 2022

Conversation

rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Dec 29, 2021

What does this PR do?

Now that multiple checkpoints are supported, evaluation with the best ckpt cannot be interpreted in such a case. So an error will be raised asking users to specify the exact ckpt path.

Open to better alternatives?

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 internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read 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?

Part of #1

Make sure you had fun coding 🙃

cc @Borda @awaelchli @rohitgr7

pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
@rohitgr7 rohitgr7 changed the title Raise an error if evaulation is triggered with best ckpt in case of multiple checkpoint callbacks Raise a warning if evaulation is triggered with best ckpt in case of multiple checkpoint callbacks Jan 3, 2022
pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
tests/trainer/test_trainer.py Outdated Show resolved Hide resolved
tests/trainer/test_trainer.py Outdated Show resolved Hide resolved
tests/trainer/test_trainer.py Outdated Show resolved Hide resolved
@mergify mergify bot added the has conflicts label Jan 3, 2022
@rohitgr7 rohitgr7 force-pushed the ref/best_eval_ckpt branch from a5ca72d to e8f50cf Compare January 3, 2022 20:34
@mergify mergify bot removed the has conflicts label Jan 3, 2022
pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
tests/trainer/test_trainer.py Outdated Show resolved Hide resolved
tests/trainer/test_trainer.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Jan 3, 2022
@rohitgr7 rohitgr7 enabled auto-merge (squash) January 3, 2022 22:17
@mergify mergify bot added the has conflicts label Jan 4, 2022
@mergify mergify bot removed the has conflicts label Jan 4, 2022
@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #11274 (8e49ee4) into master (a610e04) will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #11274   +/-   ##
=======================================
  Coverage      92%      92%           
=======================================
  Files         194      194           
  Lines       16965    16965           
=======================================
  Hits        15593    15593           
  Misses       1372     1372           

@rohitgr7 rohitgr7 merged commit 7eab379 into master Jan 4, 2022
@rohitgr7 rohitgr7 deleted the ref/best_eval_ckpt branch January 4, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants