How aditya-barik/wine-quality-prediction works
Project type and purpose
• This is a full-stack ML application for predicting wine quality.
• It includes:
• A data/versioning & model-training pipeline (DVC + Python scripts)
• A prediction microservice (serving a trained model)
• A web frontend (HTML/CSS/JS) that consumes the microservice
• CI/CD workflows (.github/workflows/ci-cd.yaml) and deployment config (Procfile).
Main components
a. Data Ingestion & Versioning
• Raw data source (e.g., data/remote/winequality.csv.dvc)
• DVC remote storage
• dvc.yaml pipelines with stages:
1. get-data (pipeline_01_get_data_from_remote_source.py)
2. split (pipeline_02_split_data_into_train_and_test.py)
3. train+evaluate (pipeline_03_train_and_evaluate_model.py)
b. Artifact Store
• models/model.joblib (persisted in wine_quality_prediction_service/models)
• DVC/dvc.lock for reproducibility
c. Prediction Microservice
• Python service (wine_quality_prediction_service/wine_quality_prediction.py)
• Schema (schema/min_max_schema.json) for input validation
• Serves a REST API endpoint for predictions
d. Frontend Web Application
• Flask (or similar) app entrypoint (app.py) or a separate Flask/WSGI configured by Procfile
• Templates (wine_quality_prediction_app/templates/*.html)
• Static assets (static/css/main.css, static/scripts/index.js)
• JavaScript code calls the prediction API
e. CI/CD & Deployment
• GitHub Actions workflow
• Procfile for Heroku or similar PaaS
f. Tests & Validation
• Unit tests (tests/), config tests, fixtures
• tox.ini for linting and test automation
Relationships & Data Flow
1. Remote Data → DVC Pipeline → Processed Data & Train/Test sets
2. Training Stage → Model Artifact → DVC & models folder
3. CI/CD Pipeline → Triggers DVC pipeline, runs tests, builds Docker/Heroku release
4. Deployed Service → Loads model.joblib → Exposes REST endpoint
5. Frontend UI → Sends user input → Prediction API → Receives & displays result
Architectural Patterns & Design Principles
• Modular pipeline stages (clear separation of data ingestion, preprocessing, training)
• Version control for data and models (DVC)
• Microservice architecture for model serving
• Layered web app: UI layer, API layer, data/model layer
• CI/CD automation for reproducibility and quick deployment
Essential Elements to Capture
• Data sources & storage (local vs. remote)
• Pipeline orchestration (dvc.yaml, scripts in src/)
• Model artifact management (models/, model.joblib)
• Microservice endpoint and schema validation
• Frontend components and user interaction flow
• CI/CD & hosting environment