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

Function write_spec

lit_nlp/api/dataset.py:63–66  ·  view source on GitHub ↗

Write spec to disk as LIT JSON format.

(spec: Spec, path: str)

Source from the content-addressed store, hash-verified

61
62
63def write_spec(spec: Spec, path: str):
64 """Write spec to disk as LIT JSON format."""
65 with open(path, 'w') as fd:
66 fd.write(serialize.to_json(spec, indent=2))
67
68
69class SliceWrapper(object):

Callers 1

saveMethod · 0.85

Calls 1

to_jsonMethod · 0.45

Tested by

no test coverage detected