Skip to content

Commit

Permalink
fix: The score type is wrong, which may cause errors in sorting betwe…
Browse files Browse the repository at this point in the history
…en integers and strings.
  • Loading branch information
xixihahaliu committed Mar 13, 2024
1 parent 2fa1661 commit 9dbd93d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def process_group(self, group):
else:
doc.page_content += " " + group_chunk_map[id]
doc_score = min([group_scores_map[id] for id in id_seq if id in group_scores_map])
doc.metadata["score"] = format(1 - doc_score / math.sqrt(2), '.4f')
doc.metadata["score"] = float(format(1 - doc_score / math.sqrt(2), '.4f'))
doc.metadata["kernel"] = '|'.join([group_chunk_map[id] for id in id_seq if id in group_scores_map])
new_cands.append(doc)
return new_cands
Expand Down

0 comments on commit 9dbd93d

Please sign in to comment.