mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 17:19:02 +08:00
fix: bug similarity() in YoudaoRerank (#1084)
### What problem does this PR solve? bix fix ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
dbdae8e83c
commit
722c342d56
@ -125,7 +125,7 @@ class YoudaoRerank(DefaultRerank):
|
||||
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=self._model.max_length)
|
||||
scores = sigmoid(np.array(scores)).tolist()
|
||||
if isinstance(scores, float): res.append(scores)
|
||||
res.extend(scores)
|
||||
else: res.extend(scores)
|
||||
return np.array(res), token_count
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user