-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
27 lines (25 loc) · 964 Bytes
/
Copy pathscript.py
File metadata and controls
27 lines (25 loc) · 964 Bytes
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
import os
lr, T = 1e-4, 2
source_length, target_length, comment_length = 512, 512, 64
batch_size, beam_size, epochs = 16, 4, 30
autonum = 20
lamda = 0.1
output_dir = "./save_models/"
os.system("mkdir -p " + output_dir)
os.system("python run.py" + \
" --do_train" + \
" --do_eval" + \
" --model_type roberta" + \
" --output_dir " + output_dir + \
" --max_source_length " + str(source_length) + \
" --max_target_length " + str(target_length) + \
" --max_comment_length " + str(comment_length) + \
" --beam_size " + str(beam_size) + \
" --train_batch_size " + str(batch_size) + \
" --eval_batch_size 69 " + \
" --learning_rate " + str(lr) + \
" --temperature " + str(T) + \
" --autonum " + str(autonum) + \
" --lamda " + str(lamda) + \
" --num_train_epochs %s 2>&1| tee %s/epoch-%s.log" % (epochs,output_dir,epochs)
)