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

Function parse_gold

test/gsm8k/eval.py:68–77  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

66 return INVALID_ANS
67
68def parse_gold(lines):
69 all_ans = []
70 for line in lines:
71 try:
72 ans = extract_answer(json.loads(line)['response'])
73 except BaseException:
74 print(line)
75 ans = extract_answer(json.loads(line)['answer'])
76 all_ans.append(ans)
77 return all_ans
78
79def parse(lines):
80 all_ans = []

Callers 2

eval_jsonFunction · 0.85
eval_majority_votingFunction · 0.85

Calls 1

extract_answerFunction · 0.85

Tested by

no test coverage detected