Commit a5c48976 authored by Leo Gao's avatar Leo Gao
Browse files

More search and replace

parent 6469a0e7
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
......@@ -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: {
......
......@@ -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
......
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment