Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: johnmarktaylor91/torchlens
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.21.1
Choose a base ref
...
head repository: johnmarktaylor91/torchlens
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.21.2
Choose a head ref
  • 4 commits
  • 5 files changed
  • 3 contributors

Commits on Mar 9, 2026

  1. fix(vis): avoid graphviz.Digraph memory bomb when ELK fails on large …

    …graphs
    
    When ELK layout fails (OOM/timeout) on 1M+ node graphs, the fallback path
    previously built a graphviz.Digraph in Python — nested subgraph body-list
    copies exploded memory and hung indefinitely. Now render_elk_direct handles
    the failure internally: reuses already-collected Phase 1 data to generate
    DOT text without positions and renders directly with sfdp, bypassing
    graphviz.Digraph entirely.
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    johnmarktaylor91 and claude committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    f5563ee View commit details
    Browse the repository at this point in the history
  2. fix(vis): bypass ELK for large graphs — use Python topological layout

    ELK's stress algorithm allocates TWO O(n²) distance matrices (n² × 16
    bytes). At 100k nodes that's 160 GB, at 1M nodes it's 16 TB — the root
    cause of the std::bad_alloc. The old >150k stress switch could never work.
    
    For graphs above 100k nodes, we now skip ELK entirely and compute a
    topological rank layout in Python (Kahn's algorithm, O(n+m)). Module
    bounding boxes are computed from node positions. The result feeds into
    the same neato -n rendering path, preserving cluster boxes.
    
    If ELK fails for smaller graphs, the Python layout is also used as a
    fallback instead of the old sfdp path that built a graphviz.Digraph
    (which exploded on nested subgraph body-list copies).
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    johnmarktaylor91 and claude committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    37cce3a View commit details
    Browse the repository at this point in the history
  3. Merge pull request #132 from johnmarktaylor91/fix/elk-sfdp-fallback-oom

    fix(vis): avoid graphviz.Digraph memory bomb when ELK fails on large graphs
    johnmarktaylor91 authored Mar 9, 2026
    Configuration menu
    Copy the full SHA
    ebdaae5 View commit details
    Browse the repository at this point in the history
  4. chore(release): 0.21.2

    semantic-release committed Mar 9, 2026
    Configuration menu
    Copy the full SHA
    fa72687 View commit details
    Browse the repository at this point in the history
Loading