From 1a8d65d218316acce8b5a01647acc3e48835cc05 Mon Sep 17 00:00:00 2001 From: "clementine@huggingface.co" Date: Thu, 12 Dec 2024 09:49:30 +0000 Subject: [PATCH] fix issue with task function --- community_tasks/arabic_evals.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/community_tasks/arabic_evals.py b/community_tasks/arabic_evals.py index 326ad588c..07a096eca 100644 --- a/community_tasks/arabic_evals.py +++ b/community_tasks/arabic_evals.py @@ -413,9 +413,7 @@ def arabic_exams_pfn(line, task_name: str = None): def alghafa_pfn(line, task_name: str = None): question = line["query"] answer_index = int(line["label"]) - # Dynamically determining the choices by excluding '__few_shots', 'query' and 'label' - choices_keys = [key for key in line.keys() if key not in ["query", "label", "__few_shots"]] - choices = [line[key] for key in choices_keys] + choices = [line[key] for key in ["sol1", "sol2", "sol3", "sol4"]] instruction = "الأسئلة التالية هي أسئلة متعددة الإختيارات مع الجواب الصحيح\n\n" query = f"{instruction}السؤال: {question}\n"