A programming framework for agentic AI
Unify regression and classification for XGBoost (#276)
Chi Wang5b0932e442e4
diff --git a/flaml/ml.py b/flaml/ml.pyindex 02c523d25..fdafec752 100644--- a/flaml/ml.py+++ b/flaml/ml.py@@ -19,7 +19,6 @@ from sklearn.metrics import ()from sklearn.model_selection import RepeatedStratifiedKFold, GroupKFold, TimeSeriesSplitfrom .model import (- XGBoostEstimator,XGBoostSklearnEstimator,RandomForestEstimator,LGBMEstimator,@@ -41,10 +40,7 @@ logger = logging.getLogger(__name__)def get_estimator_class(task, estimator_name):# when adding a new learner, need to add an elif branchif "xgboost" == estimator_name:- if "regression" == task:- estimator_class = XGBoostEstimator- else:- estimator_class = XGBoostSklearnEstimator+ estimator_class = XGBoostSklearnEstimatorelif "rf" == estimator_name:estimator_class = RandomForestEstimatorelif "lgbm" == estimator_name: