Skip to content

Commit

Permalink
Fix bug in hierarchical_merge function (infiniflow#4006)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Fix hierarchical_merge function. From idx vs. actual value to actual
value vs. actual value.
Related issue infiniflow#4003 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: luopan <[email protected]>
  • Loading branch information
unsw-luopan and luopan authored Dec 13, 2024
1 parent 7559bbd commit 68d46b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rag/nlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def binary_search(arr, target):
jj = binary_search(levels[ii], j)
if jj < 0:
continue
if jj > cks[-1][-1]:
if levels[ii][jj] > cks[-1][-1]:
cks[-1].pop(-1)
cks[-1].append(levels[ii][jj])
for ii in cks[-1]:
Expand Down

0 comments on commit 68d46b2

Please sign in to comment.