(doc, args)
| 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')) |
nothing calls this directly
no test coverage detected