Skip to content
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
2 changes: 1 addition & 1 deletion src/lighteval/tasks/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _update_task_configs(self) -> dict[str, LightevalTaskConfig]: # noqa: C901
f"was not correctly parametrized. Forgot to set '{attribute}'."
)

task_to_configs[expanded_task].append(config)
task_to_configs[expanded_task + f"|{few_shot}"].append(config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'll likely need to update the logic throughout to use the full task name with few shots in all the code


return task_to_configs

Expand Down
6 changes: 4 additions & 2 deletions src/lighteval/utils/cache_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ def _get_task_hash(self, full_task_name: str) -> str:
"The task registry was not provided to the cache config. We can't test if the current task has the same hash as the saved tasks."
)
return "NO_HASH"
task_suite, task_name, _ = full_task_name.split("|")
task_configs: list[LightevalTaskConfig] = sorted(self.registry.task_to_configs[f"{task_suite}|{task_name}"])
task_suite, task_name, few_shot = full_task_name.split("|")
task_configs: list[LightevalTaskConfig] = sorted(
self.registry.task_to_configs[f"{task_suite}|{task_name}|{few_shot}"]
)
Comment on lines +166 to +169
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well use the full task name then ^^

config_str = "|".join([task_config.__str__(lite=True) for task_config in task_configs])
return hashlib.sha256(config_str.encode()).hexdigest()[:16]

Expand Down
Loading