Tests for dask skl categorical data support. (#7054)

This commit is contained in:
Jiaming Yuan
2021-06-24 16:33:57 +08:00
committed by GitHub
parent da1ad798ca
commit 1d4d345634
2 changed files with 33 additions and 13 deletions

View File

@@ -632,6 +632,12 @@ class XGBModel(XGBModelBase):
eval_metric = None
else:
params.update({"eval_metric": eval_metric})
if self.enable_categorical and params.get("tree_method", None) != "gpu_hist":
raise ValueError(
"Experimental support for categorical data is not implemented for"
" current tree method yet."
)
return model, feval, params
def _set_evaluation_result(self, evals_result: TrainingCallback.EvalsLog) -> None: