Skip to content

Commit af52de6

Browse files
uralikIlia KulikovNathanHB
authored
making inspect working again (#887)
Co-authored-by: Ilia Kulikov <[email protected]> Co-authored-by: Nathan Habib <[email protected]>
1 parent ecef2c6 commit af52de6

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/lighteval/main_tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ def inspect(
4545

4646
from rich import print
4747

48-
from lighteval.tasks.registry import Registry, taskinfo_selector
48+
from lighteval.tasks.registry import Registry
4949

5050
registry = Registry(custom_tasks=custom_tasks)
5151

5252
# Loading task
53-
task_names_list, _ = taskinfo_selector(tasks, task_registry=registry)
54-
task_dict = registry.get_task_dict(task_names_list)
53+
task_configs = registry.get_tasks_configs(tasks)
54+
task_dict = registry.get_tasks_from_configs(task_configs)
5555
for name, task in task_dict.items():
5656
print("-" * 10, name, "-" * 10)
5757
if show_config:

src/lighteval/tasks/registry.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,7 @@ def taskinfo_selector(self, tasks: str) -> dict[str, list[dict]]:
171171
172172
173173
Returns:
174-
tuple[list[str], dict[str, list[tuple[int, bool]]]]: A tuple containing:
175-
- A sorted list of unique task names in the format "suite|task".
176-
- A dictionary mapping each task name to a list of tuples representing the few_shot and truncate_few_shots values.
174+
dict[str, list[dict]]: A dictionary mapping each task name to a list of tuples representing the few_shot and truncate_few_shots values.
177175
"""
178176
few_shot_dict = collections.defaultdict(list)
179177

0 commit comments

Comments
 (0)