From: Jérôme Benoit Date: Thu, 8 Jan 2026 21:10:38 +0000 (+0100) Subject: fix(quickadapter): restrict CatBoost grow_policy for Ordered boosting X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=396cac04ff614bfcf68445e26576463f111dfa30;p=freqai-strategies.git fix(quickadapter): restrict CatBoost grow_policy for Ordered boosting CatBoost's Ordered boosting mode only supports SymmetricTree grow policy. When Optuna suggested Ordered boosting with Depthwise or Lossguide grow policies, CatBoost raised: "Ordered boosting is not supported for nonsymmetric trees." This fix conditionally restricts grow_policy options to SymmetricTree when boosting_type is Ordered, preventing invalid parameter combinations during hyperparameter optimization. Reference: catboost/catboost source (catboost_options.cpp:~758) --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index cc3be9b..8cde3cc 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -2489,6 +2489,10 @@ def get_optuna_study_model_parameters( "boosting_type", boosting_type_options ) bootstrap_type = trial.suggest_categorical("bootstrap_type", bootstrap_options) + if boosting_type == "Ordered": + grow_policy_options = ["SymmetricTree"] + else: + grow_policy_options = ["SymmetricTree", "Depthwise", "Lossguide"] params: dict[str, Any] = { # Boosting/Training @@ -2510,7 +2514,7 @@ def get_optuna_study_model_parameters( trial, "min_data_in_leaf", ranges["min_data_in_leaf"], min_val=1 ), "grow_policy": trial.suggest_categorical( - "grow_policy", ["SymmetricTree", "Depthwise", "Lossguide"] + "grow_policy", grow_policy_options ), # Regularization "l2_leaf_reg": trial.suggest_float(