The biggest release yet: carbon-aware scheduling grows from CI gating into a platform that plugs into the large, deferrable workloads where the real energy lives (ML training, batch inference, ETL, HPC), backed by a self-growing community data commons and broader free grid coverage.
Drop-in adapters that pause or route heavy work onto clean-grid windows. Each
uses a lazy/optional import, so the base install stays dependency-light; install
the matching extra to pull the framework (e.g. pip install carbon-aware-dispatcher[lightning]).
- PyTorch Lightning:
CarbonAwareCallbackpauses at epoch boundaries while the grid is dirty - Hugging Face Trainer:
CarbonAwareTrainerCallback, the same gate for transformers - Airflow:
CarbonAwareSensor(usemode="reschedule"to free the worker slot) - Prefect:
carbon_gatetask - Dagster:
carbon_gateop plus a clean-grid sensor - Ray:
run_when_cleangates the driver before submitting distributed work - KEDA: a
ScaledJobexample pairing event scaling with await-for-greengate - Slurm: a submit wrapper for HPC jobs
- Inference routing:
cleanest_endpoint/rank_endpointsroute requests to the cleanest region
See the Integrations table in the README for imports and runnable examples.
Where no free historical API exists, an hour-of-day and day-of-week carbon curve accumulates per zone and can be pooled across users, so any zone others have sampled gains a profile even with no local history.
carbon-aware export-curvesexports your accumulated curves (anonymous sum/count cells only)carbon-aware merge-curvespools many files into one volume-weighted curve, with--cap-nto limit any single contributor's weightcarbon-aware validate-curvesgates contributions against malformed or implausible datacarbon-aware sample-curvesplus a scheduled workflow self-samples free-provider zones to grow coverage beyond GBCOMMUNITY_CURVEaccepts a local file or a published http(s) URL- Both axes are covered: hour-of-day and day-of-week (weekend grids often run cleaner)
- The pool is published to an orphan
community-databranch, so bot refreshes never touchmain - Seeded with real 14-day GB history on day one
- EirGrid (Ireland)
- Energinet (Denmark, DK1/DK2)
- RTE (France, eco2mix; ENTSO-E token still preferred when set)
- Energy-Charts (~20 EU countries)
- CAMMESA (Argentina, intensity derived from the generation mix)
- Green SLA monitoring: track and attest the share of runs that ran clean
- Provenance tagging: every reading carries
data_sourceanddata_confidence - Marginal-first timing:
carbon-aware marginalsurfaces the WattTime marginal signal, the metric that reflects real avoided emissions
- Pre-commit hooks mirror CI exactly (ruff on commit, mypy + tests on push)
- mypy now type-checks
integrations/in CI and the pre-commit push hook - Optional-dependency extras for every framework adapter
- No breaking changes. The new integrations and commons are additive.
- To use a published community pool, set
COMMUNITY_CURVE=https://raw.githubusercontent.com/peterklingelhofer/carbon-aware-dispatcher/community-data/community-curve.json. - The
community-databranch is created automatically on the first run of the publish/sample workflows; no manual setup is needed beyond enabling read/write permissions for Actions.