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
a551c789
Commit
a551c789
authored
Aug 25, 2023
by
Ethan Smith
Browse files
Fix lint failure
parent
8ba30fa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lm_eval/decontamination/janitor.py
lm_eval/decontamination/janitor.py
+4
-1
No files found.
lm_eval/decontamination/janitor.py
View file @
a551c789
...
...
@@ -18,6 +18,7 @@ except Exception:
T
=
TypeVar
(
"T"
)
# Implementation from nltk source
# https://www.nltk.org/_modules/nltk/util.html
def
form_ngrams
(
sequence
:
Iterator
[
T
],
n
:
int
)
->
Iterator
[
tuple
[
T
,
...]]:
...
...
@@ -166,7 +167,9 @@ class Janitor:
print
(
"WARNING: Janitor running in python mode"
)
return
self
.
clean_python
(
dirty_string
)
def
_split_chunks
(
self
,
dirty_string
:
str
,
dirty_parts
:
Sequence
[
tuple
])
->
list
[
str
]:
def
_split_chunks
(
self
,
dirty_string
:
str
,
dirty_parts
:
Sequence
[
tuple
]
)
->
list
[
str
]:
clean_chunks
=
[]
splice_idx
=
0
end
=
-
1
...
...
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