bitflicker64 commented on code in PR #422:
URL: https://github.com/apache/hugegraph-ai/pull/422#discussion_r4529013359
##########
hugegraph-llm/src/hugegraph_llm/operators/hugegraph_op/commit_to_hugegraph.py:
##########
@@ -179,10 +235,41 @@ def load_into_graph(self, vertices, edges, schema): #
pylint: disable=too-many-
"(Input) EdgeLabel %s not found in schema, skip & need
check it!",
label,
)
+ skipped_edges += 1
continue
+ out_v, in_v = edge.get("outV"), edge.get("inV")
+ failed_endpoints = [endpoint for endpoint in (out_v, in_v) if
endpoint in skipped_ids]
Review Comment:
Important: extraction does not dedupe vertices across chunks, so when one
copy of `1:Sarah` is skipped and another is created, `1:Sarah` sits in both
`skipped_ids` and `vid_mapping`, and every edge to Sarah is dropped although
the vertex exists (base writes the edge). Skip an endpoint only when it is in
`skipped_ids` and not in `vid_mapping`, and add a test with a duplicated vertex.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]