# expect

Checking a run's outputs: reference outputs from host LiteRT or caller files, compared tensor by tensor, with a verdict only when a tolerance is given.

Every name on this page is imported from `helia_profiler`.

**API tier:** `experimental`

Generated from the `src/helia_profiler` tree `f38e378c801d34438affb680257217e0b58d2cd1`.

[Machine-readable model](https://ambiqai.github.io/helia-profiler/reference/api/helia_profiler/expect.json)

`dataclass`

Largest accepted absolute error per element, in each tensor's stored units.

Integer tensors count quantization steps; float tensors count values. One
tolerance applies to every output tensor.

**API tier:** `experimental`

`dataclass`

Where reference outputs came from.

A host reference records the LiteRT package version, its op resolver and
how many times the model was invoked on the inputs.

**API tier:** `experimental`

`dataclass`

Reference bytes for every output, in model order, and their origin.

**API tier:** `experimental`

`dataclass`

What a run's outputs are compared against.

Build with :meth:`host_litert`, :meth:`from_build` or :meth:`from_files`.

**API tier:** `experimental`

`classmethod`

Run the model with host LiteRT on the run's input bytes (LiteRT models only).

`classmethod`

Use the expected outputs the fixture build carries.

`classmethod`

Compare with caller bytes, one file per output in model order.

`dataclass`

Comparison facts for one output tensor.

``max_abs_error`` is in stored units; ``max_abs_error_real`` is the same
error after dequantization, ``None`` for an unquantized tensor. A NaN on
one side only counts as a mismatch with infinite error. ``within_tolerance``
is ``None`` when no tolerance was given.

**API tier:** `experimental`

`dataclass`

Per-tensor comparison facts, the reference they used and an optional verdict.

**API tier:** `experimental`

Whether every tensor is within tolerance; ``None`` when no tolerance was given.

Run a LiteRT model on the host and return its output bytes in *outputs* order.

*inputs* must cover every model input. They are restored before every
invocation, as the fixture firmware does, so internal state carries across
*invocations* while inputs do not.

**API tier:** `experimental`

Compare observed output bytes with reference outputs, tensor by tensor.

**API tier:** `experimental`

Compare a fixture capture's outputs with *expect*.

A host reference runs the build's model on its pinned input bytes as many
times as the firmware invokes it (warmups, then timed iterations).

**API tier:** `experimental`

---

Machine-readable: [`expect.json`](https://ambiqai.github.io/helia-profiler/reference/api/helia_profiler/expect.json) · [`expect.md`](https://ambiqai.github.io/helia-profiler/reference/api/helia_profiler/expect.md), complete and lossless.
