-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit.sh
executable file
·146 lines (110 loc) · 5.68 KB
/
submit.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/bash
# script for generating final submissions
#--------------------------------
# simple - best precision
#--------------------------------
TEMPLATES=simple
CTX=20
RATIO=0.25
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# # generate
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_precision.csv
#--------------------------------
# compact - best precision
#--------------------------------
TEMPLATES=compact
CTX=5
RATIO=0.25
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# # generate
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_precision.csv
#--------------------------------
# simple - best recall
#--------------------------------
TEMPLATES=simple
CTX=40
RATIO=0.5
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# train
# ./qsub_train.sh --dataset "annotated_${TEMPLATES}_ctx${CTX}" --experiment rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX} --max_epochs 7 --model_path experiments/rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}/model.ckpt
# # generate <----- run training first
EXPERIMENT="rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_recall.csv
#--------------------------------
# compact - best recall
#--------------------------------
TEMPLATES=compact
CTX=10
RATIO=0.75
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# train
# ./qsub_train.sh --dataset "annotated_${TEMPLATES}_ctx${CTX}" --experiment rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX} --max_epochs 7 --model_path experiments/rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}/model.ckpt
# # generate <----- run training first
EXPERIMENT="rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_recall.csv
#--------------------------------
# simple - best F1
#--------------------------------
TEMPLATES=simple
CTX=40
RATIO=0.25
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# train
# ./qsub_train.sh --dataset "annotated_${TEMPLATES}_ctx${CTX}" --experiment rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX} --max_epochs 7 --model_path experiments/rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}/model.ckpt
# # generate <----- run training first
EXPERIMENT="rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_f1.csv
#--------------------------------
# compact - best F1
#--------------------------------
TEMPLATES=compact
CTX=40
RATIO=0.25
EXPERIMENT="rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# train
# ./qsub_train.sh --dataset "annotated_${TEMPLATES}_ctx${CTX}" --experiment rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX} --max_epochs 7 --model_path experiments/rotowire_${TEMPLATES}_r${RATIO}_ctx${CTX}/model.ckpt
# # generate <----- run training first
EXPERIMENT="rotowire_annotated_${TEMPLATES}_r${RATIO}_ctx${CTX}"
# qsub -q 'gpu*@!(dll9|dll10)' -pe smp 8 -l "mem_free=8G,gpu=1,gpu_ram=11G,hostname=*" -cwd -pty yes -j y -b y -o out -e out -N "d_${EXPERIMENT}" \
# ./decode.py --experiment ${EXPERIMENT} --ctx ${CTX} --templates ${TEMPLATES} --input_file test/games.csv --out_fname submit_${EXPERIMENT}.csv
# cp <----- generate first
cp experiments/${EXPERIMENT}/submit_${EXPERIMENT}.csv ./submit/${TEMPLATES}_best_f1.csv
#--------------------------------
# postprocessing
#--------------------------------
# merge subsequent errors for better precision
# for FILE in experiments/*/out.csv; do echo $FILE; ./postprocess_submission.py $FILE; done
for FILE in submit/*.csv; do
echo $FILE
./postprocess_submission.py $FILE
done
#--------------------------------
# consistency checks
#--------------------------------
for FILE in submit/*.csv; do
echo $FILE
./evaluate.py --gsml $FILE --submitted $FILE --token_lookup=test/token_lookup.yaml
done
#--------------------------------
# visualizations
#--------------------------------
for FILE in submit/*.csv; do
echo $FILE
OUT_HTML=`basename $FILE .csv`
./utils/gsml_to_html.py test/texts $FILE $FILE test/games.csv > submit/html/$OUT_HTML.html
done