pub struct ModelSpec {
pub id: String,
pub task: ModelTask,
pub uri: Option<String>,
pub local_path: Option<PathBuf>,
pub embedding_dim: usize,
pub preprocess: PreprocessConfig,
pub device: DevicePreference,
pub format: Option<String>,
pub sha256: Option<String>,
}Expand description
One model the host may load (weights not shipped in SightLoom core).
Fields§
§id: StringStable id ("person_yolo_v8n", "osnet_x1_0", …).
task: ModelTaskTask this model performs.
uri: Option<String>Optional remote URI for download (https / s3 / …). Host fetcher only.
local_path: Option<PathBuf>Local path when already on disk.
embedding_dim: usizeExpected embedding length (0 for detectors / segmenters).
preprocess: PreprocessConfigPreprocess knobs.
device: DevicePreferenceDevice preference.
format: Option<String>Optional model format hint ("onnx", "torchscript", "openvino", …).
sha256: Option<String>Optional lowercase hex SHA-256 of the weight file (integrity check).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelSpec
impl<'de> Deserialize<'de> for ModelSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ModelSpec
Auto Trait Implementations§
impl Freeze for ModelSpec
impl RefUnwindSafe for ModelSpec
impl Send for ModelSpec
impl Sync for ModelSpec
impl Unpin for ModelSpec
impl UnsafeUnpin for ModelSpec
impl UnwindSafe for ModelSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more