Skip to content

Local ONNX model runtime

State: open/building · Kind: module · Audience: system

  • Loads a model from the machine-local pack cache and runs it in-process, passing tensors in and out.
  • The interface is tensors, not tasks, so face detection and embedding are built on top elsewhere.

A Rust library crate that runs a model inside the calling process. A caller resolves a model file from a cached pack, loads it through a ModelRuntime, and runs forward passes on Tensors. It does not fetch packs and has no opinion on what a model is for. The ONNX backend sits behind the onnx feature, so only crates that infer link ONNX Runtime. Without it, UnavailableRuntime refuses every load with ModelError::NoRuntime.

  • Model and ModelRuntime traits: load a model, run one forward pass with outputs in graph order.
  • Tensor: shape plus f32 data, with a checked constructor.
  • resolve: a pack file path that fails as NotDownloaded when the pack is absent, separate from load failures.
  • OnnxRuntime (feature onnx) and UnavailableRuntime (the stand-in when the feature is off).
  • ModelError (src/error.rs): typed errors for missing packs, bad tensors and load or run failures.
  • solutions/determined/crates/determined-models/src/lib.rs
  • solutions/determined/crates/determined-models/src/onnx.rs
  • solutions/determined/crates/determined-models/src/unavailable.rs
  • solutions/determined/crates/determined-models/src/tensor.rs
  • solutions/determined/crates/determined-models/
  • solutions/determined/crates/determined-models/src/lib.rs#ModelRuntime
  • solutions/determined/crates/determined-models/src/tensor.rs#Tensor
  • solutions/determined/crates/determined-models/src/onnx.rs#OnnxRuntime
  • solutions/determined/crates/determined-models/src/unavailable.rs#UnavailableRuntime
  • solutions/determined/crates/determined-models/src/error.rs#ModelError

← Back to Capabilities