Skip to content

Commit eada21d

Browse files
authored
Remove unused code previously used to define arrays for testing (#346)
1 parent a87c2ea commit eada21d

File tree

8 files changed

+9
-89
lines changed

8 files changed

+9
-89
lines changed

apis/python/test/array_paths.py

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
this_file_path = os.path.join(os.path.dirname(__file__))
1010
vector_search_root = this_file_path + "/../../../"
1111

12-
# vector_search_root = "../../"
13-
1412
test_data_root = vector_search_root + "external/test_data/"
1513
test_array_root = test_data_root + "arrays/"
1614
test_file_root = test_data_root + "files/"
1715

18-
siftsmall_root = test_array_root + "siftsmall/"
1916
siftsmall_file_root = test_file_root + "siftsmall/"
17+
siftsmall_inputs_file = siftsmall_file_root + "input_vectors.fvecs"
18+
siftsmall_query_file = siftsmall_file_root + "queries.fvecs"
19+
siftsmall_groundtruth_file = siftsmall_file_root + "groundtruth.ivecs"
20+
21+
siftsmall_root = test_array_root + "siftsmall/"
2022
siftsmall_group_uri = siftsmall_root + "group"
2123
siftsmall_inputs_uri = siftsmall_root + "input_vectors"
2224
siftsmall_centroids_uri = siftsmall_root + "partition_centroids"
@@ -26,36 +28,17 @@
2628
siftsmall_query_uri = siftsmall_root + "queries"
2729
siftsmall_groundtruth_uri = siftsmall_root + "groundtruth"
2830

29-
siftsmall_inputs_file = siftsmall_file_root + "input_vectors.fvecs"
30-
siftsmall_query_file = siftsmall_file_root + "queries.fvecs"
31-
siftsmall_groundtruth_file = siftsmall_file_root + "groundtruth.ivecs"
32-
3331
siftsmall_uint8_root = test_array_root + "siftsmall_uint8/"
34-
siftsmall_uint8_group_uri = siftsmall_uint8_root + "group"
3532
siftsmall_uint8_inputs_uri = siftsmall_uint8_root + "input_vectors"
36-
siftsmall_uint8_centroids_uri = siftsmall_uint8_root + "partition_centroids"
37-
siftsmall_uint8_index_uri = siftsmall_uint8_root + "partition_indexes"
3833
siftsmall_uint8_ids_uri = siftsmall_uint8_root + "shuffled_vector_ids"
39-
siftsmall_uint8_parts_uri = siftsmall_uint8_root + "shuffled_vectors"
40-
siftsmall_uint8_query_uri = siftsmall_uint8_root + "queries"
4134
siftsmall_uint8_groundtruth_uri = siftsmall_uint8_root + "groundtruth"
4235

4336
bigann10k_root = test_array_root + "bigann10k/"
44-
bigann10k_group_uri = bigann10k_root + "group"
4537
bigann10k_inputs_uri = bigann10k_root + "input_vectors"
46-
bigann10k_centroids_uri = bigann10k_root + "partition_centroids"
47-
bigann10k_index_uri = bigann10k_root + "partition_indexes"
4838
bigann10k_ids_uri = bigann10k_root + "shuffled_vector_ids"
49-
bigann10k_parts_uri = bigann10k_root + "shuffled_vectors"
50-
bigann10k_query_uri = bigann10k_root + "queries"
5139
bigann10k_groundtruth_uri = bigann10k_root + "groundtruth"
5240

5341
fmnistsmall_root = test_array_root + "fmnistsmall/"
54-
fmnistsmall_group_uri = fmnistsmall_root + "group"
5542
fmnistsmall_inputs_uri = fmnistsmall_root + "input_vectors"
56-
fmnistsmall_centroids_uri = fmnistsmall_root + "partition_centroids"
57-
fmnistsmall_index_uri = fmnistsmall_root + "partition_indexes"
5843
fmnistsmall_ids_uri = fmnistsmall_root + "shuffled_vector_ids"
59-
fmnistsmall_parts_uri = fmnistsmall_root + "shuffled_vectors"
60-
fmnistsmall_query_uri = fmnistsmall_root + "queries"
6144
fmnistsmall_groundtruth_uri = fmnistsmall_root + "groundtruth"
-4.92 MB
Binary file not shown.
-39.5 KB
Binary file not shown.
-12.3 MB
Binary file not shown.
-50.4 KB
Binary file not shown.

backwards-compatibility-data/generate_data.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ def create_sift_micro():
1717
base_uri = os.path.join(
1818
base_dir,
1919
"..",
20-
"apis",
21-
"python",
22-
"test",
23-
"data",
20+
"external",
21+
"test_data",
22+
"files",
2423
"siftsmall",
25-
"siftsmall_base.fvecs",
24+
"input_vectors.fvecs",
2625
)
2726
write_fvecs(
2827
os.path.join(base_dir, "siftmicro_base.fvecs"), load_fvecs(base_uri)[:100]

src/include/test/array_defs.h

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -145,29 +145,6 @@ static std::string siftsmall_parts_uri{siftsmall_root / "shuffled_vectors"};
145145
static std::string siftsmall_query_uri{siftsmall_root / "queries"};
146146
static std::string siftsmall_groundtruth_uri{siftsmall_root / "groundtruth"};
147147

148-
using siftsmall_uint8_feature_type = uint8_t;
149-
using siftsmall_uint8_groundtruth_type = uint64_t;
150-
using siftsmall_uint8_centroids_type = float;
151-
using siftsmall_uint8_ids_type = uint64_t;
152-
using siftsmall_uint8_indices_type = uint64_t;
153-
constexpr size_t num_siftsmall_uint8_vectors = 10'000;
154-
constexpr size_t siftsmall_uint8_dimension = 128;
155-
static std::string siftsmall_uint8_root{test_array_root / "siftsmall_uint8"};
156-
static std::string siftsmall_uint8_group_uri{siftsmall_uint8_root / "group"};
157-
static std::string siftsmall_uint8_inputs_uri{
158-
siftsmall_uint8_root / "input_vectors"};
159-
static std::string siftsmall_uint8_centroids_uri{
160-
siftsmall_uint8_root / "partition_centroids"};
161-
static std::string siftsmall_uint8_index_uri{
162-
siftsmall_uint8_root / "partition_indexes"};
163-
static std::string siftsmall_uint8_ids_uri{
164-
siftsmall_uint8_root / "shuffled_vector_ids"};
165-
static std::string siftsmall_uint8_parts_uri{
166-
siftsmall_uint8_root / "shuffled_vectors"};
167-
static std::string siftsmall_uint8_query_uri{siftsmall_uint8_root / "queries"};
168-
static std::string siftsmall_uint8_groundtruth_uri{
169-
siftsmall_uint8_root / "groundtruth"};
170-
171148
using bigann1M_feature_type = uint8_t;
172149
using bigann1M_groundtruth_type = uint64_t;
173150
using bigann1M_centroids_type = float;
@@ -298,33 +275,6 @@ static std::string diskann_mem_index{
298275
static std::string diskann_truth_index_data =
299276
diskann_root / "truth_index_siftsmall_learn_256pts_R4_L50_A1.2.data";
300277

301-
/*
302-
* Definitions for the "nano" reference group for vamana index
303-
*/
304-
using vamana_nano_feature_type = float;
305-
using vamana_nano_groundtruth_type = uint64_t;
306-
using vamana_nano_ids_type = uint64_t;
307-
using vamana_nano_indices_type = uint64_t;
308-
constexpr size_t num_vamana_nano_vectors = 231;
309-
constexpr size_t vamana_nano_dimension = 128;
310-
static std::string vamana_nano_root{nano_root / "vamana"};
311-
static std::string vamana_nano_group_uri{
312-
vamana_nano_root / "vamana_test_index"};
313-
314-
static std::string vamana_nano_inputs_uri{vamana_nano_root / "feature_vectors"};
315-
static std::string vamana_nano_feature_vectors_uri{
316-
vamana_nano_root / "feature_vectors"};
317-
static std::string vamana_nano_adjacency_scores_uri{
318-
vamana_nano_root / "adjacency_scores"};
319-
static std::string vamana_nano_adjacency_ids_uri{
320-
vamana_nano_root / "adjacency_ids"};
321-
static std::string vamana_nano_adjacency_row_index_uri{
322-
vamana_nano_root / "adjacency_row_index"};
323-
324-
static std::string vamana_nano_query_uri{vamana_nano_root / "queries"};
325-
static std::string vamana_nano_groundtruth_uri{
326-
vamana_nano_root / "groundtruth"};
327-
328278
#define TEMP_LEGACY_URIS
329279
#ifdef TEMP_LEGACY_URIS
330280
using db_type = siftsmall_feature_type;

src/include/test/unit_array_defs.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,6 @@ std::vector<std::string> siftsmall_array_uris{
8585
siftsmall_groundtruth_uri,
8686
};
8787

88-
// Note that we don't have a canonical IVF index for siftsmall_uint8 yet, so
89-
// some of these URIs are placeholders
90-
std::vector<std::string> siftsmall_uint8_array_uris{
91-
siftsmall_uint8_inputs_uri,
92-
siftsmall_uint8_centroids_uri,
93-
siftsmall_uint8_index_uri,
94-
siftsmall_uint8_ids_uri,
95-
siftsmall_uint8_parts_uri,
96-
siftsmall_uint8_query_uri,
97-
siftsmall_uint8_groundtruth_uri,
98-
};
99-
10088
// Note that we don't have a canonical IVF index for bigann10k yet, so some
10189
// of these URIs are placeholders
10290
std::vector<std::string> bigann10k_array_uris{

0 commit comments

Comments
 (0)