MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / _process_doc

Method _process_doc

test/general/lm_eval/tasks/openbookqa.py:55–62  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

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"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected