Track your code's CO2 emissions with Code Carbon
summary
CodeCarbon is an open source Python package that measures CPU GPU and RAM energy use and multiplies it by regional carbon intensity (via CO2 Signal / electricity maps), offers a CLI plus a Python decorator, writes CSV or logs or sends runs to a password‑protected dashboard, and requires platform power tools (powermetrics/sudo). Demo runs a small LLM (Gemma 2B), shows download+inference emissions are tiny but training is large, and one example compares ~0.11 kg CO2 in France to ~0.4 kg in India (~3×).
AI-written summary · about
chapters (9)
- 0:00Code Carbon introduction
- 1:10Why track code CO2 emissions
- 5:53What is Code Carbon
- 8:32Code Carbon CLI basics
- 11:03Code Carbon in Python
- 14:46Emissions by region
- 20:52Dashboard and privacy
- 22:19Reducing code footprint
- 24:46Q&A
related talks
47mCodeCarbon: How to Measure the CO2 Impact of M...
28mReduce the environmental footprint of your Python programs
36mLet’s program to fight the impacts of climate change!
34mCarbon Footprint–Aware Software Development
44mCloud computing and carbon emissions
55mCode that Won't Heat the Planet: Engineering Sustainable Software for a Better Future
17mSustainable Coding: Why Your "Hello World" Matters
25mBuilding an AWS EC2 Carbon Emissions Dataset
