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
ad4ab52a
Commit
ad4ab52a
authored
Sep 22, 2023
by
Chris
Browse files
Fix formatting
parent
34d1ac6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lm_eval/filters/transformation.py
lm_eval/filters/transformation.py
+4
-3
No files found.
lm_eval/filters/transformation.py
View file @
ad4ab52a
...
...
@@ -11,7 +11,7 @@ class LowercaseFilter(Filter):
return
[
filter_set
(
resp
)
for
resp
in
resps
]
class
UppercaseFilter
(
Filter
):
def
__init__
(
self
)
->
None
:
pass
...
...
@@ -21,9 +21,10 @@ class UppercaseFilter(Filter):
return
[
resp
.
upper
()
for
resp
in
inst
]
return
[
filter_set
(
resp
)
for
resp
in
resps
]
class
MapFilter
(
Filter
):
def
__init__
(
self
,
mapping_dict
:
dict
=
{},
default_value
=
None
)
->
None
:
def
__init__
(
self
,
mapping_dict
:
dict
=
{},
default_value
=
None
)
->
None
:
"""
Initializes the MapFilter with a given mapping dictionary and default value.
...
...
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