Carbonara 🍝 is a Windows tool to compare the energy consumption of Python code using Intel Power Gadget (3.6). Hopefully, this can lead to insights into how we can reduce carbon emissions as a community. This project is not actively maintained and did not have a focus on proper code quality, merely the effectiveness of the tool for realising quick academic research.
As an example, popular and compatible Python packages for common data operations, e.g. Pandas, Vaex, Polars and Dask, have been compared for academic purposes and a simple run of the experiment can be visualized by checking out results/results-experiment.csv
. In addition, the experiments are still displayed in /experiments
and set up in index.py
to serve as an example, although changes are required for your own experiment.
For any questions or issues, please reach out.
- Set up experiments in
/experiments
and run inindex.py
:python index.py
Important: For valid results of experiments, please refer to this scientific guide by Luís Cruz, such that the experiment environment of measuring energy consumption is fully understood or adjusted to your intentions.
- Start the Streamlit app for visualisation of results.
streamlit run gui.py
Or, manually:
-
Connect the results of the experiment with PowerGadget logs in
parsinator.py
:python src/parsinator.py
-
Read the results (stored in
/results
) by usingreadinator.py
:python src/readinator.py
To use this project, you need to have Python 3.9 installed on your Intel-based Windows machine.
-
Clone the repository to your local machine.
git clone https://github.com/philippedeb/carbonara.git
-
Navigate to the project directory.
cd your-repository
-
Create a virtual environment using
venv
orconda
. 3.1. Using venv:python3 -m venv venv
- Activate the virtual environment:
venv\Scripts\activate
3.2. Using conda:
conda create --name myenv python=3.9
- Activate the conda environment:
conda activate myenv
- Activate the virtual environment:
-
Install the required packages.
pip install -r requirements.txt
Or using conda:
conda install --file requirements.txt
Note: if you do not plan on checking out existing /experiments
, only streamlit
, scipy
, plotly
, psutil
and wmi
are needed.