We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05be551 commit 96a5799Copy full SHA for 96a5799
1 file changed
graphgen/operators/partition/partition_kg.py
@@ -56,15 +56,7 @@ async def partition_kg(
56
logger.info("Partitioned the graph into %d communities.", len(communities))
57
batches = await partitioner.community2batch(communities, g=kg_instance)
58
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
+ batches = await attach_additional_data_to_node(batches, chunk_storage)
68
return batches
69
70
0 commit comments