Serving a model: FastAPI, Docker, and what I forgot to monitor
Week 17
A model in a notebook is not a product. I wrapped the churn model in a FastAPI service and shipped it in a Docker image.
Steps
- Saved the full scikit-learn pipeline, not just the estimator, so preprocessing could not drift from training.
- Validated request bodies with Pydantic and returned a clear error for bad input.
- Added a health endpoint and a test that calls the API with a known example.
- Tracked experiments and the chosen model version in MLflow.
What I missed
I had no plan to notice when live data stops looking like training data. Monitoring input distributions is next on my list.