Manifest reference
manifest.json is the only file Phasic parses when loading a model. It describes what the
model expects and what it emits.
Top level
| Field | Meaning |
|---|---|
version |
Contract version |
name |
Human-readable name, shown in the interface and in errors |
input |
Sample rate, window geometry, resampling |
groups |
Channel groups, in tensor row order |
stages |
Graphs to run in sequence. Omitted means a single graph over the whole tensor |
output |
What the model emits and how to read it |
_license |
Licence text, shown to the user |
_source |
Where the model came from — URL or citation |
_validate |
Free-form verification record |
Underscore-prefixed fields describe the model rather than the contract, and nothing in the compilation reads them. They are parsed rather than ignored because two are load-bearing for the user: a restrictive licence is a constraint they must know about, and a parity measurement is the only evidence the interface can offer that a graph still computes what its author trained.
input
| Field | Meaning |
|---|---|
sfreq_hz |
The rate the model was trained at. The recording is resampled to it |
window_s |
Window length in seconds |
hop_s |
Stride between window starts. Equal to window_s for non-overlapping epochs |
pad_last |
Emit a final zero-padded partial window instead of dropping the remainder |
patch |
Optional sub-window patching of the time axis |
resample |
Which resampler to use. Defaulted to polyphase |
Window length is given in seconds rather than samples deliberately. A model card states
“30 s epochs”, and a sample count silently means something different the moment sfreq_hz
changes.
The resampler is worth stating only when reproducing a specific training pipeline; otherwise the default is the better choice.
groups
Groups are listed in tensor row order. A channel is claimed by the first group that matches it, so ordering also resolves overlap — put a specific group before a catch-all.
| Field | Meaning |
|---|---|
name |
Stable identifier, used in errors and row-range reporting |
count |
How many rows this group occupies. Authoritative — even when fewer channels are selected, the rest are filled per on_missing |
select |
Which channels satisfy this group |
on_missing |
What to do when the recording cannot fill it |
input_name |
The ONNX input this group feeds on its own, for multimodal models |
count: null means dynamic — take every matching channel and size the group to them,
padding nothing. This is the honest description of a set-based encoder whose channel axis is
genuinely variable. Declaring a fixed width there would pad rows the model must then be told
to ignore, and any slip in the mask turns that padding into signal.
select
| Variant | Behaviour |
|---|---|
Kinds |
Any channel of these kinds, in recording order |
Names |
Exactly these channels, in exactly this order |
NamesThenKinds |
Named channels positionally first, remaining rows filled by kind |
NamesAnyThenKinds |
Set-membership against an alias table, taken in recording order, then kinds |
The distinction between the last two matters. NamesThenKinds is positional — a row
layout. NamesAnyThenKinds is set membership — an alias table of every label anyone has
ever used for a given channel. Feeding a large alias list to the positional variant would
define a row layout hundreds of entries long.
Name matching is normalised, so EEG C3-M2 satisfies C3.
on_missing
| Value | Behaviour |
|---|---|
Pad |
Zero-fill the empty rows and flag them in the channel mask so the model knows they are not signal |
Interpolate |
Synthesise the absent electrode from those present. Not implemented — a manifest asking for it fails loudly rather than quietly padding |
Error |
Refuse: this recording cannot satisfy the contract |
Interpolate failing loudly is deliberate. The recording layer genuinely supports spherical-
spline synthesis, but the inference path does not yet use it, and silently padding instead
would be a wrong answer disguised as a working one.
stages
Each stage names a graph and what it consumes, run in order with each consuming what the last
produced. An empty stages list means a single graph over the whole tensor, described by
the legacy top-level fields; that case is synthesised into one stage internally so every
consumer sees the same shape.
output
| Field | Meaning |
|---|---|
kind |
Logits, Probs, Regression or Embedding |
classes |
Class labels, in output order |
output_name |
Which graph output to read |
Logits are unnormalised and have softmax applied when read. Probs are already normalised.
Getting kind wrong is a silent error: applying softmax to values that are already
probabilities produces a flatter but still plausible distribution.