v0.0.1 — First public release
The first end-to-end cut of sommelier-api: two ML models trained on the UCI Wine Quality dataset, served by a FastAPI backend and a Streamlit UI over one shared core — deployed, tested, and documented.
Models
- Score (regression):
RandomForestRegressor(n_estimators=400)→ predicted quality, R² 0.50 / MAE 0.44 / RMSE 0.61. - Grade (classification): tuned
DecisionTreeClassifier(max_depth=6, min_samples_leaf=20)→ high (≥6) / low (<6), accuracy 0.74 / ROC-AUC 0.81. - Re-trained deterministically (
random_state=42) from the public CSVs — bit-identical to source. Pinned scikit-learn 1.9.0.
What's in it
ml/core —features.py(single source of truth for the 12-feature contract),train.py(reproduces both models → joblib + schema + metrics),predict.py(shared inference + A2 label-inversion guard).- FastAPI —
GET /health/features/model/info;POST /predict/score/predict/grade/predict. Pydantic v2 validation, Swagger, real metrics from training. Deployed on Render. - Streamlit — tasting-room with quality gauge + high/low grade badge; local-default inference with automatic API fallback. Deployed on Streamlit Community Cloud.
- Quality & ops — 23 tests, GitHub Actions CI (ruff + pytest), Makefile, Dockerfile, render.yaml, pinned requirements.