7

Is there a worker ID, or some unique identifier that a dask worker can access programmatically from within a task?

MRocklin
  • 55,641
  • 23
  • 163
  • 235

1 Answers1

9

Yes, you can use the get_worker function to access the worker that you're on currently, and then grab the id attribute.

from dask.distributed import get_worker
get_worker().id
MRocklin
  • 55,641
  • 23
  • 163
  • 235