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

Method doc_to_target

test/general/lm_eval/tasks/mgsm.py:85–89  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

83 return self.QUESTION + " " + doc["question"] + "\n" + self.ANSWER
84
85 def doc_to_target(self, doc):
86 if doc["answer"] is not None:
87 return " " + doc["answer"][len(self.ANSWER) + 1 :]
88 else:
89 return " " + str(doc["answer_number"])
90
91 def construct_requests(self, doc, ctx):
92 """Uses RequestFactory to construct Requests and returns an iterable of

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected