mlco2/codecarbon

Update CodeCarbon data

オープン

#503 opened on 2024/02/21

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)Python (306 件のフォーク)auto 404
P1good first issue

Repository metrics

Stars
 (1,885 個のスター)
PR merge metrics
 (PR metrics pending)

説明

My understanding is that CodeCarbon can (with some limitations) read real-time power consumption by CPUs and GPUs. From this, and integrating over time, the energy consumed is calculated (e.g. kWh). My understanding is that CC then uses a basic lookup to convert kWh to CO2_eq. It appears this is by using static data (https://github.com/mlco2/codecarbon/blob/master/codecarbon/data/private_infra/global_energy_mix.json).

It would be much better to use dynamic data e.g. from electricitymaps, WattTime etc. How would I go about doing this?

Secondly the data for UK in the above json file states a CI of "268.329" (is this g CO2_eq per kWh?) with a date of "2021". Where, UK Gov website (https://view.officeapps.live.com/op/view.aspx?src=https%3A%2F%2Fassets.publishing.service.gov.uk%2Fmedia%2F61ee7495e90e07037c8d6176%2Fconversion-factors-2021-condensed-set-most-users.xls&wdOrigin=BROWSELINK avail from https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2021) for 2021 data has a figure of 212.33 gCO2_eq per kWh for UK electricity on average for 2021

More importantly there is now updated annual average for UK, see https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2023

コントリビューターガイド