CI/CD for ML systems
CI/CD for ML is not just "deploy the code." It gates a behavior bundle: code, data transforms, model or prompt version, retrieval config, eval results, and rollback plan.
CI checks
- Unit tests for data transforms and prompt assembly.
- Schema checks for datasets and feature inputs.
- Eval smoke tests for target behavior.
- Regression tests for safety, format, and latency.
- Artifact validation: model loads, prompt renders, index exists, tool schema parses.
For LLM systems, include replay tests from real traces and exact checks for structured outputs.
CD checks
Deployment should be staged: candidate, shadow, canary, ramp, production. Monitor quality and system metrics at each step before expanding traffic.
| Release pattern | Use when |
|---|---|
| Shadow | You can run new behavior without user impact |
| Canary | You need limited real-user exposure |
| Blue/green | You need fast rollback |
| Feature flag | You need per-segment control |
Rollback
Rollback must be tested. Know whether you are rolling back code, model, prompt, index, tool config, or all of them.
Pitfall
A green deploy that skips evals is only proving the server starts. ML CI/CD must test behavior, not just uptime.
Connects to: registry · evaluation · trace replay