comgra  by FlorianDietz

GUI tool for PyTorch neural network analysis and debugging

Created 2 years ago
290 stars

Top 90.8% on SourcePulse

GitHubView on GitHub
Project Summary

Comgra is a Python tool for PyTorch users to analyze and debug neural networks by visualizing computation graphs and tensor data through a GUI. It aids both novice users in understanding network internals and experienced professionals in advanced analysis and anomaly detection, offering a comprehensive view of network behavior.

How It Works

Comgra records tensor data and network structure during training. Its core is a dependency graph visualizing tensor relationships, allowing users to navigate the computation flow. Selectors enable granular inspection of tensors, displaying summary statistics or individual neuron values. This approach simplifies complex graphs by abstracting away unnecessary details, making it easier to compare architectures and trace issues.

Quick Start & Requirements

  • Install via pip: pip install comgra
  • Requires Python.
  • Run GUI: comgra --path "/path/to/your/data/group_name"
  • Example usage and Colab notebook available in the README.

Highlighted Details

  • Interactive GUI with dependency graph, tensor selectors, and data output.
  • Supports custom visualizations via a --visualization-file parameter.
  • Dynamic recording allows retroactive selection of batches and samples for analysis.
  • Detailed tutorial demonstrates finding a subtle bug related to activation functions.

Maintenance & Community

Licensing & Compatibility

  • License not explicitly stated in the README.

Limitations & Caveats

  • Requires requires_grad=True on registered tensors, which may have side effects if directly manipulated.
  • Integer tensors or tensors where requires_grad cannot be set require workarounds using add_tensor_connection.
  • Dynamic recordings can introduce a performance overhead.
Health Check
Last Commit

9 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Théophile Gervet Théophile Gervet(Cofounder of Genesis AI), Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), and
6 more.

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
Created 11 months ago
Updated 2 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
5 more.

lit by PAIR-code

0.1%
4k
Interactive ML model analysis tool for understanding model behavior
Created 5 years ago
Updated 3 weeks ago
Feedback? Help us improve.