Skip to content
heliaEDGE
Reference
HELIA

result

Export results and the environment that produced them; importable without Keras.

Machine-readable model

class

One model input or output.

helia_edge/export/result.py:20

TensorRecord(
name: str,
role: TensorRole,
shape: tuple[int, ...],
dtype: IODType,
scale: float | None,
zero_point: int | None,
pair: int | None = None,
) -> None

dataclass

One model input or output. Dynamic dimensions are -1. I/O tensors are per-tensor quantized; float tensors have no scale. A state tensor (role STATE) has the index pair of its state pair.

function

Whether every integer state pair has one scale and zero point.

helia_edge/export/result.py:44

state_scales_tied(inputs: Sequence[TensorRecord], outputs: Sequence[TensorRecord]) -> bool | None

Whether every integer state pair has one scale and zero point.

Returns of state_scales_tied
TypeDescription
bool | Nonebool | None: None when the model has no integer state pair, as for float I/O or a stateless model.
Errors raised by state_scales_tied
TypeDescription
ValueErrorIf a state tensor has no pair index, or a state input or output has no partner.
class

Versions that can change exported bytes.

helia_edge/export/result.py:62

EnvironmentRecord(
helia_edge: str,
helia_edge_commit: str | None,
python: str,
platform: str,
packages: tuple[tuple[str, str | None], ...],
helia_edge_source: HeliaEdgeSource = 'unknown',
) -> None

dataclass

Versions that can change exported bytes.

helia_edge is "unknown" when the imported package is not the installed distribution (for example a source tree on PYTHONPATH). helia_edge_commit is set only for a distribution installed from a VCS URL. helia_edge_source says how the version identifies the code: release (installed from a package index), vcs (installed from a VCS URL at helia_edge_commit), local (installed from a directory or an archive, or a source tree with egg-info metadata, which the version does not identify) or unknown.

attribute

True when the recorded version or commit identifies the code that ran.

helia_edge/export/result.py:82

identified: bool

True when the recorded version or commit identifies the code that ran.

class

Exported model bytes with their identity.

helia_edge/export/result.py:87

ExportResult(
spec: ExportSpec,
content: bytes,
sha256: str,
inputs: tuple[TensorRecord, ...],
outputs: tuple[TensorRecord, ...],
environment: EnvironmentRecord,
) -> None

dataclass

Exported model bytes with their identity.

function

Why record does not identify the helia-edge code, and how to install code that does.

helia_edge/export/result.py:144

unidentified_install(record: EnvironmentRecord) -> str

Why record does not identify the helia-edge code, and how to install code that does.