Skip to content

Commit

Permalink
mark some tests as skippable on github runner env
Browse files Browse the repository at this point in the history
  • Loading branch information
blaise-muhirwa committed Dec 17, 2023
1 parent 6cbc347 commit 3b9f191
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion flatnav_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions flatnav_python/unit_tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions flatnav_python/unit_tests/test_parallel_insertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 3b9f191

Please sign in to comment.