Wine quality modular ML pipeline
Config-driven pipeline that ingests, validates, transforms and trains an ElasticNet wine quality model.
What it does
Config, schema and params YAML files drive five stages: download and unzip the wine quality data, validate columns against the schema, split the data, train ElasticNet and evaluate it. Evaluation logs parameters plus RMSE, MAE and R² to MLflow, with DagsHub available as a remote, and a Flask app exposes training and prediction routes.
What was built
- 01
Ingestion downloads winequality-data.zip from a configured URL and extracts winequality-red.csv.
- 02
Validation compares every column against schema.yaml and writes a status file.
- 03
ElasticNet (alpha 0.2, l1_ratio 0.1 from params.yaml) is trained and saved with joblib.
- 04
Evaluation logs parameters, RMSE, MAE and R² to MLflow and writes metrics.json.
- 05
Flask /train reruns the pipeline and /predict returns predicted quality from a form.
The pipeline, layer by layer
Five layers, one pipeline.
L1Config
- config, schema, params YAML
L2Pipeline
- Ingestion
- Validation
- Transformation
L3Training
- ElasticNet training
L4Evaluation
- MLflow metrics
L5Serving
- Flask app