pub struct FixtureRunner { /* private fields */ }Expand description
A deterministic, weightless runner for tests. Declares the canonical model versions from a
Registry (so its outputs satisfy the embedding-provenance invariant) and embeds by hashing
input bytes — content equality ⇒ vector equality, which makes semantic matches reproducible.
Implementations§
Source§impl FixtureRunner
impl FixtureRunner
Sourcepub fn new(platform: &str) -> Self
pub fn new(platform: &str) -> Self
A fixture on platform declaring the canonical inventory’s model versions.
Sourcepub fn with_registry(platform: &str, registry: Registry) -> Self
pub fn with_registry(platform: &str, registry: Registry) -> Self
A fixture whose declared model versions come from registry — for simulating a model swap
(a runner that produces the new canonical version after a bump).
Trait Implementations§
Source§impl Clone for FixtureRunner
impl Clone for FixtureRunner
Source§fn clone(&self) -> FixtureRunner
fn clone(&self) -> FixtureRunner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixtureRunner
impl Debug for FixtureRunner
Source§impl ModelRunner for FixtureRunner
impl ModelRunner for FixtureRunner
Source§fn platform(&self) -> &str
fn platform(&self) -> &str
The platform partition tag for this runner’s outputs (incomparable across platforms).
Source§fn model(&self, task: TaskKind) -> Option<(ModelId, ModelVersion)>
fn model(&self, task: TaskKind) -> Option<(ModelId, ModelVersion)>
The
(model_id, model_version) this runner produces for task, if it serves it. Must equal
the registry’s canonical row for the output to be accepted by the index.Source§fn embed_image(
&self,
task: TaskKind,
frames: &[Frame<'_>],
) -> Result<Vec<Embedding>, RunnerError>
fn embed_image( &self, task: TaskKind, frames: &[Frame<'_>], ) -> Result<Vec<Embedding>, RunnerError>
Embed images for an embedding task (
SemanticSearch, FaceRecognition). One vector per
frame, in order.Source§fn embed_text(&self, texts: &[&str]) -> Result<Vec<Embedding>, RunnerError>
fn embed_text(&self, texts: &[&str]) -> Result<Vec<Embedding>, RunnerError>
Embed text into the semantic-search space — for natural-language queries and the zero-shot
tagging that reuses the semantic embedder.
Auto Trait Implementations§
impl Freeze for FixtureRunner
impl RefUnwindSafe for FixtureRunner
impl Send for FixtureRunner
impl Sync for FixtureRunner
impl Unpin for FixtureRunner
impl UnsafeUnpin for FixtureRunner
impl UnwindSafe for FixtureRunner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more