pub struct PredictorRegistry { /* private fields */ }Expand description
Explicit registry mapping custom predictor names to runtime factories.
Implementations§
Source§impl PredictorRegistry
impl PredictorRegistry
Sourcepub fn register_model<F>(&mut self, name: impl Into<String>, factory: F)
pub fn register_model<F>(&mut self, name: impl Into<String>, factory: F)
Register a runtime custom model factory.
Sourcepub fn register_model_checked<F>(
&mut self,
name: impl Into<String>,
factory: F,
trace: &str,
spec: &FieldSchema,
field: &FieldInfo,
) -> Result<(), ConformanceError>
pub fn register_model_checked<F>( &mut self, name: impl Into<String>, factory: F, trace: &str, spec: &FieldSchema, field: &FieldInfo, ) -> Result<(), ConformanceError>
Register a runtime model and run conformance check on a sample predictor.
Sourcepub fn build(
&self,
name: &str,
spec: &FieldSchema,
field: &FieldInfo,
) -> Result<Box<dyn Predictor>, ConfigError>
pub fn build( &self, name: &str, spec: &FieldSchema, field: &FieldInfo, ) -> Result<Box<dyn Predictor>, ConfigError>
Build a predictor by registered custom name.
Trait Implementations§
Source§impl Debug for PredictorRegistry
impl Debug for PredictorRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for PredictorRegistry
impl !UnwindSafe for PredictorRegistry
impl Freeze for PredictorRegistry
impl Send for PredictorRegistry
impl Sync for PredictorRegistry
impl Unpin for PredictorRegistry
impl UnsafeUnpin for PredictorRegistry
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