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

Method doc_to_target

test/general/lm_eval/tasks/glue.py:304–307  ·  view source on GitHub ↗
(self, doc)

Source from the content-addressed store, hash-verified

302 )
303
304 def doc_to_target(self, doc):
305 # True = entailment
306 # False = not_entailment
307 return " {}".format({0: "False", 1: "True"}[doc["label"]])
308
309 def construct_requests(self, doc, ctx):
310 ll_true, _ = rf.loglikelihood(ctx, " True")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected