From cb80d7c26f77c82983f1cb4fed000bf36c94bdc8 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Fri, 24 Feb 2023 11:19:54 +0100 Subject: [PATCH] close the multi_proc env before creating new ones in an attempt to avoid increasing processes --- .../prediction_models/ReinforcementLearner_multiproc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py b/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py index 9ee035c95..b3b8c40e6 100644 --- a/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py +++ b/freqtrade/freqai/prediction_models/ReinforcementLearner_multiproc.py @@ -34,6 +34,11 @@ class ReinforcementLearner_multiproc(ReinforcementLearner): train_df = data_dictionary["train_features"] test_df = data_dictionary["test_features"] + if self.train_env: + self.train_env.close() + if self.eval_env: + self.eval_env.close() + env_info = self.pack_env_dict(dk.pair) env_id = "train_env"