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

Method _is_correct

test/general/lm_eval/tasks/mgsm.py:112–115  ·  view source on GitHub ↗
(self, completion, answer)

Source from the content-addressed store, hash-verified

110 return INVALID_ANS
111
112 def _is_correct(self, completion, answer):
113 gold = answer
114 assert gold != INVALID_ANS, "No ground truth answer found in the document."
115 return self._extract_answer(completion) == gold
116
117 def process_results(self, doc, results):
118 """Take a single document and the LM results and evaluates, returning a

Callers 1

process_resultsMethod · 0.95

Calls 1

_extract_answerMethod · 0.95

Tested by

no test coverage detected