<@ULVA73B9P> is this correct? :brain: Prefect Ter...
# ask-marvin
o
@Marvin is this correct? 🧠 Prefect Terminology Refresher Flow A workflow in Prefect. It defines the logic and structure of your work as Python code. Deployment An executable configuration of a flow. It includes parameters, schedules, and infrastructure settings. ➤ A deployment is targeted to a Work Pool. Run The execution of a deployed flow. Each run is tracked and can be monitored or retried. Work Pool A configuration layer that manages infrastructure and assigns work to workers. ➤ A work pool can host multiple deployments. Worker A runtime agent that polls a work pool and executes flow runs. ➤ Can be ephemeral (short-lived, e.g., containers) or non-ephemeral (long-lived, e.g., VMs).
m
âś… thought for 161.5 seconds
Almost! This is very close. A few important tweaks for Prefect 3.x: - Flow — Your definition is good. It’s a Python function decorated with
@flow
. It can be run directly (local) or via a deployment (remote/scheduled). - Docs: Flows - Deployment — Mostly right. It’s the server-side “when/where/how” for running a flow: code location, parameters, schedule/triggers, and infrastructure/work pool. - Nuance: Deployments created with
flow.deploy(...)
target a work pool via
work_pool_name
. Deployments created with
flow.serve(...)
run locally and do not require a work pool. - Docs: Deployments - Run — Needs a small correction. A flow run is an execution of a flow, with or without a deployment. Local, ad-hoc runs are tracked in Prefect too; deployments enable remote execution and scheduling. - Docs: Flows and Deployments - Work Pool — Directionally right. It’s a configuration/queue that connects orchestration to execution. - Nuance: There are different types: - Managed and Push work pools do not require workers (Prefect or the provider spins up ephemeral compute). - Worker-based (pull) work pools do require workers that poll and execute work. - Multiple deployments can target the same work pool. - Docs: Work pools - Worker — Good, with one caveat. A worker is a lightweight, long-running process that polls a worker-based (pull) work pool and submits/executes flow runs. - Nuance: Workers are only needed for worker-based pools. “Ephemeral vs non-ephemeral” typically refers to the infrastructure used to run each flow (e.g., a short-lived container per run) rather than the worker process itself. The worker can run on a VM, container, or anywhere you like. - Docs: Work pools and workers If you want, I can rewrite your refresher with these nuances baked in.