MCPcopy Create free account
hub / github.com/PAIR-code/lit / write_examples

Function write_examples

lit_nlp/api/dataset.py:56–60  ·  view source on GitHub ↗

Write examples to disk as LIT JSONL format.

(examples: Sequence[JsonDict], path: str)

Source from the content-addressed store, hash-verified

54
55
56def 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
63def write_spec(spec: Spec, path: str):

Callers 1

saveMethod · 0.85

Calls 1

to_jsonMethod · 0.45

Tested by

no test coverage detected