chore: add guardrails for users who neglect docs

This commit is contained in:
robcaulk
2023-09-19 12:24:44 +02:00
parent 8f883f2310
commit d21f0f4081

View File

@@ -244,6 +244,14 @@ class FreqaiDataKitchen:
f"{self.pair}: dropped {len(unfiltered_df) - len(filtered_df)} training points"
f" due to NaNs in populated dataset {len(unfiltered_df)}."
)
if len(unfiltered_df) == 0 and not self.live:
raise OperationalException(
f"{self.pair}: all training data dropped due to NaNs. "
"You likely did not download enough training data prior "
"to your backtest timerange. Hint:\n"
"https://www.freqtrade.io/en/stable/freqai-running/"
"#downloading-data-to-cover-the-full-backtest-period"
)
if (1 - len(filtered_df) / len(unfiltered_df)) > 0.1 and self.live:
worst_indicator = str(unfiltered_df.count().idxmin())
logger.warning(