MCPcopy Create free account
hub / github.com/pytorch/executorch / _json_to_program

Function _json_to_program

exir/_serialize/_program.py:89–92  ·  view source on GitHub ↗

Returns a Program deserialized from the given JSON string.

(program_json: bytes)

Source from the content-addressed store, hash-verified

87
88
89def _json_to_program(program_json: bytes) -> Program:
90 """Returns a Program deserialized from the given JSON string."""
91 # construct program class recursively from dict
92 return _json_to_dataclass(json.loads(program_json), cls=Program)
93
94
95def _insert_flatbuffer_header(

Calls 1

_json_to_dataclassFunction · 0.90