01What makes a model a data product
A model in a notebook answers questions only for the person running the notebook. A data product answers them for other systems, reliably: an HTTP endpoint that accepts a JSON request, validates it, returns a prediction in milliseconds, logs what happened, and behaves the same tomorrow as today.
The pieces from Lab 9 Part 2 / Assignment 04:
models/model.joblibโ the serialised model (or pipeline).models/model_metadata.jsonโmodel_version,feature_columns, training date, metrics. The API reports the version so every prediction can be traced to a model.src/common/features.pyโ the one place features are computed.src/api/main.pyโ FastAPI app with a Pydantic request schema and a/predictendpoint.- A
Dockerfilewith pinnedrequirements.txt, so the runtime is identical everywhere.