-
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
[FEAT] Add lambda closure to manual_optimizer_step #4618
Conversation
Hello @tchaton! Thanks for updating this PR.
Comment last updated at 2020-11-12 17:19:35 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4618 +/- ##
======================================
Coverage 93% 93%
======================================
Files 117 117
Lines 8898 8906 +8
======================================
+ Hits 8267 8275 +8
Misses 631 631 |
@tchaton Could you expose the args/kwargs also within the accelerator optimizer steps? There are a few places where the optimizer_step is overridden in our acceleartors. |
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, just still reading the tests... :]
Co-authored-by: Jirka Borovec <[email protected]>
…hLightning/pytorch-lightning into fix/manual_optimizer_step
* added lambda_closure * move to types * add 2 new tests * make example more complex * add complex example to doc * added more tests * resolve doc * typo * update * update tpu optimizer_step * Apply suggestions from code review * Update pytorch_lightning/core/lightning.py Co-authored-by: Jirka Borovec <[email protected]> * update Co-authored-by: Jirka Borovec <[email protected]> (cherry picked from commit 4018237)
* added lambda_closure * move to types * add 2 new tests * make example more complex * add complex example to doc * added more tests * resolve doc * typo * update * update tpu optimizer_step * Apply suggestions from code review * Update pytorch_lightning/core/lightning.py Co-authored-by: Jirka Borovec <[email protected]> * update Co-authored-by: Jirka Borovec <[email protected]> (cherry picked from commit 4018237)
* added lambda_closure * move to types * add 2 new tests * make example more complex * add complex example to doc * added more tests * resolve doc * typo * update * update tpu optimizer_step * Apply suggestions from code review * Update pytorch_lightning/core/lightning.py Co-authored-by: Jirka Borovec <[email protected]> * update Co-authored-by: Jirka Borovec <[email protected]> (cherry picked from commit 4018237)
* added lambda_closure * move to types * add 2 new tests * make example more complex * add complex example to doc * added more tests * resolve doc * typo * update * update tpu optimizer_step * Apply suggestions from code review * Update pytorch_lightning/core/lightning.py Co-authored-by: Jirka Borovec <[email protected]> * update Co-authored-by: Jirka Borovec <[email protected]>
* added lambda_closure * move to types * add 2 new tests * make example more complex * add complex example to doc * added more tests * resolve doc * typo * update * update tpu optimizer_step * Apply suggestions from code review * Update pytorch_lightning/core/lightning.py Co-authored-by: Jirka Borovec <[email protected]> * update Co-authored-by: Jirka Borovec <[email protected]>
What does this PR do?
This PR adds the possibility for the user to add its own lambda_closure.
Resolving #4485
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 in short, see following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃