From bcb303304d016530a87f43351e0de8f145150fbe Mon Sep 17 00:00:00 2001 From: GuyAv46 <47632673+GuyAv46@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:31:58 +0200 Subject: [PATCH] Flow test improvements (#585) * fix hnsw parallel tests * update pyproject toml file --- pyproject.toml | 7 +++++-- tests/flow/test_hnsw_parallel.py | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9537bb8b6..9988c8b2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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', ] @@ -28,8 +31,8 @@ python = "^3.10" [tool.poetry.dev-dependencies] numpy = "*" hnswlib = "^0.6.2" -pytest = "^6.2.4" -scipy = "^1.10.1" +pytest = "^8.3" +scipy = "^1.14.1" h5py = "^3.7.0" ml_dtypes = "*" diff --git a/tests/flow/test_hnsw_parallel.py b/tests/flow/test_hnsw_parallel.py index 0d207f5d2..e4b098224 100644 --- a/tests/flow/test_hnsw_parallel.py +++ b/tests/flow/test_hnsw_parallel.py @@ -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_ @@ -81,10 +81,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():