22import pytest
33
44dask_ml = pytest .importorskip ("dask_ml" )
5- xgb = pytest .importorskip ("xgboost" )
5+ dxgb = pytest .importorskip ("xgboost.dask " )
66
77
88def test_xgboost_distributed_training (small_client ):
@@ -20,8 +20,8 @@ def test_xgboost_distributed_training(small_client):
2020 )
2121
2222 # Create the XGBoost DMatrix for our training and testing splits
23- dtrain = xgb . dask .DaskDMatrix (small_client , X_train , y_train )
24- dtest = xgb . dask .DaskDMatrix (small_client , X_test , y_test )
23+ dtrain = dxgb .DaskDMatrix (small_client , X_train , y_train )
24+ dtest = dxgb .DaskDMatrix (small_client , X_test , y_test )
2525
2626 # Set model parameters (XGBoost defaults)
2727 params = {
@@ -32,10 +32,10 @@ def test_xgboost_distributed_training(small_client):
3232 "objective" : "reg:squarederror" ,
3333 "grow_policy" : "depthwise" ,
3434 }
35- output = xgb . dask .train (
35+ output = dxgb .train (
3636 small_client , params , dtrain , num_boost_round = 5 , evals = [(dtrain , "train" )]
3737 )
3838
3939 # make predictions
40- y_pred = xgb . dask .predict (small_client , output , dtest )
40+ y_pred = dxgb .predict (small_client , output , dtest )
4141 assert y_pred .shape [0 ] == y_test .shape [0 ].compute ()
0 commit comments