Spaces:
Running
Running
github-actions[bot]
commited on
Commit
·
6978916
1
Parent(s):
f5f93a3
Auto-sync from demo at Wed Jan 14 09:04:14 UTC 2026
Browse files
graphgen/models/kg_builder/light_rag_kg_builder.py
CHANGED
|
@@ -164,18 +164,9 @@ class LightRAGKGBuilder(BaseKGBuilder):
|
|
| 164 |
set([dp["source_id"] for dp in edge_data] + source_ids)
|
| 165 |
)
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
insert_id,
|
| 171 |
-
node_data={
|
| 172 |
-
"entity_type": "UNKNOWN",
|
| 173 |
-
"entity_name": insert_id,
|
| 174 |
-
"description": "",
|
| 175 |
-
"source_id": source_id,
|
| 176 |
-
"length": self.tokenizer.count_tokens(description),
|
| 177 |
-
},
|
| 178 |
-
)
|
| 179 |
|
| 180 |
description = await self._handle_kg_summary(
|
| 181 |
f"({src_id}, {tgt_id})", description
|
|
|
|
| 164 |
set([dp["source_id"] for dp in edge_data] + source_ids)
|
| 165 |
)
|
| 166 |
|
| 167 |
+
if not kg_instance.has_node(src_id) or not kg_instance.has_node(tgt_id):
|
| 168 |
+
logger.warning("Edge (%s, %s) has missing nodes.", src_id, tgt_id)
|
| 169 |
+
return {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
description = await self._handle_kg_summary(
|
| 172 |
f"({src_id}, {tgt_id})", description
|