Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:SeldonIO Seldon core Explainer Pipeline Integration

From Leeroopedia
Field Value
Overview Integrating explainer models into Seldon pipelines using custom transform steps for input/output adaptation.
Domains Explainability, Data_Flow
Workflow Model_Explainability
Related Implementation SeldonIO_Seldon_core_Seldon_Pipeline_CRD_Explainer
Last Updated 2026-02-13 00:00 GMT

Description

When an explainer needs to work with a pipeline (rather than a single model), custom transform models adapt data between the pipeline format and the explainer's expected format. The explainer uses pipelineRef instead of modelRef to reference the pipeline for black-box inference. Transform models extend MLServer's MLModel class to reshape tensors.

The key challenge with pipeline-level explanation is format mismatch:

  • The explainer expects inputs and outputs in a specific format (e.g., raw text in, class label out).
  • The pipeline may have intermediate transformations that change tensor shapes, names, or data types.
  • Custom transform models bridge this gap by reshaping the pipeline's output to match what the explainer expects.

The pipeline integration pattern involves:

  1. Deploy the base pipeline: The inference pipeline with all its steps (e.g., speech-to-text, then sentiment classification).
  2. Create output transform models: Custom MLServer models that reshape the pipeline output to match the explainer's expected format.
  3. Deploy the explanation pipeline: A new pipeline that wraps the base pipeline's output through the transform model.
  4. Deploy the explainer with pipelineRef: The explainer references the explanation pipeline for its black-box queries.

Theoretical Basis

Pipeline-level explanation requires adapting the explanation interface to work with multi-step inference graphs. Transform models act as adapters in the adapter pattern, converting between the explainer's expected input format and the pipeline's actual format. The pipelineRef mechanism routes the explainer's black-box queries through the full pipeline.

This design preserves the model-agnostic nature of the explanation algorithms while supporting complex inference topologies. The explainer still treats the pipeline as a black box; it only needs a consistent input/output interface, which the transform models provide.

The tensorMap field in pipeline steps enables tensor renaming, mapping the pipeline's input tensor name to the transform model's expected input name without additional code.

Usage

When adding explainability to pipeline-based inference (e.g., speech-to-sentiment). This pattern is necessary whenever the base inference involves multiple models in a pipeline, and the explainer cannot directly reference a single model's prediction function.

Knowledge Sources

Related Pages

Implementation:SeldonIO_Seldon_core_Seldon_Pipeline_CRD_Explainer

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment