give load_cached_data_for_updating the right flags to avoid redownloading data in dry/live

This commit is contained in:
robcaulk 2022-05-27 13:38:22 +02:00
parent 65fdebab75
commit 891fb87712

View File

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