pub struct MobileModelDebugger { /* private fields */ }Expand description
Mobile model debugger
Implementations§
Source§impl MobileModelDebugger
impl MobileModelDebugger
Sourcepub fn new(config: ModelDebuggerConfig) -> Self
pub fn new(config: ModelDebuggerConfig) -> Self
Create a new model debugger
Sourcepub fn register_model(
&self,
model_id: String,
model_type: String,
input_shapes: Vec<Vec<usize>>,
output_shapes: Vec<Vec<usize>>,
parameter_count: usize,
) -> Result<()>
pub fn register_model( &self, model_id: String, model_type: String, input_shapes: Vec<Vec<usize>>, output_shapes: Vec<Vec<usize>>, parameter_count: usize, ) -> Result<()>
Register a model for debugging
Sourcepub fn debug_inference(
&self,
model_id: &str,
input_tensors: &[Tensor],
output_tensors: &[Tensor],
execution_time: Duration,
memory_usage: usize,
) -> Result<InferenceTrace>
pub fn debug_inference( &self, model_id: &str, input_tensors: &[Tensor], output_tensors: &[Tensor], execution_time: Duration, memory_usage: usize, ) -> Result<InferenceTrace>
Debug an inference operation
Sourcepub fn validate_model(&self, model_id: &str) -> Result<ValidationStatus>
pub fn validate_model(&self, model_id: &str) -> Result<ValidationStatus>
Validate a model structure
Sourcepub fn get_model_debug_info(&self, model_id: &str) -> Result<ModelDebugInfo>
pub fn get_model_debug_info(&self, model_id: &str) -> Result<ModelDebugInfo>
Get debugging information for a model
Sourcepub fn get_inference_traces(
&self,
model_id: Option<&str>,
limit: Option<usize>,
) -> Result<Vec<InferenceTrace>>
pub fn get_inference_traces( &self, model_id: Option<&str>, limit: Option<usize>, ) -> Result<Vec<InferenceTrace>>
Get recent inference traces
Sourcepub fn get_anomalies(
&self,
model_id: Option<&str>,
severity: Option<AnomalySeverity>,
) -> Result<Vec<ModelAnomaly>>
pub fn get_anomalies( &self, model_id: Option<&str>, severity: Option<AnomalySeverity>, ) -> Result<Vec<ModelAnomaly>>
Get detected anomalies
Sourcepub fn generate_debug_report(&self, model_id: &str) -> Result<String>
pub fn generate_debug_report(&self, model_id: &str) -> Result<String>
Generate debugging report
Auto Trait Implementations§
impl Freeze for MobileModelDebugger
impl RefUnwindSafe for MobileModelDebugger
impl Send for MobileModelDebugger
impl Sync for MobileModelDebugger
impl Unpin for MobileModelDebugger
impl UnsafeUnpin for MobileModelDebugger
impl UnwindSafe for MobileModelDebugger
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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