pub struct KnownAnswer {
pub task: TaskKind,
pub input: Vec<u8>,
pub expected: Embedding,
}Expand description
A known-answer probe pinning the deterministic execution path for a task: a fixed input and the
exact embedding a bit-exact device must reproduce. Comparing a runner’s output to expected
bit-for-bit is the byte-identical known-answer check the contract requires.
Fields§
§task: TaskKindThe embedding task the probe pins.
input: Vec<u8>The fixed probe input bytes.
expected: EmbeddingThe exact embedding a device on the canonical path must reproduce.
Implementations§
Source§impl KnownAnswer
impl KnownAnswer
Sourcepub fn capture<R: ModelRunner>(
runner: &R,
registry: &Registry,
task: TaskKind,
input: &[u8],
) -> Result<Self, OrchestratorError>
pub fn capture<R: ModelRunner>( runner: &R, registry: &Registry, task: TaskKind, input: &[u8], ) -> Result<Self, OrchestratorError>
Capture the known-answer for task from a reference runner (the canonical device that
defines the shared vector space). A later device compares against this via
resolve_partition.
Trait Implementations§
Source§impl Clone for KnownAnswer
impl Clone for KnownAnswer
Source§fn clone(&self) -> KnownAnswer
fn clone(&self) -> KnownAnswer
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 KnownAnswer
impl Debug for KnownAnswer
Source§impl PartialEq for KnownAnswer
impl PartialEq for KnownAnswer
Source§fn eq(&self, other: &KnownAnswer) -> bool
fn eq(&self, other: &KnownAnswer) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KnownAnswer
Auto Trait Implementations§
impl Freeze for KnownAnswer
impl RefUnwindSafe for KnownAnswer
impl Send for KnownAnswer
impl Sync for KnownAnswer
impl Unpin for KnownAnswer
impl UnsafeUnpin for KnownAnswer
impl UnwindSafe for KnownAnswer
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