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

Method process_results

test/general/lm_eval/tasks/hendrycks_math.py:68–80  ·  view source on GitHub ↗
(self, doc, results)

Source from the content-addressed store, hash-verified

66 return rf.greedy_until(ctx, {"until": ["\n"]})
67
68 def process_results(self, doc, results):
69 retval = 0
70 indices = [pos for pos, char in enumerate(results[0]) if char == "$"]
71 if len(indices) <= 1:
72 answer = results[0]
73 else:
74 answer = results[0][indices[0] + 1 : indices[-1]]
75
76 if self.is_equiv(
77 answer, self.remove_boxed(self.last_boxed_only_string(doc["solution"]))
78 ):
79 retval = 1
80 return {"acc": retval}
81
82 def aggregation(self):
83 return {"acc": mean}

Callers

nothing calls this directly

Calls 3

is_equivMethod · 0.95
remove_boxedMethod · 0.95

Tested by

no test coverage detected