redisbench-admin 0.11.55__py3-none-any.whl → 0.11.57__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 (137) hide show
  1. redisbench_admin/environments/oss_cluster.py +9 -1
  2. redisbench_admin/run/asm.py +1 -1
  3. redisbench_admin/run_remote/remote_helpers.py +41 -11
  4. redisbench_admin/run_remote/standalone.py +2 -3
  5. redisbench_admin/utils/remote.py +2 -0
  6. {redisbench_admin-0.11.55.dist-info → redisbench_admin-0.11.57.dist-info}/METADATA +7 -4
  7. redisbench_admin-0.11.57.dist-info/RECORD +117 -0
  8. {redisbench_admin-0.11.55.dist-info → redisbench_admin-0.11.57.dist-info}/WHEEL +1 -1
  9. redisbench_admin/run/ann/pkg/.dockerignore +0 -2
  10. redisbench_admin/run/ann/pkg/.git +0 -1
  11. redisbench_admin/run/ann/pkg/.github/workflows/benchmarks.yml +0 -100
  12. redisbench_admin/run/ann/pkg/.gitignore +0 -21
  13. redisbench_admin/run/ann/pkg/LICENSE +0 -21
  14. redisbench_admin/run/ann/pkg/README.md +0 -157
  15. redisbench_admin/run/ann/pkg/algos.yaml +0 -1294
  16. redisbench_admin/run/ann/pkg/algosP.yaml +0 -67
  17. redisbench_admin/run/ann/pkg/ann_benchmarks/__init__.py +0 -2
  18. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/__init__.py +0 -0
  19. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/annoy.py +0 -26
  20. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/balltree.py +0 -22
  21. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/base.py +0 -36
  22. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/bruteforce.py +0 -110
  23. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/ckdtree.py +0 -17
  24. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/datasketch.py +0 -29
  25. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/definitions.py +0 -187
  26. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/diskann.py +0 -190
  27. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/dolphinnpy.py +0 -31
  28. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/dummy_algo.py +0 -25
  29. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/elasticsearch.py +0 -107
  30. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/elastiknn.py +0 -124
  31. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss.py +0 -124
  32. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss_gpu.py +0 -61
  33. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/faiss_hnsw.py +0 -39
  34. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/flann.py +0 -27
  35. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/hnswlib.py +0 -36
  36. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/kdtree.py +0 -22
  37. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/kgraph.py +0 -39
  38. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/lshf.py +0 -25
  39. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/milvus.py +0 -99
  40. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/mrpt.py +0 -41
  41. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/n2.py +0 -28
  42. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/nearpy.py +0 -48
  43. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/nmslib.py +0 -74
  44. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/onng_ngt.py +0 -100
  45. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/opensearchknn.py +0 -107
  46. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/panng_ngt.py +0 -79
  47. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/pinecone.py +0 -39
  48. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/puffinn.py +0 -45
  49. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/pynndescent.py +0 -115
  50. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/qg_ngt.py +0 -102
  51. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/redisearch.py +0 -90
  52. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/rpforest.py +0 -20
  53. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/scann.py +0 -34
  54. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/sptag.py +0 -28
  55. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/subprocess.py +0 -246
  56. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vald.py +0 -149
  57. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vecsim-hnsw.py +0 -43
  58. redisbench_admin/run/ann/pkg/ann_benchmarks/algorithms/vespa.py +0 -47
  59. redisbench_admin/run/ann/pkg/ann_benchmarks/constants.py +0 -1
  60. redisbench_admin/run/ann/pkg/ann_benchmarks/data.py +0 -48
  61. redisbench_admin/run/ann/pkg/ann_benchmarks/datasets.py +0 -620
  62. redisbench_admin/run/ann/pkg/ann_benchmarks/distance.py +0 -53
  63. redisbench_admin/run/ann/pkg/ann_benchmarks/main.py +0 -325
  64. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/__init__.py +0 -2
  65. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/metrics.py +0 -183
  66. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/plot_variants.py +0 -17
  67. redisbench_admin/run/ann/pkg/ann_benchmarks/plotting/utils.py +0 -165
  68. redisbench_admin/run/ann/pkg/ann_benchmarks/results.py +0 -71
  69. redisbench_admin/run/ann/pkg/ann_benchmarks/runner.py +0 -333
  70. redisbench_admin/run/ann/pkg/create_dataset.py +0 -12
  71. redisbench_admin/run/ann/pkg/create_hybrid_dataset.py +0 -147
  72. redisbench_admin/run/ann/pkg/create_text_to_image_ds.py +0 -117
  73. redisbench_admin/run/ann/pkg/create_website.py +0 -272
  74. redisbench_admin/run/ann/pkg/install/Dockerfile +0 -11
  75. redisbench_admin/run/ann/pkg/install/Dockerfile.annoy +0 -5
  76. redisbench_admin/run/ann/pkg/install/Dockerfile.datasketch +0 -4
  77. redisbench_admin/run/ann/pkg/install/Dockerfile.diskann +0 -29
  78. redisbench_admin/run/ann/pkg/install/Dockerfile.diskann_pq +0 -31
  79. redisbench_admin/run/ann/pkg/install/Dockerfile.dolphinn +0 -5
  80. redisbench_admin/run/ann/pkg/install/Dockerfile.elasticsearch +0 -45
  81. redisbench_admin/run/ann/pkg/install/Dockerfile.elastiknn +0 -61
  82. redisbench_admin/run/ann/pkg/install/Dockerfile.faiss +0 -18
  83. redisbench_admin/run/ann/pkg/install/Dockerfile.flann +0 -10
  84. redisbench_admin/run/ann/pkg/install/Dockerfile.hnswlib +0 -10
  85. redisbench_admin/run/ann/pkg/install/Dockerfile.kgraph +0 -6
  86. redisbench_admin/run/ann/pkg/install/Dockerfile.mih +0 -4
  87. redisbench_admin/run/ann/pkg/install/Dockerfile.milvus +0 -27
  88. redisbench_admin/run/ann/pkg/install/Dockerfile.mrpt +0 -4
  89. redisbench_admin/run/ann/pkg/install/Dockerfile.n2 +0 -5
  90. redisbench_admin/run/ann/pkg/install/Dockerfile.nearpy +0 -5
  91. redisbench_admin/run/ann/pkg/install/Dockerfile.ngt +0 -13
  92. redisbench_admin/run/ann/pkg/install/Dockerfile.nmslib +0 -10
  93. redisbench_admin/run/ann/pkg/install/Dockerfile.opensearchknn +0 -43
  94. redisbench_admin/run/ann/pkg/install/Dockerfile.puffinn +0 -6
  95. redisbench_admin/run/ann/pkg/install/Dockerfile.pynndescent +0 -4
  96. redisbench_admin/run/ann/pkg/install/Dockerfile.redisearch +0 -18
  97. redisbench_admin/run/ann/pkg/install/Dockerfile.rpforest +0 -5
  98. redisbench_admin/run/ann/pkg/install/Dockerfile.scann +0 -5
  99. redisbench_admin/run/ann/pkg/install/Dockerfile.scipy +0 -4
  100. redisbench_admin/run/ann/pkg/install/Dockerfile.sklearn +0 -4
  101. redisbench_admin/run/ann/pkg/install/Dockerfile.sptag +0 -30
  102. redisbench_admin/run/ann/pkg/install/Dockerfile.vald +0 -8
  103. redisbench_admin/run/ann/pkg/install/Dockerfile.vespa +0 -17
  104. redisbench_admin/run/ann/pkg/install.py +0 -70
  105. redisbench_admin/run/ann/pkg/logging.conf +0 -34
  106. redisbench_admin/run/ann/pkg/multirun.py +0 -298
  107. redisbench_admin/run/ann/pkg/plot.py +0 -159
  108. redisbench_admin/run/ann/pkg/protocol/bf-runner +0 -10
  109. redisbench_admin/run/ann/pkg/protocol/bf-runner.py +0 -204
  110. redisbench_admin/run/ann/pkg/protocol/ext-add-query-metric.md +0 -51
  111. redisbench_admin/run/ann/pkg/protocol/ext-batch-queries.md +0 -77
  112. redisbench_admin/run/ann/pkg/protocol/ext-prepared-queries.md +0 -77
  113. redisbench_admin/run/ann/pkg/protocol/ext-query-parameters.md +0 -47
  114. redisbench_admin/run/ann/pkg/protocol/specification.md +0 -194
  115. redisbench_admin/run/ann/pkg/requirements.txt +0 -14
  116. redisbench_admin/run/ann/pkg/requirements_py38.txt +0 -11
  117. redisbench_admin/run/ann/pkg/results/fashion-mnist-784-euclidean.png +0 -0
  118. redisbench_admin/run/ann/pkg/results/gist-960-euclidean.png +0 -0
  119. redisbench_admin/run/ann/pkg/results/glove-100-angular.png +0 -0
  120. redisbench_admin/run/ann/pkg/results/glove-25-angular.png +0 -0
  121. redisbench_admin/run/ann/pkg/results/lastfm-64-dot.png +0 -0
  122. redisbench_admin/run/ann/pkg/results/mnist-784-euclidean.png +0 -0
  123. redisbench_admin/run/ann/pkg/results/nytimes-256-angular.png +0 -0
  124. redisbench_admin/run/ann/pkg/results/sift-128-euclidean.png +0 -0
  125. redisbench_admin/run/ann/pkg/run.py +0 -12
  126. redisbench_admin/run/ann/pkg/run_algorithm.py +0 -3
  127. redisbench_admin/run/ann/pkg/templates/chartjs.template +0 -102
  128. redisbench_admin/run/ann/pkg/templates/detail_page.html +0 -23
  129. redisbench_admin/run/ann/pkg/templates/general.html +0 -58
  130. redisbench_admin/run/ann/pkg/templates/latex.template +0 -30
  131. redisbench_admin/run/ann/pkg/templates/summary.html +0 -60
  132. redisbench_admin/run/ann/pkg/test/__init__.py +0 -0
  133. redisbench_admin/run/ann/pkg/test/test-jaccard.py +0 -19
  134. redisbench_admin/run/ann/pkg/test/test-metrics.py +0 -99
  135. redisbench_admin-0.11.55.dist-info/RECORD +0 -243
  136. {redisbench_admin-0.11.55.dist-info → redisbench_admin-0.11.57.dist-info}/entry_points.txt +0 -0
  137. {redisbench_admin-0.11.55.dist-info → redisbench_admin-0.11.57.dist-info/licenses}/LICENSE +0 -0
@@ -1,204 +0,0 @@
1
- from __future__ import print_function
2
-
3
- import sys
4
- from enum import Enum
5
- from shlex import split
6
-
7
- from ann_benchmarks.data import type_info
8
- from ann_benchmarks.distance import metrics
9
- from ann_benchmarks.algorithms.bruteforce import BruteForce, BruteForceBLAS
10
-
11
-
12
- class QueryMode(Enum):
13
- NORMAL = 0,
14
- PREPARED = 1,
15
- BATCH = 2
16
-
17
-
18
- __true_print = print
19
-
20
-
21
- def print(*args, **kwargs):
22
- __true_print(*args, **kwargs)
23
- sys.stdout.flush()
24
-
25
-
26
- def next_line():
27
- for line in iter(sys.stdin.readline, ''):
28
- yield split(line.strip())
29
-
30
-
31
- if __name__ == '__main__':
32
- point_type = None
33
- distance = None
34
- query_mode = QueryMode.NORMAL
35
- fast = False
36
- query_parameters = False
37
- # Configuration mode
38
- for line in next_line():
39
- if not line:
40
- break
41
- elif len(line) == 2:
42
- var, val = line[0], line[1]
43
- if var == "point-type":
44
- if val in type_info:
45
- point_type = type_info[val]
46
- print("epbprtv0 ok")
47
- else:
48
- print("epbprtv0 fail")
49
- elif var == "distance":
50
- if val in metrics:
51
- distance = val
52
- print("epbprtv0 ok")
53
- else:
54
- print("epbprtv0 fail")
55
- elif var == "fast":
56
- fast = (val == "1")
57
- print("epbprtv0 ok")
58
- else:
59
- print("epbprtv0 fail")
60
- elif len(line) == 3 and line[0] == "frontend":
61
- var, val = line[1], line[2]
62
- if var == "prepared-queries":
63
- query_mode = \
64
- QueryMode.PREPARED if val == "1" else QueryMode.NORMAL
65
- print("epbprtv0 ok")
66
- elif var == "batch-queries":
67
- query_mode = \
68
- QueryMode.BATCH if val == "1" else QueryMode.NORMAL
69
- print("epbprtv0 ok")
70
- elif var == "query-parameters":
71
- query_parameters = (val == "1")
72
- print("epbprtv0 ok")
73
- else:
74
- print("epbprtv0 fail")
75
- else:
76
- print("epbprtv0 fail")
77
- if point_type and distance:
78
- print("epbprtv0 ok")
79
- else:
80
- print("epbprtv0 fail")
81
- sys.exit(1)
82
-
83
- obj = None
84
- if not fast:
85
- obj = BruteForce(distance)
86
- else:
87
- obj = BruteForceBLAS(distance)
88
-
89
- parser = point_type["parse_entry"]
90
- # Training mode
91
- points = []
92
- for line in next_line():
93
- if not line:
94
- break
95
- elif len(line) == 1:
96
- point = line[0]
97
- try:
98
- parsed = parser(point)
99
- print("epbprtv0 ok %d" % len(points))
100
- points.append(parsed)
101
- except ValueError:
102
- print("epbprtv0 fail")
103
- else:
104
- print("epbprtv0 fail len %d" % len(line))
105
- if "finish_entries" in point_type:
106
- points = point_type["finish_entries"](points)
107
- obj.fit(points)
108
- print("epbprtv0 ok %d" % len(points))
109
-
110
- def _query_parameters(line):
111
- if hasattr(obj, "set_query_arguments"):
112
- try:
113
- obj.set_query_arguments(*line[1:-1])
114
- print("epbprtv0 ok")
115
- except TypeError:
116
- print("epbprtv0 fail")
117
- else:
118
- print("epbprtv0 fail")
119
-
120
- if query_mode == QueryMode.NORMAL:
121
- # Query mode
122
- for line in next_line():
123
- if not line:
124
- break
125
- elif query_parameters and line[0] == "query-params" \
126
- and line[-1] == "set":
127
- _query_parameters(line)
128
- elif len(line) == 2:
129
- try:
130
- query_point, k = line[0], int(line[1])
131
- parsed = parser(query_point)
132
- results = obj.query(parsed, k)
133
- if results:
134
- print("epbprtv0 ok %d" % len(results))
135
- for index in results:
136
- print("epbprtv0 %d" % index)
137
- else:
138
- print("epbprtv0 fail")
139
- except ValueError:
140
- print("epbprtv0 fail")
141
- else:
142
- print("epbprtv0 fail")
143
- elif query_mode == QueryMode.PREPARED:
144
- # Prepared query mode
145
- parsed = None
146
- k = None
147
- for line in next_line():
148
- if not line:
149
- break
150
- elif query_parameters and line[0] == "query-params" \
151
- and line[-1] == "set":
152
- _query_parameters(line)
153
- elif line == ["query"]:
154
- if parsed and k:
155
- results = obj.query(parsed, k)
156
- if results:
157
- print("epbprtv0 ok %d" % len(results))
158
- for index in results:
159
- print("epbprtv0 %d" % index)
160
- else:
161
- print("epbprtv0 fail")
162
- else:
163
- print("epbprtv0 fail")
164
- elif len(line) == 2:
165
- try:
166
- parsed, k = parser(line[0]), int(line[1])
167
- print("epbprtv0 ok prepared true")
168
- except ValueError:
169
- print("epbprtv0 fail")
170
- else:
171
- print("epbprtv0 fail")
172
- elif query_mode == QueryMode.BATCH:
173
- # Batch query mode
174
- parsed = None
175
- k = None
176
- for line in next_line():
177
- if not line:
178
- break
179
- elif query_parameters and line[0] == "query-params" \
180
- and line[-1] == "set":
181
- _query_parameters(line)
182
- elif line == ["query"]:
183
- if parsed and k:
184
- results = obj.batch_query(parsed, k)
185
- print("epbprtv0 ok")
186
- for result in obj.get_batch_results():
187
- if result:
188
- print("epbprtv0 ok %d" % len(result))
189
- for index in result:
190
- print("epbprtv0 %d" % index)
191
- else:
192
- print("epbprtv0 fail")
193
- else:
194
- print("epbprtv0 fail")
195
- elif len(line) > 1:
196
- try:
197
- parsed, k = map(parser, line[0:-1]), int(line[-1])
198
- print("epbprtv0 ok")
199
- except ValueError as e:
200
- print("epbprtv0 fail" % e)
201
- else:
202
- print("epbprtv0 fail")
203
- pass
204
- print("epbprtv0 ok")
@@ -1,51 +0,0 @@
1
- (This document describes an extension that front-ends aren't required to implement. In fact, no front-end is *known* to implement it; this document serves as an example of how to extend the protocol. Front-ends that don't implement this extension should reject attempts to set the `add-query-metric` configuration option.)
2
-
3
- When the configuration option `add-query-metric` is set to a value other than `all`, if that value identifies a query metric known to the front-end, then the value for this metric will be appended to each query response. This option may be set several times; each one will (try to) add another query metric.
4
-
5
- Setting this option to the value `all` will cause *all* metrics known to the front-end to be included.
6
-
7
- ## Commands
8
-
9
- ### Configuration mode
10
-
11
- #### `add-query-metric METRIC` (two tokens)
12
-
13
- Request that query responses also include the value of the query metric `METRIC`, if that's recognised by the front-end.
14
-
15
- Responses:
16
-
17
- * `epbprtv0 ok`
18
-
19
- The metric `METRIC` was recognised, and query responses will include a value for it.
20
-
21
- * `epbprtv0 fail`
22
-
23
- The metric `METRIC` was not recognised; query responses will not include a value for it.
24
-
25
- #### `add-query-metric all` (two tokens)
26
-
27
- Request that query responses also include the values of all query metrics recognised by the front-end.
28
-
29
- Responses:
30
-
31
- * `epbprtv0 ok`
32
-
33
- Query responses will include the values of all metrics known to the front-end. (This may not actually change the output; the front-end could, in principle, support this extension but not recognise any query metrics.)
34
-
35
- * `epbprtv0 fail`
36
-
37
- Front-ends may choose to emit this response if they do not recognise *any* query metrics, but they may also emit `epbprtv0 ok` in these circumstances (to indicate that all zero metrics will be included in the output).
38
-
39
- ### Query mode
40
-
41
- #### `ENTRY N` (two tokens)
42
-
43
- This extension changes the behaviour of one response:
44
-
45
- * `epbprtv0 ok R [NAME0 VALUE0 ...]`
46
-
47
- `R` (greater than zero and less than or equal to `N`) close matches were found. Each of the next `R` lines, when tokenised, will consist of the token `epbprtv0` followed by a token specifying the index of a close match. (The first line should identify the *closest* close match, and the `R`-th should identify the furthest away.)
48
-
49
- If additional query metrics were specified and recognised during configuration mode, then their names and values will be provided as a number of pairs of tokens after `R`. For example, a response including the hypothetical `buckets_searched` and `candidates_checked` metrics might look like this:
50
-
51
- `epbprtv0 ok 10 buckets_searched 8 candidates_checked 507`
@@ -1,77 +0,0 @@
1
- (This document describes an extension that front-ends aren't required to implement. Front-ends that don't implement this extension should reject attempts to set the `batch-queries` front-end configuration option.)
2
-
3
- When the front-end configuration option `batch-queries` is set to `1`, after finishing training mode, the front-end will transition to batch query mode instead of query mode. In batch query mode, all queries are submitted at once, and the front-end will indicate when the queries have finished before any results are returned.
4
-
5
- ## Commands
6
-
7
- ### Configuration mode
8
-
9
- #### `frontend batch-queries V` (three tokens)
10
-
11
- If `V` is `1`, then request that the front-end transition into batch query mode, and not query mode, after training mode has finished. If `V` is anything else, then request that it transition into query mode as usual.
12
-
13
- Responses:
14
-
15
- * `epbprtv0 ok`
16
-
17
- The front-end will transition into the requested query mode after the training mode has finished.
18
-
19
- * `epbprtv0 fail`
20
-
21
- This command has had no effect on the query mode transition.
22
-
23
- ### Training mode
24
-
25
- This extension changes the behaviour of one command in training mode:
26
-
27
- #### *empty line* (zero tokens)
28
-
29
- Finish training mode and enter batch query mode.
30
-
31
- Responses:
32
-
33
- * `epbprtv0 ok COUNT1 [fail COUNT2]`
34
-
35
- `COUNT1` (potentially zero) entries were successfully interpreted and added to the data structure. (`COUNT2` entries couldn't be interpreted or couldn't be added for other reasons.):
36
-
37
- ### Batch query mode
38
-
39
- In batch query mode, front-ends should respond to three different kinds of command:
40
-
41
- #### `ENTRY0 [..., ENTRYk] N` (two or more tokens)
42
-
43
- Prepare to run a query to find at most `N` (greater than or equal to 1) close matches for each of the `k` query points from `ENTRY0` to `ENTRYk`.
44
-
45
- Responses:
46
-
47
- * `epbprtv0 ok`
48
-
49
- Preparation is complete, and the `query` command can now be used.
50
-
51
- * `epbprtv0 fail`
52
-
53
- Preparation has failed, and the `query` command should not be used. This may occur if one of the `k` query points could not be parsed.
54
-
55
- #### `query` (one token)
56
-
57
- Run the last prepared query.
58
-
59
- Responses:
60
-
61
- * `epbprtv0 ok`
62
-
63
- The query was executed successfully. `k` sets of results will appear after this line, each of them of the same form as in the normal query mode.
64
-
65
- * `epbprtv0 fail`
66
-
67
- No query has been prepared.
68
-
69
- #### *empty line* (zero tokens)
70
-
71
- Finish prepared query mode and terminate the front-end.
72
-
73
- Responses:
74
-
75
- * `epbprtv0 ok`
76
-
77
- The front-end has terminated.
@@ -1,77 +0,0 @@
1
- (This document describes an extension that front-ends aren't required to implement. Front-ends that don't implement this extension should reject attempts to set the `prepared-queries` front-end configuration option.)
2
-
3
- When the front-end configuration option `prepared-queries` is set to `1`, after finishing training mode, the front-end will transition to prepared query mode instead of query mode. In prepared query mode, parsing a query point -- a potentially expensive operation -- and actually running a query are two different commands; this makes the query timings more representative of the underlying algorithm's behaviour without the overhead of this protocol.
4
-
5
- ## Commands
6
-
7
- ### Configuration mode
8
-
9
- #### `frontend prepared-queries V` (three tokens)
10
-
11
- If `V` is `1`, then request that the front-end transition into prepared query mode, and not query mode, after training mode has finished. If `V` is anything else, then request that it transition into query mode as usual.
12
-
13
- Responses:
14
-
15
- * `epbprtv0 ok`
16
-
17
- The front-end will transition into the requested query mode after the training mode has finished.
18
-
19
- * `epbprtv0 fail`
20
-
21
- This command has had no effect on the query mode transition.
22
-
23
- ### Training mode
24
-
25
- This extension changes the behaviour of one command in training mode:
26
-
27
- #### *empty line* (zero tokens)
28
-
29
- Finish training mode and enter prepared query mode.
30
-
31
- Responses:
32
-
33
- * `epbprtv0 ok COUNT1 [fail COUNT2]`
34
-
35
- `COUNT1` (potentially zero) entries were successfully interpreted and added to the data structure. (`COUNT2` entries couldn't be interpreted or couldn't be added for other reasons.):
36
-
37
- ### Prepared query mode
38
-
39
- In prepared query mode, front-ends should respond to three different kinds of command:
40
-
41
- #### `ENTRY N` (two tokens)
42
-
43
- Prepare to run a query to find at most `N` (greater than or equal to 1) close matches for `ENTRY`.
44
-
45
- Responses:
46
-
47
- * `epbprtv0 ok prepared true`
48
-
49
- Preparation is complete, the `query` command can now be used, and the underlying library wrapper has special support for prepared queries.
50
-
51
- * `epbprtv0 ok prepared false`
52
-
53
- The `query` command can now be used, but the underlying library wrapper doesn't have support for prepared queries, so the `query` command will perform the parsing of `ENTRY` as it would in normal query mode.
54
-
55
- #### `query` (one token)
56
-
57
- Run the last prepared query.
58
-
59
- Responses:
60
-
61
- * `epbprtv0 ok R`
62
-
63
- `R` (greater than zero and less than or equal to the value of `N` that was specified when the query was prepared) close matches were found. The next `R` lines, when tokenised, will consist of the token `epbprtv0` followed by a token specifying the index of a close match. (The first line should identify the *closest* close match, and the `R`-th should identify the furthest away.)
64
-
65
- * `epbprtv0 fail`
66
-
67
- Either no close matches were found, or no query has been prepared.
68
-
69
- #### *empty line* (zero tokens)
70
-
71
- Finish prepared query mode and terminate the front-end.
72
-
73
- Responses:
74
-
75
- * `epbprtv0 ok`
76
-
77
- The front-end has terminated.
@@ -1,47 +0,0 @@
1
- (This document describes an extension that front-ends aren't required to implement. Front-ends that don't implement this extension should reject attempts to set the `query-parameters` front-end configuration option.)
2
-
3
- Many algorithms expose parameters that can be changed to adjust their search strategies without requiring that training data be resubmitted. When the front-end configuration option `query-parameters` is set to `1`, a new command will be added to query mode allowing these query configuration parameters to be changed.
4
-
5
- (Front-ends that support other optional query modes, such as prepared or batch queries, should also add this command to those modes.)
6
-
7
- ## Commands
8
-
9
- ### Configuration mode
10
-
11
- #### `frontend query-parameters V` (three tokens)
12
-
13
- If `V` is `1`, then request that query mode expose the `query-params` command. If `V` is anything else, then withdraw this request.
14
-
15
- Responses:
16
-
17
- * `epbprtv0 ok`
18
-
19
- The availability of the `query-params` command has been changed accordingly.
20
-
21
- * `epbprtv0 fail`
22
-
23
- This command has had no effect on the availability of the `query-params` command.
24
-
25
- ### Training mode
26
-
27
- This extension makes no changes to training mode.
28
-
29
- ### Query mode
30
-
31
- When the `query-parameters` front-end configuration option has been set to `1`, this extension adds one new command to query mode:
32
-
33
- #### `query-params [VALUE0, ..., VALUEk] set` (two or more tokens)
34
-
35
- Change the values of the query parameters.
36
-
37
- (The final token `set` is required. It exists for the sake of compatibility with the `batch-queries` extension, which also uses variable-length commands but which requires that the last token specify a number.)
38
-
39
- Responses:
40
-
41
- * `epbprtv0 ok`
42
-
43
- The query parameters were changed to the given values.
44
-
45
- * `epbprtv0 fail`
46
-
47
- The query parameters were not changed to the given values, perhaps because one of them was invalid.
@@ -1,194 +0,0 @@
1
- This document specifies a simple text-based protocol that can be used to benchmark algorithms that don't have a Python wrapper. A program that implements the algorithm side of this specification will be referred to in the rest of this document as a "front-end".
2
-
3
- This protocol is line-oriented; both sides should configure their input and output streams to be line-buffered. Front-ends receive messages by reading lines from standard input and send messages by writing lines to standard output.
4
-
5
- ## Modes
6
-
7
- A front-end begins in configuration mode. When configuration is complete, it transitions into training mode; when training data has been supplied, into query mode; and, when no more queries remain, it terminates. It isn't possible to return from one mode to an earlier mode without restarting the front-end.
8
-
9
- A front-end reads lines from standard input, tokenises them, and interprets them according to its current mode; responses are written as lines to standard output. To enable protocol responses to be distinguished from other messages that may appear on standard output, the first token of a line containing a response will always be `epbprtv0`; the second will be `ok` when a command succeeds, potentially followed by other tokens, and `fail` when it doesn't.
10
-
11
- (The obscure token `epbprtv0` is intended to uniquely identify this protocol, and is meant to suggest something like "**e**xternal **p**rogram **b**enchmarking **pr**o**t**ocol, **v**ersion **0**".)
12
-
13
- A front-end may choose to include extra tokens in its responses after the tokens required by this specification to communicate more information back to the caller.
14
-
15
- ## Tokenisation
16
-
17
- Both the front-end and `ann-benchmarks` perform *tokenisation* on the lines of text they send and receive. The rules for tokenisation are as follows:
18
-
19
- * A token is a sequence of characters separated by one or more whitespace characters.
20
-
21
- Input | Token 1 | Token 2 | Token 3
22
- ----- | ------- | ------- | -------
23
- abc | abc | |
24
- a bc | a | bc |
25
- a bc | a | bc |
26
- a b c | a | b | c
27
-
28
- * A sequence surrounded by single quote marks will be treated as part of a token, even if it contains whitespace or doesn't contain any other characters.
29
-
30
- Input | Token 1 | Token 2 | Token 3
31
- ----- | ------- | ------- | -------
32
- 'a b c' | a b c | |
33
- 'a b c'd | a b cd | |
34
- a '' b | a | *empty string* | b
35
-
36
- * A sequence surrounded by double quote marks will be treated as part of a token, even if it contains whitespace or doesn't contain any other characters.
37
-
38
- Input | Token 1 | Token 2 | Token 3
39
- ----- | ------- | ------- | -------
40
- "a b c" | a b c | |
41
- "a b c"d | a b cd | |
42
- a "" b | a | *empty string* | b
43
-
44
- * Outside of a quoted sequence, preceding a character with a backslash causes any special significance it may have to be ignored; the character is then said to have been "escaped".
45
-
46
- Input | Token 1 | Token 2 | Token 3
47
- ----- | ------- | ------- | -------
48
- \a \b \c | a | b | c
49
-
50
- An escaped whitespace character doesn't separate tokens:
51
-
52
- Input | Token 1 | Token 2
53
- ----- | ------- | -------
54
- a b\ c | a | b c |
55
- "a b c"\ d | a b c d |
56
-
57
- An escaped quote mark doesn't begin a sequence:
58
-
59
- Input | Token 1 | Token 2 | Token 3
60
- ----- | ------- | ------- | -------
61
- \'a b c\' | a | b | c |
62
- \"a b c\" | a | b | c |
63
-
64
- An escaped backslash doesn't escape the subsequent character:
65
-
66
- Input | Token 1 | Token 2
67
- ----- | ------- | -------
68
- a\\\\"b c" d | a\b c | d
69
-
70
- * In sequences begun by a double quote mark, only double quote marks and backslashes (and, for compatibility reasons, dollar signs) may be escaped; the backslash otherwise has no special significance.
71
-
72
- Input | Token 1 | Token 2 | Token 3
73
- ----- | ------- | ------- | -------
74
- "\a \b" \c | \a \b | c |
75
- "\\\\ \\" \\$ a" "\b" c | \ " $ a | \b | c
76
-
77
- * In sequences begun by a single quote mark, a backslash has no special significance.
78
-
79
- Input | Token 1 | Token 2
80
- ----- | ------- | -------
81
- 'a b' c | a b | c
82
- 'a b\\' c | a b\ | c
83
-
84
- Apart from the fact that newline characters can't be escaped, these rules should match the tokenisation rules of the POSIX shell.
85
-
86
- ## Commands
87
-
88
- Commands are sent to the front-end by `ann-benchmarks`. Each command consists of a single line of text; the front-end replies with one or more lines of text. Front-ends can't initiate communication; they can only reply to commands.
89
-
90
- This section specifies these commands, along with the possible responses a front-end might send.
91
-
92
- If a front-end receives a command that it doesn't understand in the current mode (or at all), it should respond with `epbprtv0 fail` and continue processing commands.
93
-
94
- ### Configuration mode
95
-
96
- In configuration mode, front-ends should respond to three different kinds of command:
97
-
98
- #### `VAR VAL` (two tokens)
99
-
100
- Set the value of the algorithm configuration option `VAR` to `VAL`.
101
-
102
- Responses:
103
-
104
- * `epbprtv0 ok`
105
-
106
- The value specified for the algorithm configuration option `VAR` was acceptable, and the option has been set.
107
-
108
- * `epbprtv0 fail`
109
-
110
- The value specified for the algorithm configuration option `VAR` wasn't acceptable. No change has been made to the value of this option.
111
-
112
- #### `frontend VAR VAL` (three tokens)
113
-
114
- Set the value of the front-end configuration option `VAR` to `VAL`. Front-end configuration options may cause the front-end to behave in a manner other than that described in this specification.
115
-
116
- Responses:
117
-
118
- * `epbprtv0 ok`
119
-
120
- The value specified for the front-end configuration option `VAR` was acceptable, and the option has been set.
121
-
122
- * `epbprtv0 fail`
123
-
124
- The value specified for the front-end configuration option `VAR` wasn't acceptable. No change has been made to the value of this option.
125
-
126
- #### *empty line* (zero tokens)
127
-
128
- Finish configuration mode and enter training mode.
129
-
130
- Responses:
131
-
132
- * `epbprtv0 ok`
133
-
134
- Training mode has been entered.
135
-
136
- * `epbprtv0 fail`
137
-
138
- One or more configuration options required by the algorithm weren't specified, and so the query process has terminated.
139
-
140
- ### Training mode
141
-
142
- In training mode, front-ends should respond to two different kinds of command:
143
-
144
- #### `ENTRY` (one token)
145
-
146
- Interpret `ENTRY` as an item of training data.
147
-
148
- Responses:
149
-
150
- * `epbprtv0 ok`
151
-
152
- `ENTRY` was added as the next item of training data. The index values returned in query mode refer to the first item added as `0`, the second as `1`, and so on.
153
-
154
- * `epbprtv0 fail`
155
-
156
- Either `ENTRY` couldn't be interpreted as an item of training data, or the training data wasn't accepted.
157
-
158
- #### *empty line* (zero tokens)
159
-
160
- Finish training mode and enter query mode.
161
-
162
- Responses:
163
-
164
- * `epbprtv0 ok COUNT1 [fail COUNT2]`
165
-
166
- `COUNT1` (potentially zero) entries were successfully interpreted and added to the data structure. (`COUNT2` entries couldn't be interpreted or couldn't be added for other reasons.)
167
-
168
- ### Query mode
169
-
170
- In query mode, front-ends should respond to two different kinds of command:
171
-
172
- #### `ENTRY N` (two tokens)
173
-
174
- Return the indices of at most `N` (greater than or equal to 1) close matches for `ENTRY`.
175
-
176
- Responses:
177
-
178
- * `epbprtv0 ok R`
179
-
180
- `R` (greater than zero and less than or equal to `N`) close matches were found. Each of the next `R` lines, when tokenised, will consist of the token `epbprtv0` followed by a token specifying the index of a close match. (The first line should identify the *closest* close match, and the `R`-th should identify the furthest away.)
181
-
182
- * `epbprtv0 fail`
183
-
184
- No close matches were found.
185
-
186
- #### *empty line* (zero tokens)
187
-
188
- Finish query mode and terminate the front-end.
189
-
190
- Responses:
191
-
192
- * `epbprtv0 ok`
193
-
194
- The front-end has terminated.
@@ -1,14 +0,0 @@
1
- ansicolors==1.1.8
2
- docker==5.0.2
3
- h5py==2.10.0
4
- matplotlib==3.1.2
5
- numpy==1.17.4
6
- pyyaml==5.4
7
- psutil==5.6.6
8
- scipy==1.3.3
9
- scikit-learn==0.22.2
10
- jinja2==3.1.2
11
- pymilvus==2.0.2
12
- pinecone-client==2.0.11
13
- redis==4.3.2
14
- elasticsearch==8.3.1
@@ -1,11 +0,0 @@
1
- ansicolors==1.1.8
2
- docker==5.0.2
3
- h5py==2.10.0
4
- matplotlib==3.3.4
5
- numpy==1.19.5
6
- pyyaml==5.4
7
- psutil==5.6.6
8
- scipy==1.5.4
9
- scikit-learn
10
- jinja2==2.10.1
11
- pandas==1.1.5