pub struct ModelMonitor { /* private fields */ }Expand description
Model monitor
Implementations§
Source§impl ModelMonitor
impl ModelMonitor
Sourcepub fn new(config: MonitoringConfig) -> Self
pub fn new(config: MonitoringConfig) -> Self
Creates a new model monitor
Sourcepub fn record_latency(&mut self, latency_ms: f32)
pub fn record_latency(&mut self, latency_ms: f32)
Records an inference latency
Sourcepub fn record_error(&mut self, is_error: bool)
pub fn record_error(&mut self, is_error: bool)
Records an inference error
Sourcepub fn record_drift(&mut self, metrics: DriftMetrics)
pub fn record_drift(&mut self, metrics: DriftMetrics)
Records drift metrics
Sourcepub fn performance_metrics(&self) -> PerformanceMetrics
pub fn performance_metrics(&self) -> PerformanceMetrics
Calculates performance metrics
Sourcepub fn alerts(&self) -> &[ModelAlert]
pub fn alerts(&self) -> &[ModelAlert]
Returns all alerts
Sourcepub fn alerts_by_severity(&self, severity: AlertSeverity) -> Vec<&ModelAlert>
pub fn alerts_by_severity(&self, severity: AlertSeverity) -> Vec<&ModelAlert>
Returns alerts by severity
Sourcepub fn clear_alerts(&mut self)
pub fn clear_alerts(&mut self)
Clears all alerts
Auto Trait Implementations§
impl Freeze for ModelMonitor
impl RefUnwindSafe for ModelMonitor
impl Send for ModelMonitor
impl Sync for ModelMonitor
impl Unpin for ModelMonitor
impl UnsafeUnpin for ModelMonitor
impl UnwindSafe for ModelMonitor
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