<@ULVA73B9P> what all the cluster_kwargs keys in ...
# ask-marvin
h
@Marvin what all the cluster_kwargs keys in DaskTaskRunner( cluster_kwargs={"n_workers": 4, "threads_per_worker": 2} in prefect 3
m
In Prefect 3, when using the
DaskTaskRunner
, the
cluster_kwargs
parameter allows you to pass a dictionary of keyword arguments that configure the Dask cluster according to your needs. Here are some potential keys you might use in `cluster_kwargs`: 1. n_workers: Specify the number of worker processes to use. For example, setting
{"n_workers": 4}
will use 4 worker processes. 2. threads_per_worker: Set the number of threads for each worker. For instance,
{"threads_per_worker": 2}
will assign 2 threads per worker process. 3. image: When using a cluster manager like
dask_cloudprovider
, you can specify the Docker image for workers. For example,
{"image": "my-prefect-image"}
. The
DaskTaskRunner
allows you to create temporary clusters using any of Dask's cluster managers, which can be specified by passing a
cluster_class
. This configuration is particularly useful for tailoring specific requirements for each flow run or for using different computation resources like AWS Fargate or others that Dask supports. For more detailed configuration options, you can refer to the Prefect 3 Dask integration documentation.