Project · Advanced · about 24 hours
Ship a model and catch it failing
Serve a propensity model as a tested API, simulate two years of traffic, detect drift and write the retraining policy.
Skills:Cloud platforms (AWS, Azure, Google Cloud), Machine learning, MLOps, Python
Part of: Data Scientist, AI/ML Engineer
Data and licences
- UCI Bank Marketing ↗CC BY 4.0
Brief
The bank's call data runs from May 2008 to November 2010, and the customers called changed dramatically: a model trained on the first 30,000 calls scores about 0.76 ROC AUC on its own period but about 0.53 on the last 5,000 calls. Build the system that would have caught this.
What to build
Train on the first 20,000 rows in time order. Save the pipeline and metadata.
Serve it with FastAPI in a Docker container, with input validation,
/healthand/score, and tests in CI.Replay the remaining rows in order through the API in weekly batches, logging inputs, scores and (delayed) outcomes.
Compute PSI per feature and performance per window. Set alert thresholds and show when each would have fired.
Retrain on a sliding window, compare against the live model on the next period, and promote only if it wins.
Deliverables
Repository with
service/,replay/,monitoring/,RETRAINING.md,RUNBOOK.md
How it is graded
Reviewers run the replay and read the monitoring report. The key question: would your alerts have fired early enough, and would your policy have fixed the model safely?
Stretch
Deploy the service on a free-tier cloud service and replay against it, with a cost estimate.
Deliverables
- A containerised scoring service with tests and model metadata
- A replay script that sends the calls in time order and logs predictions
- A monitoring report with drift metrics, performance over time and alerts
- A retraining policy with a promotion gate
How a reviewer grades it
| Criterion | Weight | What good looks like |
|---|---|---|
| Service is validated, versioned, tested and containerised | 25% | |
| Monitoring detects the real drift in this data, with sensible thresholds | 30% | |
| Retraining experiment uses time-based validation and a promotion gate | 25% | |
| Documentation a team could operate from | 20% |