Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions src/lighteval/tasks/lighteval_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ def __post_init__(self):
self.hf_avail_splits = ["train", "validation", "test"]
if self.evaluation_splits is None:
self.evaluation_splits = ["validation"]
if self.stop_sequence is None:
self.stop_sequence = ["\n"]

# Convert list to tuple for hashing
self.metric = tuple(self.metric)
Expand Down
17 changes: 13 additions & 4 deletions tasks_examples/custom_tasks/custom_evaluation_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@
hf_repo="hellaswag",
hf_subset="default",
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="winogrande",
prompt_function="winogrande",
hf_repo="winogrande",
hf_subset="winogrande_xl",
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="piqa",
prompt_function="piqa_harness",
hf_repo="piqa",
hf_subset="plain_text",
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="siqa",
Expand All @@ -47,13 +50,15 @@
hf_subset="default",
hf_avail_splits=["train", "validation"],
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="openbookqa",
prompt_function="openbookqa",
hf_repo="openbookqa",
hf_subset="main",
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="arc:easy",
Expand All @@ -63,6 +68,7 @@
evaluation_splits=["test"],
generation_size=1,
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="arc:challenge",
Expand All @@ -72,13 +78,15 @@
evaluation_splits=["test"],
generation_size=1,
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="commonsense_qa",
prompt_function="commonsense_qa_prompt",
hf_repo="commonsense_qa",
hf_subset="default",
metric=["loglikelihood_acc", "loglikelihood_acc_norm_nospace"],
stop_sequence=["\n"],
),
]

Expand Down Expand Up @@ -176,6 +184,7 @@ def natural_questions_prompt(line, task_name: str = None):
hf_repo="super_glue",
hf_subset="boolq",
metric=["target_perplexity"],
stop_sequence=["\n"],
),
LightevalTaskConfig(
name="quac",
Expand Down Expand Up @@ -236,9 +245,9 @@ def __init__(
few_shots_select=few_shots_select,
suite=suite,
generation_size=generation_size,
stop_sequence=stop_sequence,
output_regex=output_regex,
frozen=frozen,
stop_sequence=(stop_sequence if stop_sequence is not None else ["\n"]),
)


Expand Down Expand Up @@ -303,7 +312,7 @@ def __init__(
few_shots_select=few_shots_select,
suite=suite,
generation_size=generation_size,
stop_sequence=stop_sequence,
stop_sequence=(stop_sequence if stop_sequence is not None else ["\n"]),
output_regex=output_regex,
frozen=frozen,
)
Expand Down Expand Up @@ -445,7 +454,7 @@ def __init__(
few_shots_select=few_shots_select,
suite=suite,
generation_size=generation_size,
stop_sequence=stop_sequence,
stop_sequence=(stop_sequence if stop_sequence is not None else ["\n"]),
output_regex=output_regex,
frozen=frozen,
)
Expand Down Expand Up @@ -537,7 +546,7 @@ def __init__(
few_shots_select=few_shots_select,
suite=suite,
generation_size=generation_size,
stop_sequence=stop_sequence,
stop_sequence=(stop_sequence if stop_sequence is not None else ["\n"]),
output_regex=output_regex,
frozen=frozen,
)
Expand Down