-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_re_concat.sh
61 lines (57 loc) · 2.14 KB
/
test_re_concat.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
#!/bin/bash
source env/bin/activate
printf "fold 1, epoch 1\r\n"
for (( i=1; i<=10; i++ ))
do
step=$((i * 100))
printf "step ${step}\r\n"
python src/re_gold_qa_train.py \
--mode re_concat_qa_test \
--model_path $HOME/concat_fold_1/ \
--checkpoint _0_step_${step}_model \
--learning_rate 0.0005 --max_epochs 1 \
--concat_questions True \
--batch_size 64 --gpu True \
--ignore_unknowns False \
--train zero-shot-extraction/relation_splits/train.very_small.0 \
--dev zero-shot-extraction/relation_splits/dev.0 \
--gpu_device 0 \
--seed 12321 \
--prediction_file $HOME/concat_fold_1/concat_fold_1.dev.predictions.0.step.${step}.csv
done
'
gsutil -m cp gs://acl-2022-storage/concat_fold_1/model_1_model $HOME/concat_fold_1/
printf "Full epoch 1 \r\n"
python src/re_gold_qa_train.py \
--mode re_concat_qa_test \
--model_path $HOME/concat_fold_1/ \
--checkpoint _1_model \
--learning_rate 0.001 --max_epochs 1 \
--concat_questions False \
--batch_size 64 --gpu True \
--ignore_unknowns False \
--train zero-shot-extraction/relation_splits/train.0 \
--dev zero-shot-extraction/relation_splits/dev.0 \
--gpu_device 0 \
--seed 12321 \
--prediction_file $HOME/concat_fold_1/concat_fold_1.dev.predictions.1.full.csv
gsutil -m cp $HOME/concat_fold_1/concat_fold_1.dev.predictions.1.full.csv gs://acl-2022-storage/concat_fold_1/
rm -r -f $HOME/concat_fold_1/model_1_model
gsutil -m cp gs://acl-2022-storage/concat_fold_1/model_response_pretrained_model $HOME/concat_fold_1/
printf "step 0\r\n"
python src/re_gold_qa_train.py \
--mode re_concat_qa_test \
--model_path $HOME/concat_fold_1/ \
--checkpoint _response_pretrained_model \
--learning_rate 0.001 --max_epochs 1 \
--concat_questions False \
--batch_size 64 --gpu True \
--ignore_unknowns False \
--train zero-shot-extraction/relation_splits/train.0 \
--dev zero-shot-extraction/relation_splits/dev.0 \
--gpu_device 0 \
--seed 12321 \
--prediction_file $HOME/concat_fold_1/concat_fold_1.dev.predictions.1.step.0.csv
gsutil -m cp $HOME/concat_fold_1/concat_fold_1.dev.predictions.1.step.0.csv gs://acl-2022-storage/concat_fold_1/
rm -r -f $HOME/concat_fold_1/model_response_pretrained_model
'