Skip to content

Commit

Permalink
Added the no. of configs evaluated to the ASHA benchmarking scripts, …
Browse files Browse the repository at this point in the history
…created 5 different ASHA scripts for each tunable parameter
  • Loading branch information
AbhinavBehal committed Jun 2, 2019
1 parent 74cec23 commit efbc966
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmarking/asha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score" > ${results_file}
echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 2 4 8 16 32 64 128 256 512 1024; do
echo ${i}

workers=50
min_r=1
max_r=${i}
Expand All @@ -23,7 +22,8 @@ for i in 2 4 8 16 32 64 128 256 512 1024; do
python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score}" >> ${results_file}
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null
29 changes: 29 additions & 0 deletions benchmarking/asha_early_stopping.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

current_folder="${BASH_SOURCE%/*}"
results_file="${current_folder}/results/asha_early_stopping.csv"
temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 1 2 4 8 16 32 64 128 256; do
echo ${i}
workers=100
min_r=1
max_r=256
early_stopping_rounds=${i}
reduction_factor=2

params="{\"n_workers\": ${workers}, \"min_r\": ${min_r}, \"max_r\": ${max_r},\
\"reduction_factor\": ${reduction_factor}, \"early_stopping_rounds\": ${early_stopping_rounds},\"cv\": 3}"

python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null
29 changes: 29 additions & 0 deletions benchmarking/asha_max_r.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

current_folder="${BASH_SOURCE%/*}"
results_file="${current_folder}/results/asha_max_r.csv"
temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 2 4 8 16 32 64 128 256; do
echo ${i}
workers=100
min_r=1
max_r=${i}
early_stopping_rounds=${max_r}
reduction_factor=2

params="{\"n_workers\": ${workers}, \"min_r\": ${min_r}, \"max_r\": ${max_r},\
\"reduction_factor\": ${reduction_factor}, \"early_stopping_rounds\": ${early_stopping_rounds},\"cv\": 3}"

python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null
29 changes: 29 additions & 0 deletions benchmarking/asha_min_r.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

current_folder="${BASH_SOURCE%/*}"
results_file="${current_folder}/results/asha_min_r.csv"
temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 1 2 4 8 16 32 64 128 256; do
echo ${i}
workers=100
min_r=${i}
max_r=256
early_stopping_rounds=${max_r}
reduction_factor=2

params="{\"n_workers\": ${workers}, \"min_r\": ${min_r}, \"max_r\": ${max_r},\
\"reduction_factor\": ${reduction_factor}, \"early_stopping_rounds\": ${early_stopping_rounds},\"cv\": 3}"

python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null
29 changes: 29 additions & 0 deletions benchmarking/asha_rf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

current_folder="${BASH_SOURCE%/*}"
results_file="${current_folder}/results/asha_rf.csv"
temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 2 4 8; do
echo ${i}
workers=100
min_r=1
max_r=64
early_stopping_rounds=${max_r}
reduction_factor=${i}

params="{\"n_workers\": ${workers}, \"min_r\": ${min_r}, \"max_r\": ${max_r},\
\"reduction_factor\": ${reduction_factor}, \"early_stopping_rounds\": ${early_stopping_rounds},\"cv\": 3}"

python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null
29 changes: 29 additions & 0 deletions benchmarking/asha_workers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

current_folder="${BASH_SOURCE%/*}"
results_file="${current_folder}/results/asha_workers.csv"
temp_file="${current_folder}/.temp"

mkdir -p "${current_folder}/results" && touch ${results_file}

echo "Workers,Min_R,Max_R,Reduction_Factor,Early_Stopping_Rounds,Time,Score,Configs_Evaluated" > ${results_file}

for i in 2 4 8 16 32 64 128 256 512; do
echo ${i}
workers=${i}
min_r=1
max_r=256
early_stopping_rounds=${max_r}
reduction_factor=2

params="{\"n_workers\": ${workers}, \"min_r\": ${min_r}, \"max_r\": ${max_r},\
\"reduction_factor\": ${reduction_factor}, \"early_stopping_rounds\": ${early_stopping_rounds},\"cv\": 3}"

python "${current_folder}/../main.py" -a asha -p "${params}" > ${temp_file}
score=`grep -oP "(?<=Best score: ).+" ${temp_file}`
time=`grep -oP "(?<=Took: )[\\d\\.]+" ${temp_file}`
configs=`grep -oP "(?<=Total configs evaluated: ).+" ${temp_file}`
echo "${workers},${min_r},${max_r},${reduction_factor},${early_stopping_rounds},${time},${score},${configs}" >> ${results_file}
done

rm -f ${temp_file} &> /dev/null

0 comments on commit efbc966

Please sign in to comment.