(self, predictions, examples, output_file)
| 1309 | return examples |
| 1310 | |
| 1311 | def output_prediction(self, predictions, examples, output_file): |
| 1312 | with open(output_file, "w") as output: |
| 1313 | for prediction, example in zip(predictions, examples): |
| 1314 | data = {"idx": example.guid, "prediction_text": prediction} |
| 1315 | output.write(json.dumps(data) + "\n") |
| 1316 | |
| 1317 | |
| 1318 | class LamaProcessor(DataProcessor): |