From 56da0e25631e19fcff2d51dd936245638b8460ab Mon Sep 17 00:00:00 2001 From: Jirka Date: Thu, 14 Mar 2024 20:20:02 +0100 Subject: [PATCH] warnings.filterwarnings --- tests/unittests/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unittests/__init__.py b/tests/unittests/__init__.py index 30a31841f4f..ce4cb35fe7a 100644 --- a/tests/unittests/__init__.py +++ b/tests/unittests/__init__.py @@ -1,4 +1,5 @@ import os.path +import warnings from typing import NamedTuple import numpy @@ -28,6 +29,10 @@ _reference_cachier = cachier(cache_dir=_PATH_TEST_CACHE, separate_files=True) +# ignore FutureWarnings while testing (mainly appearing with DDP runs) +warnings.filterwarnings("ignore", category=FutureWarning, module="sklearn.*") +warnings.filterwarnings("ignore", category=FutureWarning, module="transformers.*") + if torch.cuda.is_available(): torch.backends.cuda.matmul.allow_tf32 = False