pub struct TensorInspector { /* private fields */ }Expand description
Enhanced tensor inspector for detailed analysis
Implementations§
Source§impl TensorInspector
impl TensorInspector
Sourcepub fn new(config: &DebugConfig) -> Self
pub fn new(config: &DebugConfig) -> Self
Create a new tensor inspector
Sourcepub fn inspect_tensor<T>(
&mut self,
tensor: &ArrayD<T>,
name: &str,
layer_name: Option<&str>,
operation: Option<&str>,
) -> Result<Uuid>
pub fn inspect_tensor<T>( &mut self, tensor: &ArrayD<T>, name: &str, layer_name: Option<&str>, operation: Option<&str>, ) -> Result<Uuid>
Inspect a tensor and return detailed analysis
Sourcepub fn inspect_gradients<T>(
&mut self,
tensor_id: Uuid,
gradients: &ArrayD<T>,
) -> Result<()>
pub fn inspect_gradients<T>( &mut self, tensor_id: Uuid, gradients: &ArrayD<T>, ) -> Result<()>
Inspect tensor gradients
Sourcepub fn compare_tensors(
&mut self,
id1: Uuid,
id2: Uuid,
) -> Result<TensorComparison>
pub fn compare_tensors( &mut self, id1: Uuid, id2: Uuid, ) -> Result<TensorComparison>
Compare two tensors
Sourcepub fn get_tensor_info(&self, id: Uuid) -> Option<&TensorInfo>
pub fn get_tensor_info(&self, id: Uuid) -> Option<&TensorInfo>
Get tensor information by ID
Sourcepub fn get_all_tensors(&self) -> Vec<&TensorInfo>
pub fn get_all_tensors(&self) -> Vec<&TensorInfo>
Get all tracked tensors
Sourcepub fn get_tensors_by_layer(&self, layer_name: &str) -> Vec<&TensorInfo>
pub fn get_tensors_by_layer(&self, layer_name: &str) -> Vec<&TensorInfo>
Get tensors by layer name
Sourcepub fn get_alerts(&self) -> &[TensorAlert]
pub fn get_alerts(&self) -> &[TensorAlert]
Get all alerts
Sourcepub async fn generate_report(&self) -> Result<TensorInspectionReport>
pub async fn generate_report(&self) -> Result<TensorInspectionReport>
Generate inspection report
Sourcepub fn enable_monitoring(&mut self, enable: bool)
pub fn enable_monitoring(&mut self, enable: bool)
Enable real-time tensor monitoring
Sourcepub fn track_dependency(
&mut self,
source_id: Uuid,
target_id: Uuid,
operation: &str,
weight: f64,
)
pub fn track_dependency( &mut self, source_id: Uuid, target_id: Uuid, operation: &str, weight: f64, )
Track tensor dependency
Sourcepub fn record_lifecycle_event(
&mut self,
tensor_id: Uuid,
event: TensorLifecycleEvent,
)
pub fn record_lifecycle_event( &mut self, tensor_id: Uuid, event: TensorLifecycleEvent, )
Record tensor lifecycle event
Sourcepub fn update_time_series(&mut self, tensor_id: Uuid, stats: TensorStats)
pub fn update_time_series(&mut self, tensor_id: Uuid, stats: TensorStats)
Update tensor time series data
Sourcepub fn perform_advanced_analysis<T>(
&self,
tensor: &ArrayD<T>,
) -> Result<AdvancedTensorAnalysis>
pub fn perform_advanced_analysis<T>( &self, tensor: &ArrayD<T>, ) -> Result<AdvancedTensorAnalysis>
Perform advanced tensor analysis
Sourcepub fn detect_advanced_anomalies(
&self,
tensor_id: Uuid,
) -> Result<Vec<TensorAlert>>
pub fn detect_advanced_anomalies( &self, tensor_id: Uuid, ) -> Result<Vec<TensorAlert>>
Detect tensor anomalies using advanced algorithms
Sourcepub fn get_dependencies(&self) -> &[TensorDependency]
pub fn get_dependencies(&self) -> &[TensorDependency]
Get tensor dependencies
Sourcepub fn get_lifecycle(&self, tensor_id: Uuid) -> Option<&TensorLifecycle>
pub fn get_lifecycle(&self, tensor_id: Uuid) -> Option<&TensorLifecycle>
Get tensor lifecycle
Sourcepub fn get_time_series(&self, tensor_id: Uuid) -> Option<&TensorTimeSeries>
pub fn get_time_series(&self, tensor_id: Uuid) -> Option<&TensorTimeSeries>
Get tensor time series
Sourcepub fn analyze_tensor_relationships(&self) -> HashMap<Uuid, Vec<Uuid>>
pub fn analyze_tensor_relationships(&self) -> HashMap<Uuid, Vec<Uuid>>
Analyze tensor relationships
Sourcepub fn get_frequent_tensors(&self, min_accesses: usize) -> Vec<Uuid>
pub fn get_frequent_tensors(&self, min_accesses: usize) -> Vec<Uuid>
Get frequently accessed tensors
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TensorInspector
impl RefUnwindSafe for TensorInspector
impl Send for TensorInspector
impl Sync for TensorInspector
impl Unpin for TensorInspector
impl UnwindSafe for TensorInspector
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.