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
7ab64701
Commit
7ab64701
authored
Apr 21, 2022
by
Dirk Groeneveld
Browse files
Use `_process_doc` like the other tasks do
parent
a080b5ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lm_eval/tasks/wikitext.py
lm_eval/tasks/wikitext.py
+4
-4
No files found.
lm_eval/tasks/wikitext.py
View file @
7ab64701
...
@@ -76,15 +76,15 @@ class WikiText(PerplexityTask):
...
@@ -76,15 +76,15 @@ class WikiText(PerplexityTask):
return
True
return
True
def
training_docs
(
self
):
def
training_docs
(
self
):
return
map
(
self
.
_
load
_doc
,
self
.
dataset
[
"train"
])
return
map
(
self
.
_
process
_doc
,
self
.
dataset
[
"train"
])
def
validation_docs
(
self
):
def
validation_docs
(
self
):
return
map
(
self
.
_
load
_doc
,
self
.
dataset
[
"validation"
])
return
map
(
self
.
_
process
_doc
,
self
.
dataset
[
"validation"
])
def
test_docs
(
self
):
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
):
return
doc
[
"page"
]
return
doc
[
"page"
]
def
doc_to_target
(
self
,
doc
):
def
doc_to_target
(
self
,
doc
):
...
...
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