Commit bc9f6fc5 authored by jon-tow's avatar jon-tow
Browse files

Rename all `_load_doc`s to `_process_doc`

parent e9acf86d
...@@ -38,15 +38,15 @@ class Math(Task): ...@@ -38,15 +38,15 @@ class Math(Task):
return True return True
def training_docs(self): def training_docs(self):
return map(self._load_doc, self.dataset["train"]) return map(self._process_doc, self.dataset["train"])
def validation_docs(self): def validation_docs(self):
return NotImplemented return NotImplemented
def test_docs(self): def test_docs(self):
return map(self._load_doc, self.dataset["test"]) return map(self._process_doc, self.dataset["test"])
def _load_doc(self, doc): def _process_doc(self, doc):
doc["answer"] = self.remove_boxed( doc["answer"] = self.remove_boxed(
self.last_boxed_only_string(doc["solution"])) self.last_boxed_only_string(doc["solution"]))
return doc return doc
......
...@@ -53,9 +53,9 @@ class WinogradSchemaChallenge273(Task): ...@@ -53,9 +53,9 @@ class WinogradSchemaChallenge273(Task):
return True return True
def test_docs(self): def test_docs(self):
return map(self._load_doc, self.dataset["test"]) return map(self._process_doc, self.dataset["test"])
def _load_doc(self, doc): def _process_doc(self, doc):
# The HF implementation of `wsc273` is not `partial evaluation` friendly. # The HF implementation of `wsc273` is not `partial evaluation` friendly.
doc["text"] = doc["text"].replace(" ", " ") doc["text"] = doc["text"].replace(" ", " ")
doc["options"][0] = self.__normalize_option(doc, doc["options"][0]) doc["options"][0] = self.__normalize_option(doc, doc["options"][0])
......
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