-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Modify warnings
in a with
block to avoid flaky tests
#31893
Conversation
|
||
# warning should be emitted for duplicated callbacks | ||
with patch("transformers.trainer_callback.logger.warning") as warn_mock: | ||
with warnings.catch_warnings(): |
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.
just put the body inside this 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.
Ooooffff - nasty bug 😬 Thanks for digging into this and fixing!
I need some therapy after all of this 😅 😰 |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…#31893) * fix * [test_all] check before merge --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
…#31893) * fix * [test_all] check before merge --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
…#31893) * fix * [test_all] check before merge --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
What does this PR do?
Avoid
test_bad_generation_config_fail_early
failing.This is because another test method modify some property of
warning
module.