-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Bugfix/5487 auto lr ordering #5638
Bugfix/5487 auto lr ordering #5638
Conversation
Hello @noamzilo! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-02-01 13:09:50 UTC |
…mzilo/pytorch-lightning into bugfix/5487_auto_lr_ordering
To the maintainers: I have added a test that requires Currently, I am getting the error _______________ ERROR collecting tests/trainer/test_lr_finder.py _______________ Will it be possible to install this library so the test will pass? If not, please recommend what I should use instead so I will be able to change the code. |
why is it required? If you are just changing the order of the check, we probably don't need a test for it. Usually you want to test your changes but there's no need to test the call order. And if there was, you could do it by mocking the called functions and checking the order. |
actually the call order that wasn't tested is what is PR is about. I could just delete the test... should I do that? I think this tests that the user experience is such that no waiting for errors can occur, not just that the calls happen in order. About the code comment - will commit the str return soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Codecov Report
@@ Coverage Diff @@
## master #5638 +/- ##
=======================================
- Coverage 93% 93% -0%
=======================================
Files 134 134
Lines 10056 9919 -137
=======================================
- Hits 9399 9241 -158
- Misses 657 678 +21 |
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
* started to write failing test. just getting into the framework... * started to write failing test. just getting into the framework... * added failing test for misconfiguration of lr finder * made test startup quickly. making sure without the fix it also fails slowly * improved test * fixed for linter * fixed for linter * yet another fix for the linter * yet another fix for the linter * fixed comment by @carmocca * fixed comment by @carmocca * Fix test * chlog * Apply suggestions from code review * Fix test * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update tests/trainer/test_lr_finder.py * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py * Update tests/trainer/test_lr_finder.py Co-authored-by: Carlos Mocholí <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <[email protected]>
* started to write failing test. just getting into the framework... * started to write failing test. just getting into the framework... * added failing test for misconfiguration of lr finder * made test startup quickly. making sure without the fix it also fails slowly * improved test * fixed for linter * fixed for linter * yet another fix for the linter * yet another fix for the linter * fixed comment by @carmocca * fixed comment by @carmocca * Fix test * chlog * Apply suggestions from code review * Fix test * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update tests/trainer/test_lr_finder.py * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py * Update tests/trainer/test_lr_finder.py Co-authored-by: Carlos Mocholí <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <[email protected]>
* started to write failing test. just getting into the framework... * started to write failing test. just getting into the framework... * added failing test for misconfiguration of lr finder * made test startup quickly. making sure without the fix it also fails slowly * improved test * fixed for linter * fixed for linter * yet another fix for the linter * yet another fix for the linter * fixed comment by @carmocca * fixed comment by @carmocca * Fix test * chlog * Apply suggestions from code review * Fix test * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update tests/trainer/test_lr_finder.py * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <[email protected]> * Update pytorch_lightning/tuner/lr_finder.py * Update tests/trainer/test_lr_finder.py Co-authored-by: Carlos Mocholí <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <[email protected]>
What does this PR do?
before: auto learning rate finder fails AFTER optimization due to misconfiguration
after: auto learning rate finder fails BEFORE optimization due to misconfiguration, and user can fail faster.
Fixes #5487
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃