Ahmed Rafik
01/13/2022, 12:39 PMimport pandas as pd
from prefect.deployments import DeploymentSpec
from prefect.orion.schemas.schedules import IntervalSchedule
from pred.predict import predict_flow
DeploymentSpec(
flow=predict_flow,
name="Prediction"
)
I create the deployment without a problem and I can see it in the UI. I also can run it successfully from CLI using:
prefect deployment execute 'Prediction flow/Prediction'
But When I try to run it using the “Quick Run” in the UI, a “Scheduled” task is created and is never run. I can see it in the lateness graph. one task didn’t run for over an hour during my lunch break. Same happens if I add a schedule to the deployment. any ideas why that happens or how to fix it?Anna Geller
pip install -U "prefect>=2.0a6"
) and try e.g. this tutorial? It shows how deployment can be run on an agent. There is also this brand new concept documentation of Deployments that can help understand how this works.Anna Geller
prefect orion start
)Ahmed Rafik
01/13/2022, 2:05 PMAhmed Rafik
01/14/2022, 10:21 AMScheduled flow runs will not be created unless the scheduler is running. Scheduled flow runs will not run unless an agent is running. The scheduler and agent are included in the services started by "prefect orion start".
I have a couple of questions here:
• Does that mean a scheduled deployment will not work at all if the deployment was created before running other stateful Orion services?
• Is there a way to schedule and run a deployment later after its creation if prefect orion start
was not run first?
• What if the Orion services need to restart for some reason, would that mean the scheduled tasks are interrupted and the scheduled flow needs to be updated/re-created?
ThanksAnna Geller
Ahmed Rafik
01/14/2022, 11:05 AMprefect orion start
The reason I’m asking is that when I try to create a deployment without running prefect orion start
first, The flow runs are still created but they never run as you see from the appended screenshot. The only way I got them to work is by making sure prefect orion start
runs first before creating any deployment.Anna Geller
Ahmed Rafik
01/14/2022, 11:49 AMAnna Geller
MarkLateRuns
service places such flow runs (not picked up by an agent at the time they were schedule to run) in a Late
state so that they can be picked up for execution later.Ahmed Rafik
01/14/2022, 12:28 PMMarkLateRuns
doesn’t run efficiently as I expect then. I also can’t see a way in documentation on how can we make sure that such service is up and running as expected, or see the flows is detected. I’m not sure I fully understand everything yet but I guess I have enough information to keep me going. Thanks!