carbonai.PowerMeter.stop_measure¶
- PowerMeter.stop_measure()¶
Stops the measure started with
PowerMeter.start_measure()
See also
PowerMeter.start_measure
Stop the measure started with start_measure
PowerMeter.from_config
Create a PowerMeter object from a config file
PowerMeter.measure_power
Measure the power usage using a function decorator
PowerMeter.__call__
Measure the power usage using a with statement
Notes
We do not recommend using this method to monitor the energy usage of your code because it won’t automatically stop if an error is raised at some point while running. You will then have to stop the measure manually with
PowerMeter.stop_measure()
.Examples
First, create a PowerMeter (you only do to this step once).
>>> power_meter = PowerMeter.from_config("config.json")
Start measuring the code you wish to monitor
>>> power_meter.start_measure( ... package="pandas, numpy", ... algorithm="data cleaning", ... step="preprocessing", ... data_type="tabular", ... comments="Cleaning of csv files + train-test splitting" ... ) ... # do something result_of_your_code
Do not forget to stop measuring
>>> power_meter.stop_measure()