Skip to content

Commit

Permalink
fix issue with task function
Browse files Browse the repository at this point in the history
  • Loading branch information
clefourrier committed Dec 12, 2024
1 parent 59bebe5 commit 1a8d65d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions community_tasks/arabic_evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1a8d65d

Please sign in to comment.