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
b988137d
Commit
b988137d
authored
Apr 25, 2022
by
jon-tow
Browse files
Fix `wsc` subset name
parent
422380cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+3
-12
No files found.
lm_eval/tasks/superglue.py
View file @
b988137d
...
...
@@ -199,22 +199,13 @@ class ReCoRD(PromptSourceTask):
if
self
.
_training_docs
is
None
:
self
.
_training_docs
=
[]
for
doc
in
self
.
dataset
[
"train"
]:
self
.
_training_docs
.
append
(
self
.
_process_doc
(
doc
)
)
self
.
_training_docs
.
append
(
doc
)
return
self
.
_training_docs
def
validation_docs
(
self
):
# See: training_docs
for
doc
in
self
.
dataset
[
"validation"
]:
yield
self
.
_process_doc
(
doc
)
@
classmethod
def
_process_doc
(
cls
,
doc
):
return
{
"passage"
:
doc
[
"passage"
],
"query"
:
doc
[
"query"
],
"entities"
:
sorted
(
list
(
set
(
doc
[
"entities"
]))),
"answers"
:
sorted
(
list
(
set
(
doc
[
"answers"
]))),
}
yield
doc
def
process_results
(
self
,
doc
,
results
):
# ReCoRD's evaluation is actually deceptively simple:
...
...
@@ -286,7 +277,7 @@ class SGWinogradSchemaChallenge(PromptSourceTask):
# Note: This implementation differs from Fig G.32 because this is the SuperGLUE,
# binary version of the task.
DATASET_PATH
=
"super_glue"
DATASET_NAME
=
"wsc"
DATASET_NAME
=
"wsc
.fixed
"
def
has_training_docs
(
self
):
return
True
...
...
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