Skip to content

Commit

Permalink
Add custom task (bac-fr) for evaluation of models in french
Browse files Browse the repository at this point in the history
  • Loading branch information
mdiazmel committed Jan 23, 2025
1 parent 17c42e5 commit ee02637
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions community_tasks/french_evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ def prompt_gpqa_fr(line, task_name: str = None):
)


# bac-fr prompt function
def prompt_bac_fr(line, task_name: str = None):
return Doc(
task_name=task_name,
query=line["prompt"],
choices=[""],
gold_index=0,
instruction="",
specific={"instruction": line["instruction"], "enonce": line["enonce"]},
)


# IFEVal-fr task


Expand Down Expand Up @@ -116,6 +128,22 @@ def prompt_gpqa_fr(line, task_name: str = None):
trust_dataset=True,
version=0,
)

# bac-fr task
bac_fr_task = LightevalTaskConfig(
name="bac-fr",
suite=["community"],
prompt_function=prompt_bac_fr,
hf_repo="fr-gouv-coordination-ia/bac-fr",
hf_subset="default",
hf_avail_splits=["train"],
evaluation_splits=["train"],
few_shots_split=None,
few_shots_select="random_sampling",
generation_size=1,
metric=[],
stop_sequence=["\n"],
trust_dataset=True,
version=0,
)
# STORE YOUR EVALS
TASKS_TABLE = [ifeval_fr_task, gpqa_fr_task]
TASKS_TABLE = [ifeval_fr_task, gpqa_fr_task, bac_fr_task]

0 comments on commit ee02637

Please sign in to comment.