pub struct UnifiedDebugSession { /* private fields */ }Expand description
Unified debugging session that manages multiple debugging tools
Implementations§
Source§impl UnifiedDebugSession
impl UnifiedDebugSession
Sourcepub fn with_config<P: AsRef<Path>>(
output_dir: P,
config: UnifiedDebugSessionConfig,
) -> Result<Self>
pub fn with_config<P: AsRef<Path>>( output_dir: P, config: UnifiedDebugSessionConfig, ) -> Result<Self>
Create a debugging session with custom configuration
Sourcepub fn log_scalars(&mut self, tag: &str, values: &[(&str, f64)]) -> Result<()>
pub fn log_scalars(&mut self, tag: &str, values: &[(&str, f64)]) -> Result<()>
Log multiple scalars at once
Sourcepub fn log_histogram(&mut self, tag: &str, values: &[f64]) -> Result<()>
pub fn log_histogram(&mut self, tag: &str, values: &[f64]) -> Result<()>
Log histogram (e.g., weight distribution)
Sourcepub fn register_activations(
&mut self,
layer_name: &str,
values: Vec<f32>,
shape: Vec<usize>,
) -> Result<()>
pub fn register_activations( &mut self, layer_name: &str, values: Vec<f32>, shape: Vec<usize>, ) -> Result<()>
Register layer activations
Sourcepub fn register_attention(
&mut self,
layer_name: &str,
weights: Vec<Vec<Vec<f64>>>,
tokens: Vec<String>,
) -> Result<()>
pub fn register_attention( &mut self, layer_name: &str, weights: Vec<Vec<Vec<f64>>>, tokens: Vec<String>, ) -> Result<()>
Register attention weights
Sourcepub fn check_stability(
&mut self,
layer_name: &str,
values: &[f64],
) -> Result<usize>
pub fn check_stability( &mut self, layer_name: &str, values: &[f64], ) -> Result<usize>
Check tensor for numerical stability
Sourcepub fn current_step(&self) -> u64
pub fn current_step(&self) -> u64
Get current step
Sourcepub fn export_activation_viz(
&self,
layer_name: &str,
filename: &str,
) -> Result<()>
pub fn export_activation_viz( &self, layer_name: &str, filename: &str, ) -> Result<()>
Export activation visualization for a specific layer
Sourcepub fn export_attention_viz(
&self,
layer_name: &str,
filename: &str,
) -> Result<()>
pub fn export_attention_viz( &self, layer_name: &str, filename: &str, ) -> Result<()>
Export attention visualization for a specific layer
Sourcepub fn export_attention_bertviz(
&self,
layer_name: &str,
filename: &str,
) -> Result<()>
pub fn export_attention_bertviz( &self, layer_name: &str, filename: &str, ) -> Result<()>
Export attention as BertViz HTML
Sourcepub fn summary(&self) -> SessionSummary
pub fn summary(&self) -> SessionSummary
Get session summary
Sourcepub fn session_dir(&self) -> &Path
pub fn session_dir(&self) -> &Path
Get session directory path
Sourcepub fn print_summary(&self) -> String
pub fn print_summary(&self) -> String
Print summary to string
Sourcepub fn close(self) -> Result<SessionSummary>
pub fn close(self) -> Result<SessionSummary>
Close session and perform final save
Sourcepub fn activation_visualizer(&self) -> &ActivationVisualizer
pub fn activation_visualizer(&self) -> &ActivationVisualizer
Get reference to activation visualizer
Sourcepub fn attention_visualizer(&self) -> &AttentionVisualizer
pub fn attention_visualizer(&self) -> &AttentionVisualizer
Get reference to attention visualizer
Sourcepub fn stability_checker(&self) -> &StabilityChecker
pub fn stability_checker(&self) -> &StabilityChecker
Get reference to stability checker
Sourcepub fn graph_visualizer_mut(&mut self) -> Option<&mut GraphVisualizer>
pub fn graph_visualizer_mut(&mut self) -> Option<&mut GraphVisualizer>
Get mutable reference to graph visualizer (if enabled)
Trait Implementations§
Source§impl Debug for UnifiedDebugSession
impl Debug for UnifiedDebugSession
Auto Trait Implementations§
impl Freeze for UnifiedDebugSession
impl RefUnwindSafe for UnifiedDebugSession
impl Send for UnifiedDebugSession
impl Sync for UnifiedDebugSession
impl Unpin for UnifiedDebugSession
impl UnwindSafe for UnifiedDebugSession
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.