Explainers¶
Explainers are Model resources with some extra settings. They allow a range of explainers from the Alibi-Explain library to be run on MLServer.
An example Anchors explainer definitions is shown below.
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
The key additions are:
type
: This must be one of the supported Alibi Explainer types supported by the Alibi Explain runtime in MLServer.modelRef
: The model name for black box explainers.pipelineRef
: The pipeline name for black box explainers.
Only one of modelRef and pipelineRef is allowed.
Pipeline Explanations¶
Blackbox explainers can explain a Pipeline as well as a model. An example from the Huggingface sentiment demo is show below.
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
name: sentiment-explainer
spec:
storageUri: "gs://seldon-models/scv2/examples/huggingface/speech-sentiment/explainer"
explainer:
type: anchor_text
pipelineRef: sentiment-explain