Skip to content

ksarina256/Forest-Fire-Prediction-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forest Fire Prediction System

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.

Tech Stack

  • Python (pandas, scikit-learn)
  • FastAPI for inference API
  • MLflow for experiment tracking
  • Docker for containerization
  • Pytest for unit tests
  • GitHub Actions for CI

Project Structure

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

Quickstart

  1. Create environment & install deps
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
  1. (Optional) Set MLflow tracking URI (defaults to local ./mlruns folder)
export MLFLOW_TRACKING_URI=./mlruns
  1. Train model
make train
  1. Run API locally
make api
# POST http://localhost:8000/predict
  1. Docker
make docker-build
make docker-run

Example Request

curl -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"
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors