From 54754f29dd954c699d6ac8beae012eaa7870e699 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Sun, 28 Apr 2024 18:05:15 +0800 Subject: [PATCH] [pyspark] Sort workers by task ID. (#10220) --- python-package/xgboost/spark/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/xgboost/spark/utils.py b/python-package/xgboost/spark/utils.py index 7dbe290ae..1403596c0 100644 --- a/python-package/xgboost/spark/utils.py +++ b/python-package/xgboost/spark/utils.py @@ -55,7 +55,7 @@ def _start_tracker(context: BarrierTaskContext, n_workers: int) -> Dict[str, Any """Start Rabit tracker with n_workers""" env: Dict[str, Any] = {"DMLC_NUM_WORKER": n_workers} host = _get_host_ip(context) - rabit_context = RabitTracker(host_ip=host, n_workers=n_workers) + rabit_context = RabitTracker(host_ip=host, n_workers=n_workers, sortby="task") env.update(rabit_context.worker_envs()) rabit_context.start(n_workers) thread = Thread(target=rabit_context.join)