Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
Auto-rollback guard on champion promotion
promoteModel({toStatus: "champion", metricsSnapshot: { auc, errorRate }})
in lib/ml/registry.ts now consults evaluateRollback from
lib/ml/auto-rollback.ts BEFORE the transaction that demotes the
incumbent.
Trigger
The guard fires only when:toStatus === "champion", ANDmetricsSnapshot.aucis supplied by the caller, AND- The incumbent champion in the same family has a stored
metricsSnapshot.aucto compare against.
Thresholds
| Threshold | Default | Source |
|---|---|---|
maxAucDrop | 5 % relative drop | evaluateRollback |
maxPsi | 0.25 per feature | evaluateRollback |
maxErrorRate | 2 % | evaluateRollback |
rollbackThresholds. To force a promotion that
breaches a threshold, pass bypassRollbackGuard: true — the
returned object surfaces rollbackGuardBreaches so the bypass is
auditable.
Failure mode
When the guard fires and bypass is not set,promoteModel
throws ModelRegistryError(...) with reason rollback_guard. The
incumbent champion stays in place; no DB state changes.
TS-side preprocessing orchestrator
lib/ml/preprocessing.ts bundles WOE binning + target encoding into
a single fitPreprocessing / applyPreprocessing API. Why TS-side
instead of porting into gbm_trainer.py:
- Most Kaireon scoring engines (bayesian, thompson, online, epsilon, scorecard) live entirely in TS and never cross the Python boundary. A TS-side bridge makes binning + encoding available to all engines, not just GBM.
- Keeps W6.2 testable + deterministic without a Python service in CI.
Honest limit
V1 fits encoders only. Saving / loading them across train + score boundaries is the caller’s responsibility —AlgorithmModel.modelState
is the natural home but is not yet auto-populated from this orchestrator.
Auto-binning of gbm_trainer.py features is roadmap work.