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

Adding buck target for experiment bench_fw_ivf #3423

Closed
wants to merge 1 commit into from
Closed
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
13 changes: 9 additions & 4 deletions benchs/bench_fw_ivf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

import logging
import argparse
import logging
import os

from bench_fw.benchmark import Benchmark
from bench_fw.benchmark_io import BenchmarkIO
from bench_fw.descriptors import DatasetDescriptor, IndexDescriptor
from faiss.benchs.bench_fw.benchmark import Benchmark
from faiss.benchs.bench_fw.benchmark_io import BenchmarkIO
from faiss.benchs.bench_fw.descriptors import (
DatasetDescriptor,
IndexDescriptor,
)

logging.basicConfig(level=logging.INFO)


def sift1M(bio):
benchmark = Benchmark(
num_threads=32,
Expand All @@ -37,6 +41,7 @@ def sift1M(bio):
benchmark.set_io(bio)
benchmark.benchmark(result_file="result.json", local=False, train=True, reconstruct=False, knn=True, range=False)


def bigann(bio):
for scale in [1, 2, 5, 10, 20, 50]:
benchmark = Benchmark(
Expand Down
6 changes: 5 additions & 1 deletion contrib/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import os
import numpy as np
import faiss
import getpass


from .vecs_io import fvecs_read, ivecs_read, bvecs_mmap, fvecs_mmap
from .exhaustive_search import knn
Expand Down Expand Up @@ -115,10 +117,12 @@ def get_groundtruth(self, k=100):
# that directory is
############################################################################

username = getpass.getuser()

for dataset_basedir in (
'/datasets01/simsearch/041218/',
'/mnt/vol/gfsai-flash3-east/ai-group/datasets/simsearch/'):
'/mnt/vol/gfsai-flash3-east/ai-group/datasets/simsearch/',
f'/home/{username}/simsearch/data/'):
if os.path.exists(dataset_basedir):
break
else:
Expand Down