(self, doc)
| 53 | return map(self._process_doc, self.dataset["test"]) |
| 54 | |
| 55 | def _process_doc(self, doc): |
| 56 | out_doc = { |
| 57 | "id": doc["id"], |
| 58 | "query": doc["question_stem"], |
| 59 | "choices": doc["choices"]["text"], |
| 60 | "gold": ["A", "B", "C", "D"].index(doc["answerKey"].strip()), |
| 61 | } |
| 62 | return out_doc |
| 63 | |
| 64 | def doc_to_text(self, doc): |
| 65 | return doc["query"] |
nothing calls this directly
no outgoing calls
no test coverage detected