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
7fbf899c
"backends/client/src/lib.rs" did not exist on "5e5d8766a2c2a28b166fbecf7543f19a4bf2c9d8"
Commit
7fbf899c
authored
Feb 06, 2025
by
Baber
Browse files
Merge branch 'main' into convert_gen
parents
5c914988
144a1e58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lm_eval/api/task.py
lm_eval/api/task.py
+7
-7
No files found.
lm_eval/api/task.py
View file @
7fbf899c
...
@@ -1621,13 +1621,13 @@ class ConfigurableTask(Task):
...
@@ -1621,13 +1621,13 @@ class ConfigurableTask(Task):
)
)
except
TypeError
:
# needed for now in order to use a different interface between our own metrics and HF Evaluate metrics
except
TypeError
:
# needed for now in order to use a different interface between our own metrics and HF Evaluate metrics
result_score
=
self
.
_metric_fn_list
[
metric
]([
gold
,
result
])
result_score
=
self
.
_metric_fn_list
[
metric
]([
gold
,
result
])
if
isinstance
(
result_score
,
dict
):
if
isinstance
(
result_score
,
dict
):
# TODO: this handles the case where HF evaluate returns a dict.
# TODO: this handles the case where HF evaluate returns a dict.
# This allows for multiple metrics to be returned from the same function
# This allows for multiple metrics to be returned from the same function
for
k
,
v
in
result_score
.
items
():
for
k
,
v
in
result_score
.
items
():
result_dict
[
k
]
=
v
result_dict
[
k
]
=
v
return
result_dict
else
:
result_dict
[
metric
]
=
result_score
result_dict
[
metric
]
=
result_score
else
:
else
:
raise
ValueError
(
raise
ValueError
(
f
"Passed invalid output_type '
{
self
.
OUTPUT_TYPE
}
' ! Please use one of "
,
f
"Passed invalid output_type '
{
self
.
OUTPUT_TYPE
}
' ! Please use one of "
,
...
...
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