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
3f1c6d20
Commit
3f1c6d20
authored
Jun 28, 2024
by
Nathan Habib
Browse files
cleanup
parent
f5d763dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lm_eval/filters/extraction.py
lm_eval/filters/extraction.py
+4
-1
No files found.
lm_eval/filters/extraction.py
View file @
3f1c6d20
...
@@ -62,8 +62,11 @@ class WhitespaceFilter(Filter):
...
@@ -62,8 +62,11 @@ class WhitespaceFilter(Filter):
def
filter_set
(
inst
):
def
filter_set
(
inst
):
filtered_resp
=
[]
filtered_resp
=
[]
for
resp
in
inst
:
for
resp
in
inst
:
resp
=
resp
.
lstrip
()
if
resp
.
startswith
(
" "
):
resp
=
resp
[
1
:]
filtered_resp
.
append
(
resp
)
filtered_resp
.
append
(
resp
)
return
filtered_resp
return
filtered_resp
filtered_resps
=
[
filter_set
(
resp
)
for
resp
in
resps
]
filtered_resps
=
[
filter_set
(
resp
)
for
resp
in
resps
]
...
...
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