You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cluster-only ignores --no-viz flag and GRAPHIFY_VIZ_NODE_LIMIT env var on graphs ≥ 5000 nodes (v0.7.7) #744
graphify cluster-only always invokes to_html() regardless of --no-viz flag or GRAPHIFY_VIZ_NODE_LIMIT=0 env var. On graphs with ≥ 5000 nodes this raises ValueError and aborts the run after the new clusters are written to graph.json but before.graphify_labels.json is saved, leaving the graph in an inconsistent state.
Reproduce
Tested on graphifyy 0.7.7 (Python 3.13.12, macOS).
Either flag/env should bypass to_html() entirely. Per v0.6.6 release notes:
--no-viz flag now works in cluster-only path — removes stale graph.html when passed (#565) GRAPHIFY_VIZ_NODE_LIMIT env var — override the 5000-node HTML threshold (set to 0 to disable viz entirely, useful for CI) (#565)
Actual
Loading existing graph...
Graph: 7060 nodes, 22213 edges
Re-clustering...
Traceback (most recent call last):
File "/opt/homebrew/bin/graphify", line 6, in <module>
sys.exit(main())
File ".../graphify/__main__.py", line 1415, in main
to_html(G, communities, str(out / "graph.html"), community_labels=labels or None)
File ".../graphify/export.py", line 395, in to_html
raise ValueError(...)
ValueError: Graph has 7060 nodes - too large for HTML viz. Use --no-viz or reduce input size.
Likely cause
__main__.py:1415 calls to_html(...) unconditionally on the cluster-only branch — looks like the flag/env guards present elsewhere are missing on this code path (regression vs v0.6.6, or the v0.6.6 fix never reached cluster-only).
Side effect
graph.json is saved with the new cluster IDs (good), but .graphify_labels.json is not written (bad — community label persistence relies on it, per v0.6.6 fix #558). Subsequent --update runs lose human-readable labels.
Environment
graphifyy 0.7.7 (pipx install)
Python 3.13.12
macOS Darwin 25.4.0
Graph: 7060 nodes / 22213 edges / 314 communities
Workaround
None — graphs ≥ 5000 nodes cannot run cluster-only at all on v0.7.7.
Fixed in v0.7.8: cluster-only now loads existing .graphify_labels.json before clustering and writes it back after — human-readable labels survive re-clustering instead of resetting to 'Community N'.
Activity
fix cluster-only label persistence, wiki data-loss guard, ollama erro…
safishamsi commentedon May 6, 2026
Fixed in v0.7.8: cluster-only now loads existing .graphify_labels.json before clustering and writes it back after — human-readable labels survive re-clustering instead of resetting to 'Community N'.
fix cluster-only label persistence, wiki data-loss guard, ollama erro…