Skip to content

Commit b7bcf8d

Browse files
Match task registry name on suffix (#73)
1 parent 9e329b6 commit b7bcf8d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/agenteval/score.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ def get_normalized_task_name(log: EvalLog, task_name_mapping: dict[str, str]) ->
139139
task_registry_name = log.eval.task_registry_name
140140
assert task_registry_name is not None, f"We expect a task registry name."
141141
if task_registry_name not in task_name_mapping:
142+
# Try suffix match: "super_test" should match "astabench/super_test"
143+
suffix_matches = [
144+
name
145+
for path, name in task_name_mapping.items()
146+
if path.endswith("/" + task_registry_name)
147+
]
148+
if len(suffix_matches) == 1:
149+
return suffix_matches[0]
142150
warning_msg = (
143151
f"Task '{task_registry_name}' not found in the suite task "
144152
f"paths {task_name_mapping.keys()}. This could happen if you "

0 commit comments

Comments
 (0)