-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix error when logging to progress bar with reserved name #5620
Conversation
@@ -425,3 +425,21 @@ def test_dataloader(self): | |||
) | |||
trainer.fit(model) | |||
trainer.test(model, ckpt_path=None) | |||
|
|||
|
|||
def test_logging_to_progress_bar_with_reserved_key(tmpdir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests/trainer/logging_process ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this folder does not exist on master, only dev branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see.... :]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe callback/test_progress ?
Codecov Report
@@ Coverage Diff @@
## master #5620 +/- ##
======================================
- Coverage 93% 93% -0%
======================================
Files 135 135
Lines 10005 10011 +6
======================================
- Hits 9351 9345 -6
- Misses 654 666 +12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO at least adding a warning is better rather than silently updating it.
Co-authored-by: Rohit Gupta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one :]
@awaelchli can you move this test to We should be more mindful about where we place our tests |
Here #5667
I asked but was not fast enough to react before it was merged. I am mindful and I have suggested several times before to define a consistent testing file/folder structure. |
* warn about duplicate metrics * update changelog * suggestions from rohit Co-authored-by: Rohit Gupta <[email protected]> * multiple values in message * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* warn about duplicate metrics * update changelog * suggestions from rohit Co-authored-by: Rohit Gupta <[email protected]> * multiple values in message * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* warn about duplicate metrics * update changelog * suggestions from rohit Co-authored-by: Rohit Gupta <[email protected]> * multiple values in message * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* warn about duplicate metrics * update changelog * suggestions from rohit Co-authored-by: Rohit Gupta <[email protected]> * multiple values in message * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* warn about duplicate metrics * update changelog * suggestions from rohit Co-authored-by: Rohit Gupta <[email protected]> * multiple values in message * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What does this PR do?
Fixes #5299
The statement
currently results in an error, because the loss is already logged to the progress bar by default.
Instead of an error message, we overwrite the progress bar dict entry by what the user logged and print a warning.
The warning was suggested by @edenlightning. Alternatively, we could also just overwrite the value without the warning because the user explicitly calls
self.log
anyway.