-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Ddp2 fix #448
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
Ddp2 fix #448
Conversation
| return loss, dict with metrics for tqdm | ||
| :param called with batch, batch_nb | ||
| additional: optimizer_i if multiple optimizers used | ||
| :return: |
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.
what s the return? if there is none, drop this like
| Must return model. | ||
| :param model: | ||
| :param device_ids: | ||
| :return: |
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.
return model...
| output[k] = self.reduce_distributed_output(output[k], nb_gpus) | ||
|
|
||
| # do nothing when there's a scalar | ||
| elif isinstance(output[k], torch.Tensor) and output[k].dim() == 0: |
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.
in such case, you can skip this branching condition, right?
|
gpu tests passed. waiting on circle CI |
|
It's probably too late, but it occurs to me that since DDP and AMP have nothing to do with the actual research code, it might be better to pass them as callbacks or something rather than bundling them with the model. Maybe something to think about for the future. |
|
Do we have a CircleCI? I do not see its config in the repo master... @williamFalcon |
This PR does the following: