pub struct GraphDebugger { /* private fields */ }Expand description
Computation graph debugger
Implementations§
Source§impl GraphDebugger
impl GraphDebugger
Sourcepub fn with_config(config: DebuggerConfig) -> Self
pub fn with_config(config: DebuggerConfig) -> Self
Create a new graph debugger with custom configuration
Sourcepub fn analyze(&mut self, graph: &ComputationGraph) -> Result<AnalysisResult>
pub fn analyze(&mut self, graph: &ComputationGraph) -> Result<AnalysisResult>
Analyze a computation graph
Sourcepub fn visualize(&self, graph: &ComputationGraph) -> Result<String>
pub fn visualize(&self, graph: &ComputationGraph) -> Result<String>
Generate a visual representation of the computation graph
Sourcepub fn trace_gradients(
&self,
graph: &ComputationGraph,
start_node: NodeId,
) -> Result<Vec<NodeDebugInfo>>
pub fn trace_gradients( &self, graph: &ComputationGraph, start_node: NodeId, ) -> Result<Vec<NodeDebugInfo>>
Trace gradient flow from a specific node
Sourcepub fn set_breakpoint(&mut self, node_id: NodeId)
pub fn set_breakpoint(&mut self, node_id: NodeId)
Set a breakpoint at a specific node
Sourcepub fn remove_breakpoint(&mut self, node_id: NodeId)
pub fn remove_breakpoint(&mut self, node_id: NodeId)
Remove a breakpoint
Sourcepub fn should_break(&self, node_id: NodeId) -> bool
pub fn should_break(&self, node_id: NodeId) -> bool
Check if execution should break at a node
Sourcepub fn get_node_info(
&self,
graph: &ComputationGraph,
node_id: NodeId,
) -> Result<NodeDebugInfo>
pub fn get_node_info( &self, graph: &ComputationGraph, node_id: NodeId, ) -> Result<NodeDebugInfo>
Get debug information for a specific node
Sourcepub fn find_nodes_by_name(
&self,
graph: &ComputationGraph,
pattern: &str,
) -> Result<Vec<NodeId>>
pub fn find_nodes_by_name( &self, graph: &ComputationGraph, pattern: &str, ) -> Result<Vec<NodeId>>
Find nodes by name pattern
Sourcepub fn generate_summary(&mut self, graph: &ComputationGraph) -> Result<String>
pub fn generate_summary(&mut self, graph: &ComputationGraph) -> Result<String>
Generate a summary report of the computation graph
Sourcepub fn save_debug_info(
&mut self,
graph: &ComputationGraph,
path: &str,
) -> Result<()>
pub fn save_debug_info( &mut self, graph: &ComputationGraph, path: &str, ) -> Result<()>
Save debug information to file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphDebugger
impl RefUnwindSafe for GraphDebugger
impl Send for GraphDebugger
impl Sync for GraphDebugger
impl Unpin for GraphDebugger
impl UnsafeUnpin for GraphDebugger
impl UnwindSafe for GraphDebugger
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