Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
15c01f4d
"router/client/src/v2/sharded_client.rs" did not exist on "5e5d8766a2c2a28b166fbecf7543f19a4bf2c9d8"
Commit
15c01f4d
authored
Jul 11, 2025
by
Baber
Browse files
refactor: preserve original task name during config inclusion
parent
acc634fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+9
-1
No files found.
lm_eval/tasks/__init__.py
View file @
15c01f4d
...
...
@@ -243,7 +243,7 @@ class TaskManager:
}
# Only populate tags for configs that support it (not groups)
if
config
and
task_type
!=
"group"
and
populate_tags_fn
:
populate_tags_fn
(
config
,
task_name
,
tasks_and_groups
,
True
)
populate_tags_fn
(
config
,
task_name
,
tasks_and_groups
)
def
_merge_task_configs
(
self
,
base_config
:
dict
,
task_specific_config
:
dict
,
task_name
:
str
...
...
@@ -289,6 +289,9 @@ class TaskManager:
)
->
Mapping
:
def
_load_task
(
config
,
task
):
if
"include"
in
config
:
# Store the task name to preserve it after include processing
original_task_name
=
config
.
get
(
"task"
,
task
)
config
=
{
**
utils
.
load_yaml_config
(
yaml_path
=
None
,
...
...
@@ -296,7 +299,12 @@ class TaskManager:
mode
=
"full"
,
),
**
config
,
"task"
:
original_task_name
,
}
# Ensure the task name from the group config is preserved
# This prevents tasks with the same include from being treated as duplicates
if
self
.
_config_is_python_task
(
config
):
if
self
.
_class_has_config_in_constructor
(
config
[
"class"
]):
task_object
=
config
[
"class"
](
config
=
config
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment