Closed LeahChercham closed 1 week ago
Update emissions_tracker.py to fix issue https://github.com/mlco2/codecarbon/issues/549 Divide by zero in start_task() by replacing time.time() by time.perf_counter()
Replaced all time.time() by time.perf_counter() in file emissions_tracker.py.
perf_counter gets the current time with higher precision.
(I had to recreate this pull request as I deleted my repo by mistake: https://github.com/mlco2/codecarbon/pull/570)
Update emissions_tracker.py to fix issue https://github.com/mlco2/codecarbon/issues/549 Divide by zero in start_task() by replacing time.time() by time.perf_counter()
Replaced all time.time() by time.perf_counter() in file emissions_tracker.py.
perf_counter gets the current time with higher precision.
(I had to recreate this pull request as I deleted my repo by mistake: https://github.com/mlco2/codecarbon/pull/570)