]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(weights): guard DI_values None and read label_frequency_candles from freqai_info
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 May 2026 00:45:18 +0000 (02:45 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 25 May 2026 00:50:48 +0000 (02:50 +0200)
commitb4950444cd9484a5191713e09160a8c238bb5d0e
tree386e732ed18758b701398de4e660a9927a9e03f1
parent69a43e8b4a699e7231aabebce75fc1a4c250bd76
fix(weights): guard DI_values None and read label_frequency_candles from freqai_info

- fit_live_predictions: pred_df.get('DI_values') returns None when
  feature_parameters.DI_threshold is 0 or absent (the default), causing
  AttributeError on the subsequent .mean()/.std() calls. Fall back to
  zeros instead.
- _label_frequency_candles: read from self.freqai_info['feature_parameters']
  (matching every other access in the file) instead of self.config, which
  is the top-level config dict and never contains feature_parameters
  directly. The previous code silently ignored user-provided values and
  always fell back to the default 'max(2, 2 * len(self.pairs))'.
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py