#00157
Case study of
#00165 Measure the emissions of compute you run yourself by sampling hardware power and applying local grid carbon intensity
Implementer
Mila, BCG GAMMA, Haverford College, Comet.ml, with Data For Good France volunteers (now stewarded by the CodeCarbon non-profit)
Timeline
Since Dec 1, 2020
Location
Description
CodeCarbon is an open-source Python package that estimates CO2 from code execution. An EmissionsTracker (used as a context manager or decorator) samples CPU energy via Intel RAPL, GPU energy via NVIDIA NVML, and RAM energy over a run, multiplies by region-specific grid carbon intensity, and logs the result locally or to a dashboard, optionally emitting a LaTeX snippet for papers. Released 2020-12-01 by Mila, BCG GAMMA, Haverford College, and Comet.ml, with Data For Good France volunteers. When RAPL is unavailable, it falls back to an estimation mode. It does not separately model disk I/O, network, cooling, or data-centre PUE.
Lessons learned
Sources
3Links
1Documented Jul 13, 2026