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

WandbLogger to log model topology by default #8662

Merged
merged 3 commits into from
Aug 4, 2021
Merged

WandbLogger to log model topology by default #8662

merged 3 commits into from
Aug 4, 2021

Conversation

gau-nernst
Copy link
Contributor

@gau-nernst gau-nernst commented Jul 31, 2021

What does this PR do?

Fixes #8638

  • Add log_graph=True parameter to WandbLogger.watch() and pass it to wandb.watch()
  • Update wandb logger test to include log_graph

Recently wandb introduces the parameter log_graph in wandb.watch(). By default, it is False, so model topology won't be logged (see here)

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

  • log_graph=True by default.

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 🙃

@codecov
Copy link

codecov bot commented Jul 31, 2021

Codecov Report

Merging #8662 (1d7da67) into master (560a5c3) will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #8662   +/-   ##
======================================
  Coverage      89%     89%           
======================================
  Files         169     169           
  Lines       14075   14075           
======================================
  Hits        12468   12468           
  Misses       1607    1607           

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM ! Any idea of implication on training performance ?

@tchaton tchaton added the ready PRs ready to be merged label Aug 2, 2021
@gau-nernst
Copy link
Contributor Author

I don't think it will have any negative impacts on training performance, because it's just extra logging. This was the default behavior for wandb some time ago (before wandb client commit #2395 on July 16)

I just found out that wandb added log_graph=False in their wandb.watch() in this and this commits. This means that earlier version of wandb client will throw an error because we have passed an extra argument (I haven't tested this).

Should we raise the minimum version requirement for wandb logger? Or we discard my PR and leave the user handle this behavior by themselves? (which is what I'm doing for my project)

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.

This is great. Impact is minor since this needs to be called manually anyway.
@gau-nernst could you add a changelog entry in CHANGELOG.md ?

@awaelchli awaelchli added logger Related to the Loggers 3rd party Related to a 3rd-party labels Aug 3, 2021
@awaelchli awaelchli added this to the v1.5 milestone Aug 3, 2021
@awaelchli
Copy link
Contributor

@gau-nernst if you merge master into this branch the failing gpu test will pass and we can merge.

@gau-nernst
Copy link
Contributor Author

@awaelchli I have rebased from master and added an entry to CHANGELOG.md
The GPU test has passed now. Thank you for the support!

@mergify mergify bot added the has conflicts label Aug 4, 2021
@awaelchli awaelchli enabled auto-merge (squash) August 4, 2021 09:59
@mergify mergify bot removed the has conflicts label Aug 4, 2021
@awaelchli awaelchli merged commit 052aefc into Lightning-AI:master Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party Related to a 3rd-party feature Is an improvement or enhancement logger Related to the Loggers ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WandbLogger does not log model topology
4 participants