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
e0986475
Commit
e0986475
authored
May 10, 2024
by
lintangsutawika
Browse files
convert all groups to configurable groups
parent
2f3d4272
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+16
-4
No files found.
lm_eval/tasks/__init__.py
View file @
e0986475
...
@@ -173,7 +173,14 @@ class TaskManager:
...
@@ -173,7 +173,14 @@ class TaskManager:
subtask_list
=
group_config
[
"task"
]
subtask_list
=
group_config
[
"task"
]
group_name
=
ConfigurableGroup
(
config
=
group_config
)
group_name
=
ConfigurableGroup
(
config
=
group_config
)
else
:
else
:
group_name
=
name_or_config
# group_name = name_or_config
group_name
=
ConfigurableGroup
(
config
=
{
"group"
:
name_or_config
,
"task"
:
subtask_list
}
)
if
isinstance
(
name_or_config
,
dict
):
if
isinstance
(
name_or_config
,
dict
):
if
update_config
is
not
None
:
if
update_config
is
not
None
:
...
@@ -197,7 +204,13 @@ class TaskManager:
...
@@ -197,7 +204,13 @@ class TaskManager:
subtask_list
=
group_config
[
"task"
]
subtask_list
=
group_config
[
"task"
]
group_name
=
ConfigurableGroup
(
config
=
group_config
)
group_name
=
ConfigurableGroup
(
config
=
group_config
)
else
:
else
:
group_name
=
name
# group_name = name
group_name
=
ConfigurableGroup
(
config
=
{
"group"
:
group_name
,
"task"
:
subtask_list
}
)
else
:
else
:
if
self
.
_name_is_registered
(
name
):
if
self
.
_name_is_registered
(
name
):
base_task_config
=
self
.
_get_config
(
name
)
base_task_config
=
self
.
_get_config
(
name
)
...
@@ -241,8 +254,7 @@ class TaskManager:
...
@@ -241,8 +254,7 @@ class TaskManager:
for
k
,
v
in
name_or_config
.
items
()
for
k
,
v
in
name_or_config
.
items
()
if
k
in
GROUP_ONLY_KEYS
+
[
"task"
,
"group"
]
if
k
in
GROUP_ONLY_KEYS
+
[
"task"
,
"group"
]
}
}
if
bool
(
group_config
):
group_name
=
ConfigurableGroup
(
config
=
group_config
)
group_name
=
ConfigurableGroup
(
config
=
group_config
)
fn
=
partial
(
fn
=
partial
(
self
.
_load_individual_task_or_group
,
self
.
_load_individual_task_or_group
,
...
...
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