<@ULVA73B9P> Is there a way to load 10,000 or more...
# ask-marvin
m
@Marvin Is there a way to load 10,000 or more subflows in the dashboard in the parent flow?
m
thought for 136.0 seconds
Short answer: not well in the graph view. In Prefect 3.x: - The flow run graph has a server-side max node limit of 10,000 - That count includes task runs + subflow runs - If a parent flow exceeds that, the graph endpoint can fail rather than render everything So if you mean "can I open a parent flow and visually load 10,000+ subflows in the graph/dashboard?"generally no, not reliably in the graph view. What does work better: - The Subflows tab is paginated - You can browse large numbers of subflows there more safely than in the graph A few practical recommendations: 1. If you need 10k+ child executions, prefer deployments over direct subflow nesting - Use
run_deployment(...)
for child runs instead of creating a huge parent/subflow graph - This scales much better operationally 2. Use batching/chunking - Instead of 10,000 direct subflows, group work into batches 3. Use tasks for fine-grained parallelism - If these “subflows” are really just many parallel units of work, tasks are often a better fit than thousands of nested subflows There is also a configurable limit: -
PREFECT_API_MAX_FLOW_RUN_GRAPH_NODES
- raising it is possible, but I wouldn’t recommend it as the main solution because the UI/graph still becomes heavy Relevant docs: - Flows concept docs - Running flows / deployments docs - `run_deployment` API docs If you want, I can help you redesign the pattern you’re using for those 10,000 subflows and suggest the most scalable Prefect approach.
m
@Marvin I have 100k subflows that are batched in 1k concurrent subflows. Once one subflow completes another get's scheduled. Obviously these are deployments such that each subflow is on a different node containing a gpu. What do you means separate deployments? Are you saying there's no way to view this graph or dag?
m
thought for 15.8 seconds
Yes — for 100k subflows, you should assume there is no practical way to visualize the full DAG/graph in the Prefect UI. A few distinctions: - If your parent flow is creating/owning all of those child flow runs as subflows, the UI graph is not meant to render that whole structure at that scale - Even if they’re batched 1k at a time, the parent’s overall lineage is still enormous - The Subflows list can still be more usable than the graph, but the full DAG visualization is not something Prefect currently supports at that size When I said “separate deployments”, I meant: - Define the GPU worker flow as its own deployment - Launch each child run via
run_deployment(...)
- Treat those child runs as operationally independent units, even if a coordinator flow triggers them That helps with execution/scaling, but it does not magically make a 100k-node graph view feasible. It mostly means: - better scaling - better isolation - less dependence on one giant parent flow visualization So to your direct question: No — there is not currently a supported way to view a full 100k-subflow DAG/graph in the Prefect dashboard. What you can do instead: - Use the parent flow as a coordinator only - Track progress via: - deployment run counts - states (
Running
,
Completed
,
Failed
, etc.) - tags / naming conventions / parameters - custom artifacts or external metadata store - Inspect child runs through filtered flow run views instead of a single graph For example, common patterns are: - Give every child run a batch ID / job ID - Query/filter flow runs by that identifier - Publish aggregate progress from the parent as an artifact - Store full DAG/job metadata in your own DB if you need lineage at 100k scale If the DAG itself is important, Prefect is usually better used here as the orchestrator, while the detailed job graph lives elsewhere. If helpful, I can sketch a good architecture for: - 100k GPU jobs with 1k concurrency - how to preserve observability - how to model lineage/progress without relying on the Prefect graph UI