pub trait InfererExt: Inferer + Sized {
// Provided methods
fn with_default_epsilon(self, key: &str) -> Result<EpsilonInjector<Self>> { ... }
fn with_epsilon<G: NoiseGenerator>(
self,
generator: G,
key: &str,
) -> Result<EpsilonInjector<Self, G>> { ... }
fn into_batched(self) -> Batched<Self> { ... }
fn infer(
&mut self,
observations: HashMap<u64, State<'_>>,
) -> Result<HashMap<u64, Response<'_>>, Error> { ... }
fn infer_batch<'this>(
&'this self,
batch: HashMap<u64, State<'_>>,
) -> Result<HashMap<u64, Response<'this>>, Error> { ... }
fn infer_single<'this>(
&'this self,
input: State<'_>,
) -> Result<Response<'this>, Error> { ... }
}Expand description
Extension trait for Inferer.
Provided Methods§
Sourcefn with_default_epsilon(self, key: &str) -> Result<EpsilonInjector<Self>>
fn with_default_epsilon(self, key: &str) -> Result<EpsilonInjector<Self>>
Add an epsilon injector using the default noise kind.
Sourcefn with_epsilon<G: NoiseGenerator>(
self,
generator: G,
key: &str,
) -> Result<EpsilonInjector<Self, G>>
fn with_epsilon<G: NoiseGenerator>( self, generator: G, key: &str, ) -> Result<EpsilonInjector<Self, G>>
Add an epsilon injector with a specific noise generator.
Sourcefn into_batched(self) -> Batched<Self>
fn into_batched(self) -> Batched<Self>
Wrap in a batching interface.
Sourcefn infer(
&mut self,
observations: HashMap<u64, State<'_>>,
) -> Result<HashMap<u64, Response<'_>>, Error>
👎Deprecated since 0.3.0: Please use the more explicit ‘infer_batch’ instead.
fn infer( &mut self, observations: HashMap<u64, State<'_>>, ) -> Result<HashMap<u64, Response<'_>>, Error>
Execute the model on the provided batch of elements.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.