<@ULVA73B9P> - in prefect v1 I could simply do `pr...
# ask-marvin
k
@Marvin - in prefect v1 I could simply do
prefect run -p my_flow.py
to run a flow locally. How can I do that in prefect v3?
m
In Prefect 3.x, the approach to running flows has changed from Prefect 1.x. You can no longer use the simple command
prefect run -p my_flow.py
. Instead, the process involves creating a "work pool", which is the main interface for both local and remote execution. To run a flow locally in Prefect 3.x, you should follow these steps: 1. Create a Process Work Pool: This allows you to run flows as local subprocesses. The mechanics are similar to the command line execution, but now you have more control and observability. 2. Verify the Work Pool: Make sure the work pool you created is ready to handle tasks. 3. Start a Worker: This is needed to execute tasks from your work pool. For more information on setting this up, you can visit the Prefect 3.0 Quickstart Guide. In Prefect 3.x, they've taken a step forward, aiming for more robust performance while ensuring that the entire process remains user-friendly, even if it feels a bit more "sophisticated" at first glance. Just a little more drama for a much smoother operation!