Skip to content

Commit

Permalink
Fix IFEval metric (#259)
Browse files Browse the repository at this point in the history
* Fix IFEval metric

* Remove dead code
  • Loading branch information
lewtun authored Aug 14, 2024
1 parent 6041e36 commit 38c03ad
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions src/lighteval/tasks/extended/ifeval/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ def ifeval_prompt(line, task_name: str = None):
)


# We create the task config
ifeval = LightevalTaskConfig(
name="ifeval",
prompt_function=ifeval_prompt,
suite=["extended"],
hf_repo="wis-k/instruction-following-eval",
hf_subset="default",
metric=["ifeval_metric"],
hf_avail_splits=["train"],
evaluation_splits=["train"],
few_shots_split="train",
few_shots_select="random_sampling",
generation_size=1280,
stop_sequence=[], # no stop sequence, will use eot token
)


submetric_names = [
"prompt_level_strict_acc",
"inst_level_strict_acc",
Expand Down Expand Up @@ -156,6 +139,22 @@ def agg_inst_level_acc(items):
},
)

# We create the task config
ifeval = LightevalTaskConfig(
name="ifeval",
prompt_function=ifeval_prompt,
suite=["extended"],
hf_repo="wis-k/instruction-following-eval",
hf_subset="default",
metric=[ifeval_metrics],
hf_avail_splits=["train"],
evaluation_splits=["train"],
few_shots_split="train",
few_shots_select="random_sampling",
generation_size=1280,
stop_sequence=[], # no stop sequence, will use eot token
)


TASKS_TABLE = [ifeval]

Expand Down

0 comments on commit 38c03ad

Please sign in to comment.