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
25131aa7
Commit
25131aa7
authored
Oct 24, 2020
by
Jason Phang
Browse files
mnli_mismatched
parent
00abc99a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+1
-0
lm_eval/tasks/glue.py
lm_eval/tasks/glue.py
+11
-0
No files found.
lm_eval/tasks/__init__.py
View file @
25131aa7
...
...
@@ -15,6 +15,7 @@ TASK_REGISTRY = {
# GLUE
"cola"
:
glue
.
CoLA
,
"mnli"
:
glue
.
MNLI
,
"mnli_mismatched"
:
glue
.
MNLIMismatched
,
"mrpc"
:
glue
.
MRPC
,
"rte"
:
glue
.
RTE
,
"qnli"
:
glue
.
QNLI
,
...
...
lm_eval/tasks/glue.py
View file @
25131aa7
...
...
@@ -114,6 +114,17 @@ class MNLI(HFTask):
return
simple_accuracy_metric
(
preds
=
preds
,
golds
=
golds
)
class
MNLIMismatched
(
MNLI
):
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
return
self
.
data
[
"validation_mismatched"
]
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
data
[
"test_mismatched"
]
class
MRPC
(
HFTask
):
DATASET_PATH
=
"glue"
DATASET_NAME
=
"mrpc"
...
...
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