Thread
#prefect-community
    Warsame Bashir

    Warsame Bashir

    1 year ago
    Hi. how does one deploy to prefect cloud a flow. My agent is running and I've tried
    flow.run_config = LocalRun()
    and
    with Flow("ETL", run_config=LocalRun(labels=["dev", "ml"])) as flow:
    Amanda Wee

    Amanda Wee

    1 year ago
    Did you call
    flow.register( ... )
    ?
    Warsame Bashir

    Warsame Bashir

    1 year ago
    @Amanda Wee i've updated my codebase and added
    flow.register(project_name="xxx")
    and see the flow 'appear' in the cloud UI. I'm unable to see a run log even after adding these commands
    flow.run_config = LocalRun()
    or
    with Flow("ETL", run_config=LocalRun(labels=["dev", "ml"])) as flow:
    ?
    Amanda Wee

    Amanda Wee

    1 year ago
    Ah. Setting the run_config and using a with statement to define the flow doesn't run it. After registering, you can run it from the UI, or in code (
    StartFlowRun
    or something like that; never used it myself so I don't remember offhand).
    Warsame Bashir

    Warsame Bashir

    1 year ago
    @Amanda Wee thanks. it sounds like i need a combo of
    client.create_flow_run()
    and
    flow.run_agent()