Merge pull request #9923 from freqtrade/bump/torch

Bump torch
This commit is contained in:
Matthias 2024-03-14 06:42:55 +01:00 committed by GitHub
commit 91e1b068e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 8 deletions

View File

@ -2,10 +2,9 @@
-r requirements-freqai.txt
# Required for freqai-rl
torch==2.1.2; python_version < '3.12'
#until these branches will be released we can use this
gymnasium==0.29.1; python_version < '3.12'
stable_baselines3==2.2.1; python_version < '3.12'
sb3_contrib>=2.0.0a9; python_version < '3.12'
torch==2.2.1
gymnasium==0.29.1
stable_baselines3==2.2.1
sb3_contrib>=2.2.1
# Progress bar for stable-baselines3 and sb3-contrib
tqdm==4.66.2

View File

@ -33,7 +33,7 @@ def is_arm() -> bool:
@pytest.fixture(autouse=True)
def patch_torch_initlogs(mocker) -> None:
if is_mac() and not is_arm():
if is_mac():
# Mock torch import completely
import sys
import types
@ -41,7 +41,7 @@ def patch_torch_initlogs(mocker) -> None:
module_name = 'torch'
mocked_module = types.ModuleType(module_name)
sys.modules[module_name] = mocked_module
elif not is_py12():
else:
mocker.patch("torch._logging._init_logs")

View File

@ -27,7 +27,7 @@ def can_run_model(model: str) -> None:
if is_arm() and "Catboost" in model:
pytest.skip("CatBoost is not supported on ARM.")
if is_pytorch_model and is_mac() and not is_arm():
if is_pytorch_model and is_mac():
pytest.skip("Reinforcement learning / PyTorch module not available on intel based Mac OS.")