Implementation:SeldonIO Seldon core Seldon Model CRD Explainer Deploy
Appearance
| Field | Value |
|---|---|
| Type | Pattern Doc |
| Overview | Concrete pattern for declaring and deploying explainer models in Seldon Core 2. |
| Domains | MLOps, Explainability, Kubernetes |
| Workflow | Model_Explainability |
| Related Principle | SeldonIO_Seldon_core_Explainer_Model_Deployment |
| Source | samples/models/income-explainer.yaml:L1-9, samples/models/moviesentiment-explainer.yaml:L1-9, samples/explainers/explainers.yaml:L1-26
|
| Last Updated | 2026-02-13 00:00 GMT |
Code Reference
Income Explainer (AnchorTabular with modelRef)
Source: samples/models/income-explainer.yaml:L1-9
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: income-explainer
spec:
storageUri: "gs://seldon-models/scv2/samples/mlserver_1.6.0/income-sklearn/anchor-explainer"
explainer:
type: anchor_tabular
modelRef: income
Movie Sentiment Explainer (AnchorText with modelRef)
Source: samples/models/moviesentiment-explainer.yaml:L1-9
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: sentiment-explainer
spec:
storageUri: "gs://seldon-models/scv2/samples/mlserver_1.6.0/moviesentiment/anchor-explainer"
explainer:
type: anchor_text
modelRef: sentiment
Key Parameters
| Parameter | Description | Values |
|---|---|---|
spec.explainer.type |
Alibi explanation algorithm | anchor_tabular, anchor_text, kernel_shap
|
spec.explainer.modelRef |
Name of the base model to explain | e.g., income, sentiment
|
spec.explainer.pipelineRef |
Name of the pipeline to explain (alternative to modelRef) | e.g., sentiment-explain
|
spec.storageUri |
URI to the serialized explainer artifact | e.g., gs://seldon-models/scv2/samples/mlserver_1.6.0/income-sklearn/anchor-explainer
|
I/O Contract
Inputs
- Explainer CRD YAML: A Model CRD manifest with the
spec.explainersection specifying the algorithm type and base model reference - Base model deployed and ready: The model referenced by
modelRefmust be in ModelAvailable state
Outputs
- Explainer model loaded on MLServer: The explainer is served by the Alibi-Explain runtime, linked to the base model via
modelReffor black-box inference during explanation generation
External Dependencies
- Kubernetes API
- MLServer Alibi-Explain runtime
- Seldon scheduler
seldonCLI
Usage Examples
Deploying the Income Explainer
# Ensure the base model is loaded first
seldon model load -f samples/models/income.yaml
seldon model status income -w ModelAvailable
# Deploy the explainer
seldon model load -f samples/models/income-explainer.yaml
seldon model status income-explainer -w ModelAvailable
Deploying the Sentiment Explainer
# Ensure the base model is loaded first
seldon model load -f samples/models/moviesentiment.yaml
seldon model status sentiment -w ModelAvailable
# Deploy the explainer
seldon model load -f samples/models/moviesentiment-explainer.yaml
seldon model status sentiment-explainer -w ModelAvailable
Explainer CRD Structure
The explainer CRD extends the standard Model CRD with the spec.explainer section:
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: <explainer-name>
spec:
storageUri: "<uri-to-explainer-artifact>"
explainer:
type: <anchor_tabular|anchor_text|kernel_shap>
modelRef: <base-model-name> # OR
pipelineRef: <pipeline-name> # for pipeline-level explanation
Knowledge Sources
- Repo: SeldonIO/seldon-core
- Doc: Seldon Core 2 Documentation
Related Pages
- SeldonIO_Seldon_core_Explainer_Model_Deployment - parent principle - Declaring and deploying explainer models.
- SeldonIO_Seldon_core_Seldon_Model_Load_For_Explainer - prerequisite - Loading the base model before deploying the explainer.
- SeldonIO_Seldon_core_Seldon_Model_Status_Explainer - next step - Verifying the explainer is ready.
- SeldonIO_Seldon_core_Seldon_Pipeline_CRD_Explainer - alternative - Using pipelineRef for pipeline-level explanation.
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment