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

Method doc_to_target

test/general/lm_eval/tasks/squad.py:91–97  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

89 return doc["context"]
90
91 def doc_to_target(self, doc):
92 answer_list = doc["answers"]["text"]
93 if len(answer_list) > 0:
94 answer = answer_list[0]
95 else:
96 answer = "unanswerable"
97 return " " + answer
98
99 def construct_requests(self, doc, ctx):
100 """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