From 07378e5d09810a066db4f12e74266d5417b78ee4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 22 Jun 2026 15:07:40 +0200 Subject: [PATCH] style(quickadapter): emit label_horizon_candles per pair in HPO=on log block MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Two post-implementation review findings (Oracle A + Oracle B) resolved together by a single design change. Oracle A flagged a latent value-mismatch in the HPO=on branch: the global `self._label_horizon_candles()` call (no `pair` argument) reads from `ft_params` only, so when `label_horizon_candles` is unset and the helper falls back to `label_period_candles`, the logged value reflects the global initial seed rather than the per-pair effective value used at fit time (where HPO-tuned `label_period_candles` per pair drives the fallback). When the user sets `label_horizon_candles` explicitly, the global call is correct. Oracle B flagged a cross-branch ordering inconsistency: HPO=on emitted `label_horizon_candles` first (before per-pair lines), while HPO=off emitted it last (after period + multiplier). Maintainers comparing logs across HPO toggles see the same logical scalar in different positions. Move the per-pair effective `label_horizon_candles` into the per-pair line in the HPO=on branch (third field after `label_period_candles` and `label_natr_multiplier`). This closes the per-pair accuracy gap (Oracle A) and yields the same `period → multiplier → horizon` order in both branches (Oracle B). No behavioral change; logging only. --- .../user_data/freqaimodels/QuickAdapterRegressorV3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index dd7b007..77b6a38 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -1605,13 +1605,13 @@ class QuickAdapterRegressorV3(BaseRegressionModel): if self._optuna_hyperopt: logger.info("Label Parameters:") - logger.info(f" label_horizon_candles: {self._label_horizon_candles()}") for pair in self.pairs: params = self._optuna_label_params.get(pair, {}) if params: logger.info( f" {pair}: label_period_candles={params.get('label_period_candles')}, " - f"label_natr_multiplier={format_number(params.get('label_natr_multiplier'))}" + f"label_natr_multiplier={format_number(params.get('label_natr_multiplier'))}, " + f"label_horizon_candles={self._label_horizon_candles(pair)}" ) else: logger.info("Label Parameters:") -- 2.53.0