Jason
12/05/2024, 9:50 PMNate
12/05/2024, 10:31 PMprefect cloud login
should do itNate
12/05/2024, 10:32 PMJason
12/06/2024, 6:34 PMNate
12/06/2024, 6:37 PMJason
12/06/2024, 6:43 PMJason
12/06/2024, 6:46 PMNate
12/06/2024, 6:46 PMprefect.flow
is just to encapsulate my work and then deploy that thing as the entrypoint using normal prefect
this is the mental model I would recommend bc its resilient in the sense that if next week you decided to switch from controlflow to pydantic-ai
you'd still be doing the same thing
@prefect.flow
def do_ai_stuff():
# a bunch of ai stuff
do_ai_stuff.deploy()
Jason
12/06/2024, 6:46 PMJason
12/06/2024, 6:46 PMJason
12/06/2024, 6:47 PMJason
12/06/2024, 6:47 PMJason
12/06/2024, 6:47 PMJason
12/06/2024, 6:50 PMJason
12/06/2024, 6:50 PMNate
12/06/2024, 6:52 PMso my thought was naturally to sign up for cloud and set the PREFECT_API_URL so the CF flows can be remotely managedmakes sense, not going to discourage you from cloud 🙂 but i'd also mention you can start an open source server
docker run -p 4200:4200 -d --rm prefecthq/prefect:3-latest -- prefect server start --host 0.0.0.0
or more simply, just prefect server start
in another terminal
then wherever you run controlflow you can set PREFECT_API_URL=<http://localhost:4200/api>
or instead if you go cloud route you can do prefect cloud login
the tension here is now we have 2 workflow solutions to contend withthis is a common tension. I would just try prefect in greenfield / low stakes situations and see what you think. i will say that people often say prefect is easy to incrementally adopt, so that could ease some of the tension
Jason
12/06/2024, 6:53 PM