mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
remove new feature flag
This commit is contained in:
parent
a72587576e
commit
4b9f0c2fc2
|
@ -48,7 +48,6 @@
|
|||
],
|
||||
"freqai": {
|
||||
"enabled": true,
|
||||
"warn_exceptions_on_backtest_only": false,
|
||||
"purge_old_models": 2,
|
||||
"train_period_days": 15,
|
||||
"backtest_period_days": 7,
|
||||
|
|
|
@ -116,9 +116,6 @@ class IFreqaiModel(ABC):
|
|||
|
||||
record_params(config, self.full_path)
|
||||
|
||||
self.new_feature_selector = self.config.get('freqai', {}) \
|
||||
.get('warn_exceptions_on_backtest_only', False)
|
||||
|
||||
def __getstate__(self):
|
||||
"""
|
||||
Return an empty state to be pickled in hyperopt
|
||||
|
@ -357,25 +354,8 @@ class IFreqaiModel(ABC):
|
|||
logger.warning(
|
||||
f"Training {pair} raised exception {msg.__class__.__name__}. "
|
||||
f"Message: {msg}, skipping.", exc_info=True)
|
||||
|
||||
if self.new_feature_selector:
|
||||
logger.warning(
|
||||
"Train failed. Try to train on next pair." \
|
||||
if self.new_feature_selector else
|
||||
"Train failed. Raise error, fix data issue and try again."
|
||||
)
|
||||
self.tb_logger.close()
|
||||
self.model = None
|
||||
|
||||
hard_check_model_valid = True
|
||||
if self.new_feature_selector:
|
||||
hard_check_model_valid = bool(False if self.model is None else True)
|
||||
if hard_check_model_valid:
|
||||
logger.info(
|
||||
"Model is trained. Saving model and metadata to disk."
|
||||
)
|
||||
|
||||
if hard_check_model_valid:
|
||||
self.dd.pair_dict[pair]["trained_timestamp"] = int(tr_train.stopts)
|
||||
if self.plot_features and self.model is not None:
|
||||
plot_feature_importance(self.model, pair, dk, self.plot_features)
|
||||
|
@ -389,7 +369,6 @@ class IFreqaiModel(ABC):
|
|||
else:
|
||||
self.model = self.dd.load_data(pair, dk)
|
||||
|
||||
if hard_check_model_valid:
|
||||
pred_df, do_preds = self.predict(dataframe_backtest, dk)
|
||||
append_df = dk.get_predictions_to_append(pred_df, do_preds, dataframe_backtest)
|
||||
dk.append_predictions(append_df)
|
||||
|
|
Loading…
Reference in New Issue
Block a user