[dask] Fix asyncio. (#7508)
This commit is contained in:
@@ -1622,8 +1622,9 @@ class DaskScikitLearnBase(XGBModel):
|
||||
should use `worker_client' instead of default client.
|
||||
|
||||
"""
|
||||
asynchronous = getattr(self, "_asynchronous", False)
|
||||
|
||||
if self._client is None:
|
||||
asynchronous = getattr(self, "_asynchronous", False)
|
||||
try:
|
||||
distributed.get_worker()
|
||||
in_worker = True
|
||||
@@ -1636,7 +1637,7 @@ class DaskScikitLearnBase(XGBModel):
|
||||
return ret
|
||||
return ret
|
||||
|
||||
return self.client.sync(func, **kwargs, asynchronous=asynchronous)
|
||||
return self.client.sync(func, **kwargs, asynchronous=self.client.asynchronous)
|
||||
|
||||
|
||||
@xgboost_model_doc(
|
||||
|
||||
Reference in New Issue
Block a user