A CSCE 585 - Machine Learning Systems Project
-
Follow the instructions in the original ipa repository (https://github.com/reconfigurable-ml-pipeline/ipa/blob/main/infrastructure/automated.md)
-
For measuring energy consumption, install
perf
tool using the following commands:
sudo apt update
sudo apt install linux-tools-common linux-tools-generic linux-tools-$(uname -r)
perf --version
-
Run Experiments:
- Use the
experiments/runner/run_revision_perf.sh
script to run the experiments. - This script internally calls all experiments in
experiments/runner/run-revision.sh
and usesperf
to measure the energy consumption of each experiment. - Use the
experiments/runner/run_q_learning_perf.sh
script to run the Gurobi vs Q-learning experiments.
- Use the
-
Energy Measurement Logs:
- The energy consumption logs are saved in the
energy_logs
directory. - The energy consumption logs from the gurobi and Q-learning experiments are save in the
energy_comparison
directory.
- The energy consumption logs are saved in the
-
Generate Plots:
- Use the
experiments/runner/run_revision_perf_plot.ipynb
Jupyter Notebook to generate plots for the energy benchmarks of the workloads. - Use the
experiments/runner/graph_q_learning.ipynb
Jupyter Notebook to generate plots for the energy benchmarks of the Gurobi vs Q-learning workloads. - The generated plots are saved in the
plots
directory.
- Use the
-
Segment Anything:
-
Set up a conda environment using
conda create -n sam python=3.8
-
pip install git+https://github.com/facebookresearch/segment-anything.git
-
cd segment-anything; pip install -e .
-
Download sam weights from and place them in
segment-anything/model_checkpoints/
: -vit_b
: ViT-B SAM model. -vit_h
: ViT-H SAM model. -vit_l
: ViT-L SAM model. -
To generate energy consumption results use
segment-anything/sam_energy.sh
-
The energy logs will be in
segment-anything/sam_energy_log/
-
The segmentation masks will be saved in
segment-anything/segmentation_benchmark/{model_type}_results/
-
To graph the energy consumption results you can run the
segment_anything/graph_sam_energy_consumption.ipynb
file -
To calculate IoU run
segment-anything/metrics.sh
-
-
How to Run Q-Learning:
To run Q-learning, follow the same instructions as for the Gurobi optimizer. You only need to update the configurations used in the original code. Here are the steps:
- Locate the YAML configuration file in the folder
ipa-ext/data/configs
. - Update the optimizer parameter:
- Change the value of the
optimizer
parameter fromgurobi
toq_learning
.
- Change the value of the
- Adjust the function arguments:
- Modify any function arguments that currently have the value
gurobi
toq_learning
.
- Modify any function arguments that currently have the value
- Moreover, we have provided config files for Q-learning in the
ipa-ext/data/configs
directory. You can use these files to run Q-learning experiments. The config files with the number 4, 9, 14, and 19 are the Q-learning config files. These config files are used for running the project in the updated scripts and entry point and they can be used in the same way as the other optimizers.
By making these changes, you can use Q-learning as the optimizer in the pipeline.
Please find the Final report here. Please find the Final presentation slides here. Please find the Final presentation video here.