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
1c0a1f8e
Commit
1c0a1f8e
authored
May 18, 2023
by
lintangsutawika
Browse files
condition if kwargs is None
parent
1e0d27ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lm_eval/filters/__init__.py
lm_eval/filters/__init__.py
+6
-3
No files found.
lm_eval/filters/__init__.py
View file @
1c0a1f8e
...
...
@@ -21,11 +21,14 @@ def build_filter_ensemble(filter_name, components):
"""
Create a filtering pipeline.
"""
filters
=
[]
for
(
function
,
kwargs
)
in
components
:
# create a filter given its name in the registry
f
=
get_filter
(
function
)(
**
kwargs
)
# TODO: pass kwargs to filters properly
if
kwargs
==
None
:
f
=
get_filter
(
function
)()
else
:
# create a filter given its name in the registry
f
=
get_filter
(
function
)(
**
kwargs
)
# TODO: pass kwargs to filters properly
# add the filter as a pipeline step
filters
.
append
(
f
)
...
...
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