[dask] Use DMLC_TASK_ID. (#5415)

This commit is contained in:
Jiaming Yuan 2020-03-15 16:47:03 +08:00 committed by GitHub
parent fc88105620
commit 668e432e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,9 @@ class RabitContext:
'''A context controling rabit initialization and finalization.'''
def __init__(self, args):
self.args = args
worker = distributed_get_worker()
self.args.append(
('DMLC_TASK_ID=[xgboost.dask]:' + str(worker.address)).encode())
def __enter__(self):
rabit.init(self.args)