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

Method default

exir/serde/export_serialize.py:2312–2317  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

2310
2311class EnumEncoder(json.JSONEncoder):
2312 def default(self, obj):
2313 if isinstance(obj, Enum):
2314 return obj.value
2315 if isinstance(obj, bytes):
2316 return base64.b64encode(obj).decode("utf-8")
2317 return super().default(obj)
2318
2319
2320def _dataclass_to_dict(obj):

Callers 15

shapeFunction · 0.45
embedding_byteFunction · 0.45
embedding_byte_dtypeFunction · 0.45
embedding_2bitFunction · 0.45
embedding_2bit_dtypeFunction · 0.45
embedding_4bitFunction · 0.45
embedding_4bit_dtypeFunction · 0.45
binary_op_patternFunction · 0.45
binary_relu_op_patternFunction · 0.45

Calls 1

decodeMethod · 0.45

Tested by 15

forwardMethod · 0.36
patternMethod · 0.36
replacementMethod · 0.36
forwardMethod · 0.36
forwardMethod · 0.36
forwardMethod · 0.36
forwardMethod · 0.36
forwardMethod · 0.36
forwardMethod · 0.36