Skip to content

Commit 31a53fc

Browse files
authored
Merge branch 'main' into clem-add-ifbench2
2 parents 4f69c6c + 1036929 commit 31a53fc

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/lighteval/tasks/registry.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ def _update_task_configs(self) -> dict[str, LightevalTaskConfig]: # noqa: C901
282282
for task in self.tasks_list:
283283
metric_params_dict = {}
284284
try:
285-
suite_name, task_name, few_shot = tuple(task.split("|"))
285+
if task.count("|") == 3:
286+
logger.warning(
287+
"Deprecation warning: You provided 4 arguments in your task name, but we no longer support the `truncate_fewshot` option. We will ignore the parameter for now, but it will fail in a couple of versions, so you should change your task name to `suite|task|num_fewshot`."
288+
)
289+
suite_name, task_name, few_shot, _ = tuple(task.split("|"))
290+
else:
291+
suite_name, task_name, few_shot = tuple(task.split("|"))
286292
if "@" in task_name:
287293
split_task_name = task_name.split("@")
288294
task_name, metric_params = split_task_name[0], split_task_name[1:]
@@ -402,8 +408,6 @@ def create_task_config_dict(meta_table: list[LightevalTaskConfig] | None = None)
402408
Args:
403409
meta_table: meta_table containing tasks
404410
configurations. If not provided, it will be loaded from TABLE_PATH.
405-
cache_dir: Directory to store cached data. If not
406-
provided, the default cache directory will be used.
407411
408412
Returns:
409413
Dict[str, LightevalTaskConfig]: A dictionary of task names mapped to their corresponding LightevalTaskConfig.

tests/utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ def __init__(self, tasks: Optional[str], custom_tasks: Optional[Union[str, Path,
113113
def load_tasks(self):
114114
return {task_name_fs: lighteval_task}
115115

116-
# def get_tasks_configs(self, task: str):
117-
# config = lighteval_task.config
118-
# config.num_fewshots = n_fewshot
119-
# config.full_name = f"{task_name}|{config.num_fewshots}"
120-
# return [config]
121-
122116
# This is due to logger complaining we have no initialised the accelerator
123117
# It's hard to mock as it's global singleton
124118
if is_accelerate_available():

0 commit comments

Comments
 (0)