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
df6c5dcb
Commit
df6c5dcb
authored
Aug 12, 2023
by
haileyschoelkopf
Browse files
fix multi-metric greedy_until
parent
116c540a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lm_eval/api/task.py
lm_eval/api/task.py
+3
-2
No files found.
lm_eval/api/task.py
View file @
df6c5dcb
...
@@ -78,7 +78,7 @@ class TaskConfig(dict):
...
@@ -78,7 +78,7 @@ class TaskConfig(dict):
# runtime configuration options
# runtime configuration options
num_fewshot
:
int
=
0
num_fewshot
:
int
=
0
# scoring options
# scoring options
metric_list
:
st
r
=
None
metric_list
:
li
st
=
None
output_type
:
str
=
"greedy_until"
output_type
:
str
=
"greedy_until"
generation_kwargs
:
dict
=
None
generation_kwargs
:
dict
=
None
repeats
:
int
=
1
repeats
:
int
=
1
...
@@ -992,7 +992,8 @@ class ConfigurableTask(Task):
...
@@ -992,7 +992,8 @@ class ConfigurableTask(Task):
choices
=
self
.
doc_to_choice
(
doc
)
choices
=
self
.
doc_to_choice
(
doc
)
gold
=
choices
[
gold
]
gold
=
choices
[
gold
]
for
key
,
result
in
zip
(
self
.
_metric_fn_list
.
keys
(),
results
):
for
key
in
self
.
_metric_fn_list
.
keys
():
result
=
results
[
0
]
if
self
.
multiple_target
:
if
self
.
multiple_target
:
# in the case where we have multiple targets,
# in the case where we have multiple targets,
# return true if any are true
# return true if any are true
...
...
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