-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_all.sh
More file actions
executable file
·50 lines (46 loc) · 1.19 KB
/
run_all.sh
File metadata and controls
executable file
·50 lines (46 loc) · 1.19 KB
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
#!/bin/bash
#
# Usage: ./run_all.sh [model] [topics] [collection]
#
MODELS="dir jm okapi rm3 tfidf two"
TOPICS="short orig stopped"
COLLECTIONS="combined train test"
# If no model specified, run all models
models=$1
if [ -z "$models" ]; then
models="$MODELS"
elif [ "${MODELS/$models/ }" == "$MODELS" ]; then
echo "./run_all.sh [model] [topics] [collection]"
echo "model must be one of: $MODELS"
exit 1
fi
# If no topics specified, run all topics
topics=$2
if [ -z "$topics" ]; then
topics="$TOPICS"
elif [ "${TOPICS/$topics/ }" == "$TOPICS" ]; then
echo "./run_all.sh [model] [topics] [collection]"
echo "topics must be one of: $TOPICS"
exit 1
fi
# If no collection specified, run all collections
collections=$3
if [ -z "$collections" ]; then
collections="$COLLECTIONS"
elif [ "${COLLECTIONS/$collections/ }" == "$COLLECTIONS" ]; then
echo "./run_all.sh [models] [topics] [collections]"
echo "collection must be one of: $COLLECTIONS"
exit 1
fi
# NOTE: These paths are external to the container
base=/data/biocaddie
for model in $models
do
for col in $collections
do
for topic in $topics
do
kubernetes/$model.sh $topic $col
done
done
done