logo Frugale

Tool

CodeCarbon

Edited by :
CodeCarbon

Summary

CodeCarbon is a software that integrates into Python codebases. It estimates the amount of carbon (CO₂) produced by computing resources used to run code, whether in an internal cloud or locally on a machine, for machine learning experiments or other programs.

It helps development teams understand how they can reduce emissions by optimizing their code or hosting their cloud infrastructure in regions that use renewable energy sources.

CodeCarbon is an open-source tool. It was incubated in 2021 by Data for Good. As part of this initiative, the CodeCarbon team added an API and a dashboard to centralize emissions data and provide an aggregated view of emissions.

CodeCarbon is hosted by a French company, Clever Cloud, an IT automation platform. Clever Cloud supports the project by providing free hosting for the CodeCarbon API.

Developed by four partner organizations, CodeCarbon is available to the community for free. It is maintained regularly: as of the publication of this site, the latest update was released two days prior.

The editorial perspective

CodeCarbon is the foundation for many serious carbon footprint calculation tools used to assess the impact of AI algorithms. Given the rapid growth and adoption of AI—especially generative AI—CodeCarbon has become a crucial tool.

For example, Ecologits (see the Ecologits resource in this collection) relies on CodeCarbon’s data projections to estimate the carbon footprint of language models hosted by Hugging Face. Hugging Face, in turn, uses CodeCarbon to assess the impact of the AI models it hosts.

The tool is regularly updated (see its GitHub repository) by a strong open-source community. It is free and open-source, developed and maintained by four partner organizations.

The team behind CodeCarbon is international, but notably, the majority of the development team is based in France.

In brief, the editorial perspective

The most

  • A reference project
  • A project recognized internationally
  • A regularly updated project
  • An open-source project

The least

  • If there is one drawback: the documentation is only available in English

Publication date

2020

Available in

  • English

License

Open Source