pub trait ModelInfo: Send + Sync {
// Required method
fn model_id(&self) -> &str;
// Provided method
fn active_execution_providers(&self) -> Vec<String> { ... }
}Expand description
Metadata common to every loaded model handle.
Supertrait of every task trait (EmbeddingModel, RerankerModel, …) so a
caller holding any typed handle can identify the model and inspect its
requested execution backends uniformly.
Required Methods§
Provided Methods§
Sourcefn active_execution_providers(&self) -> Vec<String>
fn active_execution_providers(&self) -> Vec<String>
Names of the ONNX Runtime execution providers requested for the underlying session, in priority order. Empty for remote and non-ONNX models.
“Requested” is not “attached”: a provider may fall back if a backend is unavailable at session-build time. This reports what was asked for.