瀏覽代碼

More robust community report. (#5328)

### What problem does this PR solve?

#5289
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.17.0
Kevin Hu 8 月之前
父節點
當前提交
1a41b92f77
No account linked to committer's email address
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      graphrag/general/community_reports_extractor.py

+ 1
- 1
graphrag/general/community_reports_extractor.py 查看文件

@@ -68,7 +68,7 @@ class CommunityReportsExtractor(Extractor):
weight = ents["weight"]
ents = ents["nodes"]
ent_df = pd.DataFrame(self._get_entity_(ents)).dropna()#[{"entity": n, **graph.nodes[n]} for n in ents])
if ent_df.empty:
if ent_df.empty or "entity_name" not in ent_df.columns:
continue
ent_df["entity"] = ent_df["entity_name"]
del ent_df["entity_name"]

Loading…
取消
儲存