fix live retraining bug

This commit is contained in:
robcaulk 2022-05-28 11:38:57 +02:00
parent 0bf915054d
commit 7870a86e9a
3 changed files with 3 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -675,7 +675,7 @@ class FreqaiDataKitchen:
def check_if_new_training_required(self, trained_timestamp: int) -> Tuple[bool, TimeRange]:
time = datetime.datetime.now(tz=datetime.timezone.utc).timestamp()
trained_timerange = TimeRange('date', 'date')
trained_timerange = TimeRange()
if trained_timestamp != 0:
elapsed_time = (time - trained_timestamp) / SECONDS_IN_DAY
retrain = elapsed_time > self.freqai_config.get('backtest_period')

View File

@ -187,7 +187,8 @@ class IFreqaiModel(ABC):
(model_filename,
trained_timestamp,
coin_first) = self.data_drawer.get_pair_dict_info(metadata)
if self.training_on_separate_thread:
print('debug_here')
if not self.training_on_separate_thread:
file_exists = False