Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom task (bac-fr) for evaluation of models in french #518

Merged
merged 7 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion 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"]},
)
mdiazmel marked this conversation as resolved.
Show resolved Hide resolved


# IFEVal-fr task


Expand Down Expand Up @@ -117,5 +129,23 @@ def prompt_gpqa_fr(line, task_name: str = None):
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=[], # To be defined
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we feel like the instructions constrain the answer enough, we could go for an exact match. We can also look at @hynky1999 's parser for math equations.

Copy link
Collaborator

@hynky1999 hynky1999 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is math bench ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Includes math questions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(but not math only, I'd say 1/3 to 1/2 are math questions?)

Copy link
Contributor Author

@mdiazmel mdiazmel Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say 2/3 math questions!

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]