Skip to content

Commit

Permalink
Update rank_gpt.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnweiwei authored Feb 24, 2024
1 parent a5fc4c9 commit 761d76b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rank_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ def main():
new_results.append(new_item)

temp_file = tempfile.NamedTemporaryFile(delete=False).name
write_eval_file(new_results, temp_file)
from trec_eval import EvalFunction

EvalFunction.eval(['-c', '-m', 'ndcg_cut.10', 'dl19-passage', temp_file])
EvalFunction.write_file(reranked_data, temp_file)
EvalFunction.main(THE_TOPICS[data], temp_file)


if __name__ == '__main__':
Expand Down

0 comments on commit 761d76b

Please sign in to comment.