MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / process_doc

Function process_doc

eval_general/eval_gsm8k_tgi.py:179–186  ·  view source on GitHub ↗
(doc, args)

Source from the content-addressed store, hash-verified

177 test = dataset["test"]
178
179 def process_doc(doc, args):
180 context = doc_to_text(doc)
181 completion = generate_sample(context, args.ip, args.min, args.max)
182 answer = doc["answer"]
183 acc = is_correct(completion, answer)
184 doc["completion"] = completion
185 doc["acc"] = acc
186 return doc, acc
187
188 f_output = jsonlines.Writer(
189 open(args.sample_output_file, 'w', encoding='utf-8'))

Callers

nothing calls this directly

Calls 3

doc_to_textFunction · 0.85
generate_sampleFunction · 0.85
is_correctFunction · 0.85

Tested by

no test coverage detected