Hi Guys! I have two questions. Is there a full exa...
# best-practices
z
Hi Guys! I have two questions. Is there a full example of using dask‘s worker resources and prefect flows? If some such examples are provided to me, I can write some best practices. (Except for AWS etc. Because I don't know how to use it) Another question is, for dask clusters, can I use prefect to implement dynamic task submission while also ensuring task dependencies? And There seems to be unpredictable task loss when I try to use multiple flows with the same dask client. This may be my problem. By the way, the doc of Prefect 2 is maybe not as clear as Prefect 1. and there are so many concepts in Prefect 2 that I couldn't figure out quickly what I needed to understand. Hope to get help from everyone.
r
Hey Zheyuan!! Here are a couple articles that have a sample Dask implementation as well as links to the 2.0 Prefect Dask collection and a link to the 2.0 prefect DaskTaskRunner documentation. Using the DaskTaskRunner, you can specify a specific Dask cluster address to point to. https://discourse.prefect.io/t/prefect-collection-for-interacting-with-dask-in-your-flows-prefect-dask/1166 https://prefecthq.github.io/prefect-dask/ Also, here is a discourse article with scaling out 2.0 flows with Dask on an ECS Cluster (You said you are not familiar with AWS but figured I would provide it anyways as there are some good tips in those articles). https://discourse.prefect.io/t/how-to-scale-out-prefect-2-0-flows-with-dask-on-aws-ecs-fargate-using-fargatecluster-from-dask-cloudprovider/1090
z
Thanks, Rob. I read the latest documentation on dask distribution and I think I can set up a dask cluster via the link you sent me. But I didn't understand the documentation in the last link you sent me (Source code for dask_cloudprovider.aws.ecs:*How to scale out Prefect 2.0 flows with Dask on AWS ECS Fargate using FargateCluster from dask_cloudprovider* ). Can you explain what this document does? And how should I read it?