pub struct DecisionBatchStore<B: StorageBackend> { /* private fields */ }Expand description
Decision-batch store over any StorageBackend: the write/read API for
Arrow-native model output (eval harness, distillation corpora, re-fit
input).
Implementations§
Source§impl<B: StorageBackend> DecisionBatchStore<B>
impl<B: StorageBackend> DecisionBatchStore<B>
pub fn new(backend: Arc<B>) -> Self
Sourcepub async fn put(
&self,
schema_fingerprint: &str,
model_id: &str,
calib_version: Option<&str>,
batch: &RecordBatch,
) -> Result<String, Status>
pub async fn put( &self, schema_fingerprint: &str, model_id: &str, calib_version: Option<&str>, batch: &RecordBatch, ) -> Result<String, Status>
Store one model-emitted batch. Returns the minted batch id.
Sourcepub async fn get(
&self,
batch_id: &str,
) -> Result<Option<(DecisionBatchMeta, RecordBatch)>, Status>
pub async fn get( &self, batch_id: &str, ) -> Result<Option<(DecisionBatchMeta, RecordBatch)>, Status>
Fetch one batch by id, decoding the payload back to its RecordBatch.
Sourcepub async fn fetch_by_schema(
&self,
schema_fingerprint: &str,
) -> Result<Vec<(DecisionBatchMeta, RecordBatch)>, Status>
pub async fn fetch_by_schema( &self, schema_fingerprint: &str, ) -> Result<Vec<(DecisionBatchMeta, RecordBatch)>, Status>
All batches for a decision-schema fingerprint, oldest first.
Auto Trait Implementations§
impl<B> Freeze for DecisionBatchStore<B>
impl<B> RefUnwindSafe for DecisionBatchStore<B>where
B: RefUnwindSafe,
impl<B> Send for DecisionBatchStore<B>
impl<B> Sync for DecisionBatchStore<B>
impl<B> Unpin for DecisionBatchStore<B>
impl<B> UnsafeUnpin for DecisionBatchStore<B>
impl<B> UnwindSafe for DecisionBatchStore<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].