Simple, reproducible Machine Learning pipeline to validate, clean, train, and predict sneaker prices from stock values.
data/๐: raw and cleaned CSV data (tracked with DVC)src/๐ง : Python scripts for generation, validation, cleaning, training, and predictionnotebooks/๐: optional exploration notebookstests/๐งช: test placeholdersdvc.yaml๐: pipeline definition
-
Install dependencies:
pip install -r requirements.txt
-
Generate data and train model:
python src/generate_raw_data.py python src/clean_data.py python src/train.py
Or run the full pipeline:
dvc repro
-
Use the API or CLI for predictions ๐ฎ (see below)
Run full pipeline:
dvc reproRun step-by-step:
python src/validate_data.py
python src/clean_data.py
python src/train.pypython src/generate_raw_data.pypython src/predict.py --stock 20Start the API server:
uvicorn src.api:app --reloadOpen your browser at http://127.0.0.1:8000/docs for interactive Swagger UI.
Endpoints:
GET /- Welcome messageGET /health- Check if model is loadedGET /predict?stock=<value>- Get price prediction
Example requests:
# Check health
curl "http://127.0.0.1:8000/health"
# Get prediction
curl "http://127.0.0.1:8000/predict?stock=20"
