From 1ade11f00b4cabf6fef4be71c38ff0e908136bdd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 5 May 2024 19:17:18 +0200 Subject: [PATCH] chore: Fix a few freqAI mutable defaults --- freqtrade/freqai/RL/BaseEnvironment.py | 11 ++++++----- freqtrade/freqai/RL/BaseReinforcementLearningModel.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/freqtrade/freqai/RL/BaseEnvironment.py b/freqtrade/freqai/RL/BaseEnvironment.py index 5ddfdeb68..63fca6224 100644 --- a/freqtrade/freqai/RL/BaseEnvironment.py +++ b/freqtrade/freqai/RL/BaseEnvironment.py @@ -47,19 +47,20 @@ class BaseEnvironment(gym.Env): def __init__( self, - df: DataFrame = DataFrame(), - prices: DataFrame = DataFrame(), - reward_kwargs: dict = {}, + *, + df: DataFrame, + prices: DataFrame, + reward_kwargs: dict, window_size=10, starting_point=True, id: str = "baseenv-1", # noqa: A002 seed: int = 1, - config: dict = {}, + config: dict, live: bool = False, fee: float = 0.0015, can_short: bool = False, pair: str = "", - df_raw: DataFrame = DataFrame(), + df_raw: DataFrame, ): """ Initializes the training/eval environment. diff --git a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py index 225ed3d50..05ab5be55 100644 --- a/freqtrade/freqai/RL/BaseReinforcementLearningModel.py +++ b/freqtrade/freqai/RL/BaseReinforcementLearningModel.py @@ -488,7 +488,7 @@ def make_env( seed: int, train_df: DataFrame, price: DataFrame, - env_info: Dict[str, Any] = {}, + env_info: Dict[str, Any], ) -> Callable: """ Utility function for multiprocessed env.