55from common import *
66from tiledb .cloud import groups
77from tiledb .cloud .dag import Mode
8- from tiledb .vector_search .ivf_flat_index import IVFFlatIndex
98from tiledb .vector_search .utils import load_fvecs
109
1110MINIMUM_ACCURACY = 0.85
@@ -20,12 +19,18 @@ def setUp(self):
2019 self .test_path = f"tiledb://{ self .namespace } /{ storage_path } /{ rand_name } "
2120 self .config = tiledb .cloud .Config ()
2221 self .config_dict = self .config .dict ()
22+ self .flat_index_uri = f"{ self .test_path } /test_flat_array"
23+ self .ivf_flat_index_uri = f"{ self .test_path } /test_ivf_flat_array"
24+
25+ def tearDown (self ):
26+ vs .Index .delete_index (uri = self .flat_index_uri , config = self .config )
27+ vs .Index .delete_index (uri = self .ivf_flat_index_uri , config = self .config )
2328
2429 def test_cloud_flat (self ):
2530 source_uri = "tiledb://TileDB-Inc/sift_10k"
2631 queries_uri = "test/data/siftsmall/siftsmall_query.fvecs"
2732 gt_uri = "test/data/siftsmall/siftsmall_groundtruth.ivecs"
28- index_uri = f" { self .test_path } /ivf_flat_array"
33+ index_uri = self .flat_index_uri
2934 k = 100
3035 nqueries = 100
3136
@@ -46,7 +51,7 @@ def test_cloud_ivf_flat(self):
4651 source_uri = "tiledb://TileDB-Inc/sift_10k"
4752 queries_uri = "test/data/siftsmall/siftsmall_query.fvecs"
4853 gt_uri = "test/data/siftsmall/siftsmall_groundtruth.ivecs"
49- index_uri = f" { self .test_path } /ivf_flat_array"
54+ index_uri = self .ivf_flat_index_uri
5055 k = 100
5156 partitions = 100
5257 nqueries = 100
0 commit comments