Retrain model if FreqAI found a pretrained model but user strategy is not passing the expected features (user has changed the features in the strategy but has passed a the same config[freqai][identifier]). Logger warning output to user.
This commit is contained in:
parent
c708dd3186
commit
89eacf2f47
@ -92,6 +92,11 @@ class IFreqaiModel(ABC):
|
||||
self.dh.save_data(self.model)
|
||||
else:
|
||||
self.model = self.dh.load_data()
|
||||
strategy_provided_features = self.dh.find_features(dataframe_train)
|
||||
if strategy_provided_features != self.dh.training_features_list:
|
||||
logger.info("User changed input features, retraining model.")
|
||||
self.model = self.train(dataframe_train, metadata)
|
||||
self.dh.save_data(self.model)
|
||||
|
||||
preds, do_preds = self.predict(dataframe_backtest, metadata)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user