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
4c363ef8
Commit
4c363ef8
authored
Jul 11, 2023
by
lintangsutawika
Browse files
multiple_output option for greedy_until
parent
f09f3ab8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lm_eval/api/task.py
lm_eval/api/task.py
+5
-5
No files found.
lm_eval/api/task.py
View file @
4c363ef8
...
@@ -660,10 +660,10 @@ class ConfigurableTask(Task):
...
@@ -660,10 +660,10 @@ class ConfigurableTask(Task):
elif
type
(
test_text
)
is
str
:
elif
type
(
test_text
)
is
str
:
self
.
multiple_input
=
0
self
.
multiple_input
=
0
if
type
(
test_target
)
is
list
:
if
type
(
test_target
)
is
list
:
self
.
multiple_output
=
len
(
test_target
)
self
.
multiple_output
=
len
(
test_target
)
else
:
else
:
self
.
multiple_output
=
0
self
.
multiple_output
=
0
def
download
(
self
,
dataset_kwargs
=
None
):
def
download
(
self
,
dataset_kwargs
=
None
):
...
@@ -998,7 +998,7 @@ class ConfigurableTask(Task):
...
@@ -998,7 +998,7 @@ class ConfigurableTask(Task):
for
key
,
result
in
zip
(
self
.
_metric_fn_list
.
keys
(),
results
):
for
key
,
result
in
zip
(
self
.
_metric_fn_list
.
keys
(),
results
):
_dict
=
self
.
_metric_fn_list
[
key
](
_dict
=
self
.
_metric_fn_list
[
key
](
references
=
[
gold
],
references
=
gold
if
self
.
multiple_output
else
[
gold
],
predictions
=
[
result
],
predictions
=
[
result
],
**
self
.
_metric_fn_kwargs
[
key
],
**
self
.
_metric_fn_kwargs
[
key
],
)
)
...
...
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