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
bc9f6fc5
"vscode:/vscode.git/clone" did not exist on "01114b45265dff484fd56d0430317c32dd4d9bd4"
Commit
bc9f6fc5
authored
Apr 21, 2022
by
jon-tow
Browse files
Rename all `_load_doc`s to `_process_doc`
parent
e9acf86d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lm_eval/tasks/hendrycks_math.py
lm_eval/tasks/hendrycks_math.py
+3
-3
lm_eval/tasks/wsc273.py
lm_eval/tasks/wsc273.py
+2
-2
No files found.
lm_eval/tasks/hendrycks_math.py
View file @
bc9f6fc5
...
...
@@ -38,15 +38,15 @@ class Math(Task):
return
True
def
training_docs
(
self
):
return
map
(
self
.
_
load
_doc
,
self
.
dataset
[
"train"
])
return
map
(
self
.
_
process
_doc
,
self
.
dataset
[
"train"
])
def
validation_docs
(
self
):
return
NotImplemented
def
test_docs
(
self
):
return
map
(
self
.
_
load
_doc
,
self
.
dataset
[
"test"
])
return
map
(
self
.
_
process
_doc
,
self
.
dataset
[
"test"
])
def
_
load
_doc
(
self
,
doc
):
def
_
process
_doc
(
self
,
doc
):
doc
[
"answer"
]
=
self
.
remove_boxed
(
self
.
last_boxed_only_string
(
doc
[
"solution"
]))
return
doc
...
...
lm_eval/tasks/wsc273.py
View file @
bc9f6fc5
...
...
@@ -53,9 +53,9 @@ class WinogradSchemaChallenge273(Task):
return
True
def
test_docs
(
self
):
return
map
(
self
.
_
load
_doc
,
self
.
dataset
[
"test"
])
return
map
(
self
.
_
process
_doc
,
self
.
dataset
[
"test"
])
def
_
load
_doc
(
self
,
doc
):
def
_
process
_doc
(
self
,
doc
):
# The HF implementation of `wsc273` is not `partial evaluation` friendly.
doc
[
"text"
]
=
doc
[
"text"
].
replace
(
" "
,
" "
)
doc
[
"options"
][
0
]
=
self
.
__normalize_option
(
doc
,
doc
[
"options"
][
0
])
...
...
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