[dask] Order the prediction result. (#5416)

This commit is contained in:
Jiaming Yuan
2020-03-15 19:34:04 +08:00
committed by GitHub
parent 668e432e2d
commit 21b671aa06
2 changed files with 72 additions and 32 deletions

View File

@@ -74,6 +74,11 @@ def test_from_dask_array():
# force prediction to be computed
prediction = prediction.compute()
single_node_predt = result['booster'].predict(
xgb.DMatrix(X.compute())
)
np.testing.assert_allclose(prediction, single_node_predt)
def test_dask_regressor():
with LocalCluster(n_workers=5) as cluster: