From 1fde411358b55841329946b5509f7feb4ed9ea38 Mon Sep 17 00:00:00 2001 From: neneluo Date: Mon, 29 Apr 2024 20:27:28 +0100 Subject: [PATCH] Fix arguments error in calculating ndcg_score for retrieval model --- toolbench/retrieval/api_evaluator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolbench/retrieval/api_evaluator.py b/toolbench/retrieval/api_evaluator.py index 43f1062..8f687b0 100644 --- a/toolbench/retrieval/api_evaluator.py +++ b/toolbench/retrieval/api_evaluator.py @@ -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):