Composable Pipelines
Composable Pipelines
Section titled “Composable Pipelines”Reusable robot subsystems often need two surfaces: a live graph that downstream users can inspect and modify, and a single-stage wrapper that fits inside a larger graph.
1. Export a live pipeline factory
Section titled “1. Export a live pipeline factory”Use this when downstream code wants to inspect, replace, or rewire internal Flows.
2. Export a Pipeline-as-Flow factory
Section titled “2. Export a Pipeline-as-Flow factory”Use this when downstream code wants to treat the whole sub-pipeline as one reusable stage.
Important boundary:
- direct
flow.step(...)on this wrapper is local/in-process - the wrapper itself is not the backend artifact
- when nested inside a larger
Pipeline, Retriever lowers the wrapper into flat IR so multiprocessing and dora backends can execute the inner nodes normally
Surface grammar
Section titled “Surface grammar”Explicit pipeline surfaces use:
Resolution order:
- exact flow id / node id
- unique flow class name fallback
Recommendation:
- name internal handles with
.named("camera"),.named("frontend"),.named("planner") - use stable ids in
input_ports=[...]andoutput_ports=[...]
Then publish the stable surface:
Visualizing composition
Section titled “Visualizing composition”Pipeline.visualize(...) and IR.visualize(...) preserve wrapped-pipeline context for build_pipeline_flow(...) stages. In HTML and ASCII views, a nested pipeline stage is rendered as a grouped pipeline box around the lowered inner Flows, with:
- the wrapped pipeline name
- surfaced input/output bindings
- a summary of the internal Flow graph
Run the core composition demo:
For applied composition examples, continue to GoldenRetriever.
