Python3 context manager to log power consumption of an ML-pipeline running on a Nvidia-GPU.
pip install power-consumption
from power_watcher import PowerWatcher
with PowerWatcher() as pw:
...
your pipeline
...
total_consumption = pw.total # total power consumption