




Note: There are several changes to deployment in Prefect 2.3.1 since 2.0b8:
DeploymentSpec
in 2.0b8 now becomesDeployment
.work_queue_name
is used instead oftags
to submit the deployment to the a specific work queue.- You don't need to create a work queue before using the work queue. A work queue will be created if it doesn't exist.
flow_location
is replaced withflow
flow_runner
andflow_storage
are no longer supported
from prefect.deployments import Deployment
from prefect.orion.schemas.schedules import CronSchedule
from score import ride_duration_prediction
deployment = Deployment.build_from_flow(
flow=ride_duration_prediction,
name="ride_duration_prediction",
parameters={
"taxi_type": "green",
"run_id": "e1efc53e9bd149078b0c12aeaa6365df",
},
schedule=CronSchedule(cron="0 3 2 * *"),
work_queue_name="ml",
)
deployment.apply()

COMING SOON
More information here: TBD
Did you take notes? Add them here: