drop redundant labels-file write in cluster-only

The auto-labeling branch wrote .graphify_labels.json, but the unconditional
write at the end of cluster-only already persists the final labels dict
(LLM or placeholder). Removed the duplicate; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Safi
2026-05-31 23:44:42 +01:00
co-authored by Claude Opus 4.8
parent 1dc5048b71
commit 4b17f199af
+3 -6
View File
@@ -2428,14 +2428,11 @@ def main() -> None:
# "Community N" (#1097). Degrades to placeholders if no backend/on error.
from graphify.llm import generate_community_labels
print("Labeling communities...")
labels, _label_src = generate_community_labels(
# The final labels (LLM or placeholder fallback) are persisted to
# .graphify_labels.json by the unconditional write below.
labels, _ = generate_community_labels(
G, communities, backend=label_backend, gods=gods
)
if _label_src == "llm":
labels_path.write_text(
json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False),
encoding="utf-8",
)
questions = suggest_questions(G, communities, labels)
tokens = {"input": 0, "output": 0}
from graphify.export import _git_head as _gh