I’d like to query for a task’s status in a Dask cluster by retrieving a percentage completed beyond the visual progress bar or dashboard. For example, I’m submitting this task below:
from dask.distributed import Client
def my_task(x):
import time
time.sleep(5)
return x ** 2
client = Client()
future = client.submit(my_task, 10, key="my_task_0")
I can get the status which is returned as a category such as “pending”, “running”, “finished.”: print(future.status)
I know this progress bar can visually print the progress of the task:
from dask.distributed import progress
progress(future)
How can I retrieve the percentage completed from that progress bar as numbers?