-
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
4/n Move Accelerator into strategy - remove X_step() from accelerator #10890
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10890 +/- ##
========================================
- Coverage 92% 88% -4%
========================================
Files 177 177
Lines 16484 16570 +86
========================================
- Hits 15132 14589 -543
- Misses 1352 1981 +629 |
I would keep the overrides for all plugins that wrap the model with a class like DistributedDataParallel for example. This way, the definition of how the model gets wrapped lies in the plugin together with how the training_step gets called through that wrapper. |
@awaelchli I agree, even have duplicate logic is better than fail silently or inherent silencely. In the last step of the refactor, we can regrouping logics and flatten the inheritance |
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.
nice!
What does this PR do?
Remove training_step() from Accelerator, and call strategy.training_step directly
In the following graph: Each color is one logic.
[RFC] Should we have training_step() in Parallel Plugin, then DDPSpawning, DP and DDP doesn't need to duplicate the logic. Instead we need training_step in Horovod.
cc: @awaelchli @ananthsub @carmocca @justusschock
Removed TPUSpawning.training_step() as the logic is same as the super class DDPSpawn
Part of #10648
Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
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 🙃