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

貢獻者指南