Highlights
This release addresses issues preventing users from using CarbonTracker due to the new kernel update on Linux, which necessitates root privileges for energy measurements through Intel's RAPL monitoring. CarbonTracker now throws more descriptive error messages in the case above and when GPUs do not support the retrieval of power usages in NVML.
The constant factors for estimating ML tasks' power consumption and carbon footprint are now updated, reflecting the latest numbers reported by the European Economic Area (EEA). Also, the carbon intensity values are now country-specific.
Additionally, we have resolved a bug preventing the correctness of logging data when using multiple instances of CarbonTracker in the same script and added an option for prefixing (labelling) logging files for individual instances of CarbonTracker.
Summary:
- Catch Intel RAPL permission error (Issue: 40)
- Throw descriptive error message when GPU does not support retrieval of power usages in NVML (Issue: 36)
- Fix the issue with log files being overwritten due to short measurement periods when multiple instances of carbontracker are instantiated.
- Add prefix labelling for individual logging instances (Issue: 26)
- Fix energydataservice API (Issue: 46)
- Update PUE
- Updated default/fallback value for when live carbon intensity cannot be fetched
- Update carbon intensity to be country-specific (PR: 49)
- Update factor for equivalent km travelled by car
- Deprecate support for Python 3.6 (Issue: 48)
Monitoring power usage
Intel RAPL
A new security update for the Linux kernel now requires root privileges to access CPU power consumption through Intel's RAPL interface. This, unfortunately, caused jobs to get aborted when using CarbonTracker. We now omit to monitor CPU power usage in such cases to prevent crashes and give a message informing users of the issue and where to look to fix it.
GPUs not supporting retrieval of power usages in NVML
Not all GPUs support retrieval of power usage through the NVML API, which is used for monitoring the power usage of GPUs. The user was previously left uninformed about this issue, and monitoring the remaining hardware components would continue. A message is now shown informing the user of the issue with a link for where to find additional information.
Logging
Multiple instances
There was an issue where log files would be overwritten due to short measurement periods when multiple instances of carbontracker were instantiated since timestamps were used for naming logging files. The corresponding process ID of the logged task now prefixes logging files. Logging files now have the format `processID_timestamp_carbontracker.log` for the standard log and `processID_timestamp_carbontracker_output.log` for the output log.
Label log runs
It is now possible to label monitoring instances - logging files - by providing a prefix when instantiating CarbonTracker:
python
from carbontracker.tracker import CarbonTracker
tracker = CarbonTracker(epochs=max_epochs, log_dir="logs", log_file_prefix="prefix")
Training loop.
for epoch in range(max_epochs):
tracker.epoch_start()
Your model training.
tracker.epoch_end()
Optional: Add a stop in case of early termination before all monitor_epochs have
been monitored to ensure that actual consumption is reported.
tracker.stop()
The resulting log files will have the format `prefix_processID_timestamp_carbontracker.log`.
Measurements
Carbon intensity
We updated the default/fallback value for when live carbon intensity cannot be fetched. We now use the latest [data](https://ourworldindata.org/grapher/carbon-intensity-electricity) for the average carbon intensity of the specific country detected. If the aforementioned fails, we default to worldwide [average carbon intensity for 2019](https://www.eea.europa.eu/ims/greenhouse-gas-emission-intensity-of-1) of 475 gCO<sub>2</sub>eq/kWh instead. The data used is generated using a [script](scripts/create_carbon_intensity_csv.py), which generates a small .csv file from our [data source](https://ourworldindata.org/grapher/carbon-intensity-electricity).
PUE
The values for estimating power consumption and carbon footprint are now updated. The PUE is now [1.55](https://uptimeinstitute.com/uptime_assets/6768eca6a75d792c8eeede827d76de0d0380dee6b5ced20fde45787dd3688bfe-2022-data-center-industry-survey-en.pdf).
Conversion
The CO<sub>2</sub>-performance of new passenger cars used is now [107.5](https://www.eea.europa.eu/ims/co2-performance-of-new-passenger). This value is used for estimating the CO<sub>2</sub> equivalent emission for km travelled by car.
API
The [energydataservice API](https://www.energidataservice.dk/) changed, and we have adjusted the API calls accordingly.
test-1.1.9
Highlights
This release addresses issues preventing users from using CarbonTracker due to the new kernel update on Linux, which necessitates root privileges for energy measurements through Intel's RAPL monitoring. CarbonTracker now throws more descriptive error messages in the case above and when GPUs do not support the retrieval of power usages in NVML.
The constant factors for estimating ML tasks' power consumption and carbon footprint are now updated, reflecting the latest numbers reported by the European Economic Area (EEA). Also, the carbon intensity values are now country-specific.
Additionally, we have resolved a bug preventing the correctness of logging data when using multiple instances of CarbonTracker in the same script and added an option for prefixing (labelling) logging files for individual instances of CarbonTracker.
Summary:
- Catch Intel RAPL permission error (Issue: 40)
- Throw descriptive error message when GPU does not support retrieval of power usages in NVML (Issue: 36)
- Fix the issue with log files being overwritten due to short measurement periods when multiple instances of carbontracker are instantiated.
- Add prefix labelling for individual logging instances (Issue: 26)
- Fix energydataservice API (Issue: 46)
- Update PUE
- Updated default/fallback value for when live carbon intensity cannot be fetched
- Update carbon intensity to be country-specific (PR: 49)
- Update factor for equivalent km travelled by car
- Deprecate support for Python 3.6 (Issue: 48)
Monitoring power usage
Intel RAPL
A new security update for the Linux kernel now requires root privileges to access CPU power consumption through Intel's RAPL interface. This, unfortunately, caused jobs to get aborted when using CarbonTracker. We now omit to monitor CPU power usage in such cases to prevent crashes and give a message informing users of the issue and where to look to fix it.
GPUs not supporting retrieval of power usages in NVML
Not all GPUs support retrieval of power usage through the NVML API, which is used for monitoring the power usage of GPUs. The user was previously left uninformed about this issue, and monitoring the remaining hardware components would continue. A message is now shown informing the user of the issue with a link for where to find additional information.
Logging
Multiple instances
There was an issue where log files would be overwritten due to short measurement periods when multiple instances of carbontracker were instantiated since timestamps were used for naming logging files. The corresponding process ID of the logged task now prefixes logging files. Logging files now have the format `processID_timestamp_carbontracker.log` for the standard log and `processID_timestamp_carbontracker_output.log` for the output log.
Label log runs
It is now possible to label monitoring instances - logging files - by providing a prefix when instantiating CarbonTracker:
python
from carbontracker.tracker import CarbonTracker
tracker = CarbonTracker(epochs=max_epochs, log_dir="logs", log_file_prefix="prefix")
Training loop.
for epoch in range(max_epochs):
tracker.epoch_start()
Your model training.
tracker.epoch_end()
Optional: Add a stop in case of early termination before all monitor_epochs have
been monitored to ensure that actual consumption is reported.
tracker.stop()
The resulting log files will have the format `prefix_processID_timestamp_carbontracker.log`.
Measurements
Carbon intensity
We updated the default/fallback value for when live carbon intensity cannot be fetched. We now use the latest [data](https://ourworldindata.org/grapher/carbon-intensity-electricity) for the average carbon intensity of the specific country detected. If the aforementioned fails, we default to worldwide [average carbon intensity for 2019](https://www.eea.europa.eu/ims/greenhouse-gas-emission-intensity-of-1) of 475 gCO<sub>2</sub>eq/kWh instead. The data used is generated using a [script](scripts/create_carbon_intensity_csv.py), which generates a small .csv file from our [data source](https://ourworldindata.org/grapher/carbon-intensity-electricity).
PUE
The values for estimating power consumption and carbon footprint are now updated. The PUE is now [1.55](https://uptimeinstitute.com/uptime_assets/6768eca6a75d792c8eeede827d76de0d0380dee6b5ced20fde45787dd3688bfe-2022-data-center-industry-survey-en.pdf).
Conversion
The CO<sub>2</sub>-performance of new passenger cars used is now [107.5](https://www.eea.europa.eu/ims/co2-performance-of-new-passenger). This value is used for estimating the CO<sub>2</sub> equivalent emission for km travelled by car.
API
The [energydataservice API](https://www.energidataservice.dk/) changed, and we have adjusted the API calls accordingly.