Track and reduce CO2 emissions from your computing
copied from cf-post-staging / codecarbonCodeCarbon is a Python package that estimates the carbon emissions produced by computer programs, from straightforward algorithms to deep neural networks.
It measures the electricity consumed by the machine it runs on and converts it to CO2 using the carbon intensity of the local electricity grid, taking into account your computing infrastructure, location, usage and running time. It can be used as a Python context manager, a decorator, or from the command line, and works either standalone or by reporting to the CodeCarbon API and dashboard.