https://prefect.io logo
Title
p

Paul Gierz

03/07/2022, 5:22 PM
Hi all, Is there a way to start a local agent with the LocalDask executor? To clarify: from the CLI Thanks!
k

Kevin Kho

03/07/2022, 5:23 PM
Hi @Paul Gierz! The Executor is attached to the Flow, not the agent. The agent deploys the Flow, which then sets up the executor.
p

Paul Gierz

03/07/2022, 5:28 PM
Ah ok, so when I define them (I'm using the decorator method) I just add one line after the with closes to swap it out?
k

Kevin Kho

03/07/2022, 5:29 PM
Are you using Orion or Prefect 1.0?
p

Paul Gierz

03/07/2022, 5:30 PM
Prefect 1.0, is Orion ready to be linked up to the server yet? If so that would be great! But I did not find any info about that in the docs
If I install the Orion preview, the register sub command wasn't there (at least as of this morning Europe time)
k

Kevin Kho

03/07/2022, 5:36 PM
I was asking cuz you said decorator method and the
flow
is a decorator in Orion but context manager in Prefect 1. Anyway, it is just
with Flow(..) as flow:
    ...
flow.executor = DaskExecutor(..)
or
with Flow(..., executor=DaskExecutor()):
    ...
and you can find more info here There is no register for Orion because Deployments is the replacement which is not 1:1 with registrations of Flows. You can find more info here . But yes, still not production ready
p

Paul Gierz

03/07/2022, 5:55 PM
Ah I meant decorator of task, sorry for the missing info. In any case I think this solved my problem! Thanks!!
k

Kevin Kho

03/07/2022, 5:57 PM
Of course! Executor is on the flow level, not on the task