Is there a worker ID, or some unique identifier that a dask worker can access programmatically from within a task?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With