-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Make optimizers skippable when using amp #7975
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7975 +/- ##
=======================================
- Coverage 92% 87% -5%
=======================================
Files 207 207
Lines 13368 13370 +2
=======================================
- Hits 12238 11602 -636
- Misses 1130 1768 +638 |
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
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.
@yifuwang pls add changelog entry
@Borda thanks for the reminder! Updated. |
@yifuwang bit late but I remembered we also need to update: |
Co-authored-by: Yifu Wang <yifuwang@[email protected]> Co-authored-by: Carlos Mocholi <[email protected]>
Co-authored-by: Yifu Wang <yifuwang@[email protected]> Co-authored-by: Carlos Mocholi <[email protected]>
What does this PR do?
Fixes #4524 and #7792. Currently users run into the following error when skipping an optimizer with amp enabled:
This is because GradScaler isn't happy with stepping an optimizer when none of the parameters it tracks has gradient.
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 🙃