-
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
Sharded Plugin 4/n: Expose scaler in amp plugin #4737
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4737 +/- ##
======================================
Coverage 93% 93%
======================================
Files 117 117
Lines 8954 8957 +3
======================================
+ Hits 8321 8324 +3
Misses 633 633 |
@@ -136,7 +136,7 @@ def setup_training(self, model: LightningModule): | |||
|
|||
# init amp. Must be done here instead of __init__ to allow ddp to work | |||
if self.trainer.amp_backend == AMPType.NATIVE and self.trainer.precision == 16 and not self.trainer.use_tpu: |
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.
for a future PR let's fold these if statements into accelerators
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.
Getting there :)
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 :]
What does this PR do?
Related to #4178
Allows precision plugin to manage grad scaler. This is needed for Sharded as we require a custom scaler object.
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 🙃