]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
refactor(quickadapter): silence warning at HPO with histgb
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Dec 2025 00:30:06 +0000 (01:30 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 29 Dec 2025 00:30:06 +0000 (01:30 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/Utils.py

index 6b958e80f57bf91e69e21a64af7c4e17b2cd7f32..c3b28cb8ce5f08acfd2368b9f4e6a9c0a4e533f6 100644 (file)
@@ -2072,7 +2072,7 @@ def fit_regressor(
     Args:
         regressor: Type of regressor.
         model_training_parameters: Copied internally to avoid side effects.
-        callbacks: Additional callbacks (pruning callbacks added automatically when trial is set).
+        callbacks: Additional callbacks.
         trial: Optuna trial for pruning and random state offset.
     """
     model_training_parameters = model_training_parameters.copy()
@@ -2216,7 +2216,7 @@ def fit_regressor(
             model = pruning_callback(
                 model=model,
                 X=X,
-                y=y,
+                y=y.to_numpy().ravel(),
                 X_val=X_val,
                 y_val=y_val,
                 sample_weight=train_weights,