mirror of
https://github.com/microsoft/autogen.git
synced 2025-09-06 23:07:06 +00:00
Commenting use_label_encoder - xgboost (#1122)
* Commenting use_label_encoder - xgboost * format change * moving the import xgboost version to the head * Shfit params for use_label to outside maxdept * Keep the original logic --------- Co-authored-by: Shaokun <shaokunzhang529@gmail.com> Co-authored-by: Li Jiang <bnujli@gmail.com>
This commit is contained in:
parent
9d857d988b
commit
da92238ffe
@ -1508,7 +1508,12 @@ class XGBoostEstimator(SKLearnEstimator):
|
||||
params["grow_policy"] = params.get("grow_policy", "lossguide")
|
||||
params["tree_method"] = params.get("tree_method", "hist")
|
||||
# params["booster"] = params.get("booster", "gbtree")
|
||||
params["use_label_encoder"] = params.get("use_label_encoder", False)
|
||||
|
||||
# use_label_encoder is deprecated in 1.7.
|
||||
from xgboost import __version__ as xgboost_version
|
||||
|
||||
if xgboost_version < "1.7.0":
|
||||
params["use_label_encoder"] = params.get("use_label_encoder", False)
|
||||
if "n_jobs" in config:
|
||||
params["nthread"] = params.pop("n_jobs")
|
||||
return params
|
||||
|
Loading…
x
Reference in New Issue
Block a user