mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +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:
@ -125,7 +125,7 @@ class YoudaoRerank(DefaultRerank):
|
|||||||
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=self._model.max_length)
|
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=self._model.max_length)
|
||||||
scores = sigmoid(np.array(scores)).tolist()
|
scores = sigmoid(np.array(scores)).tolist()
|
||||||
if isinstance(scores, float): res.append(scores)
|
if isinstance(scores, float): res.append(scores)
|
||||||
res.extend(scores)
|
else: res.extend(scores)
|
||||||
return np.array(res), token_count
|
return np.array(res), token_count
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user