Skip to content

Commit f82255e

Browse files
author
Duc Hoang
committed
Fix KeyError in truthful_qa_generative prompt function
Remove access to mc1_targets field which only exists in multiple_choice subset, not generation subset. This was causing KeyError when running truthfulqa:gen task.
1 parent 6136dc3 commit f82255e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/lighteval/tasks/default_prompts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2491,7 +2491,6 @@ def truthful_qa_generative(line, task_name: str = None): # BLEU and combination
24912491
query=line["question"].strip(),
24922492
choices=correct_answers + incorrect_answers,
24932493
gold_index=list(range(len(correct_answers))),
2494-
specific={"len_mc1": len(line["mc1_targets"]["choices"])},
24952494
)
24962495

24972496

0 commit comments

Comments
 (0)