Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 2.02 KB

benchmark.md

File metadata and controls

83 lines (57 loc) · 2.02 KB

Benchmark

Infinity provides Python script for sift1m and gist1m dataset benchmark.

Get the Infinity binary file

git clone https://github.com/infiniflow/infinity.git
cd infinity

Download the benchmark file

Download via wget.

#download sift benchmark
wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz
#download gist benchmark
wget ftp://ftp.irisa.fr/local/texmex/corpus/gist.tar.gz

or visit http://corpus-texmex.irisa.fr/ to download manually.

#uncompress and move benchmark file
tar -zxvf sift.tar.gz
mv sift/sift_base.fvecs test/data/benchmark/sift_1m/sift_base.fvecs
mv sift/sift_query.fvecs test/data/benchmark/sift_1m/sift_query.fvecs
mv sift/sift_groundtruth.ivecs test/data/benchmark/sift_1m/sift_groundtruth.ivecs


tar -zxvf gist.tar.gz
mv gist/gist_base.fvecs test/data/benchmark/gist_1m/gist_base.fvecs
mv gist/gist_query.fvecs test/data/benchmark/gist_1m/gist_query.fvecs
mv gist/gist_groundtruth.ivecs test/data/benchmark/gist_1m/gist_groundtruth.ivecs

Benchmark dependencies

cd python

pip install -r requirements.txt
python setup.py bdist_wheel
pip install dist/infinity_sdk-0.1.0.dev1-py3-none-any.whl

Start Infinity

See the README.md to start Infinity.

Import data

cd benchmark

options:
  -h, --help            show this help message and exit
  -d DATA_SET, --data DATA_SET

python remote_benchmark_import.py -d sift_1m
python remote_benchmark_import.py -d gist_1m

Run benchmark

options:
  -h, --help            show this help message and exit
  -t THREADS, --threads THREADS
  -r ROUNDS, --rounds ROUNDS
  -d DATA_SET, --data DATA_SET

# ROUNDS refers to the number of times that Python runs the benchmark. The result is the average time for all runs.

# The following command means run benchmark with one thread, for one time using the sift dataset.
python remote_benchmark.py -t 1 -r 1 -d sift_1m

python remote_benchmark.py -t 1 -r 1 -d gist_1m