pub struct CalibrationStore<B: StorageBackend> { /* private fields */ }Expand description
Calibration parameter store over any StorageBackend: the writer API for
the P2.2 re-fit loop and the reader API for serving.
Implementations§
Source§impl<B: StorageBackend> CalibrationStore<B>
impl<B: StorageBackend> CalibrationStore<B>
pub fn new(backend: Arc<B>) -> Self
Sourcepub async fn insert(&self, params: &CalibrationParams) -> Result<(), Status>
pub async fn insert(&self, params: &CalibrationParams) -> Result<(), Status>
Insert one validated parameter row. The (primitive, version triple) key
must be new — re-fits mint a fresh calib_version; rows are never
updated in place.
Sourcepub async fn latest(
&self,
schema_id: &str,
model_id: &str,
primitive: DecisionPrimitive,
) -> Result<Option<CalibrationParams>, Status>
pub async fn latest( &self, schema_id: &str, model_id: &str, primitive: DecisionPrimitive, ) -> Result<Option<CalibrationParams>, Status>
The newest parameter row for a (schema, model, primitive), by fit time.
Sourcepub async fn history(
&self,
schema_id: &str,
model_id: &str,
primitive: DecisionPrimitive,
) -> Result<Vec<CalibrationParams>, Status>
pub async fn history( &self, schema_id: &str, model_id: &str, primitive: DecisionPrimitive, ) -> Result<Vec<CalibrationParams>, Status>
All parameter versions for a (schema, model, primitive), newest first.
Auto Trait Implementations§
impl<B> Freeze for CalibrationStore<B>
impl<B> RefUnwindSafe for CalibrationStore<B>where
B: RefUnwindSafe,
impl<B> Send for CalibrationStore<B>
impl<B> Sync for CalibrationStore<B>
impl<B> Unpin for CalibrationStore<B>
impl<B> UnsafeUnpin for CalibrationStore<B>
impl<B> UnwindSafe for CalibrationStore<B>where
B: RefUnwindSafe,
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<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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].