Skip to content

Commit 96a5799

Browse files
fix: fix operator partition_kg
1 parent 05be551 commit 96a5799

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

graphgen/operators/partition/partition_kg.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,7 @@ async def partition_kg(
5656
logger.info("Partitioned the graph into %d communities.", len(communities))
5757
batches = await partitioner.community2batch(communities, g=kg_instance)
5858

59-
for _, batch in enumerate(batches):
60-
nodes, edges = batch
61-
for node_id, node_data in nodes:
62-
entity_type = node_data.get("entity_type")
63-
if entity_type and "image" in entity_type.lower():
64-
node_id = node_id.strip('"').lower()
65-
image_data = await chunk_storage.get_by_id(node_id)
66-
if image_data:
67-
node_data["images"] = image_data
59+
batches = await attach_additional_data_to_node(batches, chunk_storage)
6860
return batches
6961

7062

0 commit comments

Comments
 (0)