From 833d25bda008d7ee62456b606b1b294924dfa284 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Wed, 1 Jun 2022 08:05:38 +0200 Subject: [PATCH] Save data after queue reorg --- freqtrade/freqai/freqai_interface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 8bf767bd6..582186071 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -391,10 +391,11 @@ class IFreqaiModel(ABC): dh.set_new_model_names(metadata, new_trained_timerange) # logger.info('Training queue' # f'{sorted(self.data_drawer.pair_dict.items(), key=lambda item: item[1])}') - dh.save_data(model, coin=metadata['pair']) if self.data_drawer.pair_dict[metadata['pair']]['priority'] == 1: - self.data_drawer.pair_to_end_of_training_queue(metadata['pair']) + with self.lock: + self.data_drawer.pair_to_end_of_training_queue(metadata['pair']) + dh.save_data(model, coin=metadata['pair']) self.training_on_separate_thread = False self.retrain = False