Skip to content

aether_quant.inference

The numpy forward pass over the JSON-exported networks (no torch).

The numpy forward pass over the JSON-exported networks (no torch).

average_head_outputs

average_head_outputs(outputs: list[dict | None]) -> dict[str, Any] | None

Seed-ensemble prediction (V6.1.0): the plain mean of each head's raw output across members, taken before any cross-sectional normalisation (train.average_ensemble_predictions averages the same way). A head is kept only when every member returned a finite value for it, so a member that failed cannot silently reweight the others; None when no member returned anything.

export_input_names

export_input_names(model_export: dict[str, Any] | None, default_names: list[str]) -> list[str]

The input features a model was trained on (model.model_input_features of its export); default_names when the export does not record them (an older export trained on the full schema).

load_ensemble_member_exports

load_ensemble_member_exports(ensemble_dir: Path) -> list[dict]

Every member export (*.json, sorted by name) of an ensemble directory; [] when the directory is missing.

model_input_index

model_input_index(model_export: dict[str, Any] | None, full_names: list[str]) -> list[int] | None

V6.2.0: positions of a model's own inputs inside the full live vector (ml/feature_schema.json order), so a model trained on a feature subset gets exactly its inputs. None when they are the full vector in the same order (the caller passes the vector through untouched); ValueError when the model needs a feature live never builds.

run_exported_model

run_exported_model(model_export: dict[str, Any], inputs: list[float]) -> float

The exported network's forward pass in numpy (the torch-free path main.py uses): one input vector to one output.

run_exported_multitask_model

run_exported_multitask_model(model_export: dict[str, Any], inputs: list[float]) -> dict[str, float]

Forward pass over a branching {"trunk": [...], "heads": {name: [...]}} export (train.py::export_multitask_architecture()/AetherNetMultiTask) - the shared trunk runs once, then each head runs independently starting from the trunk's output. Returns one scalar per head, e.g. {"direction": , "magnitude": , "volatility": = 0>}.

Deliberately a new function alongside run_exported_model(), not a generalization of it - the existing flat-architecture interpreter and its 5 call sites (main.py, moe/gating.py, train_gating.py) are untouched, zero regression risk to anything already shipped.

run_exported_sequence_multitask_model

run_exported_sequence_multitask_model(model_export: dict[str, Any], sequence: list[list[float]]) -> dict[str, float]

Phase 2: forward pass over a sequence-encoder export - a causal TCN trunk (train.py::AetherNetSequenceMultiTask/export_sequence_multitask_architecture()) consuming a (window, features) matrix instead of run_exported_multitask_model()'s flat feature vector, pooled to its last (most-recent, causal) timestep, then the same {"direction", "magnitude", "volatility"} head shape run_exported_multitask_model() already uses.

sequence must be ordered oldest-to-newest (sequence[-1] is the current bar) - main.py's rolling per-symbol buffer of already-computed flat model_inputs vectors (see main.py::_build_sequence_model_input()) is built in that order.

A new function alongside run_exported_model()/run_exported_multitask_model(), not a generalization of either - zero regression risk to the flat-vector interpreters both call sites already depend on.

select_model_inputs

select_model_inputs(inputs: list[float], index: list[int] | None) -> list[float]

inputs itself when index is None (no copy), else the model's own subset in its own order.

select_sequence_inputs

select_sequence_inputs(sequence: list[list[float]], index: list[int] | None) -> list[list[float]]

select_model_inputs on every bar of a (window, features) sequence.