Describe the bug
test_flag_embedding_reranker_batch_one test function do not passaed.
Full Error log
tests/autorag/nodes/passagereranker/test_flag_embedding.py:30 (test_flag_embedding_reranker_batch_one)
flag_embedding_reranker_instance = <autorag.nodes.passagereranker.flag_embedding.FlagEmbeddingReranker object at 0x138707a90>
@pytest.mark.skipif(is_github_action(), reason="Skipping this test on GitHub Actions")
def test_flag_embedding_reranker_batch_one(flag_embedding_reranker_instance):
top_k = 3
batch = 1
contents_result, id_result, score_result = flag_embedding_reranker_instance._pure(
queries_example, contents_example, ids_example, top_k, batch
)
> base_reranker_test(contents_result, id_result, score_result, top_k)
test_flag_embedding.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contents = [['Paris is the capital of France.', 'havertz is suck at soccer', 'NomaDamas is Great Team'], ['Newjeans has 5 members.', 'LA is a country in the United States.', 'i am hungry']]
ids = [['6649ae5c-6f98-4e9a-8a2e-d94f2ecd928b', '8ba2dacb-59f4-4142-b00a-c11b205a5f03', '26e27df6-a3ab-4974-ad2c-aa1abe906dc...fdfbf058-390b-4395-a480-318a90b87b4c', '853982fc-37df-4fb6-b909-eada007d8c1a', '2a8ad16b-f14d-47a5-a7de-5d171a64a49b']]
scores = [[[7.978793621063232], [-8.296481132507324], [-9.318552017211914]], [[3.5015883445739746], [-8.99830150604248], [-9.481008529663086]]]
top_k = 3, use_ko = False, descending = True
def base_reranker_test(contents, ids, scores, top_k, use_ko=False, descending=True):
assert len(contents) == len(ids) == len(scores) == 2
assert len(contents[0]) == len(ids[0]) == len(scores[0]) == top_k
for content_list, id_list, score_list in zip(contents, ids, scores):
assert isinstance(content_list, list)
assert isinstance(id_list, list)
assert isinstance(score_list, list)
for content, _id, score in zip(content_list, id_list, score_list):
assert isinstance(content, str)
assert isinstance(_id, str)
> assert isinstance(score, float)
E assert False
E + where False = isinstance([7.978793621063232], float)
test_passage_reranker_base.py:73: AssertionError
Code that bug is happened
If applicable, add the code that bug is happened.
(Especially, your AutoRAG YAML file or python codes that you wrote)
Desktop (please complete the following information):
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too