CodeCarbon is an open-source Python library that estimates the CO2 emissions of code running on hardware the user controls, such as a laptop, workstation or cloud virtual machine. It measures CPU, GPU and RAM power use and applies regional grid carbon intensity to convert energy into emissions. It is installed with pip, and a companion web dashboard visualises the results. It is aimed at developers and researchers who need an emissions figure for machine-learning workloads.
The library is published under the MIT licence on GitHub, so organisations can inspect, fork and run it internally. The project is developed by the Code Carbon non-profit, which describes itself on its website as a French non-profit organisation. Its copyright notice names the Code Carbon NGO and earlier contributors from the Mila research institute. The optional dashboard at dashboard.codecarbon.io is a separate online service, and the website does not state where its data is hosted. A European organisation therefore decides whether to keep measurements local or to send results to the hosted dashboard.