Merge pull request #8216 from freqtrade/close-rl-env

Close training and eval environments in ReinforcementLearner_multiproc
This commit is contained in:
Matthias 2023-02-26 15:20:32 +01:00 committed by GitHub
commit d3d7cb1b14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"