Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.7] Flow test improvements #588

Merged
merged 3 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'License :: OSI Approved :: BSD License',
'Development Status :: 3 - Alpha',
]
Expand All @@ -28,7 +31,7 @@ python = "^3.8"
[tool.poetry.dev-dependencies]
numpy = "^1.21"
hnswlib = "^0.6.2"
pytest = "^6.2.4"
pytest = "^8.3"
scipy = "^1.9.1"
h5py = "^3.7.0"

Expand All @@ -37,6 +40,6 @@ h5py = "^3.7.0"
requires = ["poetry-core>=1.0.0", "setuptools"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.build]
[tool.poetry.build]
script = "setup.py"
generate-setup-file = true
generate-setup-file = true
6 changes: 3 additions & 3 deletions tests/flow/test_hnsw_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Helper class for creating a "baseline" HNSW index that was built by inserting vectors one by one and a corresponding
# flat index for given params, to compare the parallel operation against it
class TestIndex:
class IndexTest:
def __init__(self, dim_, num_elements_, metric_, data_type_, multi_=False, ef_runtime=200):

self.dim = dim_
Expand Down Expand Up @@ -82,10 +82,10 @@ def compute_ground_truth_range(self, query_data, radius):
per_label = 5 # for multi value index

print("Creating test indexes...")
g_test_index = TestIndex(dim, num_elements, metric, data_type)
g_test_index = IndexTest(dim, num_elements, metric, data_type)
g_test_index.insert_random_vectors()

g_test_index_multi = TestIndex(dim, num_elements, metric, data_type, multi_=True)
g_test_index_multi = IndexTest(dim, num_elements, metric, data_type, multi_=True)
g_test_index_multi.insert_random_vectors_multi(per_label)

def test_parallel_search():
Expand Down
Loading