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

Method _extract_answer

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

Source from the content-addressed store, hash-verified

103 return completion
104
105 def _extract_answer(self, completion):
106 match = re.findall(ANS_RE, completion)
107 if match:
108 return int(match[-1])
109 else:
110 return INVALID_ANS
111
112 def _is_correct(self, completion, answer):
113 gold = answer

Callers 1

_is_correctMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected