Commit f33717c2 authored by cjlovering's avatar cjlovering
Browse files

Merge branch 'master' of github.com:cjlovering/ps-eh

parents c26f1d4c b988137d
...@@ -199,22 +199,13 @@ class ReCoRD(PromptSourceTask): ...@@ -199,22 +199,13 @@ class ReCoRD(PromptSourceTask):
if self._training_docs is None: if self._training_docs is None:
self._training_docs = [] self._training_docs = []
for doc in self.dataset["train"]: for doc in self.dataset["train"]:
self._training_docs.append(self._process_doc(doc)) self._training_docs.append(doc)
return self._training_docs return self._training_docs
def validation_docs(self): def validation_docs(self):
# See: training_docs # See: training_docs
for doc in self.dataset["validation"]: for doc in self.dataset["validation"]:
yield self._process_doc(doc) yield 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"]))),
}
def process_results(self, doc, results): def process_results(self, doc, results):
# ReCoRD's evaluation is actually deceptively simple: # ReCoRD's evaluation is actually deceptively simple:
...@@ -286,7 +277,7 @@ class SGWinogradSchemaChallenge(PromptSourceTask): ...@@ -286,7 +277,7 @@ class SGWinogradSchemaChallenge(PromptSourceTask):
# Note: This implementation differs from Fig G.32 because this is the SuperGLUE, # Note: This implementation differs from Fig G.32 because this is the SuperGLUE,
# binary version of the task. # binary version of the task.
DATASET_PATH = "super_glue" DATASET_PATH = "super_glue"
DATASET_NAME = "wsc" DATASET_NAME = "wsc.fixed"
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