-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval.py
More file actions
34 lines (25 loc) · 790 Bytes
/
eval.py
File metadata and controls
34 lines (25 loc) · 790 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
28
29
30
31
32
33
34
import argparse
from process import evaluation
import logging
logging.basicConfig(
filename='evaluate.log',
filemode='a',
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
encoding='utf-8'
)
def main():
parser = argparse.ArgumentParser(description='accept')
parser.add_argument('-a', '--answer',
required=True,
type=str,
help="This is the ultimate answer path, namely ground truth")
parser.add_argument('-n',
type=int,
help="The topN you need to evaluate")
args = parser.parse_args()
answer = args.answer
n = args.n
evaluation.eval(answer, n)
if __name__ == '__main__':
main()