-
Notifications
You must be signed in to change notification settings - Fork 0
/
eval.sh
108 lines (93 loc) · 2.82 KB
/
eval.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
CHECKPOINT=""
LR=1e-5
EPOCH=15
BS=16
YEAR=2014
WARM=100
name="cmed_roberta-entity-cmlm-luke2"
mkdir outputs
mkdir outputs/${name}
checkpoints="roberta-entity-cmlm-luke_8_460000.ckpt"
iterations="460000"
array_checkpoints=($checkpoints)
array_iterations=($iterations)
seed=4
count=${#array_checkpoints[@]}
for i in `seq 1 $count`
do
ckpt=${array_checkpoints[$i-1]}
iter=${array_iterations[$i-1]}
mkdir outputs/${name}/${iter}
mkdir outputs/${name}/${iter}/${YEAR}_30_${seed}
python -m cli.ed_finetune \
--weight_path ${name}/${ckpt} \
--config_name ${name}/config \
--epochs ${EPOCH} \
--train_bs ${BS} \
--year ${YEAR} \
--seed ${seed} \
--warmup_step ${WARM} \
--name ${LR}_${WARM}_${YEAR}_${BS}-${EPOCH}-${seed} \
--lr ${LR} \
--output_path outputs/${name}/${iter}/${YEAR}_30_${seed}
done
seed=3
count=${#array_checkpoints[@]}
for i in `seq 1 $count`
do
ckpt=${array_checkpoints[$i-1]}
iter=${array_iterations[$i-1]}
mkdir outputs/${name}/${iter}
mkdir outputs/${name}/${iter}/${YEAR}_30_${seed}
python -m cli.ed_finetune \
--weight_path ${name}/${ckpt} \
--config_name ${name}/config \
--epochs ${EPOCH} \
--train_bs ${BS} \
--year ${YEAR} \
--seed ${seed} \
--warmup_step ${WARM} \
--name ${LR}_${WARM}_${YEAR}_${BS}-${EPOCH}-${seed} \
--lr ${LR} \
--output_path outputs/${name}/${iter}/${YEAR}_30_${seed}
done
seed=2
count=${#array_checkpoints[@]}
for i in `seq 1 $count`
do
ckpt=${array_checkpoints[$i-1]}
iter=${array_iterations[$i-1]}
mkdir outputs/${name}/${iter}
mkdir outputs/${name}/${iter}/${YEAR}_30_${seed}
python -m cli.ed_finetune \
--weight_path ${name}/${ckpt} \
--config_name ${name}/config \
--epochs ${EPOCH} \
--train_bs ${BS} \
--year ${YEAR} \
--seed ${seed} \
--warmup_step ${WARM} \
--name ${LR}_${WARM}_${YEAR}_${BS}-${EPOCH}-${seed} \
--lr ${LR} \
--output_path outputs/${name}/${iter}/${YEAR}_30_${seed}
done
seed=1
count=${#array_checkpoints[@]}
for i in `seq 1 $count`
do
ckpt=${array_checkpoints[$i-1]}
iter=${array_iterations[$i-1]}
mkdir outputs/${name}/${iter}
mkdir outputs/${name}/${iter}/${YEAR}_30_${seed}
python -m cli.ed_finetune \
--weight_path ${name}/${ckpt} \
--config_name ${name}/config \
--epochs ${EPOCH} \
--train_bs ${BS} \
--year ${YEAR} \
--seed ${seed} \
--warmup_step ${WARM} \
--name ${LR}_${WARM}_${YEAR}_${BS}-${EPOCH}-${seed} \
--lr ${LR} \
--output_path outputs/${name}/${iter}/${YEAR}_30_${seed}
done