Skip to content
heliaEDGE
Reference
HELIA

record

Export record (helia-edge/export-record@1): what export produced and how to produce it again.

One small JSON file per exported artifact, written next to it. With the weights it names by digest and the calibration it names by sha256, it is enough to rebuild the model, export it again and compare the bytes. It names files only by content hash and an optional URI, never by local path. Importable without Keras.

Machine-readable model

  • RECORD_SCHEMAconstant
  • GOLDEN_SCHEMAconstant
  • DIGESTconstant
  • SourceclassA file named by content: its sha256 and, optionally, where to fetch it (never a local path).
  • WeightImportclassWeights imported from another framework through mapping (a name in the family's MAPPINGS).
  • WeightsRecordclassThe weights, by weightsdigest, and their import when they came from another framework.
  • ExportOptionsclassFormat options of a LiteRT export.
  • CalibrationRecordclassThe calibration array as stored (.npy), its length and, for a streaming model, the state resets.
  • ExportSettingsclassHow the artifact was exported.
  • FileRecordclassA file written next to the record, by name, sha256 and size.
  • TensorEntryclassA model input or output; dynamic dimensions are -1.
  • IORecordclassThe artifact's inputs and outputs in subgraph order, read back from the artifact.
  • GoldenRecordclassA helia-model-zoo/golden@2 sequence: steps calls with the state carried and reset at resets, run with LiteRT's reference kernels from the signal named by input…
  • HeliaEdgeRecordclassThe helia-edge that exported: its version, how the version identifies the code, and the commit for a VCS install.
  • EnvironmentEntryclassVersions that can change exported bytes.
  • ExportRecordclassOne exported artifact: the model, its weights, how it was exported, and the result.
  • file_recordfunctionThe record of data written as name.
  • weights_digestfunctionsha256: over the model's weights in model.weights order, independent of the file they came from.
class

The weights, by weightsdigest, and their import when they came from another framework.

helia_edge/export/record.py:46

WeightsRecord()

The weights, by weights_digest, and their import when they came from another framework.

class

Format options of a LiteRT export.

helia_edge/export/record.py:55

ExportOptions()

Format options of a LiteRT export.

attribute

helia_edge/export/record.py:69

state_tie_tolerance: StrictFloat = Field(default=0.01, ge=0.0, le=0.5)

For calibrated precisions with integer I/O, the largest relative difference between the scales of a state pair that export ties to one scale (see ExportSpec).

attribute

mode

Python

helia_edge/export/record.py:70

mode: Literal[ConversionMode.KERAS, ConversionMode.CONCRETE] = ConversionMode.KERAS

How the model is traced: keras keeps the model’s batch; concrete traces batch 1, so it exports batch_size 1 only.

class

The calibration array as stored (.npy), its length and, for a streaming model, the state resets.

helia_edge/export/record.py:73

CalibrationRecord()

The calibration array as stored (.npy), its length and, for a streaming model, the state resets.

class

How the artifact was exported.

helia_edge/export/record.py:84

ExportSettings()

How the artifact was exported. batch_size is the batch of every model input.

class

A model input or output; dynamic dimensions are -1.

helia_edge/export/record.py:124

TensorEntry()

A model input or output; dynamic dimensions are -1. A state tensor has the index pair of its state pair (state_in_k and state_out_k).

class

IORecord

Python

The artifact's inputs and outputs in subgraph order, read back from the artifact.

helia_edge/export/record.py:143

IORecord()

The artifact’s inputs and outputs in subgraph order, read back from the artifact.

state_scales_tied is True when every integer state pair has one scale and zero point, and None without integer state pairs.

class

A helia-model-zoo/golden@2 sequence: steps calls with the state carried and reset at resets, run with LiteRT's reference kernels from the signal named by input…

helia_edge/export/record.py:157

GoldenRecord()

A helia-model-zoo/golden@2 sequence: steps calls with the state carried and reset at resets, run with LiteRT’s reference kernels from the signal named by inputs.

class

The helia-edge that exported: its version, how the version identifies the code, and the commit for a VCS install.

helia_edge/export/record.py:176

HeliaEdgeRecord()

The helia-edge that exported: its version, how the version identifies the code, and the commit for a VCS install.

class

Versions that can change exported bytes.

helia_edge/export/record.py:187

EnvironmentEntry()

Versions that can change exported bytes.

class

One exported artifact: the model, its weights, how it was exported, and the result.

helia_edge/export/record.py:209

ExportRecord()

One exported artifact: the model, its weights, how it was exported, and the result.

model, weights and export together identify the export. model is None for a model that no ModelSpec describes; such a record cannot be rebuilt.

function

sha256: over the model's weights in model.weights order, independent of the file they came from.

helia_edge/export/record.py:251

weights_digest(model) -> str

sha256: over the model’s weights in model.weights order, independent of the file they came from.

For each weight it hashes the NumPy dtype name and the shape, each followed by a NUL byte, then the C-order bytes of the value. Weight paths are not hashed: Keras numbers unnamed layers by how many it has built in the process, so paths can differ between two builds of one spec. The record’s model names the architecture.