pub struct ModelServer { /* private fields */ }Expand description
Model server for production deployment
Implementations§
Source§impl ModelServer
impl ModelServer
Sourcepub fn new(config: ServerConfig) -> Self
pub fn new(config: ServerConfig) -> Self
Creates a new model server
Sourcepub fn register_version(
&mut self,
version_id: &str,
model_path: PathBuf,
metadata: HashMap<String, String>,
) -> Result<()>
pub fn register_version( &mut self, version_id: &str, model_path: PathBuf, metadata: HashMap<String, String>, ) -> Result<()>
Sourcepub fn version_metrics(&self) -> HashMap<String, VersionMetrics>
pub fn version_metrics(&self) -> HashMap<String, VersionMetrics>
Returns metrics for all versions
Sourcepub fn active_version(&self) -> String
pub fn active_version(&self) -> String
Returns the active version
Sourcepub fn health_check(&self) -> HealthStatus
pub fn health_check(&self) -> HealthStatus
Performs health check on active version
Sourcepub fn increase_canary_traffic(&mut self, increment: u8) -> Result<()>
pub fn increase_canary_traffic(&mut self, increment: u8) -> Result<()>
Sourcepub fn promote_canary(&mut self) -> Result<()>
pub fn promote_canary(&mut self) -> Result<()>
Auto Trait Implementations§
impl Freeze for ModelServer
impl RefUnwindSafe for ModelServer
impl Send for ModelServer
impl Sync for ModelServer
impl Unpin for ModelServer
impl UnsafeUnpin for ModelServer
impl UnwindSafe for ModelServer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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