Skip to content

Commit ea73f13

Browse files
authored
Fix: infinity rerank error. (infiniflow#10760)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
1 parent af6eaba commit ea73f13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rag/nlp/search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ def retrieval(self, question, embd_mdl, tenant_ids, kb_ids, page, page_size, sim
388388
else:
389389
# Don't need rerank here since Infinity normalizes each way score before fusion.
390390
sim = [sres.field[id].get("_score", 0.0) for id in sres.ids]
391+
sim = [s if s is not None else 0. for s in sim]
391392
tsim = sim
392393
vsim = sim
393394
# Already paginated in search function

0 commit comments

Comments
 (0)