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

Fixed NeptuneLogger when using DDP #11030

Merged
merged 13 commits into from
Dec 18, 2021

Conversation

Raalsky
Copy link
Contributor

@Raalsky Raalsky commented Dec 10, 2021

What does this PR do?

Makes Neptune Experiment (Run in the scope of Neptune) initialization to be called only on rank == 0 in distributed environment. Should not introduce any breaking changes and was tested with previously pickled NeptuneLogger.

Fixes #10604

And could resolve a few similar issues in external repositories:

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • 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?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

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:

  • 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

Did you have fun?

Make sure you had fun coding 🙃
Definitely ❤️

pytorch_lightning/loggers/neptune.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Dec 13, 2021
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.

Great! Thanks for the quick fix!

One could consider adding Neptune to the parametrization of
tests/loggers/test_all.py::test_logger_created_on_rank_zero_only

@awaelchli awaelchli added this to the 1.5.x milestone Dec 14, 2021
@awaelchli awaelchli self-assigned this Dec 14, 2021
@awaelchli awaelchli enabled auto-merge (squash) December 14, 2021 14:00
auto-merge was automatically disabled December 14, 2021 14:08

Head branch was pushed to by a user without write access

@Raalsky
Copy link
Contributor Author

Raalsky commented Dec 14, 2021

@awaelchli

Great! Thanks for the quick fix!

One could consider adding Neptune to the parametrization of tests/loggers/test_all.py::test_logger_created_on_rank_zero_only

Added 😉. Sorry, am I broke something (don't know about an active auto merge before committing)? :D

@rohitgr7 rohitgr7 enabled auto-merge (squash) December 14, 2021 14:16
auto-merge was automatically disabled December 14, 2021 16:24

Head branch was pushed to by a user without write access

CHANGELOG.md Outdated Show resolved Hide resolved
@awaelchli awaelchli enabled auto-merge (squash) December 17, 2021 17:08
auto-merge was automatically disabled December 17, 2021 17:13

Head branch was pushed to by a user without write access

CHANGELOG.md Outdated Show resolved Hide resolved
@Raalsky
Copy link
Contributor Author

Raalsky commented Dec 17, 2021

It looks like a final state now 😉. @rohitgr7 @awaelchli 😉 Could you re-enable auto-merge?

@awaelchli awaelchli enabled auto-merge (squash) December 17, 2021 18:44
auto-merge was automatically disabled December 17, 2021 22:20

Head branch was pushed to by a user without write access

@mergify mergify bot removed the has conflicts label Dec 17, 2021
@rohitgr7 rohitgr7 enabled auto-merge (squash) December 17, 2021 22:21
@codecov
Copy link

codecov bot commented Dec 18, 2021

Codecov Report

Merging #11030 (6c819c4) into master (62f1e82) will increase coverage by 0%.
The diff coverage is 87%.

@@           Coverage Diff           @@
##           master   #11030   +/-   ##
=======================================
  Coverage      88%      88%           
=======================================
  Files         177      177           
  Lines       16526    16551   +25     
=======================================
+ Hits        14580    14603   +23     
- Misses       1946     1948    +2     

@rohitgr7 rohitgr7 merged commit 3cc69f9 into Lightning-AI:master Dec 18, 2021
@awaelchli awaelchli added the bug Something isn't working label Dec 18, 2021
rohitgr7 added a commit that referenced this pull request Dec 18, 2021
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
lexierule pushed a commit that referenced this pull request Dec 21, 2021
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
@Raalsky Raalsky deleted the fix/neptune-ddp branch December 21, 2021 23:43
@rohitgr7 rohitgr7 mentioned this pull request Feb 7, 2022
12 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 logger: neptune ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using neptune logger and multi-gpu DDP, duplicate runs are logged, one for each gpu.
7 participants