Write examples to disk as LIT JSONL format.
(examples: Sequence[JsonDict], path: str)
| 54 | |
| 55 | |
| 56 | def write_examples(examples: Sequence[JsonDict], path: str): |
| 57 | """Write examples to disk as LIT JSONL format.""" |
| 58 | with open(path, 'w') as fd: |
| 59 | for ex in examples: |
| 60 | fd.write(serialize.to_json(ex) + '\n') |
| 61 | |
| 62 | |
| 63 | def write_spec(spec: Spec, path: str): |