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

Function _convert_dataclass

exir/_serialize/_flatbuffer_program.py:166–170  ·  view source on GitHub ↗
(val: Any)

Source from the content-addressed store, hash-verified

164
165
166def _convert_dataclass(val: Any) -> Any:
167 result = _flatbuffer_t_class(type(val))()
168 for src_name, dst_name in _dataclass_field_map(type(val)):
169 setattr(result, dst_name, _convert_value(getattr(val, src_name)))
170 return result
171
172
173def _convert_value(val: Any) -> Any:

Callers 2

_convert_valueFunction · 0.85
convert_programFunction · 0.85

Calls 3

_flatbuffer_t_classFunction · 0.85
_dataclass_field_mapFunction · 0.85
_convert_valueFunction · 0.85

Tested by

no test coverage detected