Perf: pass useless check for tidy graph (#8121)

### What problem does this PR solve?
Support passing the attribute check when the upstream has already made
sure it.

### Type of change
- [X] Performance Improvement
This commit is contained in:
Stephen Hu
2025-06-09 11:44:13 +08:00
committed by GitHub
parent ad1f89fea0
commit 2337bbf6ca
2 changed files with 15 additions and 13 deletions

View File

@ -166,7 +166,7 @@ async def generate_subgraph(
)
if ignored_rels:
callback(msg=f"ignored {ignored_rels} relations due to missing entities.")
tidy_graph(subgraph, callback)
tidy_graph(subgraph, callback, check_attribute=False)
subgraph.graph["source_id"] = [doc_id]
chunk = {