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
b91cabae
"include/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "4f2a71af4f956fedd99a2ec914939cc054ab16e4"
Commit
b91cabae
authored
May 14, 2024
by
JessicaOjo
Browse files
fix exact match valueError
parent
348e304a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
lm_eval/api/task.py
lm_eval/api/task.py
+15
-8
No files found.
lm_eval/api/task.py
View file @
b91cabae
...
@@ -1367,6 +1367,13 @@ class ConfigurableTask(Task):
...
@@ -1367,6 +1367,13 @@ class ConfigurableTask(Task):
result_score
=
0.0
result_score
=
0.0
else
:
else
:
try
:
try
:
if
metric
==
"exact_match"
:
result_score
=
self
.
_metric_fn_list
[
metric
](
references
=
[
str
(
gold
)],
predictions
=
[
str
(
result
)],
**
self
.
_metric_fn_kwargs
[
metric
],
)
else
:
result_score
=
self
.
_metric_fn_list
[
metric
](
result_score
=
self
.
_metric_fn_list
[
metric
](
references
=
[
gold
],
references
=
[
gold
],
predictions
=
[
result
],
predictions
=
[
result
],
...
...
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