From 3fa23860c01747a572f81f37cc6bc6dbae4640ac Mon Sep 17 00:00:00 2001 From: Yinon Polak Date: Tue, 21 Mar 2023 14:34:27 +0200 Subject: [PATCH] skip pytorch tests on python 3.11 and intel based mac os --- tests/freqai/test_freqai_interface.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/freqai/test_freqai_interface.py b/tests/freqai/test_freqai_interface.py index c1d9998d6..718d80f44 100644 --- a/tests/freqai/test_freqai_interface.py +++ b/tests/freqai/test_freqai_interface.py @@ -34,13 +34,14 @@ def is_mac() -> bool: def can_run_model(model: str) -> None: if (is_arm() or is_py11()) and "Catboost" in model: - pytest.skip("CatBoost is not supported on ARM") + pytest.skip("CatBoost is not supported on ARM.") - if is_mac() and not is_arm() and 'Reinforcement' in model: - pytest.skip("Reinforcement learning module not available on intel based Mac OS") + is_pytorch_model = 'Reinforcement' in model or 'PyTorch' in model + if is_pytorch_model and is_mac() and not is_arm(): + pytest.skip("Reinforcement learning / PyTorch module not available on intel based Mac OS.") - if is_py11() and 'Reinforcement' in model: - pytest.skip("Reinforcement learning currently not available on python 3.11.") + if is_pytorch_model and is_py11(): + pytest.skip("Reinforcement learning / PyTorch currently not available on python 3.11.") @pytest.mark.parametrize('model, pca, dbscan, float32, can_short, shuffle, buffer', [