Skip to content

Commit 5ed4afc

Browse files
committed
revert previous 2 and update test
1 parent 8e21287 commit 5ed4afc

2 files changed

Lines changed: 0 additions & 3 deletions

File tree

faiss/svs/IndexSVSVamana.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ IndexSVSVamana::IndexSVSVamana(
7171
graph_max_degree{degree},
7272
is_static{is_static},
7373
storage_kind{storage} {
74-
is_trained = false;
7574
prune_to = graph_max_degree < 4 ? graph_max_degree : graph_max_degree - 4;
7675
alpha = metric == METRIC_L2 ? 1.2f : 0.95f;
7776

@@ -158,7 +157,6 @@ void IndexSVSVamana::add(idx_t n, const float* x) {
158157
std::memcpy(stored_vectors.data() + prev, x, sizeof(float) * n * d);
159158
}
160159
ntotal += n;
161-
is_trained = true;
162160
}
163161

164162
void IndexSVSVamana::reconstruct(idx_t key, float* recons) const {

tests/test_svs_py.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,6 @@ def test_static_construction(self):
13461346
"""is_static is set on the constructed index"""
13471347
index = self._create_static()
13481348
self.assertTrue(index.is_static)
1349-
self.assertFalse(index.is_trained)
13501349

13511350
def test_static_add_and_search(self):
13521351
"""add() builds the static index and search returns shaped output"""

0 commit comments

Comments
 (0)