Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arguments error in calculating ndcg_score for retrieval model #266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion toolbench/retrieval/api_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def compute_ndcg_for_query(query_tuple):
if hit["corpus_id"] in query_relevant_docs:
true_relevance[corpus_ids.index(hit["corpus_id"])] = 1

return ndcg_score([true_relevance], [predicted_scores], k)
return ndcg_score([true_relevance], [predicted_scores], k=k)


class APIEvaluator(SentenceEvaluator):
Expand Down