cellmil.graph.debug_visualizer

Interactive debug visualizer for graph creation hyperparameter tuning.

This module provides an interactive Dash application for visualizing and tuning graph creation hyperparameters in real-time with a sampled subset of cells.

Classes

GraphDebugVisualizer(cells, method[, device])

Interactive visualizer for debugging graph creation with different hyperparameters.

class cellmil.graph.debug_visualizer.GraphDebugVisualizer(cells: List[Dict[str, Any]], method: GraphCreatorType, device: str = 'cpu')[source]

Bases: object

Interactive visualizer for debugging graph creation with different hyperparameters.

__init__(cells: List[Dict[str, Any]], method: GraphCreatorType, device: str = 'cpu')[source]

Initialize the debug visualizer.

Parameters:
  • cells – List of cell dictionaries with centroid and other features

  • method – Graph creation method to use

  • device – Computing device (‘cpu’ or ‘cuda:X’)

_setup_layout()[source]

Setup the Dash application layout with controls and visualization.

_create_controls() List[Div][source]

Create control widgets based on the graph creation method.

_setup_callbacks()[source]

Setup Dash callbacks for interactive updates.

_setup_sync_callbacks()[source]

Setup callbacks to sync sliders and input fields.

_create_edge_creator(*params: Any)[source]

Create an edge creator instance with the given parameters.

_create_figure(edge_indices: Tensor) Figure[source]

Create a Plotly figure for the graph visualization.

_create_stats(edge_indices: Tensor, edge_features: Tensor, *params: Any) Div[source]

Create statistics display for the current graph.

_format_params(*params: Any) str[source]

Format parameters for display.

run(host: str = '127.0.0.1', port: int = 8050, debug: bool = True)[source]

Run the Dash application.

Parameters:
  • port – Port to run the application on

  • debug – Enable debug mode for Dash