mlco2 / codecarbon

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

Documentation: bug in offline mode code example #392

Closed tornede closed 1 year ago

tornede commented 1 year ago

Description

Within the documentation, one offline mode code example for context manager imports the offline mode but uses the online mode. It has to be like:

from codecarbon import OfflineEmissionsTracker

with OfflineEmissionsTracker() as tracker:
  # GPU intensive training code  goes here

Furthermore, the texts within this offline mode section should be checked to fit the offline mode.

What I Did

Investigated the offline mode documentation ;)

benoit-cty commented 1 year ago

Thank you ! Note for the dev :