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
5f205bd5
Commit
5f205bd5
authored
Sep 15, 2023
by
baberabb
Browse files
list(gold) if `multiple_target`
parent
680c5686
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
lm_eval/api/task.py
lm_eval/api/task.py
+1
-2
No files found.
lm_eval/api/task.py
View file @
5f205bd5
...
@@ -674,7 +674,6 @@ class ConfigurableTask(Task):
...
@@ -674,7 +674,6 @@ class ConfigurableTask(Task):
check_choices
=
test_choice
check_choices
=
test_choice
else
:
else
:
check_choices
=
[
test_target
]
check_choices
=
[
test_target
]
# TODO: is this only for multiple-choice?
if
self
.
config
.
doc_to_choice
is
not
None
:
if
self
.
config
.
doc_to_choice
is
not
None
:
for
choice
in
check_choices
:
for
choice
in
check_choices
:
choice_has_whitespace
=
True
if
choice
[
0
].
isspace
()
else
False
choice_has_whitespace
=
True
if
choice
[
0
].
isspace
()
else
False
...
@@ -1070,7 +1069,7 @@ class ConfigurableTask(Task):
...
@@ -1070,7 +1069,7 @@ class ConfigurableTask(Task):
gold
=
choices
[
gold
]
gold
=
choices
[
gold
]
# we expect multiple_targets to be a list.
# we expect multiple_targets to be a list.
elif
self
.
multiple_target
:
elif
self
.
multiple_target
:
pass
gold
=
list
(
gold
)
else
:
else
:
gold
=
str
(
gold
)
gold
=
str
(
gold
)
...
...
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