A production-style ML MVP that predicts wildfire ignition risk from weather and FWI (Fire Weather Index) features. It includes a training pipeline, MLflow experiment tracking, a FastAPI inference service, tests, Docker, and GitHub Actions CI.
- Python (pandas, scikit-learn)
- FastAPI for inference API
- MLflow for experiment tracking
- Docker for containerization
- Pytest for unit tests
- GitHub Actions for CI
src/
training/
train.py
features.py
config.yaml
inference/
app.py
schemas.py
model.py
utils.py
tests/
test_features.py
test_api.py
models/
(trained model + metadata saved here)
.github/workflows/ci.yml
docker/Dockerfile.api
docker-compose.yml
requirements.txt
Makefile
- Create environment & install deps
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt- (Optional) Set MLflow tracking URI (defaults to local
./mlrunsfolder)
export MLFLOW_TRACKING_URI=./mlruns- Train model
make train- Run API locally
make api
# POST http://localhost:8000/predict- Docker
make docker-build
make docker-runcurl -X POST http://localhost:8000/predict -H "Content-Type: application/json" -d '{
"FFMC": 86.2, "DMC": 26.2, "DC": 94.3, "ISI": 5.1,
"temp": 18.0, "RH": 45, "wind": 4.3, "rain": 0.0,
"month": "aug", "day": "fri"
}'