mlco2 / codecarbon

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

Clarification about Metrics like CPU Power and CPU Energy #679

Open altruistcoder opened 5 days ago

altruistcoder commented 5 days ago

Description

Hello,

I recently got introduced to Code Carbon for tracking emissions produced by our machine learning experiments and I am currently exploring the same for our use case.

I am having a bit of unclarity on certain metrics found out by Code Carbon which includes metrics like CPU, GPU & Memory Power and CPU, GPU and Memory Energy, on whether the results for these metrics take into consideration only the process executing the experiment or code carbon tracks the complete node (on which the pod is running inside which the experiment is being run) in the tracking duration and the metric values that come up in the results are for complete node instead of being for the particular machine learning experiment only?

Similarly, the values we get for the Emissions parameter field represent the total emissions produced by the node in the tracking duration or is it the value for that particular machine learning experiment only?

I tried going through the official documentation but couldn't find much information on it:

https://mlco2.github.io/codecarbon/output.html#http-output

So, if anyone could please provide some information on this topic or guide me through the right documentation, then it would be very helpful.

benoit-cty commented 4 hours ago

By default it's the complete node.

You have a tracking_mode but to be honest, it works only for RAM right now.

For GPU, you could mask the GPU you doesn't want to track with CUDA_VISIBLE_DEVICES