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

Incorrect runtimes reported in emissions files #653

Open ferricadooza02 opened 3 weeks ago

ferricadooza02 commented 3 weeks ago

Description

I was trying to record the emissions generated while fine-tuning the Gemma-7B model on an A100 GPU on Google Colab. While the code ran without any errors, the duration reported by the library in the emissions seems to be incorrect.

In two trials, the total duration is reported as 33.5 seconds and 33.2 seconds, respectively, while the actual durations were closer to 30 minutes. I also recorded the emissions subtask-wise, and the durations for individual subtasks are reported as negative (e.g., -1723972816).

Since I did not face this issue with other notebooks I ran on Google Colab with other models and GPUs, as well as other models on the same GPU, I was wondering where the error came from in this scenario? Thanks!

benoit-cty commented 3 weeks ago

Hello, Thanks for using CodeCarbon.

We are going to release a fix about task duration : https://github.com/mlco2/codecarbon/pull/649

You seems to say that you also have problem without Task but only with A100 GPU on Google Colab and not with other GPU ?

Can you provide a link to you Colab notebook ?

ferricadooza02 commented 2 weeks ago

Hi, thanks for your response! May I know by when the fix will be released?

Here's the link to the notebook: https://colab.research.google.com/drive/1QiAQdgVX3VMw0pDCUj3yTYQ72MKFMnHN?usp=sharing

As seen in the following screenshot, the total duration reported is 33.5 seconds and 33.2 seconds, respectively, for two runs.

Screenshot 2024-09-15 at 11 52 16 AM
benoit-cty commented 2 weeks ago

Hello, The fix I was talking is in the last version 2.7.1, already on PyPi https://pypi.org/project/codecarbon/ and conda : https://anaconda.org/codecarbon/codecarbon

ferricadooza02 commented 1 week ago

Alright thanks! I'll try the specified version.