From 647200e8a72ad20c4eb7d890486fb9c869ff0b3f Mon Sep 17 00:00:00 2001 From: robcaulk Date: Fri, 23 Sep 2022 19:30:56 +0200 Subject: [PATCH] isort --- freqtrade/freqai/RL/BaseReinforcementLearningModel.py | 2 +- .../prediction_models/ReinforcementLearner_multiproc.py | 3 ++- tests/freqai/test_freqai_interface.py | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py index c82fd1ea9..70b3e58ef 100644 --- a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py +++ b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py @@ -14,6 +14,7 @@ from pandas import DataFrame from stable_baselines3.common.callbacks import EvalCallback from stable_baselines3.common.monitor import Monitor from stable_baselines3.common.utils import set_random_seed +from stable_baselines3.common.vec_env import SubprocVecEnv from freqtrade.exceptions import OperationalException from freqtrade.freqai.data_kitchen import FreqaiDataKitchen @@ -21,7 +22,6 @@ from freqtrade.freqai.freqai_interface import IFreqaiModel from freqtrade.freqai.RL.Base5ActionRLEnv import Actions, Base5ActionRLEnv from freqtrade.freqai.RL.BaseEnvironment import Positions from freqtrade.persistence import Trade -from stable_baselines3.common.vec_env import SubprocVecEnv logger = logging.getLogger(__name__) diff --git a/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py b/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py index 5b2ea2ef5..0e6449dcd 100644 --- a/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py +++ b/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py @@ -4,9 +4,10 @@ from typing import Any, Dict # , Tuple # import numpy.typing as npt import torch as th +from pandas import DataFrame from stable_baselines3.common.callbacks import EvalCallback from stable_baselines3.common.vec_env import SubprocVecEnv -from pandas import DataFrame + from freqtrade.freqai.data_kitchen import FreqaiDataKitchen from freqtrade.freqai.RL.BaseReinforcementLearningModel import (BaseReinforcementLearningModel, make_env) diff --git a/tests/freqai/test_freqai_interface.py b/tests/freqai/test_freqai_interface.py index 1bc30a670..3a200e0af 100644 --- a/tests/freqai/test_freqai_interface.py +++ b/tests/freqai/test_freqai_interface.py @@ -4,15 +4,16 @@ from pathlib import Path from unittest.mock import MagicMock import pytest -from freqtrade.enums import RunMode + from freqtrade.configuration import TimeRange from freqtrade.data.dataprovider import DataProvider +from freqtrade.enums import RunMode from freqtrade.freqai.data_kitchen import FreqaiDataKitchen +from freqtrade.freqai.utils import download_all_data_for_training, get_required_data_timerange +from freqtrade.persistence import Trade from freqtrade.plugins.pairlistmanager import PairListManager from tests.conftest import get_patched_exchange, log_has_re from tests.freqai.conftest import get_patched_freqai_strategy -from freqtrade.persistence import Trade -from freqtrade.freqai.utils import download_all_data_for_training, get_required_data_timerange def is_arm() -> bool: