Count the amount of carbon used for creating an AI model using Impact framework and display in Hugging face
timestamp
- When the training for startedduration
- how much took to complete the training in secondscloud/instance-type
- Cloud instance name understandable by cloud-metadata plugincloud/vendor
- Cloud vendor like azure, gcp, aws understandable by cloud-metadata plugincloud/region
- Cloud regin where the machines were located cloud/region understandable by cloud-metadata plugincpu/utilization
- If you know approximate usage percentage, otherwise go with 100
WattTime API requires activation of subscription before usage. Please refer to the WattTime website for more information.
Create a .env
file in the IF project root directory. This is where you can store your WattTime authentication details. Your .env
file should look as follows:
Required Parameters:
WATT_TIME_USERNAME: <your-username>
WATT_TIME_PASSWORD: <your-password>
install node
npm install -g "@grnsft/if-plugins"
npm install -g "@grnsft/if-unofficial-plugins"
ie --manifest ./ai_carbon_counter.yml --output output
The final output will be available in output file. Look for carbon variable for the carbon usage in grams.
- duration to be within 32 days (WattTime plugin).
- Emissions are aggregated for every 5 minutes regardless of the granularity of the inputs (WattTime plugin).
- Limited instance types support (cloud-metadata plugin)