mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
enhance: Print results if a test fails (#37606)
test_hybrid_search_different_limit_round_decimal fails occasionally. Print more details for debug. --------- Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
266f8ef1f5
commit
2742e9573f
@ -12091,6 +12091,13 @@ class TestCollectionHybridSearchValid(TestcaseBase):
|
|||||||
# 6. compare results through the re-calculated distances
|
# 6. compare results through the re-calculated distances
|
||||||
for i in range(len(score_answer[:limit])):
|
for i in range(len(score_answer[:limit])):
|
||||||
delta = math.fabs(score_answer[i] - hybrid_res[0].distances[i])
|
delta = math.fabs(score_answer[i] - hybrid_res[0].distances[i])
|
||||||
|
if delta >= hybrid_search_epsilon:
|
||||||
|
# print id and distance for debug
|
||||||
|
# answer and hybrid search result
|
||||||
|
for i1 in range(len(score_answer)):
|
||||||
|
log.info("answer id: %d, distance: %f" % (ids_answer[i1], score_answer[i1]))
|
||||||
|
for i2 in range(len(hybrid_res[0].ids)):
|
||||||
|
log.info("hybrid search res id: %d, distance: %f" % (hybrid_res[0].ids[i2], hybrid_res[0].distances[i2]))
|
||||||
assert delta < hybrid_search_epsilon
|
assert delta < hybrid_search_epsilon
|
||||||
|
|
||||||
@pytest.mark.tags(CaseLabel.L1)
|
@pytest.mark.tags(CaseLabel.L1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user