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
4140dd99
Commit
4140dd99
authored
Jun 06, 2024
by
lintangsutawika
Browse files
corner case for single tag being called
parent
be8b547b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+13
-5
No files found.
lm_eval/tasks/__init__.py
View file @
4140dd99
...
...
@@ -150,7 +150,7 @@ class TaskManager:
**
config
,
}
if
self
.
_config_is_python_task
(
config
):
task_object
=
config
[
"class"
]()
task_object
=
config
[
"class"
](
config
=
config
)
else
:
task_object
=
ConfigurableTask
(
config
=
config
)
return
{
task
:
task_object
}
...
...
@@ -192,6 +192,13 @@ class TaskManager:
group_name
,
subtask_list
=
_get_group_and_subtask_from_config
(
group_config
)
else
:
if
self
.
_name_is_tag
(
name_or_config
):
fn
=
partial
(
self
.
_load_individual_task_or_group
,
update_config
=
name_or_config
if
isinstance
(
name_or_config
,
dict
)
else
None
,
)
return
dict
(
collections
.
ChainMap
(
*
map
(
fn
,
reversed
(
subtask_list
))))
else
:
group_name
=
ConfigurableGroup
(
config
=
{
"group"
:
name_or_config
,
"task"
:
subtask_list
}
...
...
@@ -350,11 +357,12 @@ class TaskManager:
if
attr
==
"group"
and
print_info
:
self
.
logger
.
info
(
"`group` and `group_alias` will no longer be used in the next release of lm-eval. "
"`tag
s
` will be used to allow to call a collection of tasks just like `group`. "
"`tag` will be used to allow to call a collection of tasks just like `group`. "
"`group` will be removed in order to not cause confusion with the new ConfigurableGroup "
"which will be the offical way to create groups with addition of group-wide configuations."
)
print_info
=
False
# attr = "tag"
attr_list
=
config
[
attr
]
if
isinstance
(
attr_list
,
str
):
...
...
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