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

Throw warning on changing val_loss #3010

Closed
wants to merge 3 commits into from

Conversation

shivin7
Copy link

@shivin7 shivin7 commented Aug 16, 2020

What does this PR do?

Fixes #2868

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

Please note : I'm a little new with the tests so any comments are really helpful. Thanks!

@pep8speaks
Copy link

pep8speaks commented Aug 16, 2020

Hello @shivin7! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-08-16 23:38:34 UTC

@mergify mergify bot requested a review from a team August 16, 2020 23:23
@shivin7
Copy link
Author

shivin7 commented Aug 16, 2020

Right now I'm throwing the same warning when the output of validation_step is a scalar or None. Is that fine?

@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #3010 into master will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #3010   +/-   ##
======================================
- Coverage      90%     90%   -0%     
======================================
  Files          81      81           
  Lines        7644    7645    +1     
======================================
- Hits         6878    6858   -20     
- Misses        766     787   +21     

@@ -343,6 +343,11 @@ def _evaluate(
m = 'only EvalResults or dicts are allowed from validation_step'
raise MisconfigurationException(m)

# throw warning if key other than 'val_loss' is used in output
if not isinstance(output, EvalResult) or 'val_loss' not in output.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

that’s not what we meant.

the warning js when the word monitor changes in a callback AND you are using a result obj

Copy link
Author

Choose a reason for hiding this comment

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

Oh I see.
So something like when EarlyStopping(monitor='not_val_loss') AND using a Result object?

Copy link
Contributor

Choose a reason for hiding this comment

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

correct

@mergify mergify bot requested a review from a team August 17, 2020 00:15
@shivin7 shivin7 changed the title Bugfix/2868 vallosswarn Throw warning on changing val_loss Aug 17, 2020
@williamFalcon
Copy link
Contributor

williamFalcon commented Aug 17, 2020

this is time sensitive since we need to get the release out today. I'll take care of this one, but please give another issue a shot!

@Borda Borda added this to the 0.9.0 milestone Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Throw warning for changing val_loss
4 participants