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
6b6303d4
Commit
6b6303d4
authored
Jun 20, 2021
by
Leo Gao
Browse files
Stable file order and don't lower
parent
69c83456
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/mutual.py
lm_eval/tasks/mutual.py
+2
-2
No files found.
lm_eval/tasks/mutual.py
View file @
6b6303d4
...
...
@@ -55,7 +55,7 @@ class MuTualBase(Task):
return
False
def
_load_docs
(
self
,
path
):
for
file
in
path
.
iterdir
():
for
file
in
sorted
(
path
.
iterdir
()
)
:
if
file
.
suffix
!=
".txt"
:
continue
with
open
(
file
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
...
...
@@ -100,7 +100,7 @@ class MuTualBase(Task):
text
=
text
.
replace
(
" ?"
,
"?"
)
text
=
text
.
replace
(
" ,"
,
","
)
text
=
text
.
replace
(
" ."
,
"."
)
return
text
.
lower
()
return
text
def
process_results
(
self
,
doc
,
results
):
gold
=
self
.
CHOICES
.
index
(
doc
[
"answers"
])
...
...
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