Skip to content

Using Coiled for executing prefect flows? #3257

Answered by cicdw
gryBox asked this question in Ideas
Discussion options

You must be logged in to vote

Hey @gryBox - you can tap into a Coiled cluster quite easily using the coiled.Cluster object:

from prefect.engine.executors import DaskExecutor
import coiled

coiled_executor = DaskExecutor(cluster_class=coiled.Cluster, 
                               cluster_kwargs=dict(name="prefect-demo", 
                                                   configuration="my-acct/demo-cluster-config"))
flow_state = flow.run(executor=coiled_executor)

This is probably the most flexible approach, and if you use a name (which I like to do) it will re-use the same cluster if it already exists if you’re running a lot of flows in succession / in parallel

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gryBox
Comment options

@cicdw
Comment options

cicdw Sep 4, 2020
Maintainer

Answer selected by gryBox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants