From ad652817ef6875ac1d1705178f3c2921df758e55 Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Mon, 19 Sep 2022 11:11:23 +0200 Subject: [PATCH 1/4] Ensure train ordering after restart Ensure lowest timestamps get trained first after restart --- freqtrade/freqai/freqai_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 3f5eff167..fa9d5043b 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -711,7 +711,7 @@ class IFreqaiModel(ABC): key=lambda k: k[1]['trained_timestamp']) for pair in pair_dict_sorted: if pair[0] in current_pairlist: - best_queue.appendleft(pair[0]) + best_queue.appendright(pair[0]) for pair in current_pairlist: if pair not in best_queue: best_queue.appendleft(pair) From 995396c7752657ea29815cf1443d0679a6c0e6ba Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Mon, 19 Sep 2022 11:42:56 +0200 Subject: [PATCH 2/4] Add useful log info --- freqtrade/freqai/freqai_interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index fa9d5043b..0dc2baf54 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -703,6 +703,7 @@ class IFreqaiModel(ABC): current_pairlist = self.config.get("exchange", {}).get("pair_whitelist") if not self.dd.pair_dict: logger.info('Set fresh train queue from whitelist.') + logger.info(f'Queue: {current_pairlist}') return deque(current_pairlist) best_queue = deque() @@ -717,6 +718,7 @@ class IFreqaiModel(ABC): best_queue.appendleft(pair) logger.info('Set existing queue from trained timestamps.') + logger.info(f'Best approximation queue: {best_queue}') return best_queue # Following methods which are overridden by user made prediction models. From 9b66297cc0bbb2ae758319a5a4747eeca738451e Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Mon, 19 Sep 2022 12:47:20 +0200 Subject: [PATCH 3/4] Fix append --- freqtrade/freqai/freqai_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 0dc2baf54..9743c35d4 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -712,7 +712,7 @@ class IFreqaiModel(ABC): key=lambda k: k[1]['trained_timestamp']) for pair in pair_dict_sorted: if pair[0] in current_pairlist: - best_queue.appendright(pair[0]) + best_queue.append(pair[0]) for pair in current_pairlist: if pair not in best_queue: best_queue.appendleft(pair) From 42c75b4a7beb71603cad305f72154410209b791e Mon Sep 17 00:00:00 2001 From: robcaulk Date: Mon, 19 Sep 2022 19:16:32 +0200 Subject: [PATCH 4/4] combine log messages --- freqtrade/freqai/freqai_interface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 9743c35d4..156c6bee5 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -702,8 +702,8 @@ class IFreqaiModel(ABC): """ current_pairlist = self.config.get("exchange", {}).get("pair_whitelist") if not self.dd.pair_dict: - logger.info('Set fresh train queue from whitelist.') - logger.info(f'Queue: {current_pairlist}') + logger.info('Set fresh train queue from whitelist. ' + f'Queue: {current_pairlist}') return deque(current_pairlist) best_queue = deque() @@ -717,8 +717,8 @@ class IFreqaiModel(ABC): if pair not in best_queue: best_queue.appendleft(pair) - logger.info('Set existing queue from trained timestamps.') - logger.info(f'Best approximation queue: {best_queue}') + logger.info('Set existing queue from trained timestamps. ' + f'Best approximation queue: {best_queue}') return best_queue # Following methods which are overridden by user made prediction models.