dask / dask/dask-ml

Xgboost standard example errors out

Open
#596 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
951
Forks
262
PR merge metrics
No merged PRs in 30d

Description

I have a 4 worker cluster with Dask; all examples on arrays and dataframes work but when I try the xgboost example I get an error:

```
bst = dask_xgboost.train(client, params, X_train, y_train, num_boost_round=20)
```

ERROR
'coroutine' object is not iterable

Full error is:
```pytb
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
3 'min_child_weight': 0.5}
4
----> 5 bst = dask_xgboost.train(client, params, X_train, y_train, num_boost_round=20)

~/anaconda3/envs/python3/lib/python3.6/site-packages/dask_xgboost/core.py in train(client, params, data, labels, dmatrix_kwargs, **kwargs)
240 """
241 return client.sync(
--> 242 _train, client, params, data, labels, dmatrix_kwargs, **kwargs
243 )
244

~/anaconda3/envs/python3/lib/python3.6/site-packages/distributed/client.py in sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
766 else:
767 return sync(
--> 768 self.loop, func, *args, callback_timeout=callback_timeout, **kwargs
769 )
770

~/anaconda3/envs/python3/lib/python3.6/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
332 if error[0]:
333 typ, exc, tb = error[0]
--> 334 raise exc.with_traceback(tb)
335 else:
336 return result[0]

~/anaconda3/envs/python3/lib/python3.6/site-packages/distributed/utils.py in f()
316 if callback_timeout is not None:
317 future = gen.with_timeout(timedelta(seconds=callback_timeout), future)
--> 318 result[0] = yield future
319 except Exception as exc:
320 error[0] = sys.exc_info()

~/anaconda3/envs/python3/lib/python3.6/site-packages/tornado/gen.py in run(self)
1097
1098 try:
-> 1099 value = future.result()
1100 except Exception:
1101 self.had_exception = True

~/anaconda3/envs/python3/lib/python3.6/site-packages/tornado/gen.py in run(self)
1105 if exc_info is not None:
1106 try:
-> 1107 yielded = self.gen.throw(*exc_info)
1108 finally:
1109 # Break up a reference to itself

~/anaconda3/envs/python3/lib/python3.6/site-packages/dask_xgboost/core.py in _train(client, params, data, labels, dmatrix_kwargs, **kwargs)
169 for part in parts:
170 if part.status == "error":
--> 171 yield part # trigger error locally
172
173 # Because XGBoost-python doesn't yet allow iterative training, we need to

~/anaconda3/envs/python3/lib/python3.6/site-packages/tornado/gen.py in run(self)
1097
1098 try:
-> 1099 value = future.result()
1100 except Exception:
1101 self.had_exception = True

~/anaconda3/envs/python3/lib/python3.6/asyncio/tasks.py in _wrap_awaitable(awaitable)
535 that will later be wrapped in a Task by ensure_future().
536 """
--> 537 return (yield from awaitable.__await__())
538
539

~/anaconda3/envs/python3/lib/python3.6/site-packages/distributed/client.py in __await__(self)
411
412 def __await__(self):
--> 413 return self.result().__await__()
414
415

~/anaconda3/envs/python3/lib/python3.6/site-packages/distributed/client.py in result(self, timeout)
220 result = self.client.sync(self._result, callback_timeout=timeout, raiseit=False)
221 if self.status == "error":
--> 222 typ, exc, tb = result
223 raise exc.with_traceback(tb)
224 elif self.status == "cancelled":

TypeError: 'coroutine' object is not iterable
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.