dan
01/08/2024, 2:14 AMMarvin
01/08/2024, 2:15 AMdan
01/08/2024, 2:23 AMMarvin
01/08/2024, 2:24 AMdan
01/08/2024, 2:26 AMMarvin
01/08/2024, 2:27 AMrun_deployment
to execute a pre-existing deployment as a subflow, the subflows will run according to the infrastructure associated with that particular deployment. This means that if the deployment specifies execution on a Cloud Run instance, each subflow can run on its designated Cloud Run instance, potentially different from the one on which the parent flow is running.
This is in contrast to calling the subflow()
object itself within a parent flow (e.g., using asyncio.gather
), which will cause the subflow to run on the same infrastructure as the parent flow, essentially as a process within that infrastructure.
Therefore, when you want subflows to run independently on different infrastructural components, such as separate Cloud Run instances, you should use deployments with their dedicated infrastructure definitions. Each subflow can be mapped to a different work pool, which in turn can be configured to run on various serverless infrastructures including different Cloud Run instances.
For further insights into parallel execution of subflows, you may refer to the discussion on Prefect's Discourse: How can i run multiple subflows or child flows in parallel.dan
01/08/2024, 2:30 AMMarvin
01/08/2024, 2:31 AMdan
01/08/2024, 2:32 AMMarvin
01/08/2024, 2:32 AMdan
01/08/2024, 2:35 AMMarvin
01/08/2024, 2:35 AM