Thread
#prefect-server
    p

    Paul Gierz

    6 months ago
    Hi all, Is there a way to start a local agent with the LocalDask executor? To clarify: from the CLI Thanks!
    Kevin Kho

    Kevin Kho

    6 months ago
    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

    6 months ago
    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?
    Kevin Kho

    Kevin Kho

    6 months ago
    Are you using Orion or Prefect 1.0?
    p

    Paul Gierz

    6 months ago
    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)
    Kevin Kho

    Kevin Kho

    6 months ago
    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

    6 months ago
    Ah I meant decorator of task, sorry for the missing info. In any case I think this solved my problem! Thanks!!
    Kevin Kho

    Kevin Kho

    6 months ago
    Of course! Executor is on the flow level, not on the task