From d3d9f3281ef19b242e3236fe38be08c19e618429 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 6 Dec 2023 19:26:09 +0100 Subject: [PATCH] Fix torch logging setup mess --- tests/freqai/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/freqai/conftest.py b/tests/freqai/conftest.py index be208408f..d2383c5b9 100644 --- a/tests/freqai/conftest.py +++ b/tests/freqai/conftest.py @@ -20,6 +20,11 @@ def is_mac() -> bool: return "Darwin" in machine +@pytest.fixture(autouse=True) +def patch_torch_initlogs(mocker) -> None: + mocker.patch("torch._logging._init_logs") + + @pytest.fixture(scope="function") def freqai_conf(default_conf, tmp_path): freqaiconf = deepcopy(default_conf)