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 Stop

From Leeroopedia
Field Value
Type External Tool Doc
Overview Concrete CLI tool for stopping experiments and managing experiment lifecycle in Seldon Core 2.
Domains MLOps, Experimentation
Related Principle SeldonIO_Seldon_core_Experiment_Lifecycle_Management
Source docs-gb/cli/seldon_experiment_stop.md:L1-20, samples/local-experiments.md:L219-230
Knowledge Sources Repo, Doc
Last Updated 2026-02-13 00:00 GMT

Description

This implementation provides the concrete CLI commands for stopping experiments and managing experiment lifecycle in Seldon Core 2. The seldon experiment stop command terminates an active experiment and reverts traffic routing to the default model. Experiments can also be updated in-place by resubmitting a modified manifest via seldon experiment start.

Code Reference

CLI Signature: Stop

seldon experiment stop <experimentName> [--scheduler-host string]

CLI Signature: Update (via start)

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

Full Example: Stop an Experiment

# Stop the experiment
seldon experiment stop experiment-sample

# Verify traffic reverts to default model
seldon model infer iris \
  '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' \
  --show-headers -i 10

# Expected: all requests go to iris (no experiment routing)

Full Example: Update Experiment Weights

# Modify the experiment manifest to change weights (e.g., from 50/50 to 90/10)
# Then resubmit:
seldon experiment start -f updated-experiment.yaml

# Verify new distribution
seldon model infer iris \
  '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' \
  -i 100

# Expected: approximately 90/10 split

I/O Contract

Direction Description
Inputs (stop) Experiment name (positional argument). The experiment must be currently active.
Inputs (update) Updated experiment YAML manifest with modified weights, candidates, or mirror configuration.
Outputs (stop) Experiment stopped: traffic reverts to the default model. The scheduler removes the experiment from its routing table.
Outputs (update) Experiment updated: new traffic split is active. The scheduler updates its routing table with the new configuration.

Key Parameters

Parameter Description Default Required
experimentName (positional) Name of the experiment to stop Yes (for stop)
-f / --file-path Path to the updated experiment manifest YAML (for updates) Yes (for update)
--scheduler-host Address of the Seldon scheduler 0.0.0.0:9004 No

Usage Examples

Stop Experiment and Verify Reversion

# Stop the A/B test
seldon experiment stop experiment-sample

# Verify all traffic goes to the default model
seldon model infer iris \
  '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' \
  --show-headers -i 20

# All responses should show model_name: iris_1 (no routing to iris2)

Progressive Canary Rollout

# Phase 1: Start with 90/10 split
seldon experiment start -f canary-phase1.yaml
# canary-phase1.yaml has: iris=90, iris2=10

# Verify phase 1
seldon model infer iris \
  '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' \
  -i 100

# Phase 2: Shift to 50/50
seldon experiment start -f canary-phase2.yaml
# canary-phase2.yaml has: iris=50, iris2=50

# Verify phase 2
seldon model infer iris \
  '{"inputs": [{"name": "predict", "shape": [1, 4], "datatype": "FP32", "data": [[1, 2, 3, 4]]}]}' \
  -i 100

# Phase 3: Full rollout to new candidate
seldon experiment start -f canary-phase3.yaml
# canary-phase3.yaml has: iris=0, iris2=100

# Phase 4: Conclude experiment
seldon experiment stop experiment-sample

Stop Mirror Experiment

# Stop the mirroring experiment
seldon experiment stop sklearn-mirror

# Confirm mirroring has stopped (iris2 no longer receives shadow traffic)

Cleanup: Stop Experiment and Unload Models

# Stop the experiment
seldon experiment stop experiment-sample

# Unload the losing candidate
seldon model unload iris2

# Keep the winning model running as production
seldon model status iris

Using kubectl

# Delete experiment via kubectl
kubectl delete experiment experiment-sample

# Or update experiment via kubectl
kubectl apply -f updated-experiment.yaml

External Dependencies

  • seldon CLI — Command-line tool for experiment lifecycle management
  • kubectl — Kubernetes CLI for deleting or updating experiment CRDs (alternative method)

Related Pages

Page Connections

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