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

More search and replace

parent 6469a0e7
from . common import HFTask from . common import HFTask
class ARCEasy(HFTask): class ARCEasy(HFTask):
NLP_PATH = "ai2_arc" DATASET_PATH = "ai2_arc"
NLP_NAME = "ARC-Easy" DATASET_NAME = "ARC-Easy"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -27,5 +27,5 @@ class ARCEasy(HFTask): ...@@ -27,5 +27,5 @@ class ARCEasy(HFTask):
raise NotImplementedError() raise NotImplementedError()
class ARCChallenge(ARCEasy): class ARCChallenge(ARCEasy):
NLP_PATH = "ai2_arc" DATASET_PATH = "ai2_arc"
NLP_NAME = "ARC-Challenge" DATASET_NAME = "ARC-Challenge"
\ No newline at end of file \ No newline at end of file
...@@ -5,8 +5,8 @@ import nlp ...@@ -5,8 +5,8 @@ import nlp
class RACE(HFTask): class RACE(HFTask):
NLP_PATH = "race" DATASET_PATH = "race"
NLP_NAME = "high" DATASET_NAME = "high"
cache = {} cache = {}
...@@ -26,7 +26,7 @@ class RACE(HFTask): ...@@ -26,7 +26,7 @@ class RACE(HFTask):
# is shown that one document is made per passage. # is shown that one document is made per passage.
r = collections.defaultdict(list) 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) r[item['article']].append(item)
res = list(r.values() >> each(lambda x: { res = list(r.values() >> each(lambda x: {
......
...@@ -4,8 +4,8 @@ from . common import HFTask, simple_accuracy_metric, yesno ...@@ -4,8 +4,8 @@ from . common import HFTask, simple_accuracy_metric, yesno
class BoolQ(HFTask): class BoolQ(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "boolq" DATASET_NAME = "boolq"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -37,8 +37,8 @@ class BoolQ(HFTask): ...@@ -37,8 +37,8 @@ class BoolQ(HFTask):
class CommitmentBank(HFTask): class CommitmentBank(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "cb" DATASET_NAME = "cb"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -80,8 +80,8 @@ class CommitmentBank(HFTask): ...@@ -80,8 +80,8 @@ class CommitmentBank(HFTask):
class Copa(HFTask): class Copa(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "copa" DATASET_NAME = "copa"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -121,8 +121,8 @@ class Copa(HFTask): ...@@ -121,8 +121,8 @@ class Copa(HFTask):
class MultiRC(HFTask): class MultiRC(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "multirc" DATASET_NAME = "multirc"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -178,8 +178,8 @@ class MultiRC(HFTask): ...@@ -178,8 +178,8 @@ class MultiRC(HFTask):
class WordsInContext(HFTask): class WordsInContext(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "wic" DATASET_NAME = "wic"
def has_training_docs(self): def has_training_docs(self):
return True return True
...@@ -215,8 +215,8 @@ class WordsInContext(HFTask): ...@@ -215,8 +215,8 @@ class WordsInContext(HFTask):
class WinogradSchemaChallenge(HFTask): class WinogradSchemaChallenge(HFTask):
NLP_PATH = "super_glue" DATASET_PATH = "super_glue"
NLP_NAME = "wsc" DATASET_NAME = "wsc"
def has_training_docs(self): def has_training_docs(self):
return True return True
......
from . common import HFTask from . common import HFTask
class WebQs(HFTask): class WebQs(HFTask):
NLP_PATH = "web_questions" DATASET_PATH = "web_questions"
NLP_NAME = None DATASET_NAME = None
def has_training_docs(self): def has_training_docs(self):
return True 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