-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[DDP] Remove train call to module copies #58595
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
Conversation
No longer needed since this list is always of size 1. Differential Revision: [D28548426](https://our.internmc.facebook.com/intern/diff/D28548426/) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 2e0f63d (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
No longer needed since this list is always of size 1. Differential Revision: [D28548426](https://our.internmc.facebook.com/intern/diff/D28548426/) ghstack-source-id: 129383153 Pull Request resolved: #58595
| def train(self, mode=True): | ||
| super(DistributedDataParallel, self).train(mode) | ||
| for module in self._module_copies[1:]: | ||
| module.train(mode) |
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.
we still need to keep train(mode) call?
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.
We have the call to the parent class method on L894, which does train(mode) on the module for this process. this call is for the rest of the module copies on this process, but there are none (see https://github.com/pytorch/pytorch/blob/master/torch/nn/parallel/distributed.py#L492)
No longer needed since this list is always of size 1. Differential Revision: [D28548426](https://our.internmc.facebook.com/intern/diff/D28548426/) [ghstack-poisoned]
No longer needed since this list is always of size 1. Differential Revision: [D28548426](https://our.internmc.facebook.com/intern/diff/D28548426/) [ghstack-poisoned]
|
This pull request has been merged in 1d67c6d. |
Stack from ghstack:
No longer needed since this list is always of size 1.
Differential Revision: D28548426