Merge pull request #7441 from freqtrade/train-queue
Ensure train ordering after restart
This commit is contained in:
commit
a023ac26f3
@ -702,7 +702,8 @@ class IFreqaiModel(ABC):
|
|||||||
"""
|
"""
|
||||||
current_pairlist = self.config.get("exchange", {}).get("pair_whitelist")
|
current_pairlist = self.config.get("exchange", {}).get("pair_whitelist")
|
||||||
if not self.dd.pair_dict:
|
if not self.dd.pair_dict:
|
||||||
logger.info('Set fresh train queue from whitelist.')
|
logger.info('Set fresh train queue from whitelist. '
|
||||||
|
f'Queue: {current_pairlist}')
|
||||||
return deque(current_pairlist)
|
return deque(current_pairlist)
|
||||||
|
|
||||||
best_queue = deque()
|
best_queue = deque()
|
||||||
@ -711,12 +712,13 @@ class IFreqaiModel(ABC):
|
|||||||
key=lambda k: k[1]['trained_timestamp'])
|
key=lambda k: k[1]['trained_timestamp'])
|
||||||
for pair in pair_dict_sorted:
|
for pair in pair_dict_sorted:
|
||||||
if pair[0] in current_pairlist:
|
if pair[0] in current_pairlist:
|
||||||
best_queue.appendleft(pair[0])
|
best_queue.append(pair[0])
|
||||||
for pair in current_pairlist:
|
for pair in current_pairlist:
|
||||||
if pair not in best_queue:
|
if pair not in best_queue:
|
||||||
best_queue.appendleft(pair)
|
best_queue.appendleft(pair)
|
||||||
|
|
||||||
logger.info('Set existing queue from trained timestamps.')
|
logger.info('Set existing queue from trained timestamps. '
|
||||||
|
f'Best approximation queue: {best_queue}')
|
||||||
return best_queue
|
return best_queue
|
||||||
|
|
||||||
# Following methods which are overridden by user made prediction models.
|
# Following methods which are overridden by user made prediction models.
|
||||||
|
Loading…
Reference in New Issue
Block a user