Skip to content

aleksanderstevens191-sudo/GridPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GridPilot

A Fluxera prototype. GridPilot is an energy-aware scheduling engine for flexible AI workloads. It simulates how data centers can shift GPU jobs into lower-cost and lower-carbon grid windows while preserving SLA deadlines.

🟢 Live demo: https://gridpilot-sandy.vercel.app

Solver Backend Frontend


What it does

AI workloads are energy-intensive, but many batch jobs (training, fine-tuning, inference backfill, ETL) are flexible — they only need to finish by a deadline. Most data centers schedule them around compute availability, not grid conditions, so they end up paying peak prices and emitting peak-carbon electricity.

GridPilot:

  • Models a fleet of flexible AI jobs (GPUs, hours, deadlines, priority).
  • Simulates regional grid conditions for ERCOT, CAISO, and PJM — hourly price + carbon intensity.
  • Solves a constrained scheduling problem with OR-Tools CP-SAT to find the minimum-cost-and-carbon assignment that respects deadlines and a per-hour GPU capacity cap.
  • Compares against a naive FIFO baseline ("what data centers do today") and shows you the savings.
  • Explains every decision — for each job, which hours it moved to and why.

Demo (sample mixed-fleet, ERCOT)

Baseline (FIFO) Optimized (CP-SAT)
Energy cost $72.38 $50.80 (−29.8%)
Carbon emitted 788.7 kg 643.5 kg (−18.4%)
SLA violations 0 0
Solver runtime 14 ms

Architecture

┌──────────────────┐         ┌─────────────────────┐
│  Next.js (web)   │ HTTP →  │  FastAPI (api)      │
│  Tailwind        │         │  OR-Tools CP-SAT    │
│  Recharts        │         │  Pandas / NumPy     │
└──────────────────┘         └─────────────────────┘
                                     │
                                     ▼
                              data/*.csv (synthetic
                              regional grid data)

See docs/architecture.md for the optimization model details.

Run locally

Option A — Docker (one command)

docker compose up --build

Then visit http://localhost:3000.

Option B — direct run (faster iteration)

# Terminal 1: API
cd apps/api
pip install -r <(grep -v '^\[' pyproject.toml | grep -E '^\s*"[a-z]' | tr -d ' ",' | sed 's/>=.*//' )  # or just pip install fastapi uvicorn pydantic ortools pandas numpy
DATA_DIR=$(pwd)/../../data uvicorn main:app --reload --port 8000

# Terminal 2: web
cd apps/web
npm install
NEXT_PUBLIC_API_URL=http://localhost:8000 npm run dev

Repository layout

gridpilot/
  apps/
    web/       Next.js 14 dashboard (TypeScript, Tailwind, Recharts)
    api/       FastAPI + OR-Tools optimizer
  data/        Sample regional grid CSVs + workload presets
  docs/        Problem statement, architecture, demo walkthrough
  docker-compose.yml

Roadmap

GridPilot is an MVP. Concrete next steps tracked as a real product:

  • v1.1 — Real data ingestion. Replace synthetic CSVs with public ERCOT/CAISO/PJM 5-minute price feeds and a carbon-intensity API (e.g., ElectricityMaps / WattTime).
  • v1.2 — Workload CSV upload. Let users import a real workload manifest (job_name,gpu_hours,earliest_start,deadline,priority) instead of editing rows in the UI.
  • v1.3 — Fluxera API mode. Expose POST /api/v1/schedule with auth, so other systems can call GridPilot as a scheduling backend.
  • v1.4 — LLM explanations. Replace deterministic explanations with a Claude-powered "why" generator that can answer follow-up questions.
  • v2 — Live integration. Hook into Kubernetes / Slurm / Ray Job APIs to actually shift workloads, not just simulate.

A note on the data

All grid data in data/*.csv is synthetic but modeled on public patterns (ERCOT wind nights, CAISO solar duck curve, PJM gas/coal). It is clearly labeled "Sample data — not real-time" in the UI. The optimizer is real; the data feed is not — yet.

License

MIT.

About

Energy-aware AI workload scheduler — a Fluxera prototype. CP-SAT optimizer + Next.js dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors