-
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
Bugfix/all gather #5221
Bugfix/all gather #5221
Conversation
Hello @tchaton! Thanks for updating this PR.
Comment last updated at 2021-01-09 11:57:54 UTC |
Codecov Report
@@ Coverage Diff @@
## release/1.2-dev #5221 +/- ##
===============================================
- Coverage 93% 93% -0%
===============================================
Files 151 151
Lines 10592 10619 +27
===============================================
+ Hits 9808 9832 +24
- Misses 784 787 +3 |
@tchaton should this PR target master branch? |
Release/1.2-dev is not up-to-date with master. And we decided we won't merge any new features to master during Christmas holiday as it creates a potential risk. |
pytorch_lightning/core/lightning.py
Outdated
@@ -363,7 +366,10 @@ def __auto_choose_log_on_epoch(self, on_epoch): | |||
|
|||
return on_epoch | |||
|
|||
def all_gather(self, tensor: Union[torch.Tensor], group: Optional[Any] = None, sync_grads: bool = False): | |||
def all_gather(self, |
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.
let's use the standard formating...
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: Adrian Wälchli <[email protected]>
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.
useful!
(bool, torch.bool), | ||
(int, torch.int), | ||
(float, torch.float), | ||
(np.ndarray, None), |
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.
alternatively you could define a callable (torch.from_numpy) here instead of specifically checking for ndarray below
Co-authored-by: Adrian Wälchli <[email protected]>
What does this PR do?
Fixes #5181
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 🙃