A tool for interactively tracking and exploring energy consumption for ML models
For more information, check out our manuscript:
EnergyVis: Interactively Tracking and Exploring Energy Consumption for ML Models. Omar Shaikh, Jon Saad-Falcon, Austin P Wright, Nilaksh Das, Scott Freitas, Omar Asensio, and Duen Horng (Polo) Chau. Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems
For a live demo (without using the backend), visit: http://poloclub.github.io/EnergyVis/
Clone or download this repository:
git clone git@github.com:poloclub/EnergyVis.git
# use degit if you don't want to download commit histories
degit poloclub/EnergyVis
Navigate to the frontend folder:
cd frontend
Install the dependencies:
yarn install
Then run EnergyVis:
yarn start
Navigate to localhost:5000. You should see EnergyVis running in your broswer :)
If you want to collect data on your model's energy profile, you can set up live-tracking by starting the EnergyVis backend.
Navigate to the backend folder:
cd backend
Install the backend module:
pip install --editable ./
Use the module in your training code, like documented below:
from carbontracker.tracker import CarbonTracker
tracker = CarbonTracker(epochs=max_epochs)
# 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 has
# been monitored to ensure that actual consumption is reported.
tracker.stop()
In the console, you'll see a backend URL being printed when you run your training code. Simply plug this URL into the EnergyVis frontend to live-track your model.
CNN Explainer was created by Omar Shaikh, Jon Saad-Falcon, Austin P Wright, Nilaksh Das, Scott Freitas, Omar Asensio, and Polo Chau
@inproceedings{shaikhEnergyVis2021,
author = {Shaikh, Omar and Saad-Falcon, Jon and Wright, Austin P and Das, Nilaksh and Freitas, Scott and Asensio, Omar and Chau, Duen Horng},
title = {EnergyVis: Interactively Tracking and Exploring Energy Consumption for ML Models},
year = {2021},
isbn = {9781450380959},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3411763.3451780},
doi = {10.1145/3411763.3451780},
booktitle = {Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems},
articleno = {458},
numpages = {7},
keywords = {environmental sustainability, computational equity, machine learning, interactive visualization},
location = {Yokohama, Japan},
series = {CHI EA '21}
}
Also, cite carbontracker, which we rely on for our backend!
@misc{anthony2020carbontracker,
title={Carbontracker: Tracking and Predicting the Carbon Footprint of Training Deep Learning Models},
author={Lasse F. Wolff Anthony and Benjamin Kanding and Raghavendra Selvan},
howpublished={ICML Workshop on Challenges in Deploying and monitoring Machine Learning Systems},
month={July},
note={arXiv:2007.03051},
year={2020}}
The software is available under the MIT License.
If you have any questions, feel free to open an issue or contact Omar Shaikh.