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 envsource 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, wherenis the number of cpu cores andmis the number of gigabytes of RAM that the application was run on. Make sure all csv files in subfolders have aruntimecolumn and any feature columns of the application. - For a csv file, make sure the columns contain
runtimeand any feature columns of the application.Encode the number of cpu cores and gigabytes of RAM in ahardwarecolumn 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_DATAis 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_dataorpython3 pre_process.py --base_path=data/matmul.csv
- For example,
- Finally, to see some of the functionality of BanditWare, run
examples.pyafter selecting the dataset you would like to run on and specifying the feature columns of that dataset.
For anyone looking to contribute, please see CONTRIBUTING.md.