Skip to main content

Model

Model is the top-level API for loading a compiled model (.tar.gz) and exposing reusable stage fragments.

Use Model when you want model-aware pipeline assembly without manually wiring every model plugin.

What Model gives you

  • session(): full model path as a node group.
  • preprocess(), inference(), postprocess(): stage-level composition.
  • input_spec() and output_spec(): tensor contract introspection.
  • build(...) / run(...): direct convenience execution via Model::Runner.

Reference:

Typical usage inside a session

simaai::neat::Model model("yolov8s_model.tar.gz");

simaai::neat::Session session;
session.add(model.session());

Failure handling

Model-driven sessions use the same diagnostics contract as raw Session:

  • SessionError.report().error_code for terminal failures
  • SessionError.report().repro_note for actionable context + hints
  • SessionError.report().bus for plugin/runtime detail

Start triage from error_code (misconfig.*, build.*, runtime.*, io.*) before inspecting detailed bus logs.

See also

Tutorials