A Python library automating CO2 emissions tracking from ML training workloads — mapping GPU/CPU power draw to regional carbon intensity for ESG reporting and EU AI Act compliance.
CarbonTrack is a Python library that automatically estimates and tracks CO2 emissions from computing hardware — GPU, CPU, and RAM — during machine learning training runs and inference workloads. It maps hardware power draw to regional electricity grid carbon intensity data, producing per-experiment emissions reports with a pip-installable decorator that adds three lines to any Python script. Backed by Comet.ml, BCG GAMMA, and Mila (Montreal Institute for Learning Algorithms), it has become the standard tool for ML carbon accounting.
AI and machine learning have become material contributors to corporate carbon footprints — a single large model training run can emit as much CO2 as five cars over their operational lifetimes. As EU AI Act requirements and SEC climate disclosure rules extend to scope 3 compute emissions, data science and ML teams need tooling to measure, attribute, and report the carbon cost of their models. Without measurement infrastructure, sustainability commitments are aspirational rather than auditable. Top ML conferences (NeurIPS, ICML) are increasingly requiring carbon disclosures in paper submissions.
CarbonTrack works as a Python decorator or context manager — wrapping any training loop or inference pipeline with three lines of code. It reads hardware power draw via NVIDIA API (for GPUs), Intel RAPL (for CPUs), and DRAM energy counters. Regional carbon intensity data from hundreds of electricity grids worldwide converts energy consumption into CO2-equivalent emissions. Results export to CSV, integrate with MLflow and Weights & Biases experiment tracking, and feed into a dashboard for cross-team benchmarking. For enterprise sustainability programs, the output feeds directly into scope 3 compute emissions reports for ESG disclosure.
Tell us about your problem. We'll tell you honestly how we'd approach it — and whether we're the right team.