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

Skip tuner algorithms on fast dev #3903

Merged
merged 20 commits into from
Nov 9, 2020

Conversation

SkafteNicki
Copy link
Member

What does this PR do?

Fixes #3241
Using fast_dev_run=True in combination with tuner algorithms currently give strange error messages. fast_dev_run=True is meant to see that trainer.fit() runs without errors, not the tuner algorithms.
This PR implements that if the users calls the tuner algorithms while fast_dev_run=True, the tuning will be skipped and a warning will be thrown.

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 🙃

@mergify mergify bot requested a review from a team October 6, 2020 14:45
@Borda Borda added the feature Is an improvement or enhancement label Oct 6, 2020
@mergify mergify bot requested a review from a team October 6, 2020 17:53
@pep8speaks
Copy link

pep8speaks commented Oct 7, 2020

Hello @SkafteNicki! Thanks for updating this PR.

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

Comment last updated at 2020-11-09 18:37:45 UTC

@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #3903 (13fd648) into master (41c9bee) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #3903   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         116     116           
  Lines        8831    8837    +6     
======================================
+ Hits         8232    8238    +6     
  Misses        599     599           

@mergify
Copy link
Contributor

mergify bot commented Oct 7, 2020

This pull request is now in conflict... :(

@mergify
Copy link
Contributor

mergify bot commented Oct 7, 2020

This pull request is now in conflict... :(

@mergify mergify bot requested a review from a team October 8, 2020 17:58
@mergify mergify bot requested a review from a team October 9, 2020 10:36
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
@mergify
Copy link
Contributor

mergify bot commented Oct 9, 2020

This pull request is now in conflict... :(

@Borda Borda added this to the 1.0.x milestone Oct 20, 2020
@edenlightning edenlightning modified the milestones: 1.0.3, 1.1 Oct 20, 2020
@rohitgr7
Copy link
Contributor

rohitgr7 commented Nov 3, 2020

@SkafteNicki is this still relevant/required??

@stale stale bot removed the won't fix This will not be worked on label Nov 3, 2020
@SkafteNicki
Copy link
Member Author

@rohitgr7 yes, it is still relevant, and it is probably ready merging

Copy link
Contributor

@rohitgr7 rohitgr7 left a comment

Choose a reason for hiding this comment

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

Great. LGTM :)

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

Great catch !

Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

lgtm

@Borda Borda merged commit 4f3160b into Lightning-AI:master Nov 9, 2020
@Borda Borda modified the milestones: 1.1, 1.0.x Nov 9, 2020
SeanNaren pushed a commit that referenced this pull request Nov 10, 2020
* skip on fast dev

* fix error

* changelog

* fix recursive issue

* combine tests

* pep8

* move logic to base funcs

* fix mistake

* Update pytorch_lightning/tuner/lr_finder.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* pep

Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>

(cherry picked from commit 4f3160b)
SeanNaren pushed a commit that referenced this pull request Nov 11, 2020
* skip on fast dev

* fix error

* changelog

* fix recursive issue

* combine tests

* pep8

* move logic to base funcs

* fix mistake

* Update pytorch_lightning/tuner/lr_finder.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* pep

Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>

(cherry picked from commit 4f3160b)
SeanNaren pushed a commit that referenced this pull request Nov 11, 2020
rohitgr7 added a commit that referenced this pull request Nov 21, 2020
* skip on fast dev

* fix error

* changelog

* fix recursive issue

* combine tests

* pep8

* move logic to base funcs

* fix mistake

* Update pytorch_lightning/tuner/lr_finder.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* pep

Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
@SkafteNicki SkafteNicki deleted the skip_tuner_on_fast_dev branch December 30, 2020 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message for lr_find when fast_dev_run=True.
7 participants