mlco2/codecarbon
Track emissions from Compute and recommend ways to reduce their impact on the environment. observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 98
- Release rhythm 96
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 15.5
- age_days: 2304
- days_rel: 29
- days_push: 13
- n_releases_24m: 31
Adoption not part of the score
1905 stars · 316 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
CodeCarbon is a lightweight Python library and CLI that estimates and tracks CO2 emissions from local computing hardware (CPU, GPU, RAM) by measuring power consumption and applying regional carbon intensity. It helps quantify the environmental impact of running code, especially machine learning workloads, and recommends ways to reduce it.
Use cases
- track carbon emissions of my machine learning training runs
- measure energy consumption of python code
- estimate co2 footprint of gpu training
- monitor sustainability of compute workloads
- compare carbon efficiency of ml models
- track emissions from a command without changing code
When to choose
- you run ML training or heavy compute on local hardware and want to quantify its carbon footprint
- you want a simple pip-installable tracker with a Python API and CLI
- you need emissions reporting for sustainability or ai-ethics goals
When to avoid
- you need emissions from remote GenAI API calls (use EcoLogits instead)
- you need fine-grained measurement of disk, network, cooling, or display power
- you run exclusively on hardware where power metrics are unavailable
Facets
library · maturity active
monitoring analytics benchmarking cli machine-learning developer-tools data-science energy python windows cli carbon-emissions energy-consumption co2-tracking green-computing ai-ethics sustainability emissions-tracker linux macos
4 sources
- readme: https://github.com/mlco2/codecarbon · fetched 2026-08-28 · c292a9b950e4
- homepage: https://docs.codecarbon.io/ · fetched 2026-08-29 · be56de3a38dd
- site_page: https://docs.codecarbon.io/latest · fetched 2026-08-29 · 1f69784e88f0
- registry_pypi: https://pypi.org/pypi/codecarbon/json · fetched 2026-08-29 · 88309bfafe63
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mlco2/codecarbon | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="mlco2/codecarbon")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem