Hi. how does one deploy to prefect cloud a flow. M...
# ask-community
w
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:
a
Did you call
flow.register( ... )
?
upvote 1
🙏 1
w
@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:
?
a
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).
w
@Amanda Wee thanks. it sounds like i need a combo of
client.create_flow_run()
and
flow.run_agent()