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
44d70398
Commit
44d70398
authored
May 08, 2024
by
lintangsutawika
Browse files
update additional condition when loading a group in a group yaml
parent
56373978
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
lm_eval/evaluator.py
lm_eval/evaluator.py
+12
-6
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+3
-1
No files found.
lm_eval/evaluator.py
View file @
44d70398
...
...
@@ -541,15 +541,13 @@ def evaluate(
task_hierarchy
=
{}
for
group_or_task
,
group_or_task_info
in
task_dict
.
items
():
# Convert to string
if
isinstance
(
group_or_task
,
ConfigurableGroup
):
group_config
=
group_or_task
.
config
group_or_task
=
group_or_task
.
group
show_group_table
=
(
show_group_table
|
group_config
[
"aggregate_metric"
]
)
if
group_config
[
"aggregate_metric"
]
is
False
:
results
[
group_or_task
][
" "
]
=
" "
continue
else
:
group_config
=
None
if
isinstance
(
group_or_task_info
,
ConfigurableTask
):
if
task_root
:
...
...
@@ -570,6 +568,14 @@ def evaluate(
task_hierarchy
.
get
(
group_or_task
,
[])
)
if
(
group_config
is
not
None
)
and
(
group_config
[
"aggregate_metric"
]
is
False
):
results
[
group_or_task
][
" "
]
=
" "
continue
show_group_table
=
(
show_group_table
|
group_config
[
"aggregate_metric"
]
)
task_list
=
_task_hierarchy
[
group_or_task
]
metric_list
=
list
(
{
...
...
lm_eval/tasks/__init__.py
View file @
44d70398
...
...
@@ -184,7 +184,9 @@ class TaskManager:
}
subtask_list
=
self
.
_get_tasklist
(
name
)
if
subtask_list
==
-
1
:
subtask_list
=
self
.
_get_config
(
name
)[
"task"
]
group_config
=
self
.
_get_config
(
name
)
subtask_list
=
group_config
[
"task"
]
group_name
=
ConfigurableGroup
(
config
=
group_config
)
else
:
if
self
.
_name_is_registered
(
name
):
base_task_config
=
self
.
_get_config
(
name
)
...
...
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