mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1k stars 157 forks source link

Power measurements in emissions.csv #559

Open ConstanceDws opened 1 month ago

ConstanceDws commented 1 month ago

Description

I have a question regarding the cpu_power, gpu_power, and ram_power values in the emissions.csv file generated by CodeCarbon. I noticed that these values represent the latest instantaneous power measurements for each component. Is this the normal operating behavior, or is it an error? If not, it would be helpful to clarify this in the documentation, as it can be misleading. Users might mistakenly assume that these values reflect the mean power consumption of each component over the measurement period.

Alternatively, would it be more useful to compute these power values as the mean power? This would involve dividing the energy consumption of each component by the duration of the measurement period. However, I realize that this approach may not be as informative, given that this information is already available in the emissions.csv file.

SaboniAmine commented 1 month ago

Hello, we have multiple ways of representing power, energy & emissions data. I would answer that the behavior you mention is the expected one, but maybe you are expecting something else. The mean power by itself is not quite useful, at least from my understanding, but its instant value gives an idea of what happened at a specific time. Would you have a specific usecase, where a mean power value would be useful ? (it could be aggregated in a reporting app, for instance).