[dask] Supoort running on GKE. (#6343)

* Avoid accessing `scheduler_info()['workers']`.
* Avoid calling `client.gather` inside task.
* Avoid using `client.scheduler_address`.
This commit is contained in:
Jiaming Yuan
2020-11-11 18:04:34 +08:00
committed by GitHub
parent 8a17610666
commit 6e12c2a6f8
4 changed files with 150 additions and 128 deletions

View File

@@ -15,6 +15,7 @@ if sys.platform.startswith("win"):
sys.path.append("tests/python")
from test_with_dask import run_empty_dmatrix_reg # noqa
from test_with_dask import run_empty_dmatrix_cls # noqa
from test_with_dask import _get_client_workers # noqa
from test_with_dask import generate_array # noqa
import testing as tm # noqa
@@ -217,7 +218,7 @@ class TestDistributedGPU:
return subprocess.run([exe, test], env=env, stdout=subprocess.PIPE)
with Client(local_cuda_cluster) as client:
workers = list(dxgb._get_client_workers(client).keys())
workers = list(_get_client_workers(client).keys())
rabit_args = client.sync(dxgb._get_rabit_args, workers, client)
futures = client.map(runit,
workers,