You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when reranking a single document with bge-reranker-v2-gemma, you get
File "/home/xinference/.local/lib/python3.11/site-packages/xinference/model/rerank/core.py", line 219, in rerank
docs = [
File "/home/xinference/.local/lib/python3.11/site-packages/xinference/model/rerank/core.py", line 222, in <listcomp>
relevance_score=float(similarity_scores[arg]),
^^^^^^^^^^^^^^^^^
TypeError: [address=0.0.0.0:40107, pid=862388] 'float' object is not subscriptable
(line numbers might be a bit off, since i added some debug lines).
The reason seems to be that a single document gives a similarity_scores that is not an array, but a float.
I previously thought that the float in the exception was about arg (found that via some stackoverflow post), but it's not the issue. It's the following example:
>>> a=0.5
>>> a[0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'float' object is not subscriptable
The text was updated successfully, but these errors were encountered:
The bge-reranker-v2-gemma model is a LLM-based model. We use the FlagLLMReranker from FlagEmbedding package to inference. From the code, it shows the compute_score should return a list of float, but in your case it returns a float. I think there may have some bugs in the FlagEmbedding.
Describe the bug
when reranking a single document with bge-reranker-v2-gemma, you get
(line numbers might be a bit off, since i added some debug lines).
The reason seems to be that a single document gives a
similarity_scores
that is not an array, but a float.I previously thought that the
float
in the exception was aboutarg
(found that via some stackoverflow post), but it's not the issue. It's the following example:The text was updated successfully, but these errors were encountered: