[dask] Add scheduler address to dask config. (#7581)

- Add user configuration.
- Bring back to the logic of using scheduler address from dask.  This was removed when we were trying to support GKE, now we bring it back and let xgboost try it if direct guess or host IP from user config failed.
This commit is contained in:
Jiaming Yuan
2022-01-22 01:56:32 +08:00
committed by GitHub
parent 5ddd4a9d06
commit ef4dae4c0e
6 changed files with 136 additions and 24 deletions

View File

@@ -28,7 +28,7 @@ def run_rabit_ops(client, n_workers):
from xgboost import rabit
workers = _get_client_workers(client)
rabit_args = client.sync(_get_rabit_args, len(workers), client)
rabit_args = client.sync(_get_rabit_args, len(workers), None, client)
assert not rabit.is_distributed()
n_workers_from_dask = len(workers)
assert n_workers == n_workers_from_dask