What it covers
The full lifecycle of a small ML model — from data prep through production deployment:
- Data prep — heart disease dataset (918 patients, 7 features), train/test split
- Training with MLflow tracking — two parallel approaches (Random Forest, Dense NN) both logged to MLflow with parameters, metrics, and model artifacts
- Model registry — register the chosen model and promote to the
prodalias - Deployment in two patterns:
- Embedded: Streamlit loads the MLflow
prodmodel directly into its process - API-backed: FastAPI wraps the model; Streamlit calls it over HTTP
- Embedded: Streamlit loads the MLflow
Why both patterns
- Embedded is simpler — one process, one deployment. Fine for demos, small-scale internal tools.
- API-backed is how production ML systems are usually structured — model service can scale independently from the UI, can be called by multiple clients, and decouples the model release cycle from the app release cycle.
Showing both side-by-side demonstrates that model serving isn’t a single solved problem — it’s a design decision.
Stack
- Training: scikit-learn, TensorFlow / Keras
- Experiment tracking / registry: MLflow
- Serving front-end: Streamlit
- Serving API: FastAPI + Uvicorn