-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_series.sh
executable file
·61 lines (51 loc) · 1.25 KB
/
run_series.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# ###########################################################
#
# PARSE INPUT
usage="
Usage: $(basename "$0") [-h] -s series -i iterations -l learner
where:
-s series folder in experiments
-i number of iterations
-l learner to use
"
series=""
iterations=""
learner=""
while getopts 'hs:i:l:' option; do
case "$option" in
h) echo "$usage"
exit
;;
s) series=$OPTARG
;;
i) iterations=$OPTARG
;;
l) learner=$OPTARG
;;
:) printf "missing argument for -%s\n" "$OPTARG" >&2
echo "$usage" >&2
exit 1
;;
\?) printf "illegal option: -%s\n" "$OPTARG" >&2
echo "$usage" >&2
exit 1
;;
esac
done
if [ -z "$series" -o -z "$iterations" -o -z "$learner" ]; then
echo "$usage" >&2
exit 1
fi
# EXECUTE
echo "=================================================="
echo "= "
echo "= $series with $learner"
echo "= "
echo "=================================================="
for experiment in $(find experiments/"$series" | grep .xml | sed 's/.xml//' | sed 's/.*\///')
do
echo "== Running: $experiment"
./run_experiment.sh -s "$series" -e "$experiment" -i "$iterations" -l "$learner"
./search_logs.sh "$series" "$experiment" "$learner"
done