Code Monkey home page Code Monkey logo

carbonara's Introduction

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.


Running experiments

  • Set up experiments in /experiments and run in index.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 using readinator.py:

    python src/readinator.py
    

Installation

To use this project, you need to have Python 3.9 installed on your Intel-based Windows machine.

  1. Clone the repository to your local machine.

    git clone https://github.com/philippedeb/carbonara.git
    
  2. Navigate to the project directory.

    cd your-repository
    
  3. Create a virtual environment using venv or conda. 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
      
  4. 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.

carbonara's People

Contributors

philippedeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.