From ac21d67e08d81a858d6be647e9e665d2fdfd1797 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 7 Jan 2026 01:14:46 +0100 Subject: [PATCH] refactor(quickadapter): simplify early stopping condition checks Remove redundant has_eval_set verification in early stopping callbacks for XGBoost and LightGBM. The check is unnecessary because early_stopping_rounds is only assigned a non-None value when has_eval_set is True, making the condition implicitly guaranteed. --- quickadapter/user_data/strategies/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 404fafa..fec90b9 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -1674,7 +1674,7 @@ def fit_regressor( else: model_training_parameters.pop("early_stopping_rounds", None) - if early_stopping_rounds is not None and has_eval_set: + if early_stopping_rounds is not None: fit_callbacks.append( EarlyStopping( rounds=early_stopping_rounds, -- 2.53.0