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.

Implementation:SeldonIO Seldon core Seldon Pipeline Infer Monitoring

From Leeroopedia
Revision as of 13:51, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/SeldonIO_Seldon_core_Seldon_Pipeline_Infer_Monitoring.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Property Value
Implementation Name Seldon Pipeline Infer Monitoring
Type Wrapper Doc
Overview Concrete tools for sending inference requests and monitoring production traffic in Seldon Core 2 pipelines
Domains MLOps, Monitoring
Implements Principle SeldonIO_Seldon_core_Production_Traffic_Monitoring
Source samples/examples/income_classifier/infer.md:L28-41, docs-gb/cli/seldon_pipeline_infer.md:L1-35
External Dependencies seldon CLI, requests, V2 protocol, Prometheus
Knowledge Sources Repo (https://github.com/SeldonIO/seldon-core), Doc (https://docs.seldon.io/projects/seldon-core/en/v2/)
Last Updated 2026-02-13 00:00 GMT

Code Reference

CLI Inference

seldon pipeline infer income-production \
  '{"inputs": [{"name": "predict", "datatype": "FP32", "shape": [1, 12], "data": [[39,7,1,1,1,1,4,1,2174,0,40,9]]}]}'

Python Requests Inference

import requests

payload = {
    "inputs": [
        {
            "name": "predict",
            "datatype": "FP32",
            "shape": [1, 12],
            "data": [[39, 7, 1, 1, 1, 1, 4, 1, 2174, 0, 40, 9]]
        }
    ]
}

response = requests.post(
    "http://0.0.0.0:9000/v2/models/income-production/infer",
    headers={"seldon-model": "income-production.pipeline"},
    json=payload
)

print(response.json())

Expected Response Structure

{
  "model_name": "income-production",
  "outputs": [
    {
      "name": "predict",
      "datatype": "INT64",
      "shape": [1, 1],
      "data": [0]
    },
    {
      "name": "is_outlier",
      "datatype": "INT64",
      "shape": [1, 1],
      "data": [0]
    }
  ]
}

Key Parameters

Parameter Description Example Value
pipelineName Name of the monitoring pipeline income-production
inputs[].name Input tensor name "predict"
inputs[].datatype Data type for features "FP32"
inputs[].shape Tensor shape [batch, features] [1, 12]
inputs[].data Feature values (12 Adult Census features) 39,7,1,1,1,1,4,1,2174,0,40,9
seldon-model header Pipeline routing header (Python requests) "income-production.pipeline"
URL endpoint V2 inference endpoint http://0.0.0.0:9000/v2/models/{pipeline}/infer

Feature Mapping (12 Adult Census Features)

Index Feature Example Value Type
0 Age 39 Continuous
1 Workclass 7 Categorical
2 Education 1 Categorical
3 Marital Status 1 Categorical
4 Occupation 1 Categorical
5 Relationship 1 Categorical
6 Race 4 Categorical
7 Sex 1 Categorical
8 Capital Gain 2174 Continuous
9 Capital Loss 0 Continuous
10 Hours per Week 40 Continuous
11 Country 9 Categorical

I/O Contract

Inputs

Input Type Description
V2 JSON payload JSON Inference request with FP32 tabular features (12 dimensions)
Pipeline name String Target monitoring pipeline (income-production)
Seldon-model header HTTP header Pipeline routing (Python requests only)

Outputs

Output Type Description
Predictions INT64 tensor Classifier output (0 = <=50K, 1 = >50K)
is_outlier INT64 tensor Outlier flag (0 = normal, 1 = outlier)
Drift results Async batch Drift detection results reported per batch of 20 requests
Prometheus metrics Time-series Available at /metrics endpoint for monitoring dashboards

Usage Examples

Sending Normal Traffic

# Single inference request via CLI
seldon pipeline infer income-production \
  '{"inputs": [{"name": "predict", "datatype": "FP32", "shape": [1, 12], "data": [[39,7,1,1,1,1,4,1,2174,0,40,9]]}]}'

Sending Batch Traffic for Drift Detection

import requests

# Send 20+ requests to trigger drift detection batch
for i in range(25):
    payload = {
        "inputs": [
            {
                "name": "predict",
                "datatype": "FP32",
                "shape": [1, 12],
                "data": [[39, 7, 1, 1, 1, 1, 4, 1, 2174, 0, 40, 9]]
            }
        ]
    }
    response = requests.post(
        "http://0.0.0.0:9000/v2/models/income-production/infer",
        headers={"seldon-model": "income-production.pipeline"},
        json=payload
    )
    result = response.json()
    print(f"Request {i}: prediction={result['outputs'][0]['data']}, "
          f"outlier={result['outputs'][1]['data']}")

Testing with Outlier Data

# Send data that is likely to be flagged as an outlier (extreme feature values)
seldon pipeline infer income-production \
  '{"inputs": [{"name": "predict", "datatype": "FP32", "shape": [1, 12], "data": [[99,1,1,1,1,1,1,1,99999,99999,99,1]]}]}'

Related Pages

Page Connections

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