mlco2/codecarbon

Update CodeCarbon data

开放

#503 创建于 2024年2月21日

 (5 条评论) (0 个反应) (0 位负责人)Python (306 个派生)auto 404
P1good first issue

仓库指标

星标
 (1,885 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南