-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_rerank.sh
57 lines (52 loc) · 1.71 KB
/
train_rerank.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
#!/bin/bash
set -e
source activate py3torch3cuda9
seed=${1:-0}
vocab="data/conala/vocab.var_str_sep.src_freq3.code_freq3.bin"
train_file="data/conala/train.var_str_sep.bin"
dev_file="data/conala/dev.var_str_sep.bin"
dropout=0.3
hidden_size=256
embed_size=128
action_embed_size=128
field_embed_size=64
type_embed_size=64
ptrnet_hidden_dim=32
lr=0.001
lr_decay=0.5
beam_size=15
lstm='lstm' # lstm
lr_decay_after_epoch=15
model_name=model.sup.conala.${lstm}.hidden${hidden_size}.embed${embed_size}.action${action_embed_size}.field${field_embed_size}.type${type_embed_size}.dr${dropout}.lr${lr}.lr_de${lr_decay}.lr_da${lr_decay_after_epoch}.beam${beam_size}.$(basename ${vocab}).$(basename ${train_file}).glorot.par_state.seed${seed}.rerank
python -u exp.py \
--cuda \
--seed ${seed} \
--mode train_reconstructor \
--batch_size 10 \
--evaluator conala_evaluator \
--asdl_file asdl/lang/py3/py3_asdl.simplified.txt \
--lang python3 \
--train_file ${train_file} \
--dev_file ${dev_file} \
--vocab ${vocab} \
--lstm ${lstm} \
--no_parent_field_type_embed \
--no_parent_production_embed \
--hidden_size ${hidden_size} \
--embed_size ${embed_size} \
--action_embed_size ${action_embed_size} \
--field_embed_size ${field_embed_size} \
--type_embed_size ${type_embed_size} \
--dropout ${dropout} \
--patience 5 \
--max_num_trial 5 \
--glorot_init \
--lr ${lr} \
--lr_decay ${lr_decay} \
--lr_decay_after_epoch ${lr_decay_after_epoch} \
--max_epoch 2 \
--beam_size ${beam_size} \
--log_every 50 \
--save_to saved_models/conala/${model_name} \
--decode_max_time_step 100 \
. scripts/conala/test.sh saved_models/conala/${model_name}.bin