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

Method doc_to_text

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

Source from the content-addressed store, hash-verified

389 return self.dataset["validation"]
390
391 def doc_to_text(self, doc):
392 return (
393 "Sentence 1: {}\nSentence 2: {}\nQuestion: Is the word '{}' used in the same way in the"
394 " two sentences above?\nAnswer:".format(
395 doc["sentence1"],
396 doc["sentence2"],
397 doc["sentence1"][doc["start1"] : doc["end1"]],
398 )
399 )
400
401 def doc_to_target(self, doc):
402 return " {}".format({0: "no", 1: "yes"}[doc["label"]])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected