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
d9b4ca7f
Commit
d9b4ca7f
authored
Oct 19, 2023
by
haileyschoelkopf
Browse files
fix bug when target_delimiter is empty string
parent
ff148cd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lm_eval/api/task.py
lm_eval/api/task.py
+4
-1
No files found.
lm_eval/api/task.py
View file @
d9b4ca7f
...
...
@@ -689,7 +689,10 @@ class ConfigurableTask(Task):
for
choice
in
check_choices
:
choice_has_whitespace
=
True
if
choice
[
0
].
isspace
()
else
False
delimiter_has_whitespace
=
(
True
if
self
.
config
.
target_delimiter
[
-
1
].
isspace
()
else
False
True
if
self
.
config
.
target_delimiter
.
rstrip
()
==
self
.
config
.
target_delimiter
else
False
)
if
delimiter_has_whitespace
and
choice_has_whitespace
:
...
...
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