A demand forecasting platform for NYC taxi data. Contracts validate the input, a gate decides what reaches production, the API reports on itself, and a monitor files a ticket when the model starts to slip.
Five stages, one repository, no always-on infrastructure. Every arrow below runs as a command locally and as a workflow in CI.
A breach re-enters the pipeline as a retraining trigger, so monitoring is part of the loop rather than a report at the end of it.
Held out window, 17 to 30 September 2026. One run per configuration, no tuning on the test window. Errors below the 5% noise floor are not claimed.
WAPE by hour runs from 17.6% at 18:00 to 44.4% at 04:00, where a handful of trips moves the ratio. The dashboard carries the profile.
Every retrain is registered, but only a challenger that beats the champion by 2% WAPE takes the production alias. The alias decides what serves, not the code.
A breach fails the workflow and opens a GitHub issue with the metric, the window and the runbook section. Regressions become tickets, not dashboards.
The panel is validated for density, nulls, duplicates and zone count before training. A silently missing slot would corrupt every lag above it.
Request ID, model version and latency on every response and in every log line. Prometheus counters, a latency histogram and a batch size histogram.
Aliases are data. Point production at a previous version, redeploy, confirm with the version header. No rebuild, no migration.
Training and serving reshape the same dense panel into the same cube, so a served lag cannot drift from a trained one.
# forecast one zone, one day curl "localhost:8000/v1/zones/161/forecast?slots=48" # batch, all zones, no band curl -X POST localhost:8000/v1/forecast/batch \ -H 'content-type: application/json' \ -d '{"slots":48,"quantiles":false}' # what is deployed and what it scored curl localhost:8000/v1/model # operational surface curl localhost:8000/healthz localhost:8000/readyz curl localhost:8000/metrics | grep forecast_