Skip to content

casch-europehack/casch

Repository files navigation

CaSch

This project is a profiling and scheduling service for machine learning jobs. It analyzes Python scripts to estimate energy consumption, execution time, and carbon emissions, and allows scheduling jobs with specific power-throttling policies to optimize carbon footprint.

Key Dependencies

This project relies on several important Python packages:

  • FastAPI & Uvicorn: High-performance framework and server for building the REST API.
  • PyTorch: Used for machine learning model execution and profiling.
  • Zeus-ML: A framework for deep learning energy measurement and optimization.
  • NumPy & SciPy: Fundamental packages for scientific computing and data manipulation.
  • Matplotlib: Used for plotting and visualizing profiling data.
  • Requests: For making HTTP requests to external services (e.g., Electricity Maps API).

Setup

python -m venv .venv
source .venv/bin/activate
.venv/bin/pip install -r requirements.txt

Usage

python monitor.py <path_to_user_job.py>

Running the Server

To start the FastAPI server, run:

python server.py

The server will be available at http://0.0.0.0:8000.

Alternatively, in case you'd like to deploy the client and the server in different networks, execute:

./start.sh

This will start the server and create an ngrok tunneling channel.

Example Jobs

There is an example job named test_job.py under the jobs directory.

About

sub-12-hour project developed at hackeurope

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors