From d26aa231fc8eb20a582945df6d9a1522af2cc8ce Mon Sep 17 00:00:00 2001 From: Richard Jozsa <38407205+richardjozsa@users.noreply.github.com> Date: Mon, 22 May 2023 10:36:07 +0200 Subject: [PATCH] Stable baselines updates, and fix There was a seeding error in SB3 after the gymnasium update, the stable baselines team has patched and fixed the issue, but the reset function has to be aligned. --- freqtrade/freqai/RL/BaseEnvironment.py | 2 +- requirements-freqai-rl.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqai/RL/BaseEnvironment.py b/freqtrade/freqai/RL/BaseEnvironment.py index 7c83a7e42..42e644f0a 100644 --- a/freqtrade/freqai/RL/BaseEnvironment.py +++ b/freqtrade/freqai/RL/BaseEnvironment.py @@ -180,7 +180,7 @@ class BaseEnvironment(gym.Env): def reset_tensorboard_log(self): self.tensorboard_metrics = {} - def reset(self): + def reset(self, seed=None): """ Reset is called at the beginning of every episode """ diff --git a/requirements-freqai-rl.txt b/requirements-freqai-rl.txt index 535d10f4b..0e9df61f1 100644 --- a/requirements-freqai-rl.txt +++ b/requirements-freqai-rl.txt @@ -5,7 +5,7 @@ torch==2.0.1 #until these branches will be released we can use this gymnasium==0.28.1 -stable_baselines3==2.0.0a5 -sb3_contrib>=2.0.0a4 +stable_baselines3==2.0.0a9 +sb3_contrib>=2.0.0a9 # Progress bar for stable-baselines3 and sb3-contrib tqdm==4.65.0