Machine Learning Model Deployment Checklist
17 items · Ml Deployment · Hard difficulty · 2 hours
Deploy ML models safely with a practical, production-ready checklist.
-
Pin and document the model version
Tag artifacts with semantic version, git commit, training data snapshot, and config.
-
Choose and fix a serialization format
Pick a portable format (ONNX, SavedModel, TorchScript) and document input/output schema.
-
Store the serialized artifact in an immutable registry
Save artifacts to a read-only model registry or object store with metadata.
-
Containerize runtime and pin dependencies
Build a Docker image, pin package versions, and include hardware specs (CPU/GPU).
-
Expose the model via a versioned REST API
Provide /predict, /health, and /version endpoints and include model version in responses.
-
Implement input validation and sanitization
Validate schema, types, ranges and reject or normalize bad inputs before inference.
-
Add authentication, rate limiting, and request limits
Require tokens, enforce quotas, and set max payload size to protect the service.
-
Benchmark inference latency and throughput
Measure p50/p95/p99 latency and max QPS with production-like payloads.
-
Set performance thresholds and automated alerts
Define alert rules for latency, error rate, resource saturation, and throughput drops.
-
Implement logging and structured tracing
Log request id, model version, inputs/outputs (mask PII), and propagate trace IDs.
-
Monitor data and concept drift against a baseline
Track feature distributions, prediction shifts, and label changes over time.
-
Set up canary or A/B testing deployment
Deploy candidate model to a subset of traffic to validate performance vs. control.
-
Route a small percentage of traffic to the candidate model
Start with 1–5% traffic and increase gradually while monitoring metrics.
-
Compare model and business metrics; define pass/fail criteria
Compare accuracy, latency, error rates, and key business KPIs; document thresholds.
-
Automate CI/CD for model builds, tests, and rollouts
Trigger builds from model registry tags, run smoke tests, and automate promotion.
-
Prepare rollback and hotfix strategy
Keep previous artifact ready, script fast rollback, and define automated rollback triggers.
-
Run end-to-end validation in shadow mode with production-like data
Validate responses without impacting users to catch edge cases before routing traffic.
Printed from TickYouOff — the interactive version tracks your progress and can be shared with others.