-
Notifications
You must be signed in to change notification settings - Fork 54
/
eval_hits.py
28 lines (24 loc) · 1008 Bytes
/
eval_hits.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
from projects.convai2.eval_hits import setup_args, eval_hits
if __name__ == '__main__':
parser = setup_args()
parser.set_defaults(model='agent:TransformerAgent',
batchsize=10,
rank_candidates=True,
sample=False,
wild_mode=False,
replace_repeat=True,
replace_ngram=False,
detokenize=False,
emoji_prob=0,
add_questions=0,
clean_emoji=True,
check_grammar=True,
correct_generative=True,
split_into_sentences=True,
max_seq_len=256,
beam_size=3,
annealing_topk=None,
annealing=0,
length_penalty=0.6)
opt = parser.parse_args()
eval_hits(opt, print_parser=parser)