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

Method data_files

exir/program/_program.py:641–655  ·  view source on GitHub ↗

Returns the data files as a dictionary of filename to byte data. Returns: Dict[str, bytes]: Dictionary mapping data filenames (e.g., .ptd files) to their serialized byte content. Returns empty dict if no data files are available.

(self)

Source from the content-addressed store, hash-verified

639 @property
640 @experimental("This API is experimental and subject to change without notice.")
641 def data_files(self) -> Dict[str, bytes]:
642 """Returns the data files as a dictionary of filename to byte data.
643
644 Returns:
645 Dict[str, bytes]: Dictionary mapping data filenames (e.g., .ptd files) to
646 their serialized byte content.
647 Returns empty dict if no data files are available.
648 """
649 if self._pte_data is None:
650 self._get_pte_data() # This populates _tensor_data
651
652 if self._tensor_data is None:
653 return {}
654
655 return {filename: bytes(cord) for filename, cord in self._tensor_data.items()}
656
657 @property
658 def program(self) -> Program:

Callers

nothing calls this directly

Calls 2

_get_pte_dataMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected