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 graph assembly without manually wiring every model plugin.

What Model gives you

  • graph(): full model path as a reusable Graph fragment.
  • preprocess(), inference(), postprocess(): reusable node-stage fragments.
  • input_spec() and output_spec(): tensor contract introspection.
  • build(...) / run(...): direct convenience execution via Model::Runner.

Reference:

Typical usage inside a Graph

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

simaai::neat::Graph graph;
graph.add(model.graph());

Failure handling

Model-driven Graphs use the same diagnostics contract as raw Graph:

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

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

See also

Tutorials