-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
dvclive callback: warn instead of fail when logging non-scalars #27608
dvclive callback: warn instead of fail when logging non-scalars #27608
Conversation
@muellerz This makes the tests pass, but I'm not sure if it's intended that the test here logs the learning rate as a list rather than as a scalar (which will fail under several of the existing loggers, but only with a warning like in this PR). transformers/tests/trainer/test_trainer.py Line 675 in e4280d6
transformers/tests/trainer/test_trainer.py Lines 699 to 712 in f31af39
Everywhere else in the codebase, it looks like a scalar is extracted: transformers/src/transformers/trainer_pt_utils.py Lines 847 to 867 in f31af39
|
In the future it's @muellerzr @dberenbaum, don't want to be pinging random people :) Yes, let's go with |
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.
Thanks for the fix! If we can log just the scalar too as part of this that would be great too. Otherwise this PR LG2M. Appreciate the quickfix :)
@muellerzr Apologies to you and the other person who was pinged here Zach! Added the change to the test in the last commit. The current test failures look unrelated. |
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.
Thanks 😉
What does this PR do?
Fixes #27352 (comment). This will warn instead of fail when trying to log non-scalars as metrics.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@muellerz Could you please take a look?