-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhyperparam_tuning_nested.sh
executable file
·56 lines (40 loc) · 1.43 KB
/
hyperparam_tuning_nested.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
#!/bin/bash
set -e
export MAX_EPOCHS=20
export OUTPUT_FOLDER=tuning
CONF_FILES=configurations/conf_*.env
# for HuRIC only
export DATASET=huric/modern_right
export MODE=cross_nested
for f in $CONF_FILES
do
CONFIG_FILE=${f} python nlunetwork/main.py
done
# aggregate the epochs
python nlunetwork/results_aggregator.py nlunetwork/results/tuning/ ${DATASET}
mv nlunetwork/results/tuning/aggregated.json nlunetwork/results/tuning/aggregated_huric.json
# for FrameNet fulltexts
export DATASET=framenet/subset_both
export MODE=cross
for f in $CONF_FILES
do
CONFIG_FILE=${f} python nlunetwork/main.py
done
# aggregate the epochs
python nlunetwork/results_aggregator.py nlunetwork/results/tuning/ ${DATASET}
mv nlunetwork/results/tuning/aggregated.json nlunetwork/results/tuning/aggregated_fn_ft.json
# for FrameNet lu
export MAX_EPOCHS=10 # more samples, less epochs
export DATASET=framenet/modern_lu_subset_right
export MODE=cross
for f in $CONF_FILES
do
CONFIG_FILE=${f} python nlunetwork/main.py
done
# aggregate the epochs
python nlunetwork/results_aggregator.py nlunetwork/results/tuning/ ${DATASET}
mv nlunetwork/results/tuning/aggregated.json nlunetwork/results/tuning/aggregated_fn_lu.json
echo "Hyperparameter tuning results:"
python select_best.py nlunetwork/results/tuning/aggregated_huric.json
python select_best.py nlunetwork/results/tuning/aggregated_fn_ft.json
python select_best.py nlunetwork/results/tuning/aggregated_fn_lu.json