Principle:SeldonIO Seldon core Pipeline Topology Definition
| Field | Value |
|---|---|
| Principle Name | Pipeline Topology Definition |
| Overview | Declarative specification of directed acyclic graph (DAG) topologies for multi-step ML inference. |
| Domains | MLOps, Data_Flow |
| Related Implementation | SeldonIO_Seldon_core_Seldon_Pipeline_CRD |
| Last Updated | 2026-02-13 00:00 GMT |
Description
Seldon Core 2 Pipelines define inference DAGs using a Pipeline CRD (kind: Pipeline). Each step references a deployed model by name. Data flows between steps via Kafka topics. The tensorMap field handles tensor name remapping between models with different I/O naming conventions.
A pipeline's topology is expressed declaratively in the spec.steps array. Each step has:
- name: The name of a deployed model to invoke at this step.
- inputs: A list of upstream step references whose outputs feed into this step. If omitted, the step receives the pipeline's input directly.
- tensorMap: A mapping from upstream output tensor names to the input tensor names expected by this step's model.
The spec.output section designates which step(s) produce the pipeline's final output. This allows the output to come from any step in the DAG, not necessarily the last one defined.
Theoretical Basis
DAG-based inference pipelines decompose complex predictions into ordered stages. Each node processes input tensors and produces output tensors. Edges represent data dependencies. Kafka provides asynchronous, durable message passing between nodes.
Key theoretical properties of this approach:
- Directed Acyclic Graph (DAG): The topology must be acyclic to prevent infinite loops. The scheduler validates this constraint at pipeline load time.
- Tensor Name Resolution: Models may use different naming conventions for their input/output tensors. The
tensorMapfield acts as an adapter layer, translating between naming conventions without modifying the models themselves. - Implicit vs. Explicit Wiring: When a step lists another step in its
inputs, it receives all output tensors from that step. ThetensorMapselectively renames specific tensors while passing others through unchanged. - Fan-out and Fan-in: Multiple steps can consume the same upstream output (fan-out), and a single step can consume outputs from multiple upstream steps (fan-in), enabling complex graph structures beyond simple chains.
When to Use
Use this principle when composing multiple models into a chained or branching inference graph:
- When two or more models must execute sequentially, with one model's output feeding the next.
- When parallel model execution is needed (fan-out), with results converging at a downstream step (fan-in).
- When models have incompatible tensor naming and
tensorMapremapping is required. - When the pipeline's output should come from a specific intermediate or terminal step.
Structure
A minimal pipeline topology consists of:
- Steps definition: An ordered list of steps, each referencing a model name and optionally specifying inputs and tensor mappings.
- Data flow edges: Implicit (first step gets pipeline input) or explicit (step lists
inputsfrom upstream steps). - Tensor remapping: Optional
tensorMapentries that translate output tensor names from upstream steps to input tensor names expected by the current step. - Output designation: The
spec.output.stepsfield specifying which step(s) produce the pipeline's final response.
Related Pages
- SeldonIO_Seldon_core_Seldon_Pipeline_CRD - implements - Concrete pattern for declaring Pipeline resources as Kubernetes YAML manifests.
- SeldonIO_Seldon_core_Component_Model_Deployment - prerequisite - Models must be deployed before they can be referenced in a pipeline topology.
- SeldonIO_Seldon_core_Pipeline_Conditional_Routing - extends - Advanced routing with triggers, joins, and conditional branching on top of the base topology.
- SeldonIO_Seldon_core_Pipeline_Deployment_Execution - next step - Deploying the defined pipeline topology onto the scheduler.