You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "imbajin (via GitHub)" <gi...@apache.org> on 2024/10/09 11:11:45 UTC
Re: [PR] feat: Supported multiple property data types and modified the method of importing graph by extracting from the entire document [incubator-hugegraph-ai]
imbajin commented on code in PR #84:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/84#discussion_r1793328081
##########
hugegraph-llm/src/hugegraph_llm/utils/graph_index_utils.py:
##########
@@ -113,8 +110,9 @@ def import_graph_data(data: str, schema: str) -> Union[str, Dict[str, Any]]:
context = builder.commit_to_hugegraph().run(data_json)
gr.Info("Import graph data successfully!")
+ print(context)
Review Comment:
Clean it?
##########
hugegraph-llm/src/hugegraph_llm/operators/hugegraph_op/schema_manager.py:
##########
@@ -37,20 +37,20 @@ def run(self, context: Optional[Dict[str, Any]]) -> Dict[str, Any]:
if context is None:
context = {}
schema = self.schema.getSchema()
- vertices = []
- for vl in schema["vertexlabels"]:
- vertex = {"vertex_label": vl["name"], "properties": vl["properties"]}
- vertices.append(vertex)
- edges = []
- for el in schema["edgelabels"]:
- edge = {
- "edge_label": el["name"],
- "source_vertex_label": el["source_label"],
- "target_vertex_label": el["target_label"],
- "properties": el["properties"],
- }
- edges.append(edge)
- if not vertices and not edges:
+ # vertices = []
+ # for vl in schema["vertexlabels"]:
+ # vertex = {"vertex_label": vl["name"], "properties": vl["properties"]}
+ # vertices.append(vertex)
+ # edges = []
+ # for el in schema["edgelabels"]:
+ # edge = {
+ # "edge_label": el["name"],
+ # "source_vertex_label": el["source_label"],
+ # "target_vertex_label": el["target_label"],
+ # "properties": el["properties"],
+ # }
+ # edges.append(edge)
Review Comment:
need keep it?
##########
hugegraph-llm/src/hugegraph_llm/utils/graph_index_utils.py:
##########
@@ -113,8 +110,9 @@ def import_graph_data(data: str, schema: str) -> Union[str, Dict[str, Any]]:
context = builder.commit_to_hugegraph().run(data_json)
gr.Info("Import graph data successfully!")
+ print(context)
Review Comment:
clean it?
--
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: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org