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 using CrossEncoderRanker as a ranker for EmbeddingRetrieve, calling the rank function of CrossEncoderRanker results in an "index out of bounds" error when the length of the retrieved results is 0.
What you expected to happen
self._rerank.rank(new_candidates_with_score, query) -> self._model.predict(sentences=query_content_pairs) -> if isinstance(sentences[0], str):
the value of new_candidates_with_score may be [] sometimes.
Search before asking
Operating system information
Linux
Python version information
3.10
DB-GPT version
main
Related scenes
Installation Information
Installation From Source
Docker Installation
Docker Compose Installation
Cluster Installation
AutoDL Image
Other
Device information
Device CPU
Models information
RerankModel: bge-rerank-base
What happened
When using
CrossEncoderRanker
as a ranker forEmbeddingRetrieve
, calling therank
function ofCrossEncoderRanker
results in an "index out of bounds" error when the length of the retrieved results is 0.What you expected to happen
self._rerank.rank(new_candidates_with_score, query)
->self._model.predict(sentences=query_content_pairs)
->if isinstance(sentences[0], str):
new_candidates_with_score
may be[]
sometimes.How to reproduce
Additional context
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: