Fix flaky data initialization test. (#6318)
This commit is contained in:
parent
608bda7052
commit
c80657b542
@ -768,7 +768,9 @@ class TestDaskCallbacks:
|
|||||||
def worker_fn(worker_addr, data_ref):
|
def worker_fn(worker_addr, data_ref):
|
||||||
with xgb.dask.RabitContext(rabit_args):
|
with xgb.dask.RabitContext(rabit_args):
|
||||||
local_dtrain = xgb.dask._dmatrix_from_worker_map(**data_ref)
|
local_dtrain = xgb.dask._dmatrix_from_worker_map(**data_ref)
|
||||||
assert local_dtrain.num_row() == kRows / n_workers
|
total = np.array([local_dtrain.num_row()])
|
||||||
|
total = xgb.rabit.allreduce(total, xgb.rabit.Op.SUM)
|
||||||
|
assert total[0] == kRows
|
||||||
|
|
||||||
futures = client.map(
|
futures = client.map(
|
||||||
worker_fn, workers, [m.create_fn_args()] * len(workers),
|
worker_fn, workers, [m.create_fn_args()] * len(workers),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user