Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:SeldonIO Seldon core Seldon Experiment Start

From Leeroopedia
Field Value
Type External Tool Doc
Overview Concrete CLI tool for starting A/B test and traffic mirroring experiments in Seldon Core 2.
Domains MLOps, Experimentation
Related Principle SeldonIO_Seldon_core_Experiment_Execution
Source docs-gb/cli/seldon_experiment_start.md:L1-25, samples/local-experiments.md:L109-127
Knowledge Sources Repo, Doc
Last Updated 2026-02-13 00:00 GMT

Description

This implementation provides the concrete CLI commands for starting A/B test and traffic mirroring experiments in Seldon Core 2. The seldon experiment start command submits an Experiment CRD to the Seldon scheduler, which activates traffic routing according to the specified weights and mirror configuration. Alternatively, kubectl apply can be used to apply the experiment manifest directly to the Kubernetes API.

Code Reference

CLI Signature

seldon experiment start -f <experiment.yaml> [--scheduler-host string] [--force]

Alternative: kubectl

kubectl apply -f <experiment.yaml>

Full Example: Start an A/B Test

# Ensure candidates are loaded and ready
seldon model status iris -w ModelAvailable
seldon model status iris2 -w ModelAvailable

# Start the experiment
seldon experiment start -f samples/experiments/ab-default-model.yaml

# Verify experiment is active
seldon experiment status experiment-sample -w | head -1

Full Example: Start a Mirror Experiment

# Start mirroring experiment
seldon experiment start -f samples/experiments/sklearn-mirror.yaml

# Verify mirror experiment is active
seldon experiment status sklearn-mirror -w | head -1

I/O Contract

Direction Description
Inputs Experiment CRD YAML file. All candidate models and/or pipelines referenced in the manifest must be deployed and ready before starting the experiment.
Outputs Experiment active: traffic splitting or mirroring engaged on the default endpoint. The scheduler updates its routing table and begins probabilistically routing requests to candidates.

Key Parameters

Parameter Description Default Required
-f / --file-path Path to the experiment manifest YAML file Yes
--scheduler-host Address of the Seldon scheduler 0.0.0.0:9004 No
--force Force start even if experiment is already running false No

Usage Examples

Start A/B Test Between Two Models

# Define the experiment manifest (ab-test.yaml)
# Then start it
seldon experiment start -f ab-test.yaml

Start with Custom Scheduler Host

seldon experiment start -f ab-test.yaml --scheduler-host scheduler.seldon-mesh:9004

Start and Immediately Verify

# Start experiment and wait for active status
seldon experiment start -f ab-test.yaml
seldon experiment status experiment-sample -w | head -1

# Run a quick inference to verify routing
seldon model infer iris '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' --show-headers

Using kubectl

# Apply the experiment
kubectl apply -f samples/experiments/ab-default-model.yaml

# Check experiment status
kubectl get experiments experiment-sample -o yaml

External Dependencies

  • seldon CLI — Command-line tool for interacting with Seldon Core 2 scheduler
  • kubectl — Kubernetes CLI for applying CRD manifests (alternative method)
  • Seldon scheduler — Orchestrates experiment routing; must be running and accessible

Related Pages

Page Connections

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