We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73a1d6b commit 9d6c4d5Copy full SHA for 9d6c4d5
1 file changed
codecarbon/emissions_tracker.py
@@ -851,7 +851,11 @@ def _measure_power_and_energy(self) -> None:
851
raise e
852
853
warning_duration = self._measure_power_secs * 3
854
- if last_duration > warning_duration and not self._scheduler._stopped:
+ if (
855
+ last_duration > warning_duration
856
+ and self._scheduler
857
+ and not self._scheduler._stopped
858
+ ):
859
warn_msg = (
860
"Background scheduler didn't run for a long period"
861
+ " (%ds), results might be inaccurate"
0 commit comments