-
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
Enforce Lightning module as source of truth for automatic optimization #7130
Enforce Lightning module as source of truth for automatic optimization #7130
Conversation
Hello @ananthsub! Thanks for updating this PR.
Comment last updated at 2021-04-26 05:15:17 UTC |
Codecov Report
@@ Coverage Diff @@
## master #7130 +/- ##
=======================================
- Coverage 91% 87% -4%
=======================================
Files 198 198
Lines 12635 12632 -3
=======================================
- Hits 11541 11008 -533
- Misses 1094 1624 +530 |
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.
thanks @ananthsub :)
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.
Really neat !
99daeb7
to
28a5c36
Compare
28a5c36
to
0e9a753
Compare
What does this PR do?
This is further cleanup from #4317. This PR deletes the train loop's automatic optimization attribute and enforces all accesses go through the lightning module's property. This ensures we don't have divergence across these fields. Since the lightning module is the sole decider for automatic optimization, it looked very odd that the lightning module itself was referring to this property via
self.trainer.train_loop.automatic_optimization
even thoughself.automatic_optimization
was already defined. Now that the trainer constructor argument forautomatic_optimization
is gone, we can simplify this.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 🙃