Model

Trait Model 

Source
pub trait Model:
    Send
    + Sync
    + Debug {
    // Required methods
    fn model_type(&self) -> &str;
    fn model_path(&self) -> &Path;
    fn metadata(&self) -> &HashMap<String, Value>;
    fn config(&self) -> EdgeResult<Value>;
    fn validate(&self) -> EdgeResult<()>;
}
Expand description

Trait representing a model that can be loaded and used for inference

Required Methods§

Source

fn model_type(&self) -> &str

Get the model type (e.g., “onnx”, “tensorrt”, “coreml”)

Source

fn model_path(&self) -> &Path

Get the model path or identifier

Source

fn metadata(&self) -> &HashMap<String, Value>

Get model metadata

Source

fn config(&self) -> EdgeResult<Value>

Get model configuration as JSON

Source

fn validate(&self) -> EdgeResult<()>

Validate that the model files exist and are valid

Implementors§