Skip to content
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

Merged
merged 37 commits into from
Jan 9, 2021
Merged

Bugfix/all gather #5221

merged 37 commits into from
Jan 9, 2021

Conversation

tchaton
Copy link
Contributor

@tchaton tchaton commented Dec 21, 2020

What does this PR do?

Fixes #5181

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

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:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified; Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases.

Did you have fun?

Make sure you had fun coding 🙃

@tchaton tchaton added bug Something isn't working feature Is an improvement or enhancement design Includes a design discussion labels Dec 21, 2020
@tchaton tchaton added this to the 1.2 milestone Dec 21, 2020
@tchaton tchaton self-assigned this Dec 21, 2020
@pep8speaks
Copy link

pep8speaks commented Dec 21, 2020

Hello @tchaton! Thanks for updating this PR.

Line 33:33: E231 missing whitespace after ':'

Comment last updated at 2021-01-09 11:57:54 UTC

@codecov
Copy link

codecov bot commented Dec 21, 2020

Codecov Report

Merging #5221 (0df1a98) into release/1.2-dev (48718d7) will decrease coverage by 0%.
The diff coverage is 88%.

@@               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     

@SkafteNicki
Copy link
Member

@tchaton should this PR target master branch?

@tchaton
Copy link
Contributor Author

tchaton commented Dec 22, 2020

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.

@tchaton tchaton marked this pull request as ready for review December 22, 2020 09:00
@@ -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,
Copy link
Member

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...

pytorch_lightning/utilities/distributed.py Outdated Show resolved Hide resolved
tchaton and others added 2 commits December 28, 2020 16:24
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
pytorch_lightning/utilities/distributed.py Outdated Show resolved Hide resolved
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useful!

pytorch_lightning/core/lightning.py Outdated Show resolved Hide resolved
(bool, torch.bool),
(int, torch.int),
(float, torch.float),
(np.ndarray, None),
Copy link
Contributor

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

@awaelchli awaelchli mentioned this pull request Jan 8, 2021
9 tasks
@tchaton tchaton enabled auto-merge (squash) January 8, 2021 17:41
@tchaton tchaton merged commit be255de into release/1.2-dev Jan 9, 2021
@tchaton tchaton deleted the bugfix/all_gather branch January 9, 2021 12:37
@justusschock justusschock mentioned this pull request Feb 2, 2021
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working design Includes a design discussion feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants