Unverified Commit 080e14b2 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Modify `warnings` in a `with` block to avoid flaky tests (#31893)



* fix

* [test_all] check before merge

---------
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent ec03d97b
......@@ -218,6 +218,7 @@ class TrainerCallbackTest(unittest.TestCase):
import warnings
# XXX: for now ignore scatter_gather warnings in this test since it's not relevant to what's being tested
with warnings.catch_warnings():
warnings.simplefilter(action="ignore", category=UserWarning)
trainer = self.get_trainer(callbacks=[MyTestTrainerCallback])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment