Skip to content

Commit

Permalink
Reduce DPR evaluation precision accuracy to 4 digits (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
HAKSOAT authored Mar 26, 2022
1 parent a052748 commit 8d2a67c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyserini/eval/evaluate_dpr_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def evaluate_retrieval(retrieval_file, topk, regex=False):
accuracy[k].append(0 if has_ans_idx >= k else 1)

for k in topk:
print(f'Top{k}\taccuracy: {np.mean(accuracy[k])}')
print(f'Top{k}\taccuracy: {np.around(np.mean(accuracy[k]), 4)}')


if __name__ == '__main__':
Expand Down

0 comments on commit 8d2a67c

Please sign in to comment.