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

Method doc_to_text

test/general/lm_eval/tasks/superglue.py:182–188  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

180 return self.dataset["validation"]
181
182 def doc_to_text(self, doc):
183 # Drop the period
184 connector = {
185 "cause": "because",
186 "effect": "therefore",
187 }[doc["question"]]
188 return doc["premise"].strip()[:-1] + f" {connector}"
189
190 def doc_to_target(self, doc):
191 correct_choice = doc["choice1"] if doc["label"] == 0 else doc["choice2"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected