-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoption.py
93 lines (92 loc) · 2.25 KB
/
option.py
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
import torch
class option(object):
n_layers=6
n_position = 160
n_inner_vocab = 5000
n_inner_layers = 3
n_inner_position = 15
d_word_vec = 512
n_head = 8
d_k = 64
d_v = 64
pad_idx = 2
d_model = 512
d_inner = 2048
dropout = 0.1
n_warmup_steps = 2000
scale_emb = False
switch_interval = 16
cache_turn = 0
context_max_len = 150
r_max_len = 50
r_beam_max_len = 30
conv_max_len = 500
profile_num = 1
state_num = 10
state_num_redial = 20
pretrain_state_num = 50
all_topic_num = 20
all_topic_num_redial = 40
movie_path_len = 3
tag_num = 3
preference_num = 1
topic_num = 2
action_num = 10
action_num_redial = 1
relation_num = 150
movie_num = 200
state_token = 40
scale_prj = True
epoch = 100
task = "meddg"
dataset_file = "dataset/{dataset}.zip"
topic_file = "dataset/TG-ReDial/topic.txt"
topic_movie_file = "dataset/TG-ReDial/tpmv.txt"
vocab_file = "dataset/TG-ReDial/tpvocab.txt"
vocab_movie_file = "dataset/TG-ReDial/tpmvvocab.txt"
no_action_super = None
max_patience = 20
log_loss_interval = 100
gradient_stack = 8
decay_interval = 10000
decay_rate = 0.9
lr = 1e-5
valid_eval_interval = 10000
test_eval_interval = 10000
force_ckpt_dump = True
sub_gen_lambda = 0.01
s_copy_lambda = 1
a_copy_lambda = 1
copy_lambda_mini = 0.1
copy_lambda_decay_steps = 10000
copy_lambda_decay_value = 1.0
init_tau = 1.0
tau_mini = 0.1
tau_decay_total_steps = 5000
tau_decay_rate = 0.5
beam_width = 1
wo_l = False
wo_m = False
wo_entropy_restrain = False
wo_repeat_penalty = False
wo_rl = False
super_only = False
hungary = False
super_rate = 0.0
super_epoch = 5
batch_size = 16
reg_lambda = 5e-3
BOS_CONTEXT = "[s_context]"
EOS_CONTEXT = "[/s_context]"
BOS_RESPONSE = "[s_response>]"
EOS_RESPONSE = "[/s_response]"
BOS_ACTION = "[s_action]"
EOS_ACTION = "[/s_action]"
PAD_WORD = "[PAD]"
SENTENCE_SPLITER = "[sent]"
TOPIC_SPLITER = "[unused2]"
UNK_WORD = "[UNK]"
BOS_PRE = "[s_preference]"
EOS_PRE = "[/s_preference]"
BOS_PRO = "[s_profile]"
EOS_PRO = "[/s_profile]"