-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathrun_sensitivity.sh
executable file
·47 lines (37 loc) · 1.17 KB
/
run_sensitivity.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#########################################################################
# File Name: run.sh
# Author: Lin Ma
# mail: [email protected]
# Created Time: 10/08/17
#########################################################################
#!/bin/bash
trap onexit 1 2 3 15
function onexit() {
local exit_status=${1:-$?}
pkill -f hstore.tag
exit $exit_status
}
# ---------------------------------------------------------------------
# remove the log file
if [ -f run.log ] ; then
rm run.log
fi
PROJECT_ARRAY=( "tiramisu:tiramisu-combined-results"
"oli:oli-combined-results"
"admission:admission-combined-results" )
for PAIR in "${PROJECT_ARRAY[@]}"; do
PROJECT="${PAIR%%:*}"
DATA_PATH="${PAIR##*:}"
for RHO in '0.55' '0.65' '0.75' '0.85' '0.95'; do
cmd="time python3.5 online_clustering.py --project $PROJECT --dir $DATA_PATH
--rho $RHO"
echo $cmd
echo $cmd >> run.log
START=$(date +%s)
eval $cmd &
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "Execution time: $DIFF seconds"
echo -e "Execution time: $DIFF seconds\n" >> run.log
done # RHO
done # PROJECT