Hi @Michal Mucha, I haven’t used it myself but I think the easier way to do it would be to do something like this:
Copy code
from dask.distributed import worker_client
@task
def calling_compute_in_a_task(filepath):
with performance_report(filename="dask-report.html"):
with worker_client():
df = dd.read_csv(filepath)
return df.describe().compute()
Kevin Kho
06/02/2021, 4:02 PM
This is if you’re using Dask commands with Prefect. If you’re not using Dask commands, and instead using Dask through Prefect, then I guess you might need to inject it there.
m
Michal Mucha
06/02/2021, 4:02 PM
Thanks Kevin. Yeah I wanted to get the profile flamegraph (that Dask makes across a cluster) on a Dask cluster spawned to execute a Prefect flow. For the entire flow
Michal Mucha
06/02/2021, 4:03 PM
rather than to profile a Dask workload where the compute is called in a task
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.