The question boils down to two key questions actua...
# prefect-community
The question boils down to two key questions actually: 1. Is interflow dependencies supported? 2. If it is supported, what are the tradeoffs between the two approaches? what is the standard practice?
Yes, interflow dependencies work. Here's a quick example that shows that dependencies between subflows:
Copy code
import asyncio
from prefect import task, flow

async def task1():

async def task2():

@flow(name="subflow 1")
async def sub_flow_one():
    print("in subflow")
    await task1()
    return "returned from subflow 1"

@flow(name="subflow 2")
async def sub_flow_two(input):
    print("in subflow")
    await task2()
    return "returned from subflow 2"

@flow(name="main flow")
async def main_flow():
    sub_one_result = await sub_flow_one()
    sub_two_result = await sub_flow_two(sub_one_result)

if __name__ == '__main__':
As the docs mention, one of the advantages of subflows is that you can use different task runners for each flow. So, for example, you might use a Dask task runner that connects to a CPU-only Dask cluster for your preprocessing subflow, but you might then want to use a different Dask cluster running on machines with GPUs for you training subflow.
Thank you Ryan, amazing to have you around