-
Notifications
You must be signed in to change notification settings - Fork 2
/
train.sh
executable file
·81 lines (63 loc) · 2.27 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
cuda=0
exp_num=1
dir=/data/ED4SP
batch=16
lr=3e-5
epoch=20
warmup_factor=10
gnn_model=GATv2
test_pp=top1
seed=1${exp_num}0
# exp_group=SmBop
# exp_group=Bridge
# exp_group=NatSQL
# exp_group=NatSQL_spider_tr
# exp_group=NatSQL_ori
exp_group=ResdNatSQL
expr_name=CodeBERT_GAT
### Main settings.
# train_dat=preprocessing/datasets/bridge/ed_bridge_full_beam_train_sim2.dat
# dev_dat=preprocessing/datasets/bridge/ed_bridge_full_beam_dev_sim2.dat
# test_dat=preprocessing/datasets/bridge/ed_bridge_beam_test_sim2.dat
# train_dat=preprocessing/datasets/smbop/ed_smbop_full_beam_train_sim2.dat
# dev_dat=preprocessing/datasets/smbop/ed_smbop_full_beam_dev_sim2.dat
# test_dat=preprocessing/datasets/smbop/ed_smbop_beam_test_sim2.dat
# train_dat=preprocessing/datasets/natsql/ed_natsql_full_beam_train_sim2.dat
# dev_dat=preprocessing/datasets/natsql/ed_natsql_full_beam_dev_sim2.dat
# test_dat=preprocessing/datasets/natsql/ed_natsql_beam_test_sim2.dat
train_dat=preprocessing/datasets/resdnatsql/ed_resdnatsql_full_beam_train_sim2.dat
dev_dat=preprocessing/datasets/resdnatsql/ed_resdnatsql_full_beam_dev_sim2.dat
test_dat=preprocessing/datasets/resdnatsql/ed_resdnatsql_beam_test_sim2.dat
### In-domain data collection
# train_dat=preprocessing/datasets/natsql_beam_spider_tr_train_sim2.dat
# dev_dat=preprocessing/datasets/natsql_beam_spider_tr_dev_sim2.dat
# test_dat=preprocessing/datasets/ed_natsql_beam_test_sim2_tr.dat
### w/o graph simplification
# train_dat=preprocessing/datasets/ed_natsql_full_beam_train_ori.dat
# dev_dat=preprocessing/datasets/ed_natsql_full_beam_dev_ori.dat
# test_dat=preprocessing/datasets/ed_natsql_beam_test_ori.dat
name=${exp_group}/${expr_name}_${exp_num}
# name=${expr_name}_ron_test
mkdir -p ${dir}/experiments/$name
touch ${dir}/experiments/$name/log.txt
cat ${dir}/train.sh >> ${dir}/experiments/$name/config
# nvidia-smi
# CUDA_LAUNCH_BLOCKING=1 \
CUDA_VISIBLE_DEVICES=${cuda} \
python3 ${dir}/model.py \
--expr_name ${name} \
--batch_size ${batch} \
--lr ${lr} \
--dir=${dir} \
--exp_name ${name} \
--epoch ${epoch} \
--warmup_factor ${warmup_factor} \
--dev_dat ${dev_dat} \
--train_dat ${train_dat} \
--test_dat ${test_dat} \
--gnn_model ${gnn_model} \
--seed ${seed} \
--nl_use_consti_edges \
--nl_use_dep_edges \
--use_seq_edges \
--use_beam \