dask-examples icon indicating copy to clipboard operation
dask-examples copied to clipboard

XGBoost example notebook uses deprecated dask-xgboost

Open avriiil opened this issue 2 years ago • 2 comments

This Dask Examples notebook uses the deprecated dask-xgboost rather than the native XGBoost integration.

Tweaking the notebook should be relatively straightforward by following the example code in this blog

import xgboost as xgb

# Create the XGBoost DMatrices
dtrain = xgb.dask.DaskDMatrix(client, X_train, y_train)
dtest = xgb.dask.DaskDMatrix(client, X_test, y_test)

# train the model
output = xgb.dask.train(
    client, params, dtrain, num_boost_round=4,
    evals=[(dtrain, 'train')]
)

# make predictions
y_pred = xgb.dask.predict(client, output, dtest)

From the dask-xgboost repo:

"Warning: Dask-XGBoost has been deprecated and is no longer maintained. The functionality of this project has been included directly in XGBoost. To use Dask and XGBoost together, please use xgboost.dask instead https://xgboost.readthedocs.io/en/latest/tutorials/dask.html."

avriiil avatar Jun 08 '22 09:06 avriiil

I can make these changes and submit a PR

avriiil avatar Jun 08 '22 09:06 avriiil

Thanks for surfacing this @rrpelgrim. A PR that updates that example to use xgboost.dask instead of dask_xgboost would be very welcome. Let me know if you know have any questions about that process

jrbourbeau avatar Jun 08 '22 16:06 jrbourbeau