mlco2/codecarbon

Having the same run-ids for different decorators?

TECO-Octo opened this issue · 6 comments

  • CodeCarbon version: 2.4.2
  • Python version: 3.12
  • Operating System: macOS

Description

When you implement different decorators for tracking, is it possible for them to have the same run-ids? (those you can see in the respective column in the .csv file).

Hey @TECO-Octo thanks for using codecarbon!
For now it is not possible, we assign a random uuid to each run. What is exactly your use case?

I have just realized, @TECO-Octo we have the concept of experiment_id, but for now it is only in our API.
For the .csv files there is an open PR ==> #463

Once that is merged, you can have different run_ids and a common experiment_id that you set up manually. Maybe that is what you need?

Thanks for the reply!
Actually what I want to figure out is what's the impact of having different ids for the runs?
Because I am afraid that I would have biased results in the process, emissions wise :(
In my case, I invoke four decorators, respectively tracking a function, that are called one after another

As long as they are run sequentially, you are fine. The only issue is if they are run in parallel, which might mean that some emissions are counted double.

Just so you know, we have an ongoing PR (#562) to prevent parallel instances of codecarbon. So in the future, instances run in parallel will not be allowed unless clearly specified by the user.

Ok!
Thanks for the clarifications!

Closing this as solved! Have a nice day