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

feat(wandb): log in sync with Trainer step #4405

Merged
merged 6 commits into from
Oct 28, 2020

Conversation

borisdayma
Copy link
Contributor

What does this PR do?

Uses directly Trainer step to log metrics and keep it in sync with wandb step.

They were decoupled due to an issue on k-fold logging, where we use multiple Trainer for the same W&B run.

This created confusion for some users as wandb was then using global_step as a parameter to refer to Trainer step.
global_step is not used anymore and instead, we offset step when logging additional Trainer loops on the same W&B run.

Fixes #4113

Before submitting

  • Was this discussed/approved via a Github issue? (related to issue)
  • 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

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #4405 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #4405   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         111     111           
  Lines        8081    8081           
======================================
  Hits         7489    7489           
  Misses        592     592           

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.

nice

pytorch_lightning/loggers/wandb.py Outdated Show resolved Hide resolved
@awaelchli awaelchli added logger Related to the Loggers feature Is an improvement or enhancement labels Oct 28, 2020
@awaelchli awaelchli added this to the 1.0.x milestone Oct 28, 2020
@rohitgr7 rohitgr7 merged commit ff41d80 into Lightning-AI:master Oct 28, 2020
@borisdayma borisdayma deleted the feat-wandb-step branch October 28, 2020 19:44
Borda pushed a commit that referenced this pull request Nov 4, 2020
* feat(wandb): log in sync with Trainer step

* docs: update CHANGELOG

* style(test_wandb): fix formatting

* parentheses

Co-authored-by: Adrian Wälchli <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
(cherry picked from commit ff41d80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement logger Related to the Loggers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

training curves look fragmented / not clear what is "step"
6 participants