It seems that the most relevant section of the Pre...
# marvin-in-the-wild
m
It seems that the most relevant section of the Prefect documentation that briefly touches on why tasks must be in a flow is about using subflows or tasks within workflows. Unfortunately, it does not explicitly state why every task must be within a flow, but it does imply that tasks are fundamental units of work within a workflow. Here is the link to the section: - Subflows or tasks? One way to interpret this is that tasks are designed to be the atomic units of execution within Prefect, and flows orchestrate these tasks, determining the order of execution and managing dependencies. Tasks, therefore, are not standalone and must be part of a flow to have context and orchestration in the workflow management that Prefect provides. You might not find a direct quote stating this explicitly, but the entire architecture and usage of Prefect revolve around this concept. Tasks are defined to be run as part of flows where execution order, data passing, and state management are controlled. Additionally, this discussion is embedded in different parts of the Prefect documentation, such as the articulation of flows and tasks: - Specifying Upstream Dependencies Guide To enrich your understanding, you might want to refer to the overview of Prefect's core concepts, which can give insights into how the system is designed: - Prefect Core Concepts If you need further specifics or examples, I'd recommend exploring other sections of the Prefect documentation, or asking the community for their interpretations or explanations of this design choice.