diff --git a/flatnav_python/setup.py b/flatnav_python/setup.py index e85ccec..f3075de 100644 --- a/flatnav_python/setup.py +++ b/flatnav_python/setup.py @@ -49,7 +49,7 @@ def platform_has_avx_support(): "-funroll-loops", # Unroll loops "-mavx", # Enable AVX instructions "-mavx512f", # Enable AVX-512 instructions - "-march=native", # Enable architecture-specific optimizations + # "-march=native", # Enable architecture-specific optimizations ] if not platform_has_avx_support(): diff --git a/flatnav_python/unit_tests/test_index.py b/flatnav_python/unit_tests/test_index.py index def8f68..da01ac9 100644 --- a/flatnav_python/unit_tests/test_index.py +++ b/flatnav_python/unit_tests/test_index.py @@ -9,7 +9,7 @@ compute_recall, create_index, ) - +import pytest def test_flatnav_l2_index_random_dataset(): dataset_to_index = generate_random_data(dataset_length=30_000, dim=784) @@ -34,7 +34,7 @@ def test_flatnav_l2_index_random_dataset(): ground_truth=ground_truth, ) - +@pytest.mark.skip(reason="Difficult to run on GitHub actions env due to data download") def test_flatnav_l2_index_mnist_dataset(): training_set, queries, ground_truth, _ = get_ann_benchmark_dataset( dataset_name="mnist-784-euclidean" @@ -85,7 +85,7 @@ def test_flatnav_ip_index_random_dataset(): ground_truth=ground_truth, ) - +@pytest.mark.skip(reason="Difficult to run on GitHub actions env due to data download") def test_flatnav_index_with_reordering(): training_set, queries, ground_truth, _ = get_ann_benchmark_dataset( dataset_name="mnist-784-euclidean" diff --git a/flatnav_python/unit_tests/test_parallel_insertions.py b/flatnav_python/unit_tests/test_parallel_insertions.py index 53f0cce..18cfb5d 100644 --- a/flatnav_python/unit_tests/test_parallel_insertions.py +++ b/flatnav_python/unit_tests/test_parallel_insertions.py @@ -3,15 +3,16 @@ import flatnav from flatnav.index import index_factory from flatnav.index import L2Index -from .test_utils import get_ann_benchmark_dataset, compute_recall, create_index +from .test_utils import generate_random_data, compute_recall, create_index import os import numpy as np def test_parallel_insertions_yield_similar_recall(): - training_set, queries, ground_truth, _ = get_ann_benchmark_dataset( - dataset_name="mnist-784-euclidean" - ) + training_set = generate_random_data(dataset_length=30_000, dim=784) + queries = generate_random_data(dataset_length=5_000, dim=784) + ground_truth = np.random.randint(low=0, high=50, size=(5_000, 100)) + index = create_index( distance_type="l2", dim=training_set.shape[1],