Skip to content

making inspect working again #887

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions src/lighteval/main_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ def inspect(

from rich import print

from lighteval.tasks.registry import Registry, taskinfo_selector
from lighteval.tasks.registry import Registry

registry = Registry(custom_tasks=custom_tasks)

# Loading task
task_names_list, _ = taskinfo_selector(tasks, task_registry=registry)
task_dict = registry.get_task_dict(task_names_list)
task_configs = registry.get_tasks_configs(tasks)
task_dict = registry.get_tasks_from_configs(task_configs)
for name, task in task_dict.items():
print("-" * 10, name, "-" * 10)
if show_config:
Expand Down
4 changes: 1 addition & 3 deletions src/lighteval/tasks/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ def taskinfo_selector(self, tasks: str) -> dict[str, list[dict]]:
Returns:
tuple[list[str], dict[str, list[tuple[int, bool]]]]: A tuple containing:
- A sorted list of unique task names in the format "suite|task".
- A dictionary mapping each task name to a list of tuples representing the few_shot and truncate_few_shots values.
dict[str, list[dict]]: A dictionary mapping each task name to a list of tuples representing the few_shot and truncate_few_shots values.
"""
few_shot_dict = collections.defaultdict(list)

Expand Down