Skip to content

Commit

Permalink
The unit test for the new feature is fixed, but the static memory tes…
Browse files Browse the repository at this point in the history
…ts around filtered indices is sporadically failing. This is new! And exciting! But also unexpected!
  • Loading branch information
daxpryce committed Oct 24, 2024
1 parent fa111cc commit b608101
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_memmap(self):
vecs_file_copy = tempfile.NamedTemporaryFile(delete=False)
atexit.register(Path(vecs_file_copy.name).unlink)
shutil.copyfile(vecs_file, vecs_file_copy.name)

actual = dap.vectors_from_file(
vecs_file,
dtype=np.float32,
Expand Down
2 changes: 2 additions & 0 deletions python/tests/test_static_memory_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ def test_exhaustive_validation(self):
with_filter_but_label_all, _ = index.search(
query_vectors[0], k_neighbors=k*2, complexity=128, filter_label="all"
)
# this has begun failing randomly. gopalrs - this *shouldn't* fail, but for some reason the filtered search
# will sometimes return fewer than the expected 10k results here.
intersection = np.intersect1d(without_filter, with_filter_but_label_all)
intersect_count = intersection.shape[0]
self.assertEqual(intersect_count, k*2)
Expand Down

0 comments on commit b608101

Please sign in to comment.