Skip to content

Commit

Permalink
bug fix: triples extraction chunk sort without chunk_order (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
GingerMoon authored Nov 13, 2024
1 parent a58ed6f commit 8a2723a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/core/pipes/kg/triples_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async def _run_logic( # type: ignore

# sort the extractions accroding to chunk_order field in metadata in ascending order
extractions = sorted(
extractions, key=lambda x: x.metadata["chunk_order"]
extractions, key=lambda x: x.metadata.get("chunk_order", float('inf'))
)

# group these extractions into groups of extraction_merge_count
Expand Down

0 comments on commit 8a2723a

Please sign in to comment.