We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbf8dc1 commit 7f5bb0eCopy full SHA for 7f5bb0e
python-package/xgboost/dask.py
@@ -34,6 +34,11 @@
34
from .sklearn import XGBModel, XGBRegressorBase, XGBClassifierBase
35
from .sklearn import xgboost_model_doc
36
37
+try:
38
+ from distributed import Client
39
+except ImportError:
40
+ Client = None
41
+
42
# Current status is considered as initial support, many features are
43
# not properly supported yet.
44
#
@@ -360,7 +365,7 @@ def get_worker_data_shape(self, worker):
360
365
cols = c
361
366
return (rows, cols)
362
367
363
-from distributed import Client
368
364
369
def _get_rabit_args(worker_map, client: Client, host_ip=None, port=None):
370
'''Get rabit context arguments from data distribution in DaskDMatrix.'''
371
msg = 'Please provide both IP and port'
0 commit comments