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
a5c48976
Commit
a5c48976
authored
Oct 05, 2020
by
Leo Gao
Browse files
More search and replace
parent
6469a0e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
21 deletions
+21
-21
lm_eval/tasks/arc.py
lm_eval/tasks/arc.py
+4
-4
lm_eval/tasks/race.py
lm_eval/tasks/race.py
+3
-3
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+12
-12
lm_eval/tasks/webqs.py
lm_eval/tasks/webqs.py
+2
-2
No files found.
lm_eval/tasks/arc.py
View file @
a5c48976
from
.
common
import
HFTask
class
ARCEasy
(
HFTask
):
NLP
_PATH
=
"ai2_arc"
NLP
_NAME
=
"ARC-Easy"
DATASET
_PATH
=
"ai2_arc"
DATASET
_NAME
=
"ARC-Easy"
def
has_training_docs
(
self
):
return
True
...
...
@@ -27,5 +27,5 @@ class ARCEasy(HFTask):
raise
NotImplementedError
()
class
ARCChallenge
(
ARCEasy
):
NLP_PATH
=
"ai2_arc"
NLP_NAME
=
"ARC-Challenge"
\ No newline at end of file
DATASET_PATH
=
"ai2_arc"
DATASET_NAME
=
"ARC-Challenge"
\ No newline at end of file
lm_eval/tasks/race.py
View file @
a5c48976
...
...
@@ -5,8 +5,8 @@ import nlp
class
RACE
(
HFTask
):
NLP
_PATH
=
"race"
NLP
_NAME
=
"high"
DATASET
_PATH
=
"race"
DATASET
_NAME
=
"high"
cache
=
{}
...
...
@@ -26,7 +26,7 @@ class RACE(HFTask):
# is shown that one document is made per passage.
r
=
collections
.
defaultdict
(
list
)
for
item
in
nlp
.
load_dataset
(
path
=
self
.
NLP
_PATH
,
name
=
self
.
NLP
_NAME
)[
set
]:
for
item
in
nlp
.
load_dataset
(
path
=
self
.
DATASET
_PATH
,
name
=
self
.
DATASET
_NAME
)[
set
]:
r
[
item
[
'article'
]].
append
(
item
)
res
=
list
(
r
.
values
()
>>
each
(
lambda
x
:
{
...
...
lm_eval/tasks/superglue.py
View file @
a5c48976
...
...
@@ -4,8 +4,8 @@ from . common import HFTask, simple_accuracy_metric, yesno
class
BoolQ
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"boolq"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"boolq"
def
has_training_docs
(
self
):
return
True
...
...
@@ -37,8 +37,8 @@ class BoolQ(HFTask):
class
CommitmentBank
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"cb"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"cb"
def
has_training_docs
(
self
):
return
True
...
...
@@ -80,8 +80,8 @@ class CommitmentBank(HFTask):
class
Copa
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"copa"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"copa"
def
has_training_docs
(
self
):
return
True
...
...
@@ -121,8 +121,8 @@ class Copa(HFTask):
class
MultiRC
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"multirc"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"multirc"
def
has_training_docs
(
self
):
return
True
...
...
@@ -178,8 +178,8 @@ class MultiRC(HFTask):
class
WordsInContext
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"wic"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"wic"
def
has_training_docs
(
self
):
return
True
...
...
@@ -215,8 +215,8 @@ class WordsInContext(HFTask):
class
WinogradSchemaChallenge
(
HFTask
):
NLP
_PATH
=
"super_glue"
NLP
_NAME
=
"wsc"
DATASET
_PATH
=
"super_glue"
DATASET
_NAME
=
"wsc"
def
has_training_docs
(
self
):
return
True
...
...
lm_eval/tasks/webqs.py
View file @
a5c48976
from
.
common
import
HFTask
class
WebQs
(
HFTask
):
NLP
_PATH
=
"web_questions"
NLP
_NAME
=
None
DATASET
_PATH
=
"web_questions"
DATASET
_NAME
=
None
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