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

Method doc_to_target

test/general/lm_eval/tasks/coqa.py:126–131  ·  view source on GitHub ↗
(self, doc, turnid=None)

Source from the content-addressed store, hash-verified

124 }
125
126 def doc_to_target(self, doc, turnid=None):
127 # Default to prediction of last turn.
128 if turnid is None:
129 turnid = len(doc["questions"]["input_text"])
130 raw_text = doc["answers"]["input_text"][turnid - 1]
131 return " " + raw_text
132
133 def construct_requests(self, doc, ctx):
134 """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