From a286259db0d679f748d2f4cf8ff059de9fd3e3f0 Mon Sep 17 00:00:00 2001 From: progerdav Date: Fri, 4 Aug 2023 16:21:50 +0400 Subject: [PATCH 1/2] Check if samples are the same --- deeplake/core/vectorstore/test_deeplake_vectorstore.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deeplake/core/vectorstore/test_deeplake_vectorstore.py b/deeplake/core/vectorstore/test_deeplake_vectorstore.py index 54eb44d359..57aa34c87c 100644 --- a/deeplake/core/vectorstore/test_deeplake_vectorstore.py +++ b/deeplake/core/vectorstore/test_deeplake_vectorstore.py @@ -475,7 +475,9 @@ def test_search_quantitative(distance_metric, hub_cloud_dev_token): # use python implementation to search the data data_p = vector_store.search( - embedding=query_embedding, exec_option="python", distance_metric=distance_metric + embedding=query_embedding, + exec_option="tensor_db", + distance_metric=distance_metric, ) # use indra implementation to search the data @@ -486,6 +488,12 @@ def test_search_quantitative(distance_metric, hub_cloud_dev_token): ) assert len(data_p["score"]) == len(data_ce["score"]) + + print(data_ce["id"]) + print(data_p["id"]) + + assert data_ce["id"] == data_p["id"] + assert all( [ isclose( From 513ac18fea57033a9476ad82b65550f4a82d34f9 Mon Sep 17 00:00:00 2001 From: progerdav Date: Fri, 4 Aug 2023 16:23:23 +0400 Subject: [PATCH 2/2] Check if samples are the same --- deeplake/core/vectorstore/test_deeplake_vectorstore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deeplake/core/vectorstore/test_deeplake_vectorstore.py b/deeplake/core/vectorstore/test_deeplake_vectorstore.py index 57aa34c87c..c3bdbc24f2 100644 --- a/deeplake/core/vectorstore/test_deeplake_vectorstore.py +++ b/deeplake/core/vectorstore/test_deeplake_vectorstore.py @@ -476,7 +476,7 @@ def test_search_quantitative(distance_metric, hub_cloud_dev_token): # use python implementation to search the data data_p = vector_store.search( embedding=query_embedding, - exec_option="tensor_db", + exec_option="python", distance_metric=distance_metric, )