-
Notifications
You must be signed in to change notification settings - Fork 7
/
reproduce.sh
executable file
·43 lines (32 loc) · 1.27 KB
/
reproduce.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
#!/usr/bin/bash
# Warning: This script has some unmentioned dependencies.
# Use it as a guideline for the steps to follow to use the code in this repository.
set -e
if [[ ! -d configs/finunified ]]; then
echo "you must run this script from the repository root"
exit 1
fi
echo "See the Section 'Evaluation Visualizer' in the readme to see the results"
echo "regenerating configs"
rm -r configs/finunified/vary-*
ts-node --fast configs/meta_config_generator.ts
getOutVersion() {
config=$1
gitversion="$(git describe --dirty)"
configname="$(jq -r .name "$config")"
echo "$gitversion:$configname"
}
bestconfig="configs/finunified/vary-features/lstm-best-features-power,pitch,ffv,word2vec_dim30.json"
echo "reproducing best config $bestconfig"
python -m trainNN.train "$bestconfig"
bestversion="$(getOutVersion "$bestconfig")"
echo "$bestversion"
python -m evaluate.evaluate "trainNN/out/$bestversion/config.json" allmargins
for config in configs/finunified/vary-*/*.json; do
if [[ $config == $bestconfig ]]; then continue; fi
echo "reproducing results for config $config"
python -m trainNN.train "$config"
version="$(getOutVersion $config)"
echo "evaluation $version"
python -m evaluate.evaluate "trainNN/out/$version/config.json" bestmargin
done