-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtrain.sh
99 lines (85 loc) · 2.54 KB
/
train.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
carbot_data_path=carbot_data
rm -rf $carbot_data_path
echo $carbot_data_path
cp -r data/kg $carbot_data_path
cp -r data/kg $carbot_data_path
cp -r data/sample_question $carbot_data_path
cp -r data/dictionary $carbot_data_path
cp -r data/complex_qa.xlsx $carbot_data_path
python bert_script/run_text_classifier.py \
--cache_dir ./data/bert_pretrain \
--do_train \
--do_eval \
--do_lower_case \
--data_dir data/train/kbqa/predicate_classification \
--bert_model bert-base-chinese \
--max_seq_length 30 \
--train_batch_size 32 \
--learning_rate 2e-5 \
--num_train_epochs 5 \
--output_dir $carbot_data_path/model/kbqapc/
python bert_script/run_sequence_labeling.py \
--cache_dir ./data/bert_pretrain \
--do_train \
--do_eval \
--do_lower_case \
--data_dir data/train/kbqa/ner \
--bert_model bert-base-chinese \
--max_seq_length 30 \
--train_batch_size 32 \
--learning_rate 2e-5 \
--num_train_epochs 5 \
--output_dir $carbot_data_path/model/ner/
python bert_script/run_text_similarity.py \
--text_a_key question \
--text_b_key predicate \
--label_key label \
--cache_dir ./data/bert_pretrain \
--do_train \
--do_eval \
--do_lower_case \
--data_dir data/train/kbqa/predicate_match \
--bert_model bert-base-chinese \
--max_seq_length 30 \
--train_batch_size 64 \
--learning_rate 2e-5 \
--num_train_epochs 5 \
--output_dir $carbot_data_path/model/kbqapm/
python script/get_relation_match_data.py \
--sample_qa_path data/train/kbqa/predicate_classification/train.xlsx \
--complex_qa_path data/complex_qa.xlsx \
--save_path data/train/kbqa/complex_qa \
python bert_script/run_text_similarity.py \
--text_a_key text_a \
--text_b_key text_b \
--label_key label \
--cache_dir ./data/bert_pretrain \
--do_train \
--do_eval \
--do_lower_case \
--data_dir data/train/kbqa/complex_qa \
--bert_model bert-base-chinese \
--max_seq_length 30 \
--train_batch_size 64 \
--learning_rate 2e-5 \
--num_train_epochs 5 \
--output_dir $carbot_data_path/model/kbqasp/
python bert_script/run_squad.py \
--bert_model bert-base-chinese \
--cache_dir ./data/bert_pretrain \
--do_train \
--do_predict \
--do_lower_case \
--train_file data/train/dbqa/train.json \
--predict_file data/train/dbqa/test.json \
--train_batch_size 12 \
--learning_rate 3e-5 \
--num_train_epochs 3.0 \
--max_seq_length 128 \
--doc_stride 128 \
--output_dir carbot_data/model/dbqa/
python eval/eval_dbqa.py
python eval/eval_ner.py
python eval/eval_kbqapc.py
python eval/eval_kbqapm.py
python eval/eval_kbqasp.py