An online recommendation system that dynamically selects the most suitable hardware for applications using a contextual multi-armed bandit algorithm.
-
Set Up a Virtual Environment:
-
With Python's built-in venv:
python3 -m venv env
source env/bin/activate
-
-
Install Dependencies:
-
Install required packages:
pip3 install -r requirements.txt
-
- Choose a dataset you would like to use. Choose a path to a folder or csv file that holds various runs of an application.
- For a folder, label subfolders as follows:
{n}cores_{m}gb
, wheren
is the number of cpu cores andm
is the number of gigabytes of RAM that the application was run on. Make sure all csv files in subfolders have aruntime
column and any feature columns of the application. - For a csv file, make sure the columns contain
runtime
and any feature columns of the application.Encode the number of cpu cores and gigabytes of RAM in ahardware
column with values like"2_16"
to represent 2 cpu cores and 16 GB of RAM.
- For a folder, label subfolders as follows:
- In the terminal, if you have a data folder, run
python3 pre_process.py --base_path={PATH_TO_DATA}
wherePATH_TO_DATA
is the path from step 1. If you have a single csv, run `python3 pre_process.py --data_file={PATH_TO_DATA_FILE}, where PATH_TO_DATA_FILE is the csv defined in part 1.- For example,
python3 pre_process.py --base_path=data/bp3d_data
orpython3 pre_process.py --base_path=data/matmul.csv
- For example,
- Finally, to see some of the functionality of BanditWare, run
examples.py
after selecting the dataset you would like to run on and specifying the feature columns of that dataset.