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
cf1370d1
Commit
cf1370d1
authored
Aug 08, 2023
by
haileyschoelkopf
Browse files
ensure multiple_choice task type respects target_delimiter
parent
1710b42d
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 @
cf1370d1
...
...
@@ -848,13 +848,14 @@ class ConfigurableTask(Task):
elif
self
.
OUTPUT_TYPE
==
"multiple_choice"
:
choices
=
self
.
doc_to_choice
(
doc
)
target_delimiter
=
self
.
_config
.
target_delimiter
if
self
.
multiple_input
:
# If there are multiple inputs, choices are placed in the ctx
cont
=
self
.
doc_to_target
(
doc
)
arguments
=
[(
ctx
,
" {}"
.
format
(
cont
)
)
for
ctx
in
choices
]
arguments
=
[(
ctx
,
f
"
{
target_delimiter
}{
cont
}
"
)
for
ctx
in
choices
]
else
:
# Otherwise they are placed in the continuation
arguments
=
[(
ctx
,
" {}"
.
format
(
cont
)
)
for
cont
in
choices
]
arguments
=
[(
ctx
,
f
"
{
target_delimiter
}{
cont
}
"
)
for
cont
in
choices
]
request_list
=
[
Instance
(
...
...
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