[bugfix] Logging only on not should_accumulate() during training#5417
Merged
[bugfix] Logging only on not should_accumulate() during training#5417
not should_accumulate() during training#5417Conversation
Codecov Report
@@ Coverage Diff @@
## master #5417 +/- ##
======================================
Coverage 93% 93%
======================================
Files 134 134
Lines 9996 9996
======================================
Hits 9313 9313
Misses 683 683 |
carmocca
reviewed
Jan 8, 2021
Contributor
|
Not familiar with W&B. Can you see the raw data for the epoch graph? Doesn't look right, does it? |
Contributor
Author
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
carmocca
approved these changes
Jan 8, 2021
Borda
approved these changes
Jan 8, 2021
Collaborator
Borda
left a comment
There was a problem hiding this comment.
lgtm, just check back-compatibity and chlog
| self.cached_results.legacy_batch_log_metrics.update(logged_metrics_tmp) | ||
|
|
||
| def log_metrics(self, metrics, grad_norm_dic, step=None, log_train_step_metrics=False): | ||
| def log_metrics(self, metrics, grad_norm_dic, step=None): |
Collaborator
There was a problem hiding this comment.
is it used by a user, right? then let's hold back compatibility with API and add a warning...
Contributor
Author
There was a problem hiding this comment.
It is internal. LoggerConnector class
ananyahjha93
approved these changes
Jan 8, 2021
SeanNaren
approved these changes
Jan 8, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
This PR fixes visual logging with accumulated_grad_batches > 1.
Solution: We can't assume the metrics can be averaged, so we will log only when
optimizer_stepwill be called.Previously
Now.
Code used to generate the visualization
Fixes #5405 <- this links related issue to this PR
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 🙃