Handle the new device parameter in dask and demos. (#9386)

* Handle the new `device` parameter in dask and demos.

- Check no ordinal is specified in the dask interface.
- Update demos.
- Update dask doc.
- Update the condition for QDM.
This commit is contained in:
Jiaming Yuan
2023-07-15 19:11:20 +08:00
committed by GitHub
parent 9da5050643
commit 16eb41936d
31 changed files with 631 additions and 450 deletions

View File

@@ -1349,10 +1349,11 @@ def test_multilabel_classification() -> None:
np.testing.assert_allclose(clf.predict(X), predt)
def test_data_initialization():
def test_data_initialization() -> None:
from sklearn.datasets import load_digits
X, y = load_digits(return_X_y=True)
validate_data_initialization(xgb.DMatrix, xgb.XGBClassifier, X, y)
validate_data_initialization(xgb.QuantileDMatrix, xgb.XGBClassifier, X, y)
@parametrize_with_checks([xgb.XGBRegressor()])