redisbench-admin 0.11.64__py3-none-any.whl → 0.11.66__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. redisbench_admin/run/ann/pkg/.dockerignore +2 -0
  2. redisbench_admin/run/ann/pkg/.git +1 -0
  3. redisbench_admin/run/ann/pkg/.github/workflows/benchmarks.yml +100 -0
  4. redisbench_admin/run/ann/pkg/.gitignore +21 -0
  5. redisbench_admin/run/ann/pkg/LICENSE +21 -0
  6. redisbench_admin/run/ann/pkg/README.md +157 -0
  7. redisbench_admin/run/ann/pkg/algos.yaml +1294 -0
  8. redisbench_admin/run/ann/pkg/algosP.yaml +67 -0
  9. redisbench_admin/run/ann/pkg/ann_benchmarks/__init__.py +2 -0
  10. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/__init__.py +0 -0
  11. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/annoy.py +26 -0
  12. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/balltree.py +22 -0
  13. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/base.py +36 -0
  14. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/bruteforce.py +110 -0
  15. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/ckdtree.py +17 -0
  16. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/datasketch.py +29 -0
  17. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/definitions.py +187 -0
  18. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/diskann.py +190 -0
  19. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/dolphinnpy.py +31 -0
  20. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/dummy_algo.py +25 -0
  21. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/elasticsearch.py +107 -0
  22. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/elastiknn.py +124 -0
  23. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss.py +124 -0
  24. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss_gpu.py +61 -0
  25. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss_hnsw.py +39 -0
  26. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/flann.py +27 -0
  27. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/hnswlib.py +36 -0
  28. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/kdtree.py +22 -0
  29. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/kgraph.py +39 -0
  30. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/lshf.py +25 -0
  31. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/milvus.py +99 -0
  32. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/mrpt.py +41 -0
  33. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/n2.py +28 -0
  34. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/nearpy.py +48 -0
  35. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/nmslib.py +74 -0
  36. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/onng_ngt.py +100 -0
  37. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/opensearchknn.py +107 -0
  38. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/panng_ngt.py +79 -0
  39. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/pinecone.py +39 -0
  40. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/puffinn.py +45 -0
  41. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/pynndescent.py +115 -0
  42. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/qg_ngt.py +102 -0
  43. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/redisearch.py +90 -0
  44. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/rpforest.py +20 -0
  45. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/scann.py +34 -0
  46. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/sptag.py +28 -0
  47. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/subprocess.py +246 -0
  48. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vald.py +149 -0
  49. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vecsim-hnsw.py +43 -0
  50. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vespa.py +47 -0
  51. redisbench_admin/run/ann/pkg/ann_benchmarks/constants.py +1 -0
  52. redisbench_admin/run/ann/pkg/ann_benchmarks/data.py +48 -0
  53. redisbench_admin/run/ann/pkg/ann_benchmarks/datasets.py +620 -0
  54. redisbench_admin/run/ann/pkg/ann_benchmarks/distance.py +53 -0
  55. redisbench_admin/run/ann/pkg/ann_benchmarks/main.py +325 -0
  56. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/__init__.py +2 -0
  57. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/metrics.py +183 -0
  58. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/plot_variants.py +17 -0
  59. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/utils.py +165 -0
  60. redisbench_admin/run/ann/pkg/ann_benchmarks/results.py +71 -0
  61. redisbench_admin/run/ann/pkg/ann_benchmarks/runner.py +333 -0
  62. redisbench_admin/run/ann/pkg/create_dataset.py +12 -0
  63. redisbench_admin/run/ann/pkg/create_hybrid_dataset.py +147 -0
  64. redisbench_admin/run/ann/pkg/create_text_to_image_ds.py +117 -0
  65. redisbench_admin/run/ann/pkg/create_website.py +272 -0
  66. redisbench_admin/run/ann/pkg/install/Dockerfile +11 -0
  67. redisbench_admin/run/ann/pkg/install/Dockerfile.annoy +5 -0
  68. redisbench_admin/run/ann/pkg/install/Dockerfile.datasketch +4 -0
  69. redisbench_admin/run/ann/pkg/install/Dockerfile.diskann +29 -0
  70. redisbench_admin/run/ann/pkg/install/Dockerfile.diskann_pq +31 -0
  71. redisbench_admin/run/ann/pkg/install/Dockerfile.dolphinn +5 -0
  72. redisbench_admin/run/ann/pkg/install/Dockerfile.elasticsearch +45 -0
  73. redisbench_admin/run/ann/pkg/install/Dockerfile.elastiknn +61 -0
  74. redisbench_admin/run/ann/pkg/install/Dockerfile.faiss +18 -0
  75. redisbench_admin/run/ann/pkg/install/Dockerfile.flann +10 -0
  76. redisbench_admin/run/ann/pkg/install/Dockerfile.hnswlib +10 -0
  77. redisbench_admin/run/ann/pkg/install/Dockerfile.kgraph +6 -0
  78. redisbench_admin/run/ann/pkg/install/Dockerfile.mih +4 -0
  79. redisbench_admin/run/ann/pkg/install/Dockerfile.milvus +27 -0
  80. redisbench_admin/run/ann/pkg/install/Dockerfile.mrpt +4 -0
  81. redisbench_admin/run/ann/pkg/install/Dockerfile.n2 +5 -0
  82. redisbench_admin/run/ann/pkg/install/Dockerfile.nearpy +5 -0
  83. redisbench_admin/run/ann/pkg/install/Dockerfile.ngt +13 -0
  84. redisbench_admin/run/ann/pkg/install/Dockerfile.nmslib +10 -0
  85. redisbench_admin/run/ann/pkg/install/Dockerfile.opensearchknn +43 -0
  86. redisbench_admin/run/ann/pkg/install/Dockerfile.puffinn +6 -0
  87. redisbench_admin/run/ann/pkg/install/Dockerfile.pynndescent +4 -0
  88. redisbench_admin/run/ann/pkg/install/Dockerfile.redisearch +18 -0
  89. redisbench_admin/run/ann/pkg/install/Dockerfile.rpforest +5 -0
  90. redisbench_admin/run/ann/pkg/install/Dockerfile.scann +5 -0
  91. redisbench_admin/run/ann/pkg/install/Dockerfile.scipy +4 -0
  92. redisbench_admin/run/ann/pkg/install/Dockerfile.sklearn +4 -0
  93. redisbench_admin/run/ann/pkg/install/Dockerfile.sptag +30 -0
  94. redisbench_admin/run/ann/pkg/install/Dockerfile.vald +8 -0
  95. redisbench_admin/run/ann/pkg/install/Dockerfile.vespa +17 -0
  96. redisbench_admin/run/ann/pkg/install.py +70 -0
  97. redisbench_admin/run/ann/pkg/logging.conf +34 -0
  98. redisbench_admin/run/ann/pkg/multirun.py +298 -0
  99. redisbench_admin/run/ann/pkg/plot.py +159 -0
  100. redisbench_admin/run/ann/pkg/protocol/bf-runner +10 -0
  101. redisbench_admin/run/ann/pkg/protocol/bf-runner.py +204 -0
  102. redisbench_admin/run/ann/pkg/protocol/ext-add-query-metric.md +51 -0
  103. redisbench_admin/run/ann/pkg/protocol/ext-batch-queries.md +77 -0
  104. redisbench_admin/run/ann/pkg/protocol/ext-prepared-queries.md +77 -0
  105. redisbench_admin/run/ann/pkg/protocol/ext-query-parameters.md +47 -0
  106. redisbench_admin/run/ann/pkg/protocol/specification.md +194 -0
  107. redisbench_admin/run/ann/pkg/requirements.txt +14 -0
  108. redisbench_admin/run/ann/pkg/requirements_py38.txt +11 -0
  109. redisbench_admin/run/ann/pkg/results/fashion-mnist-784-euclidean.png +0 -0
  110. redisbench_admin/run/ann/pkg/results/gist-960-euclidean.png +0 -0
  111. redisbench_admin/run/ann/pkg/results/glove-100-angular.png +0 -0
  112. redisbench_admin/run/ann/pkg/results/glove-25-angular.png +0 -0
  113. redisbench_admin/run/ann/pkg/results/lastfm-64-dot.png +0 -0
  114. redisbench_admin/run/ann/pkg/results/mnist-784-euclidean.png +0 -0
  115. redisbench_admin/run/ann/pkg/results/nytimes-256-angular.png +0 -0
  116. redisbench_admin/run/ann/pkg/results/sift-128-euclidean.png +0 -0
  117. redisbench_admin/run/ann/pkg/run.py +12 -0
  118. redisbench_admin/run/ann/pkg/run_algorithm.py +3 -0
  119. redisbench_admin/run/ann/pkg/templates/chartjs.template +102 -0
  120. redisbench_admin/run/ann/pkg/templates/detail_page.html +23 -0
  121. redisbench_admin/run/ann/pkg/templates/general.html +58 -0
  122. redisbench_admin/run/ann/pkg/templates/latex.template +30 -0
  123. redisbench_admin/run/ann/pkg/templates/summary.html +60 -0
  124. redisbench_admin/run/ann/pkg/test/__init__.py +0 -0
  125. redisbench_admin/run/ann/pkg/test/test-jaccard.py +19 -0
  126. redisbench_admin/run/ann/pkg/test/test-metrics.py +99 -0
  127. redisbench_admin/run/args.py +2 -1
  128. redisbench_admin/run_remote/run_remote.py +1 -1
  129. {redisbench_admin-0.11.64.dist-info → redisbench_admin-0.11.66.dist-info}/METADATA +2 -5
  130. redisbench_admin-0.11.66.dist-info/RECORD +243 -0
  131. {redisbench_admin-0.11.64.dist-info → redisbench_admin-0.11.66.dist-info}/WHEEL +1 -1
  132. redisbench_admin-0.11.64.dist-info/RECORD +0 -117
  133. {redisbench_admin-0.11.64.dist-info/licenses → redisbench_admin-0.11.66.dist-info}/LICENSE +0 -0
  134. {redisbench_admin-0.11.64.dist-info → redisbench_admin-0.11.66.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,2 @@
1
+ data
2
+ results
@@ -0,0 +1 @@
1
+ gitdir: ../../../../.git/modules/redisbench_admin/run/ann/pkg
@@ -0,0 +1,100 @@
1
+ name: ANN benchmarks
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-20.04
9
+ strategy:
10
+ matrix:
11
+ include:
12
+ - library: annoy
13
+ dataset: random-xs-20-angular
14
+ - library: dolphinn
15
+ dataset: random-xs-20-angular
16
+ - library: faiss
17
+ dataset: random-xs-20-angular
18
+ - library: flann
19
+ dataset: random-xs-20-angular
20
+ - library: kgraph
21
+ dataset: random-xs-20-angular
22
+ - library: milvus
23
+ dataset: random-xs-20-angular
24
+ - library: mrpt
25
+ dataset: random-xs-20-angular
26
+ - library: n2
27
+ dataset: random-xs-20-angular
28
+ - library: nearpy
29
+ dataset: random-xs-20-angular
30
+ - library: ngt
31
+ dataset: random-xs-20-angular
32
+ - library: nmslib
33
+ dataset: random-xs-20-angular
34
+ - library: hnswlib
35
+ dataset: random-xs-20-angular
36
+ - library: puffinn
37
+ dataset: random-xs-20-angular
38
+ - library: pynndescent
39
+ dataset: random-xs-20-angular
40
+ - library: rpforest
41
+ dataset: random-xs-20-angular
42
+ - library: sklearn
43
+ dataset: random-xs-20-angular
44
+ - library: sptag
45
+ dataset: random-xs-20-angular
46
+ - library: mih
47
+ dataset: random-xs-16-hamming
48
+ - library: datasketch
49
+ dataset: random-s-jaccard
50
+ - library: scann
51
+ dataset: random-xs-20-angular
52
+ - library: elasticsearch
53
+ dataset: random-xs-20-angular
54
+ - library: elastiknn
55
+ dataset: random-xs-20-angular
56
+ - library: opensearchknn
57
+ dataset: random-xs-20-angular
58
+ - library: diskann
59
+ dataset: random-xs-20-angular
60
+ - library: puffinn
61
+ dataset: random-s-jaccard
62
+ - library: pynndescent
63
+ dataset: random-s-jaccard
64
+ - library: vespa
65
+ dataset: random-xs-20-angular
66
+ - library: scipy
67
+ dataset: random-xs-20-angular
68
+ - library: vald
69
+ dataset: random-xs-20-angular
70
+ fail-fast: false
71
+
72
+ steps:
73
+ - uses: actions/checkout@v2 # Pull the repository
74
+
75
+ - name: Install various apt packages
76
+ run: sudo apt-get install -y libhdf5-dev python3-numpy python3-scipy python3-matplotlib python3-sklearn
77
+
78
+ - name: Install dependencies
79
+ run: |
80
+ pip3 install -r requirements.txt
81
+ python3 install.py
82
+
83
+ env:
84
+ LIBRARY: ${{ matrix.library }}
85
+ DATASET: ${{ matrix.dataset }}
86
+
87
+ - name: Run the benchmark
88
+ run: |
89
+ python3 run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 5 --dataset $DATASET --run-disabled --timeout 300
90
+ python3 run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 5 --dataset $DATASET --run-disabled --batch --timeout 300
91
+ sudo chmod -R 777 results/
92
+ python3 plot.py --dataset $DATASET --output plot.png
93
+ python3 plot.py --dataset $DATASET --output plot-batch.png --batch
94
+ python3 -m unittest test/test-metrics.py
95
+ python3 -m unittest test/test-jaccard.py
96
+ python3 create_website.py --outputdir . --scatter --latex
97
+
98
+ env:
99
+ LIBRARY: ${{ matrix.library }}
100
+ DATASET: ${{ matrix.dataset }}
@@ -0,0 +1,21 @@
1
+ .DS_Store
2
+ *.pyc
3
+ *.o
4
+ protocol/c/fr-*
5
+
6
+ install/*.txt
7
+ install/*.yaml
8
+ install/lib-*/
9
+ data/*
10
+ *.class
11
+
12
+ *.log
13
+
14
+ results/*
15
+ !results/*.png
16
+ website
17
+
18
+ venv
19
+
20
+ .idea
21
+ .vscode
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Erik Bernhardsson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,157 @@
1
+ Benchmarking nearest neighbors
2
+ ==============================
3
+
4
+ [![Build Status](https://img.shields.io/github/workflow/status/erikbern/ann-benchmarks/ANN%20benchmarks?style=flat-square)](https://github.com/erikbern/ann-benchmarks/actions?query=workflow:benchmarks)
5
+
6
+ Doing fast searching of nearest neighbors in high dimensional spaces is an increasingly important problem, but so far there has not been a lot of empirical attempts at comparing approaches in an objective way.
7
+
8
+ This project contains some tools to benchmark various implementations of approximate nearest neighbor (ANN) search for different metrics. We have pregenerated datasets (in HDF5) formats and we also have Docker containers for each algorithm. There's a [test suite](https://travis-ci.org/erikbern/ann-benchmarks) that makes sure every algorithm works.
9
+
10
+ Evaluated
11
+ =========
12
+
13
+ * [Annoy](https://github.com/spotify/annoy)
14
+ * [FLANN](http://www.cs.ubc.ca/research/flann/)
15
+ * [scikit-learn](http://scikit-learn.org/stable/modules/neighbors.html): LSHForest, KDTree, BallTree
16
+ * [PANNS](https://github.com/ryanrhymes/panns)
17
+ * [NearPy](http://pixelogik.github.io/NearPy/)
18
+ * [KGraph](https://github.com/aaalgo/kgraph)
19
+ * [NMSLIB (Non-Metric Space Library)](https://github.com/nmslib/nmslib): SWGraph, HNSW, BallTree, MPLSH
20
+ * [hnswlib (a part of nmslib project)](https://github.com/nmslib/hnsw)
21
+ * [RPForest](https://github.com/lyst/rpforest)
22
+ * [FAISS](https://github.com/facebookresearch/faiss.git)
23
+ * [DolphinnPy](https://github.com/ipsarros/DolphinnPy)
24
+ * [Datasketch](https://github.com/ekzhu/datasketch)
25
+ * [PyNNDescent](https://github.com/lmcinnes/pynndescent)
26
+ * [MRPT](https://github.com/teemupitkanen/mrpt)
27
+ * [NGT](https://github.com/yahoojapan/NGT): ONNG, PANNG, QG
28
+ * [SPTAG](https://github.com/microsoft/SPTAG)
29
+ * [PUFFINN](https://github.com/puffinn/puffinn)
30
+ * [N2](https://github.com/kakao/n2)
31
+ * [ScaNN](https://github.com/google-research/google-research/tree/master/scann)
32
+ * [Elastiknn](https://github.com/alexklibisz/elastiknn)
33
+ * [OpenSearch KNN](https://github.com/opensearch-project/k-NN)
34
+ * [DiskANN](https://github.com/microsoft/diskann): Vamana, Vamana-PQ
35
+ * [Vespa](https://github.com/vespa-engine/vespa)
36
+ * [scipy](https://docs.scipy.org/doc/scipy/reference/spatial.html): cKDTree
37
+ * [vald](https://github.com/vdaas/vald)
38
+
39
+ Data sets
40
+ =========
41
+
42
+ We have a number of precomputed data sets for this. All data sets are pre-split into train/test and come with ground truth data in the form of the top 100 neighbors. We store them in a HDF5 format:
43
+
44
+ | Dataset | Dimensions | Train size | Test size | Neighbors | Distance | Download |
45
+ | ----------------------------------------------------------------- | ---------: | ---------: | --------: | --------: | --------- | -------------------------------------------------------------------------- |
46
+ | [DEEP1B](http://sites.skoltech.ru/compvision/noimi/) | 96 | 9,990,000 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/deep-image-96-angular.hdf5) (3.6GB)
47
+ | [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) | 784 | 60,000 | 10,000 | 100 | Euclidean | [HDF5](http://ann-benchmarks.com/fashion-mnist-784-euclidean.hdf5) (217MB) |
48
+ | [GIST](http://corpus-texmex.irisa.fr/) | 960 | 1,000,000 | 1,000 | 100 | Euclidean | [HDF5](http://ann-benchmarks.com/gist-960-euclidean.hdf5) (3.6GB) |
49
+ | [GloVe](http://nlp.stanford.edu/projects/glove/) | 25 | 1,183,514 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/glove-25-angular.hdf5) (121MB) |
50
+ | GloVe | 50 | 1,183,514 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/glove-50-angular.hdf5) (235MB) |
51
+ | GloVe | 100 | 1,183,514 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/glove-100-angular.hdf5) (463MB) |
52
+ | GloVe | 200 | 1,183,514 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/glove-200-angular.hdf5) (918MB) |
53
+ | [Kosarak](http://fimi.uantwerpen.be/data/) | 27983 | 74,962 | 500 | 100 | Jaccard | [HDF5](http://ann-benchmarks.com/kosarak-jaccard.hdf5) (2.0GB) |
54
+ | [MNIST](http://yann.lecun.com/exdb/mnist/) | 784 | 60,000 | 10,000 | 100 | Euclidean | [HDF5](http://ann-benchmarks.com/mnist-784-euclidean.hdf5) (217MB) |
55
+ | [NYTimes](https://archive.ics.uci.edu/ml/datasets/bag+of+words) | 256 | 290,000 | 10,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/nytimes-256-angular.hdf5) (301MB) |
56
+ | [SIFT](http://corpus-texmex.irisa.fr/) | 128 | 1,000,000 | 10,000 | 100 | Euclidean | [HDF5](http://ann-benchmarks.com/sift-128-euclidean.hdf5) (501MB) |
57
+ | [Last.fm](https://github.com/erikbern/ann-benchmarks/pull/91) | 65 | 292,385 | 50,000 | 100 | Angular | [HDF5](http://ann-benchmarks.com/lastfm-64-dot.hdf5) (135MB) |
58
+
59
+ Results
60
+ =======
61
+
62
+ Interactive plots can be found at <http://ann-benchmarks.com>. These are all as of December 2021, running all benchmarks on a r5.4xlarge machine on AWS with `--parallelism 7`:
63
+
64
+ glove-100-angular
65
+ -----------------
66
+
67
+ ![glove-100-angular](https://raw.github.com/erikbern/ann-benchmarks/master/results/glove-100-angular.png)
68
+
69
+ sift-128-euclidean
70
+ ------------------
71
+
72
+ ![glove-100-angular](https://raw.github.com/erikbern/ann-benchmarks/master/results/sift-128-euclidean.png)
73
+
74
+ fashion-mnist-784-euclidean
75
+ ---------------------------
76
+
77
+ ![fashion-mnist-784-euclidean](https://raw.github.com/erikbern/ann-benchmarks/master/results/fashion-mnist-784-euclidean.png)
78
+
79
+ lastfm-64-dot
80
+ ------------------
81
+
82
+ ![lastfm-64-dot](https://raw.github.com/erikbern/ann-benchmarks/master/results/lastfm-64-dot.png)
83
+
84
+ nytimes-256-angular
85
+ -------------------
86
+
87
+ ![nytimes-256-angular](https://raw.github.com/erikbern/ann-benchmarks/master/results/nytimes-256-angular.png)
88
+
89
+ glove-25-angular
90
+ ----------------
91
+
92
+ ![glove-25-angular](https://raw.github.com/erikbern/ann-benchmarks/master/results/glove-25-angular.png)
93
+
94
+ Install
95
+ =======
96
+
97
+ The only prerequisite is Python (tested with 3.6) and Docker.
98
+
99
+ 1. Clone the repo.
100
+ 2. Run `pip install -r requirements.txt`.
101
+ 3. Run `python install.py` to build all the libraries inside Docker containers (this can take a while, like 10-30 minutes).
102
+
103
+ Running
104
+ =======
105
+
106
+ 1. Run `python run.py` (this can take an extremely long time, potentially days)
107
+ 2. Run `python plot.py` or `python create_website.py` to plot results.
108
+
109
+ You can customize the algorithms and datasets if you want to:
110
+
111
+ * Check that `algos.yaml` contains the parameter settings that you want to test
112
+ * To run experiments on SIFT, invoke `python run.py --dataset glove-100-angular`. See `python run.py --help` for more information on possible settings. Note that experiments can take a long time.
113
+ * To process the results, either use `python plot.py --dataset glove-100-angular` or `python create_website.py`. An example call: `python create_website.py --plottype recall/time --latex --scatter --outputdir website/`.
114
+
115
+ Including your algorithm
116
+ ========================
117
+
118
+ 1. Add your algorithm into `ann_benchmarks/algorithms` by providing a small Python wrapper.
119
+ 2. Add a Dockerfile in `install/` for it
120
+ 3. Add it to `algos.yaml`
121
+ 4. Add it to `.github/workflows/benchmarks.yml`
122
+
123
+ Principles
124
+ ==========
125
+
126
+ * Everyone is welcome to submit pull requests with tweaks and changes to how each library is being used.
127
+ * In particular: if you are the author of any of these libraries, and you think the benchmark can be improved, consider making the improvement and submitting a pull request.
128
+ * This is meant to be an ongoing project and represent the current state.
129
+ * Make everything easy to replicate, including installing and preparing the datasets.
130
+ * Try many different values of parameters for each library and ignore the points that are not on the precision-performance frontier.
131
+ * High-dimensional datasets with approximately 100-1000 dimensions. This is challenging but also realistic. Not more than 1000 dimensions because those problems should probably be solved by doing dimensionality reduction separately.
132
+ * Single queries are used by default. ANN-Benchmarks enforces that only one CPU is saturated during experimentation, i.e., no multi-threading. A batch mode is available that provides all queries to the implementations at once. Add the flag `--batch` to `run.py` and `plot.py` to enable batch mode.
133
+ * Avoid extremely costly index building (more than several hours).
134
+ * Focus on datasets that fit in RAM. For billion-scale benchmarks, see the related [big-ann-benchmarks](https://github.com/harsha-simhadri/big-ann-benchmarks) project.
135
+ * We mainly support CPU-based ANN algorithms. GPU support exists for FAISS, but it has to be compiled with GPU support locally and experiments must be run using the flags `--local --batch`.
136
+ * Do proper train/test set of index data and query points.
137
+ * Note that we consider that set similarity datasets are sparse and thus we pass a **sorted** array of integers to algorithms to represent the set of each user.
138
+
139
+
140
+ Authors
141
+ =======
142
+
143
+ Built by [Erik Bernhardsson](https://erikbern.com) with significant contributions from [Martin Aumüller](http://itu.dk/people/maau/) and [Alexander Faithfull](https://github.com/ale-f).
144
+
145
+ Related Publication
146
+ ==================
147
+
148
+ The following publication details design principles behind the benchmarking framework:
149
+
150
+ - M. Aumüller, E. Bernhardsson, A. Faithfull:
151
+ [ANN-Benchmarks: A Benchmarking Tool for Approximate Nearest Neighbor Algorithms](https://arxiv.org/abs/1807.05614). Information Systems 2019. DOI: [10.1016/j.is.2019.02.006](https://doi.org/10.1016/j.is.2019.02.006)
152
+
153
+ Related Projects
154
+ ================
155
+
156
+ - [big-ann-benchmarks](https://github.com/harsha-simhadri/big-ann-benchmarks) is a benchmarking effort for billion-scale approximate nearest neighbor search as part of the [NeurIPS'21 Competition track](https://neurips.cc/Conferences/2021/CompetitionTrack).
157
+