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

codecarbon and memray interaction #489

Closed lcrmorin closed 8 months ago

lcrmorin commented 9 months ago

I was trying to use code carbon along memray magic. It seems that the %%memray_flamegraph magic create (and overide) something nommed tracker. That prevent further use of codecarbon tracker. I don't know if the problem is on code carbon side. But currently I could't add energy consumption in my tracker.

inimaz commented 8 months ago

Hello @lcrmorin, in order to be able to reproduce this issue, could you give us an snippet of how you are running memray and codecarbon together? Also the exact logs of the error you are seeing. Thanks a lot!

benoit-cty commented 8 months ago

If you use something like tracker = EmissionsTracker(project_name="classification-measure") you could try another name, like codecarbon_tracker = EmissionsTracker(project_name="classification-measure").

Does it works ?

lcrmorin commented 8 months ago

Seems like it would work. In the end I removed memray. As it is a profiler (and not a sampling profiler) it would fill the drive then crash with a bit of calculations.

inimaz commented 8 months ago

Closing this. Looks like it is solved.