Model Ops
ML model release management: candidates train only on approved data, reach production only after passing accuracy, fairness and safety evaluations and a completed canary, canaries halt on regression, and rollbacks need a second approver.
- Resources (6)
- dataset, model, candidate, evaluation, rollout, rollback
- Roles (5)
- mlengineer, reviewer, steward, sre, admin
- Features (10)
- suitepermissionsstate_machinevalidationrules_engineviewsscheduled_tasksauditindexeshistory_events
model-ops.infinity-sdg.com — the ML model lifecycle with its gates written down: approved data in, evaluated models out, canaries that stop themselves.
dataset: registered → approved by a data steward → deprecated
model → candidate (trained on an approved dataset)
→ evaluations: accuracy · fairness · robustness · latency · safety (each with threshold and direction)
→ approve (reviewer) → canary rollout (traffic %, error budget) → completed | halted
→ production (one per model) → superseded / rolled back → retired
rollback: requested → approved by a second SRE → executed
every 15 minutes: running canaries over their error budget halt
What it enforces
| Rule | Why |
|---|---|
| A candidate trains only on a dataset a data steward approved | No model on unreviewed data, and PII datasets wait for their steward |
An evaluation’s passed must agree with its value, threshold and direction | Results can’t be mislabeled green |
| Approval needs accuracy, fairness and safety evaluations, and no failed evaluation of any kind | Fairness and safety aren’t optional suites |
| Production needs a completed canary | Nothing jumps straight to 100% |
| One production version per model; supersede before promoting | Lineage stays unambiguous |
| Rollouts open only for candidates in canary | Traffic follows the state machine |
| Running canaries over their error budget halt automatically | Regressions stop without anyone watching |
| Rollbacks are approved by someone other than the requester, and a version rolls back only under an approved rollback | Four-eyes control on production changes |
Every resource is audited. Candidates keep a readable history: approved by whom, canary, promoted, rolled back.
Resources, views, roles
- Resources: dataset, model, candidate, evaluation, rollout, rollback
- Views:
promotionPipelinefailingEvaluations: why a candidate is blockedliveCanaries, with an over-budget flag
- Roles:
mlengineer: datasets, candidates, evaluationsreviewer: approves or rejects candidatessteward: approves and deprecates datasre: canaries, promotion, rollbacksadmin
Demo data
The demo has 10 model families: fraud scoring, search ranking, ticket summarization, document embedding, demand forecasting, weld-defect detection, churn, toxicity filtering, feed recommendations and delivery ETA. They run on 12 datasets; one PII dataset still awaits its steward, and one is deprecated.
There are 23 candidates with 111 evaluations, all consistent with their numbers:
- Promotions: clean ones, plus superseded versions that were retired.
- Canaries: one running within budget, and one halted at 3× its error budget and then abandoned.
- Rollbacks: 5 executed with hotfixes promoted, 2 approved, 1 rejected (the spike was upstream) and 2 requested.
- Fairness: two candidates fail it. One was rejected and one is still blocked.
Every decision is made by the demo user who would make it (steward1, reviewer1, sre1, sre2, mle1), with that user’s own roles. That needs Kalos seeder 1.2.0 or later. Hashes are derived for the demo, not real artifacts.
To regenerate the data, run python3 seeds/gen_seed.py.
Run it
scripts/kalos.sh validate # static checks
scripts/kalos.sh start # kalosd on :9219
scripts/kalos.sh verify # live checks
By default, KALOS_REPO is ../kalos.
Sign in with admin / Admin123!. The other users are mle1, mle2, reviewer1, steward1, sre1 and sre2, all with password Demo123!.
Domain Resource Summary
| Resource | Purpose & Lifecycle |
|---|---|
dataset | A versioned training dataset. Nothing trains on it until a data steward approves it. (States: registered, approved, deprecated) |
model | A model family: one task, one owning team. |
candidate | One trained version of a model, from training to retirement. (States: trained, approved, canary, production, superseded, rolled_back, rejected, retired) |
evaluation | One metric on one evaluation suite, with its threshold. |
rollout | A canary rollout of a candidate, with its error budget. (States: running, completed, halted) |
rollback | Taking a production version out. Requested by one person, approved by another. (States: requested, approved, executed, rejected) |
Domain definition
Download rawdomain.yaml (351 lines)
Inspect domain.yaml (351 lines)
# model-ops/backend/domain.yaml
#
# Model Ops — the ML model lifecycle, with the gates written down.
#
# dataset (registered → approved by a data steward → deprecated)
# model → candidate (trained on an approved dataset)
# → evaluations (accuracy, fairness, robustness, latency, safety; each with
# its threshold and direction, `passed` must match the numbers)
# → approve (reviewer; needs accuracy, fairness and safety evaluations and no failures)
# → canary rollout (traffic %, error budget) → completed | halted
# → production (needs a completed canary; one production version per model)
# → superseded / retired
# rollback: requested → approved by a second person → executed
# Every 15 minutes: running rollouts whose error rate exceeds their budget halt.
#
# An ISDG product for ML platform teams.
# query() filter keys are single lowercase words.
domain:
name: modelops
version: "1.0.0"
description: >
ML model lifecycle: approved datasets, evaluation-gated promotion, canary
rollouts that halt on regression, four-eyes rollbacks and lineage.
resources:
dataset:
description: "A versioned training dataset. Nothing trains on it until a data steward approves it."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
name: { type: string, required: true, maxLength: 120 }
tag: { type: string, required: true, maxLength: 20 }
rowCount: { type: integer, required: true, min: 1 }
sha256: { type: string, required: true, pattern: "^[0-9a-f]{64}$" }
source: { type: text, required: true }
containsPii: { type: boolean, required: true, default: false }
steward: { type: string, maxLength: 100 }
status: { type: string, required: true, default: registered }
stateMachine:
field: status
initial: registered
states:
registered:
transitions:
approve: { to: approved, guards: [steward, admin], requiredFields: [steward] }
approved:
transitions:
deprecate: { to: deprecated, guards: [steward, admin] }
deprecated: {}
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [mlengineer, steward, admin]
update: [steward, admin]
delete: [admin]
features: { audit: true }
indexes:
- { fields: [name, tag], unique: true }
model:
description: "A model family: one task, one owning team."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
name: { type: string, required: true, unique: true, maxLength: 80 }
task: { type: string, required: true, enum: [classification, ranking, generation, embedding, forecasting, detection] }
team: { type: string, required: true, maxLength: 80 }
sloP95Ms: { type: integer, required: true, min: 1 }
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [mlengineer, admin]
update: [mlengineer, admin]
delete: [admin]
features: { audit: true }
candidate:
description: "One trained version of a model, from training to retirement."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
model:
type: reference
references: "adl.modelops.modelops.model"
required: true
dataset:
type: reference
references: "adl.modelops.modelops.dataset"
required: true
semver: { type: string, required: true, pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" }
framework: { type: string, required: true, maxLength: 40 }
artifactSha: { type: string, required: true, pattern: "^[0-9a-f]{64}$" }
approvedBy: { type: string, maxLength: 100 }
retireNote: { type: text }
status: { type: string, required: true, default: trained }
stateMachine:
field: status
initial: trained
states:
trained:
transitions:
approve: { to: approved, guards: [reviewer, admin], requiredFields: [approvedBy] }
reject: { to: rejected, guards: [reviewer, admin], requiredFields: [retireNote] }
approved:
transitions:
startCanary: { to: canary, guards: [sre, mlengineer, admin] }
canary:
transitions:
promote: { to: production, guards: [sre, admin] }
abandon: { to: rejected, guards: [sre, admin], requiredFields: [retireNote] }
production:
transitions:
supersede: { to: superseded, guards: [sre, admin] }
rollBack: { to: rolled_back, guards: [sre, admin] }
superseded:
transitions:
retire: { to: retired, guards: [mlengineer, admin], requiredFields: [retireNote] }
rolled_back:
transitions:
retire: { to: retired, guards: [mlengineer, admin], requiredFields: [retireNote] }
rejected: {}
retired: {}
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [mlengineer, admin]
update: [mlengineer, reviewer, sre, admin]
delete: [admin]
features: { audit: true }
history:
events:
approved: { trigger: transition, transition: approve, capture: [approvedBy], label: "Approved by {approvedBy}", severity: info }
canary: { trigger: transition, transition: startCanary, severity: info }
promoted: { trigger: transition, transition: promote, label: "Promoted to production", severity: success }
rolledBack: { trigger: transition, transition: rollBack, severity: error }
indexes:
- { fields: [model, status] }
- { fields: [model, semver], unique: true }
evaluation:
description: "One metric on one evaluation suite, with its threshold."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
candidate:
type: reference
references: "adl.modelops.modelops.candidate"
required: true
suite: { type: string, required: true, enum: [accuracy, fairness, robustness, latency, safety] }
metric: { type: string, required: true, maxLength: 60 }
value: { type: decimal, required: true, precision: 12, scale: 4 }
threshold: { type: decimal, required: true, precision: 12, scale: 4 }
direction: { type: string, required: true, enum: [higher_better, lower_better] }
passed: { type: boolean, required: true }
validation:
passedMatchesTheNumbers:
rule: "passed == ((direction == 'higher_better' && value >= threshold) || (direction == 'lower_better' && value <= threshold))"
message: "passed must agree with the value, the threshold and the direction."
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [mlengineer, admin]
update: [admin]
delete: [admin]
features: { audit: true }
indexes:
- { fields: [candidate] }
rollout:
description: "A canary rollout of a candidate, with its error budget."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
candidate:
type: reference
references: "adl.modelops.modelops.candidate"
required: true
trafficPercent: { type: percentage, required: true }
errorBudget: { type: decimal, required: true, precision: 6, scale: 3, min: 0 }
errorRate: { type: decimal, required: true, precision: 6, scale: 3, min: 0, default: 0 }
latencyP95Ms: { type: integer, min: 0 }
haltReason: { type: text }
status: { type: string, required: true, default: running }
stateMachine:
field: status
initial: running
states:
running:
transitions:
complete: { to: completed, guards: [sre, admin] }
halt: { to: halted, guards: [sre, admin] }
completed: {}
halted: {}
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [sre, mlengineer, admin]
update: [sre, admin]
delete: [admin]
features: { audit: true }
history:
events:
halted: { trigger: transition, transition: halt, label: "Canary halted", severity: error }
indexes:
- { fields: [candidate] }
- { fields: [status] }
rollback:
description: "Taking a production version out. Requested by one person, approved by another."
object:
id: { type: uuid, primaryKey: true, protected: true, allowUserProvided: true }
candidate:
type: reference
references: "adl.modelops.modelops.candidate"
required: true
reason: { type: text, required: true }
requestedBy: { type: string, required: true, maxLength: 100 }
approver: { type: string, maxLength: 100 }
decisionNote: { type: text }
status: { type: string, required: true, default: requested }
stateMachine:
field: status
initial: requested
states:
requested:
transitions:
approve: { to: approved, guards: [sre, admin], requiredFields: [approver] }
reject: { to: rejected, guards: [sre, admin], requiredFields: [approver, decisionNote] }
approved:
transitions:
execute: { to: executed, guards: [sre, admin] }
executed: {}
rejected: {}
permissions:
list: [mlengineer, reviewer, steward, sre, admin]
get: [mlengineer, reviewer, steward, sre, admin]
create: [mlengineer, sre, admin]
update: [sre, admin]
delete: [admin]
features: { audit: true }
indexes:
- { fields: [candidate] }
rules:
trainOnlyOnApprovedData:
description: "A candidate is trained only on a dataset a data steward approved."
trigger: { resource: candidate, events: [create] }
condition: "some(query('dataset', { id: $record.dataset }), d => d.status != 'approved')"
action: reject
severity: error
message: "The training dataset is not approved."
approveOnlyEvaluated:
description: "Approval needs accuracy, fairness and safety evaluations, and no failed evaluation of any kind."
trigger: { resource: candidate, events: [transition], transition: approve }
condition: "len(query('evaluation', { candidate: $record.id, suite: 'accuracy' })) == 0
|| len(query('evaluation', { candidate: $record.id, suite: 'fairness' })) == 0
|| len(query('evaluation', { candidate: $record.id, suite: 'safety' })) == 0
|| len(query('evaluation', { candidate: $record.id, passed: false })) > 0"
action: reject
severity: error
message: "Accuracy, fairness and safety must be evaluated, and every evaluation must pass."
productionNeedsACompletedCanary:
description: "Nothing reaches production without a canary that completed."
trigger: { resource: candidate, events: [transition], transition: promote }
condition: "len(query('rollout', { candidate: $record.id, status: 'completed' })) == 0"
action: reject
severity: error
message: "No completed canary rollout for this candidate."
oneProductionVersionPerModel:
description: "Supersede the current production version before promoting another."
trigger: { resource: candidate, events: [transition], transition: promote }
condition: "len(query('candidate', { model: $record.model, status: 'production' })) > 0"
action: reject
severity: error
message: "Another version of this model is in production. Supersede it first."
canaryOnlyForCanaries:
description: "Rollouts are opened only for candidates in canary."
trigger: { resource: rollout, events: [create] }
condition: "some(query('candidate', { id: $record.candidate }), c => c.status != 'canary')"
action: reject
severity: error
message: "This candidate is not in canary."
fourEyesOnRollbacks:
description: "Whoever requested a rollback can't approve it."
trigger: { resource: rollback, events: [transition], transition: approve }
condition: "$record.approver == $record.requestedBy"
action: reject
severity: error
message: "A different SRE must approve this rollback."
rollBackOnlyUnderAnApprovedRollback:
description: "A production version is rolled back only under an approved (or executed) rollback."
trigger: { resource: candidate, events: [transition], transition: rollBack }
condition: "len(query('rollback', { candidate: $record.id, status: 'approved' })) == 0
&& len(query('rollback', { candidate: $record.id, status: 'executed' })) == 0"
action: reject
severity: error
message: "An approved rollback is required."
schedules:
haltCanariesOverBudget:
description: "Running canaries whose error rate exceeds their budget halt automatically."
recurrence: every 15 minutes
source:
resource: rollout
filter: "status == 'running' && errorRate > errorBudget"
action: transition
transition: halt
views:
promotionPipeline:
description: "Every candidate and where it stands."
source: candidate
permissions: [mlengineer, reviewer, steward, sre, admin]
columns:
- { field: semver, label: "Version" }
- { field: framework, label: "Framework" }
- { field: approvedBy, label: "Approved by" }
- { field: status, label: "State" }
defaultLimit: 500
failingEvaluations:
description: "Evaluations below threshold — why a candidate is blocked."
source: evaluation
filter: "passed == false"
permissions: [mlengineer, reviewer, admin]
columns:
- { field: suite, label: "Suite" }
- { field: metric, label: "Metric" }
- { field: value, label: "Value" }
- { field: threshold, label: "Threshold" }
defaultLimit: 200
liveCanaries:
description: "Running canaries against their error budget."
source: rollout
filter: "status == 'running'"
permissions: [sre, mlengineer, admin]
columns:
- { field: trafficPercent, label: "Traffic %" }
- { field: errorRate, label: "Error rate" }
- { field: errorBudget, label: "Budget" }
- name: overBudget
label: "Over budget"
computed: "errorRate > errorBudget"
defaultLimit: 200