What does a CI/CD pipeline for an ML service test that a normal service pipeline does not?
Answer
Model answer, written in a candidate's voice
In short
- Tests data and features, not just application code.
- Runs a training smoke test on a sample and checks reproducibility.
- Gates on model quality and inference behaviour: schema, latency, size, and contract.
- Uses staged rollout with rollback criteria rather than a single deploy.
- Separates code-change pipelines from data/model refresh pipelines.
In full
The core difference is that an ML pipeline has to prove the whole learning loop, not just that the service builds and deploys. Beyond normal unit and integration tests, it checks feature code, data contracts, and a training smoke test on a sample, then verifies reproducibility so the same inputs produce a comparable model. It also gates on model quality and inference contracts: output schema, latency, size, and behaviour under expected traffic, not only whether the endpoint returns 200. Rollout is staged, with canary or shadow validation and clear rollback criteria, because a bad model can be technically deployable while still degrading decisions. Finally, code changes and data or model refreshes are usually separate pipelines, since a code fix and a retrain have different triggers, approvals, and failure modes.
What a strong answer covers
- Unit tests on feature code; data contract tests; a training smoke test on a sample.
- Model-quality gates; inference contract tests (schema, latency, size); reproducibility checks.
- Staged rollout.
- Separate pipelines for code changes and data or model refreshes.
Common mistakes
- only testing code paths and never model quality
- no performance or latency test.