vectordb-bench 0.0.12__py3-none-any.whl → 0.0.14__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.
- vectordb_bench/backend/clients/__init__.py +22 -0
- vectordb_bench/backend/clients/api.py +21 -1
- vectordb_bench/backend/clients/aws_opensearch/aws_opensearch.py +47 -6
- vectordb_bench/backend/clients/aws_opensearch/config.py +12 -6
- vectordb_bench/backend/clients/aws_opensearch/run.py +34 -3
- vectordb_bench/backend/clients/memorydb/cli.py +88 -0
- vectordb_bench/backend/clients/memorydb/config.py +54 -0
- vectordb_bench/backend/clients/memorydb/memorydb.py +254 -0
- vectordb_bench/backend/clients/pgvecto_rs/cli.py +154 -0
- vectordb_bench/backend/clients/pgvecto_rs/config.py +108 -73
- vectordb_bench/backend/clients/pgvecto_rs/pgvecto_rs.py +159 -59
- vectordb_bench/backend/clients/pgvector/cli.py +17 -2
- vectordb_bench/backend/clients/pgvector/config.py +20 -5
- vectordb_bench/backend/clients/pgvector/pgvector.py +95 -25
- vectordb_bench/backend/clients/pgvectorscale/cli.py +108 -0
- vectordb_bench/backend/clients/pgvectorscale/config.py +111 -0
- vectordb_bench/backend/clients/pgvectorscale/pgvectorscale.py +290 -0
- vectordb_bench/backend/clients/pinecone/config.py +0 -2
- vectordb_bench/backend/clients/pinecone/pinecone.py +34 -36
- vectordb_bench/backend/clients/redis/cli.py +8 -0
- vectordb_bench/backend/clients/redis/config.py +37 -6
- vectordb_bench/backend/runner/mp_runner.py +2 -1
- vectordb_bench/cli/cli.py +137 -0
- vectordb_bench/cli/vectordbbench.py +7 -1
- vectordb_bench/frontend/components/check_results/charts.py +9 -6
- vectordb_bench/frontend/components/check_results/data.py +13 -6
- vectordb_bench/frontend/components/concurrent/charts.py +3 -6
- vectordb_bench/frontend/components/run_test/caseSelector.py +10 -0
- vectordb_bench/frontend/components/run_test/dbConfigSetting.py +37 -15
- vectordb_bench/frontend/components/run_test/initStyle.py +3 -1
- vectordb_bench/frontend/config/dbCaseConfigs.py +230 -9
- vectordb_bench/frontend/pages/quries_per_dollar.py +13 -5
- vectordb_bench/frontend/vdb_benchmark.py +11 -3
- vectordb_bench/models.py +25 -9
- vectordb_bench/results/Milvus/result_20230727_standard_milvus.json +53 -1
- vectordb_bench/results/Milvus/result_20230808_standard_milvus.json +48 -0
- vectordb_bench/results/ZillizCloud/result_20230727_standard_zillizcloud.json +29 -1
- vectordb_bench/results/ZillizCloud/result_20230808_standard_zillizcloud.json +24 -0
- vectordb_bench/results/ZillizCloud/result_20240105_standard_202401_zillizcloud.json +98 -49
- vectordb_bench/results/getLeaderboardData.py +17 -7
- vectordb_bench/results/leaderboard.json +1 -1
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/METADATA +64 -31
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/RECORD +47 -40
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/WHEEL +1 -1
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/LICENSE +0 -0
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/entry_points.txt +0 -0
- {vectordb_bench-0.0.12.dist-info → vectordb_bench-0.0.14.dist-info}/top_level.txt +0 -0
@@ -148,6 +148,7 @@ class InputType(IntEnum):
|
|
148
148
|
Text = 20001
|
149
149
|
Number = 20002
|
150
150
|
Option = 20003
|
151
|
+
Float = 20004
|
151
152
|
|
152
153
|
|
153
154
|
class CaseConfigInput(BaseModel):
|
@@ -169,6 +170,7 @@ CaseConfigParamInput_IndexType = CaseConfigInput(
|
|
169
170
|
IndexType.IVFFlat.value,
|
170
171
|
IndexType.IVFSQ8.value,
|
171
172
|
IndexType.DISKANN.value,
|
173
|
+
IndexType.STREAMING_DISKANN.value,
|
172
174
|
IndexType.Flat.value,
|
173
175
|
IndexType.AUTOINDEX.value,
|
174
176
|
IndexType.GPU_IVF_FLAT.value,
|
@@ -178,6 +180,104 @@ CaseConfigParamInput_IndexType = CaseConfigInput(
|
|
178
180
|
},
|
179
181
|
)
|
180
182
|
|
183
|
+
|
184
|
+
CaseConfigParamInput_IndexType_PgVectorScale = CaseConfigInput(
|
185
|
+
label=CaseConfigParamType.IndexType,
|
186
|
+
inputHelp="Select Index Type",
|
187
|
+
inputType=InputType.Option,
|
188
|
+
inputConfig={
|
189
|
+
"options": [
|
190
|
+
IndexType.STREAMING_DISKANN.value,
|
191
|
+
],
|
192
|
+
},
|
193
|
+
)
|
194
|
+
|
195
|
+
|
196
|
+
CaseConfigParamInput_storage_layout = CaseConfigInput(
|
197
|
+
label=CaseConfigParamType.storage_layout,
|
198
|
+
inputHelp="Select Storage Layout",
|
199
|
+
inputType=InputType.Option,
|
200
|
+
inputConfig={
|
201
|
+
"options": [
|
202
|
+
"memory_optimized",
|
203
|
+
"plain",
|
204
|
+
],
|
205
|
+
},
|
206
|
+
)
|
207
|
+
|
208
|
+
CaseConfigParamInput_num_neighbors = CaseConfigInput(
|
209
|
+
label=CaseConfigParamType.num_neighbors,
|
210
|
+
inputType=InputType.Number,
|
211
|
+
inputConfig={
|
212
|
+
"min": 10,
|
213
|
+
"max": 300,
|
214
|
+
"value": 50,
|
215
|
+
},
|
216
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
217
|
+
== IndexType.STREAMING_DISKANN.value,
|
218
|
+
)
|
219
|
+
|
220
|
+
CaseConfigParamInput_search_list_size = CaseConfigInput(
|
221
|
+
label=CaseConfigParamType.search_list_size,
|
222
|
+
inputType=InputType.Number,
|
223
|
+
inputConfig={
|
224
|
+
"min": 10,
|
225
|
+
"max": 300,
|
226
|
+
"value": 100,
|
227
|
+
},
|
228
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
229
|
+
== IndexType.STREAMING_DISKANN.value,
|
230
|
+
)
|
231
|
+
|
232
|
+
CaseConfigParamInput_max_alpha = CaseConfigInput(
|
233
|
+
label=CaseConfigParamType.max_alpha,
|
234
|
+
inputType=InputType.Float,
|
235
|
+
inputConfig={
|
236
|
+
"min": 0.1,
|
237
|
+
"max": 2.0,
|
238
|
+
"value": 1.2,
|
239
|
+
},
|
240
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
241
|
+
== IndexType.STREAMING_DISKANN.value,
|
242
|
+
)
|
243
|
+
|
244
|
+
CaseConfigParamInput_num_dimensions = CaseConfigInput(
|
245
|
+
label=CaseConfigParamType.num_dimensions,
|
246
|
+
inputType=InputType.Number,
|
247
|
+
inputConfig={
|
248
|
+
"min": 0,
|
249
|
+
"max": 2000,
|
250
|
+
"value": 0,
|
251
|
+
},
|
252
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
253
|
+
== IndexType.STREAMING_DISKANN.value,
|
254
|
+
)
|
255
|
+
|
256
|
+
CaseConfigParamInput_query_search_list_size = CaseConfigInput(
|
257
|
+
label=CaseConfigParamType.query_search_list_size,
|
258
|
+
inputType=InputType.Number,
|
259
|
+
inputConfig={
|
260
|
+
"min": 50,
|
261
|
+
"max": 150,
|
262
|
+
"value": 100,
|
263
|
+
},
|
264
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
265
|
+
== IndexType.STREAMING_DISKANN.value,
|
266
|
+
)
|
267
|
+
|
268
|
+
|
269
|
+
CaseConfigParamInput_query_rescore = CaseConfigInput(
|
270
|
+
label=CaseConfigParamType.query_rescore,
|
271
|
+
inputType=InputType.Number,
|
272
|
+
inputConfig={
|
273
|
+
"min": 0,
|
274
|
+
"max": 150,
|
275
|
+
"value": 50,
|
276
|
+
},
|
277
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
278
|
+
== IndexType.STREAMING_DISKANN.value,
|
279
|
+
)
|
280
|
+
|
181
281
|
CaseConfigParamInput_IndexType_PgVector = CaseConfigInput(
|
182
282
|
label=CaseConfigParamType.IndexType,
|
183
283
|
inputHelp="Select Index Type",
|
@@ -190,6 +290,19 @@ CaseConfigParamInput_IndexType_PgVector = CaseConfigInput(
|
|
190
290
|
},
|
191
291
|
)
|
192
292
|
|
293
|
+
CaseConfigParamInput_IndexType_PgVectoRS = CaseConfigInput(
|
294
|
+
label=CaseConfigParamType.IndexType,
|
295
|
+
inputHelp="Select Index Type",
|
296
|
+
inputType=InputType.Option,
|
297
|
+
inputConfig={
|
298
|
+
"options": [
|
299
|
+
IndexType.HNSW.value,
|
300
|
+
IndexType.IVFFlat.value,
|
301
|
+
IndexType.Flat.value,
|
302
|
+
],
|
303
|
+
},
|
304
|
+
)
|
305
|
+
|
193
306
|
CaseConfigParamInput_M = CaseConfigInput(
|
194
307
|
label=CaseConfigParamType.M,
|
195
308
|
inputType=InputType.Number,
|
@@ -247,6 +360,37 @@ CaseConfigParamInput_EFConstruction_ES = CaseConfigInput(
|
|
247
360
|
},
|
248
361
|
)
|
249
362
|
|
363
|
+
CaseConfigParamInput_EFConstruction_AWSOpensearch = CaseConfigInput(
|
364
|
+
label=CaseConfigParamType.EFConstruction,
|
365
|
+
inputType=InputType.Number,
|
366
|
+
inputConfig={
|
367
|
+
"min": 100,
|
368
|
+
"max": 1024,
|
369
|
+
"value": 256,
|
370
|
+
},
|
371
|
+
)
|
372
|
+
|
373
|
+
CaseConfigParamInput_M_AWSOpensearch = CaseConfigInput(
|
374
|
+
label=CaseConfigParamType.M,
|
375
|
+
inputType=InputType.Number,
|
376
|
+
inputConfig={
|
377
|
+
"min": 4,
|
378
|
+
"max": 64,
|
379
|
+
"value": 16,
|
380
|
+
},
|
381
|
+
)
|
382
|
+
|
383
|
+
CaseConfigParamInput_EF_SEARCH_AWSOpensearch = CaseConfigInput(
|
384
|
+
label=CaseConfigParamType.ef_search,
|
385
|
+
inputType=InputType.Number,
|
386
|
+
inputConfig={
|
387
|
+
"min": 100,
|
388
|
+
"max": 1024,
|
389
|
+
"value": 256,
|
390
|
+
},
|
391
|
+
)
|
392
|
+
|
393
|
+
|
250
394
|
CaseConfigParamInput_maintenance_work_mem_PgVector = CaseConfigInput(
|
251
395
|
label=CaseConfigParamType.maintenance_work_mem,
|
252
396
|
inputHelp="Recommended value: 1.33x the index size, not to exceed the available free memory."
|
@@ -272,14 +416,26 @@ CaseConfigParamInput_max_parallel_workers_PgVector = CaseConfigInput(
|
|
272
416
|
|
273
417
|
|
274
418
|
CaseConfigParamInput_EFConstruction_PgVectoRS = CaseConfigInput(
|
275
|
-
label=CaseConfigParamType.
|
419
|
+
label=CaseConfigParamType.ef_construction,
|
276
420
|
inputType=InputType.Number,
|
277
421
|
inputConfig={
|
278
|
-
"min":
|
279
|
-
"max":
|
280
|
-
"value":
|
422
|
+
"min": 10,
|
423
|
+
"max": 2000,
|
424
|
+
"value": 300,
|
281
425
|
},
|
282
|
-
isDisplayed=lambda config: config
|
426
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
427
|
+
== IndexType.HNSW.value,
|
428
|
+
)
|
429
|
+
|
430
|
+
CaseConfigParamInput_EFSearch_PgVectoRS = CaseConfigInput(
|
431
|
+
label=CaseConfigParamType.ef_search,
|
432
|
+
inputType=InputType.Number,
|
433
|
+
inputConfig={
|
434
|
+
"min": 1,
|
435
|
+
"max": 65535,
|
436
|
+
"value": 100,
|
437
|
+
},
|
438
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
283
439
|
== IndexType.HNSW.value,
|
284
440
|
)
|
285
441
|
|
@@ -402,6 +558,7 @@ CaseConfigParamInput_M_PQ = CaseConfigInput(
|
|
402
558
|
in [IndexType.GPU_IVF_PQ.value],
|
403
559
|
)
|
404
560
|
|
561
|
+
|
405
562
|
CaseConfigParamInput_Nbits_PQ = CaseConfigInput(
|
406
563
|
label=CaseConfigParamType.nbits,
|
407
564
|
inputType=InputType.Number,
|
@@ -598,6 +755,7 @@ CaseConfigParamInput_EFSearch_PgVector = CaseConfigInput(
|
|
598
755
|
== IndexType.HNSW.value,
|
599
756
|
)
|
600
757
|
|
758
|
+
|
601
759
|
CaseConfigParamInput_QuantizationType_PgVectoRS = CaseConfigInput(
|
602
760
|
label=CaseConfigParamType.quantizationType,
|
603
761
|
inputType=InputType.Option,
|
@@ -611,6 +769,19 @@ CaseConfigParamInput_QuantizationType_PgVectoRS = CaseConfigInput(
|
|
611
769
|
],
|
612
770
|
)
|
613
771
|
|
772
|
+
CaseConfigParamInput_QuantizationType_PgVector = CaseConfigInput(
|
773
|
+
label=CaseConfigParamType.quantizationType,
|
774
|
+
inputType=InputType.Option,
|
775
|
+
inputConfig={
|
776
|
+
"options": ["none", "halfvec"],
|
777
|
+
},
|
778
|
+
isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
|
779
|
+
in [
|
780
|
+
IndexType.HNSW.value,
|
781
|
+
IndexType.IVFFlat.value,
|
782
|
+
],
|
783
|
+
)
|
784
|
+
|
614
785
|
CaseConfigParamInput_QuantizationRatio_PgVectoRS = CaseConfigInput(
|
615
786
|
label=CaseConfigParamType.quantizationRatio,
|
616
787
|
inputType=InputType.Option,
|
@@ -626,6 +797,18 @@ CaseConfigParamInput_QuantizationRatio_PgVectoRS = CaseConfigInput(
|
|
626
797
|
],
|
627
798
|
)
|
628
799
|
|
800
|
+
CaseConfigParamInput_max_parallel_workers_PgVectorRS = CaseConfigInput(
|
801
|
+
label=CaseConfigParamType.max_parallel_workers,
|
802
|
+
displayLabel="Max parallel workers",
|
803
|
+
inputHelp="Recommended value: (cpu cores - 1). This will set the parameters: [optimizing.optimizing_threads]",
|
804
|
+
inputType=InputType.Number,
|
805
|
+
inputConfig={
|
806
|
+
"min": 0,
|
807
|
+
"max": 1024,
|
808
|
+
"value": 16,
|
809
|
+
},
|
810
|
+
)
|
811
|
+
|
629
812
|
CaseConfigParamInput_ZillizLevel = CaseConfigInput(
|
630
813
|
label=CaseConfigParamType.level,
|
631
814
|
inputType=InputType.Number,
|
@@ -687,11 +870,19 @@ ESPerformanceConfig = [
|
|
687
870
|
CaseConfigParamInput_NumCandidates_ES,
|
688
871
|
]
|
689
872
|
|
873
|
+
AWSOpensearchLoadingConfig = [CaseConfigParamInput_EFConstruction_AWSOpensearch, CaseConfigParamInput_M_AWSOpensearch]
|
874
|
+
AWSOpenSearchPerformanceConfig = [
|
875
|
+
CaseConfigParamInput_EFConstruction_AWSOpensearch,
|
876
|
+
CaseConfigParamInput_M_AWSOpensearch,
|
877
|
+
CaseConfigParamInput_EF_SEARCH_AWSOpensearch,
|
878
|
+
]
|
879
|
+
|
690
880
|
PgVectorLoadingConfig = [
|
691
881
|
CaseConfigParamInput_IndexType_PgVector,
|
692
882
|
CaseConfigParamInput_Lists_PgVector,
|
693
883
|
CaseConfigParamInput_m,
|
694
884
|
CaseConfigParamInput_EFConstruction_PgVector,
|
885
|
+
CaseConfigParamInput_QuantizationType_PgVector,
|
695
886
|
CaseConfigParamInput_maintenance_work_mem_PgVector,
|
696
887
|
CaseConfigParamInput_max_parallel_workers_PgVector,
|
697
888
|
]
|
@@ -702,33 +893,55 @@ PgVectorPerformanceConfig = [
|
|
702
893
|
CaseConfigParamInput_EFSearch_PgVector,
|
703
894
|
CaseConfigParamInput_Lists_PgVector,
|
704
895
|
CaseConfigParamInput_Probes_PgVector,
|
896
|
+
CaseConfigParamInput_QuantizationType_PgVector,
|
705
897
|
CaseConfigParamInput_maintenance_work_mem_PgVector,
|
706
898
|
CaseConfigParamInput_max_parallel_workers_PgVector,
|
707
899
|
]
|
708
900
|
|
709
901
|
PgVectoRSLoadingConfig = [
|
710
|
-
|
711
|
-
|
902
|
+
CaseConfigParamInput_IndexType_PgVectoRS,
|
903
|
+
CaseConfigParamInput_m,
|
712
904
|
CaseConfigParamInput_EFConstruction_PgVectoRS,
|
713
905
|
CaseConfigParamInput_Nlist,
|
714
906
|
CaseConfigParamInput_QuantizationType_PgVectoRS,
|
715
907
|
CaseConfigParamInput_QuantizationRatio_PgVectoRS,
|
908
|
+
CaseConfigParamInput_max_parallel_workers_PgVectorRS,
|
716
909
|
]
|
717
910
|
|
718
911
|
PgVectoRSPerformanceConfig = [
|
719
|
-
|
720
|
-
|
912
|
+
CaseConfigParamInput_IndexType_PgVectoRS,
|
913
|
+
CaseConfigParamInput_m,
|
721
914
|
CaseConfigParamInput_EFConstruction_PgVectoRS,
|
915
|
+
CaseConfigParamInput_EFSearch_PgVectoRS,
|
722
916
|
CaseConfigParamInput_Nlist,
|
723
917
|
CaseConfigParamInput_Nprobe,
|
724
918
|
CaseConfigParamInput_QuantizationType_PgVectoRS,
|
725
919
|
CaseConfigParamInput_QuantizationRatio_PgVectoRS,
|
920
|
+
CaseConfigParamInput_max_parallel_workers_PgVectorRS,
|
726
921
|
]
|
727
922
|
|
728
923
|
ZillizCloudPerformanceConfig = [
|
729
924
|
CaseConfigParamInput_ZillizLevel,
|
730
925
|
]
|
731
926
|
|
927
|
+
PgVectorScaleLoadingConfig = [
|
928
|
+
CaseConfigParamInput_IndexType_PgVectorScale,
|
929
|
+
CaseConfigParamInput_num_neighbors,
|
930
|
+
CaseConfigParamInput_storage_layout,
|
931
|
+
CaseConfigParamInput_search_list_size,
|
932
|
+
CaseConfigParamInput_max_alpha,
|
933
|
+
]
|
934
|
+
|
935
|
+
PgVectorScalePerformanceConfig = [
|
936
|
+
CaseConfigParamInput_IndexType_PgVectorScale,
|
937
|
+
CaseConfigParamInput_num_neighbors,
|
938
|
+
CaseConfigParamInput_storage_layout,
|
939
|
+
CaseConfigParamInput_search_list_size,
|
940
|
+
CaseConfigParamInput_max_alpha,
|
941
|
+
CaseConfigParamInput_query_rescore,
|
942
|
+
CaseConfigParamInput_query_search_list_size,
|
943
|
+
]
|
944
|
+
|
732
945
|
CASE_CONFIG_MAP = {
|
733
946
|
DB.Milvus: {
|
734
947
|
CaseLabel.Load: MilvusLoadConfig,
|
@@ -745,6 +958,10 @@ CASE_CONFIG_MAP = {
|
|
745
958
|
CaseLabel.Load: ESLoadingConfig,
|
746
959
|
CaseLabel.Performance: ESPerformanceConfig,
|
747
960
|
},
|
961
|
+
DB.AWSOpenSearch: {
|
962
|
+
CaseLabel.Load: AWSOpensearchLoadingConfig,
|
963
|
+
CaseLabel.Performance: AWSOpenSearchPerformanceConfig,
|
964
|
+
},
|
748
965
|
DB.PgVector: {
|
749
966
|
CaseLabel.Load: PgVectorLoadingConfig,
|
750
967
|
CaseLabel.Performance: PgVectorPerformanceConfig,
|
@@ -753,4 +970,8 @@ CASE_CONFIG_MAP = {
|
|
753
970
|
CaseLabel.Load: PgVectoRSLoadingConfig,
|
754
971
|
CaseLabel.Performance: PgVectoRSPerformanceConfig,
|
755
972
|
},
|
973
|
+
DB.PgVectorScale: {
|
974
|
+
CaseLabel.Load: PgVectorScaleLoadingConfig,
|
975
|
+
CaseLabel.Performance: PgVectorScalePerformanceConfig,
|
976
|
+
},
|
756
977
|
}
|
@@ -1,10 +1,17 @@
|
|
1
1
|
import streamlit as st
|
2
2
|
from vectordb_bench.frontend.components.check_results.footer import footer
|
3
|
-
from vectordb_bench.frontend.components.check_results.expanderStyle import
|
3
|
+
from vectordb_bench.frontend.components.check_results.expanderStyle import (
|
4
|
+
initMainExpanderStyle,
|
5
|
+
)
|
4
6
|
from vectordb_bench.frontend.components.check_results.priceTable import priceTable
|
5
|
-
from vectordb_bench.frontend.components.check_results.stPageConfig import
|
7
|
+
from vectordb_bench.frontend.components.check_results.stPageConfig import (
|
8
|
+
initResultsPageConfig,
|
9
|
+
)
|
6
10
|
from vectordb_bench.frontend.components.check_results.headerIcon import drawHeaderIcon
|
7
|
-
from vectordb_bench.frontend.components.check_results.nav import
|
11
|
+
from vectordb_bench.frontend.components.check_results.nav import (
|
12
|
+
NavToResults,
|
13
|
+
NavToRunTest,
|
14
|
+
)
|
8
15
|
from vectordb_bench.frontend.components.check_results.charts import drawMetricChart
|
9
16
|
from vectordb_bench.frontend.components.check_results.filters import getshownData
|
10
17
|
from vectordb_bench.frontend.components.get_results.saveAsImage import getResults
|
@@ -16,7 +23,7 @@ from vectordb_bench.metric import QURIES_PER_DOLLAR_METRIC
|
|
16
23
|
def main():
|
17
24
|
# set page config
|
18
25
|
initResultsPageConfig(st)
|
19
|
-
|
26
|
+
|
20
27
|
# header
|
21
28
|
drawHeaderIcon(st)
|
22
29
|
|
@@ -57,7 +64,8 @@ def main():
|
|
57
64
|
dataWithMetric.append(d)
|
58
65
|
if len(dataWithMetric) > 0:
|
59
66
|
chartContainer = st.expander(caseName, True)
|
60
|
-
|
67
|
+
key = f"{caseName}-{metric}"
|
68
|
+
drawMetricChart(data, metric, chartContainer, key=key)
|
61
69
|
|
62
70
|
# footer
|
63
71
|
footer(st.container())
|
@@ -1,8 +1,13 @@
|
|
1
1
|
import streamlit as st
|
2
2
|
from vectordb_bench.frontend.components.check_results.footer import footer
|
3
|
-
from vectordb_bench.frontend.components.check_results.stPageConfig import
|
3
|
+
from vectordb_bench.frontend.components.check_results.stPageConfig import (
|
4
|
+
initResultsPageConfig,
|
5
|
+
)
|
4
6
|
from vectordb_bench.frontend.components.check_results.headerIcon import drawHeaderIcon
|
5
|
-
from vectordb_bench.frontend.components.check_results.nav import
|
7
|
+
from vectordb_bench.frontend.components.check_results.nav import (
|
8
|
+
NavToQuriesPerDollar,
|
9
|
+
NavToRunTest,
|
10
|
+
)
|
6
11
|
from vectordb_bench.frontend.components.check_results.charts import drawCharts
|
7
12
|
from vectordb_bench.frontend.components.check_results.filters import getshownData
|
8
13
|
from vectordb_bench.frontend.components.get_results.saveAsImage import getResults
|
@@ -20,7 +25,10 @@ def main():
|
|
20
25
|
allResults = benchMarkRunner.get_results()
|
21
26
|
|
22
27
|
st.title("Vector Database Benchmark")
|
23
|
-
st.caption(
|
28
|
+
st.caption(
|
29
|
+
"Except for zillizcloud-v2024.1, which was tested in _January 2024_, all other tests were completed before _August 2023_."
|
30
|
+
)
|
31
|
+
st.caption("All tested milvus are in _standalone_ mode.")
|
24
32
|
|
25
33
|
# results selector and filter
|
26
34
|
resultSelectorContainer = st.sidebar.container()
|
vectordb_bench/models.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import logging
|
2
2
|
import pathlib
|
3
|
-
from datetime import date
|
3
|
+
from datetime import date, datetime
|
4
4
|
from enum import Enum, StrEnum, auto
|
5
|
-
from typing import List, Self
|
5
|
+
from typing import List, Self
|
6
6
|
|
7
7
|
import ujson
|
8
8
|
|
@@ -10,7 +10,6 @@ from .backend.clients import (
|
|
10
10
|
DB,
|
11
11
|
DBConfig,
|
12
12
|
DBCaseConfig,
|
13
|
-
IndexType,
|
14
13
|
)
|
15
14
|
from .backend.cases import CaseType
|
16
15
|
from .base import BaseModel
|
@@ -46,8 +45,8 @@ class CaseConfigParamType(Enum):
|
|
46
45
|
numCandidates = "num_candidates"
|
47
46
|
lists = "lists"
|
48
47
|
probes = "probes"
|
49
|
-
quantizationType = "
|
50
|
-
quantizationRatio = "
|
48
|
+
quantizationType = "quantization_type"
|
49
|
+
quantizationRatio = "quantization_ratio"
|
51
50
|
m = "m"
|
52
51
|
nbits = "nbits"
|
53
52
|
intermediate_graph_degree = "intermediate_graph_degree"
|
@@ -63,6 +62,14 @@ class CaseConfigParamType(Enum):
|
|
63
62
|
level = "level"
|
64
63
|
maintenance_work_mem = "maintenance_work_mem"
|
65
64
|
max_parallel_workers = "max_parallel_workers"
|
65
|
+
storage_layout = "storage_layout"
|
66
|
+
num_neighbors = "num_neighbors"
|
67
|
+
search_list_size = "search_list_size"
|
68
|
+
max_alpha = "max_alpha"
|
69
|
+
num_dimensions = "num_dimensions"
|
70
|
+
num_bits_per_dimension = "num_bits_per_dimension"
|
71
|
+
query_search_list_size = "query_search_list_size"
|
72
|
+
query_rescore = "query_rescore"
|
66
73
|
|
67
74
|
|
68
75
|
class CustomizedCase(BaseModel):
|
@@ -128,9 +135,14 @@ class TaskConfig(BaseModel):
|
|
128
135
|
|
129
136
|
@property
|
130
137
|
def db_name(self):
|
131
|
-
|
138
|
+
db_name = f"{self.db.value}"
|
132
139
|
db_label = self.db_config.db_label
|
133
|
-
|
140
|
+
if db_label:
|
141
|
+
db_name += f"-{db_label}"
|
142
|
+
version = self.db_config.version
|
143
|
+
if version:
|
144
|
+
db_name += f"-{version}"
|
145
|
+
return db_name
|
134
146
|
|
135
147
|
|
136
148
|
class ResultLabel(Enum):
|
@@ -151,16 +163,20 @@ class TestResult(BaseModel):
|
|
151
163
|
results: list[CaseResult]
|
152
164
|
|
153
165
|
file_fmt: str = "result_{}_{}_{}.json" # result_20230718_statndard_milvus.json
|
166
|
+
timestamp: float = 0.0
|
154
167
|
|
155
168
|
def flush(self):
|
156
169
|
db2case = self.get_db_results()
|
157
|
-
|
170
|
+
timestamp = datetime.combine(date.today(), datetime.min.time()).timestamp()
|
158
171
|
result_root = config.RESULTS_LOCAL_DIR
|
159
172
|
for db, result in db2case.items():
|
160
173
|
self.write_db_file(
|
161
174
|
result_dir=result_root.joinpath(db.value),
|
162
175
|
partial=TestResult(
|
163
|
-
run_id=self.run_id,
|
176
|
+
run_id=self.run_id,
|
177
|
+
task_label=self.task_label,
|
178
|
+
results=result,
|
179
|
+
timestamp=timestamp,
|
164
180
|
),
|
165
181
|
db=db.value.lower(),
|
166
182
|
)
|