From e219aa8ce881913c81ca6b3ffb575f2c05a771fe Mon Sep 17 00:00:00 2001 From: Matthew Rocklin Date: Tue, 6 Dec 2022 16:38:24 -0600 Subject: [PATCH 1/2] Properly await async method client.wait_for_workers --- python-package/xgboost/dask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/xgboost/dask.py b/python-package/xgboost/dask.py index 6ebd57db3cf7..01a2bf2979db 100644 --- a/python-package/xgboost/dask.py +++ b/python-package/xgboost/dask.py @@ -853,7 +853,7 @@ async def _get_rabit_args( sched_addr = None # make sure all workers are online so that we can obtain reliable scheduler_info - client.wait_for_workers(n_workers) + await client.wait_for_workers(n_workers) env = await client.run_on_scheduler( _start_tracker, n_workers, sched_addr, user_addr ) From bc8e135d2b629d5479420431f4e254264df13675 Mon Sep 17 00:00:00 2001 From: jiamingy Date: Wed, 7 Dec 2022 18:44:27 +0800 Subject: [PATCH 2/2] ignore mypy error. --- python-package/xgboost/dask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/xgboost/dask.py b/python-package/xgboost/dask.py index 01a2bf2979db..cac867da0db9 100644 --- a/python-package/xgboost/dask.py +++ b/python-package/xgboost/dask.py @@ -853,7 +853,7 @@ async def _get_rabit_args( sched_addr = None # make sure all workers are online so that we can obtain reliable scheduler_info - await client.wait_for_workers(n_workers) + await client.wait_for_workers(n_workers) # type: ignore env = await client.run_on_scheduler( _start_tracker, n_workers, sched_addr, user_addr )