vectordb-bench 0.0.18__py3-none-any.whl → 0.0.20__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 (105) hide show
  1. vectordb_bench/__init__.py +49 -24
  2. vectordb_bench/__main__.py +4 -3
  3. vectordb_bench/backend/assembler.py +12 -13
  4. vectordb_bench/backend/cases.py +56 -46
  5. vectordb_bench/backend/clients/__init__.py +101 -14
  6. vectordb_bench/backend/clients/aliyun_elasticsearch/aliyun_elasticsearch.py +26 -0
  7. vectordb_bench/backend/clients/aliyun_elasticsearch/config.py +18 -0
  8. vectordb_bench/backend/clients/aliyun_opensearch/aliyun_opensearch.py +345 -0
  9. vectordb_bench/backend/clients/aliyun_opensearch/config.py +47 -0
  10. vectordb_bench/backend/clients/alloydb/alloydb.py +58 -80
  11. vectordb_bench/backend/clients/alloydb/cli.py +52 -35
  12. vectordb_bench/backend/clients/alloydb/config.py +30 -30
  13. vectordb_bench/backend/clients/api.py +8 -9
  14. vectordb_bench/backend/clients/aws_opensearch/aws_opensearch.py +46 -47
  15. vectordb_bench/backend/clients/aws_opensearch/cli.py +4 -7
  16. vectordb_bench/backend/clients/aws_opensearch/config.py +13 -9
  17. vectordb_bench/backend/clients/aws_opensearch/run.py +69 -59
  18. vectordb_bench/backend/clients/chroma/chroma.py +38 -36
  19. vectordb_bench/backend/clients/chroma/config.py +4 -2
  20. vectordb_bench/backend/clients/elastic_cloud/config.py +5 -5
  21. vectordb_bench/backend/clients/elastic_cloud/elastic_cloud.py +23 -22
  22. vectordb_bench/backend/clients/memorydb/cli.py +8 -8
  23. vectordb_bench/backend/clients/memorydb/config.py +2 -2
  24. vectordb_bench/backend/clients/memorydb/memorydb.py +65 -53
  25. vectordb_bench/backend/clients/milvus/cli.py +62 -80
  26. vectordb_bench/backend/clients/milvus/config.py +31 -7
  27. vectordb_bench/backend/clients/milvus/milvus.py +23 -26
  28. vectordb_bench/backend/clients/pgdiskann/cli.py +29 -22
  29. vectordb_bench/backend/clients/pgdiskann/config.py +29 -26
  30. vectordb_bench/backend/clients/pgdiskann/pgdiskann.py +55 -73
  31. vectordb_bench/backend/clients/pgvecto_rs/cli.py +9 -11
  32. vectordb_bench/backend/clients/pgvecto_rs/config.py +8 -14
  33. vectordb_bench/backend/clients/pgvecto_rs/pgvecto_rs.py +33 -34
  34. vectordb_bench/backend/clients/pgvector/cli.py +40 -31
  35. vectordb_bench/backend/clients/pgvector/config.py +63 -73
  36. vectordb_bench/backend/clients/pgvector/pgvector.py +97 -98
  37. vectordb_bench/backend/clients/pgvectorscale/cli.py +38 -24
  38. vectordb_bench/backend/clients/pgvectorscale/config.py +14 -15
  39. vectordb_bench/backend/clients/pgvectorscale/pgvectorscale.py +38 -43
  40. vectordb_bench/backend/clients/pinecone/config.py +1 -0
  41. vectordb_bench/backend/clients/pinecone/pinecone.py +14 -21
  42. vectordb_bench/backend/clients/qdrant_cloud/config.py +11 -10
  43. vectordb_bench/backend/clients/qdrant_cloud/qdrant_cloud.py +40 -31
  44. vectordb_bench/backend/clients/redis/cli.py +6 -12
  45. vectordb_bench/backend/clients/redis/config.py +7 -5
  46. vectordb_bench/backend/clients/redis/redis.py +94 -58
  47. vectordb_bench/backend/clients/test/cli.py +1 -2
  48. vectordb_bench/backend/clients/test/config.py +2 -2
  49. vectordb_bench/backend/clients/test/test.py +4 -5
  50. vectordb_bench/backend/clients/weaviate_cloud/cli.py +3 -4
  51. vectordb_bench/backend/clients/weaviate_cloud/config.py +2 -2
  52. vectordb_bench/backend/clients/weaviate_cloud/weaviate_cloud.py +36 -22
  53. vectordb_bench/backend/clients/zilliz_cloud/cli.py +14 -11
  54. vectordb_bench/backend/clients/zilliz_cloud/config.py +2 -4
  55. vectordb_bench/backend/clients/zilliz_cloud/zilliz_cloud.py +1 -1
  56. vectordb_bench/backend/data_source.py +30 -18
  57. vectordb_bench/backend/dataset.py +47 -27
  58. vectordb_bench/backend/result_collector.py +2 -3
  59. vectordb_bench/backend/runner/__init__.py +4 -6
  60. vectordb_bench/backend/runner/mp_runner.py +85 -34
  61. vectordb_bench/backend/runner/rate_runner.py +51 -23
  62. vectordb_bench/backend/runner/read_write_runner.py +140 -46
  63. vectordb_bench/backend/runner/serial_runner.py +99 -50
  64. vectordb_bench/backend/runner/util.py +4 -19
  65. vectordb_bench/backend/task_runner.py +95 -74
  66. vectordb_bench/backend/utils.py +17 -9
  67. vectordb_bench/base.py +0 -1
  68. vectordb_bench/cli/cli.py +65 -60
  69. vectordb_bench/cli/vectordbbench.py +6 -7
  70. vectordb_bench/frontend/components/check_results/charts.py +8 -19
  71. vectordb_bench/frontend/components/check_results/data.py +4 -16
  72. vectordb_bench/frontend/components/check_results/filters.py +8 -16
  73. vectordb_bench/frontend/components/check_results/nav.py +4 -4
  74. vectordb_bench/frontend/components/check_results/priceTable.py +1 -3
  75. vectordb_bench/frontend/components/check_results/stPageConfig.py +2 -1
  76. vectordb_bench/frontend/components/concurrent/charts.py +12 -12
  77. vectordb_bench/frontend/components/custom/displayCustomCase.py +17 -11
  78. vectordb_bench/frontend/components/custom/displaypPrams.py +4 -2
  79. vectordb_bench/frontend/components/custom/getCustomConfig.py +1 -2
  80. vectordb_bench/frontend/components/custom/initStyle.py +1 -1
  81. vectordb_bench/frontend/components/get_results/saveAsImage.py +2 -0
  82. vectordb_bench/frontend/components/run_test/caseSelector.py +3 -9
  83. vectordb_bench/frontend/components/run_test/dbConfigSetting.py +1 -4
  84. vectordb_bench/frontend/components/run_test/dbSelector.py +1 -1
  85. vectordb_bench/frontend/components/run_test/generateTasks.py +8 -8
  86. vectordb_bench/frontend/components/run_test/submitTask.py +14 -18
  87. vectordb_bench/frontend/components/tables/data.py +3 -6
  88. vectordb_bench/frontend/config/dbCaseConfigs.py +108 -83
  89. vectordb_bench/frontend/pages/concurrent.py +3 -5
  90. vectordb_bench/frontend/pages/custom.py +30 -9
  91. vectordb_bench/frontend/pages/quries_per_dollar.py +3 -3
  92. vectordb_bench/frontend/pages/run_test.py +3 -7
  93. vectordb_bench/frontend/utils.py +1 -1
  94. vectordb_bench/frontend/vdb_benchmark.py +4 -6
  95. vectordb_bench/interface.py +56 -26
  96. vectordb_bench/log_util.py +59 -64
  97. vectordb_bench/metric.py +10 -11
  98. vectordb_bench/models.py +26 -43
  99. {vectordb_bench-0.0.18.dist-info → vectordb_bench-0.0.20.dist-info}/METADATA +34 -42
  100. vectordb_bench-0.0.20.dist-info/RECORD +135 -0
  101. {vectordb_bench-0.0.18.dist-info → vectordb_bench-0.0.20.dist-info}/WHEEL +1 -1
  102. vectordb_bench-0.0.18.dist-info/RECORD +0 -131
  103. {vectordb_bench-0.0.18.dist-info → vectordb_bench-0.0.20.dist-info}/LICENSE +0 -0
  104. {vectordb_bench-0.0.18.dist-info → vectordb_bench-0.0.20.dist-info}/entry_points.txt +0 -0
  105. {vectordb_bench-0.0.18.dist-info → vectordb_bench-0.0.20.dist-info}/top_level.txt +0 -0
@@ -33,9 +33,9 @@ class UICaseItem(BaseModel):
33
33
  def __init__(
34
34
  self,
35
35
  isLine: bool = False,
36
- case_id: CaseType = None,
37
- custom_case: dict = {},
38
- cases: list[CaseConfig] = [],
36
+ case_id: CaseType | None = None,
37
+ custom_case: dict | None = None,
38
+ cases: list[CaseConfig] | None = None,
39
39
  label: str = "",
40
40
  description: str = "",
41
41
  caseLabel: CaseLabel = CaseLabel.Performance,
@@ -70,17 +70,13 @@ class UICaseItemCluster(BaseModel):
70
70
  def get_custom_case_items() -> list[UICaseItem]:
71
71
  custom_configs = get_custom_configs()
72
72
  return [
73
- UICaseItem(
74
- case_id=CaseType.PerformanceCustomDataset, custom_case=custom_config.dict()
75
- )
73
+ UICaseItem(case_id=CaseType.PerformanceCustomDataset, custom_case=custom_config.dict())
76
74
  for custom_config in custom_configs
77
75
  ]
78
76
 
79
77
 
80
78
  def get_custom_case_cluter() -> UICaseItemCluster:
81
- return UICaseItemCluster(
82
- label="Custom Search Performance Test", uiCaseItems=get_custom_case_items()
83
- )
79
+ return UICaseItemCluster(label="Custom Search Performance Test", uiCaseItems=get_custom_case_items())
84
80
 
85
81
 
86
82
  UI_CASE_CLUSTERS: list[UICaseItemCluster] = [
@@ -224,8 +220,7 @@ CaseConfigParamInput_max_neighbors = CaseConfigInput(
224
220
  "max": 300,
225
221
  "value": 32,
226
222
  },
227
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
228
- == IndexType.DISKANN.value,
223
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.DISKANN.value,
229
224
  )
230
225
 
231
226
  CaseConfigParamInput_l_value_ib = CaseConfigInput(
@@ -236,8 +231,7 @@ CaseConfigParamInput_l_value_ib = CaseConfigInput(
236
231
  "max": 300,
237
232
  "value": 50,
238
233
  },
239
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
240
- == IndexType.DISKANN.value,
234
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.DISKANN.value,
241
235
  )
242
236
 
243
237
  CaseConfigParamInput_l_value_is = CaseConfigInput(
@@ -248,8 +242,7 @@ CaseConfigParamInput_l_value_is = CaseConfigInput(
248
242
  "max": 300,
249
243
  "value": 40,
250
244
  },
251
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
252
- == IndexType.DISKANN.value,
245
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.DISKANN.value,
253
246
  )
254
247
 
255
248
  CaseConfigParamInput_num_neighbors = CaseConfigInput(
@@ -260,8 +253,7 @@ CaseConfigParamInput_num_neighbors = CaseConfigInput(
260
253
  "max": 300,
261
254
  "value": 50,
262
255
  },
263
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
264
- == IndexType.STREAMING_DISKANN.value,
256
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
265
257
  )
266
258
 
267
259
  CaseConfigParamInput_search_list_size = CaseConfigInput(
@@ -272,8 +264,7 @@ CaseConfigParamInput_search_list_size = CaseConfigInput(
272
264
  "max": 300,
273
265
  "value": 100,
274
266
  },
275
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
276
- == IndexType.STREAMING_DISKANN.value,
267
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
277
268
  )
278
269
 
279
270
  CaseConfigParamInput_max_alpha = CaseConfigInput(
@@ -284,8 +275,7 @@ CaseConfigParamInput_max_alpha = CaseConfigInput(
284
275
  "max": 2.0,
285
276
  "value": 1.2,
286
277
  },
287
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
288
- == IndexType.STREAMING_DISKANN.value,
278
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
289
279
  )
290
280
 
291
281
  CaseConfigParamInput_num_dimensions = CaseConfigInput(
@@ -296,8 +286,7 @@ CaseConfigParamInput_num_dimensions = CaseConfigInput(
296
286
  "max": 2000,
297
287
  "value": 0,
298
288
  },
299
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
300
- == IndexType.STREAMING_DISKANN.value,
289
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
301
290
  )
302
291
 
303
292
  CaseConfigParamInput_query_search_list_size = CaseConfigInput(
@@ -308,8 +297,7 @@ CaseConfigParamInput_query_search_list_size = CaseConfigInput(
308
297
  "max": 150,
309
298
  "value": 100,
310
299
  },
311
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
312
- == IndexType.STREAMING_DISKANN.value,
300
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
313
301
  )
314
302
 
315
303
 
@@ -321,8 +309,7 @@ CaseConfigParamInput_query_rescore = CaseConfigInput(
321
309
  "max": 150,
322
310
  "value": 50,
323
311
  },
324
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
325
- == IndexType.STREAMING_DISKANN.value,
312
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.STREAMING_DISKANN.value,
326
313
  )
327
314
 
328
315
  CaseConfigParamInput_IndexType_PgVector = CaseConfigInput(
@@ -358,8 +345,7 @@ CaseConfigParamInput_M = CaseConfigInput(
358
345
  "max": 64,
359
346
  "value": 30,
360
347
  },
361
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
362
- == IndexType.HNSW.value,
348
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.HNSW.value,
363
349
  )
364
350
 
365
351
  CaseConfigParamInput_m = CaseConfigInput(
@@ -370,8 +356,7 @@ CaseConfigParamInput_m = CaseConfigInput(
370
356
  "max": 64,
371
357
  "value": 16,
372
358
  },
373
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
374
- == IndexType.HNSW.value,
359
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.HNSW.value,
375
360
  )
376
361
 
377
362
 
@@ -383,8 +368,7 @@ CaseConfigParamInput_EFConstruction_Milvus = CaseConfigInput(
383
368
  "max": 512,
384
369
  "value": 360,
385
370
  },
386
- isDisplayed=lambda config: config[CaseConfigParamType.IndexType]
387
- == IndexType.HNSW.value,
371
+ isDisplayed=lambda config: config[CaseConfigParamType.IndexType] == IndexType.HNSW.value,
388
372
  )
389
373
 
390
374
  CaseConfigParamInput_EFConstruction_Weaviate = CaseConfigInput(
@@ -437,6 +421,16 @@ CaseConfigParamInput_EF_SEARCH_AWSOpensearch = CaseConfigInput(
437
421
  },
438
422
  )
439
423
 
424
+ CaseConfigParamInput_EF_SEARCH_AliyunOpensearch = CaseConfigInput(
425
+ label=CaseConfigParamType.ef_search,
426
+ inputType=InputType.Number,
427
+ inputConfig={
428
+ "min": 1,
429
+ "max": 1000000,
430
+ "value": 40,
431
+ },
432
+ )
433
+
440
434
 
441
435
  CaseConfigParamInput_maintenance_work_mem_PgVector = CaseConfigInput(
442
436
  label=CaseConfigParamType.maintenance_work_mem,
@@ -470,8 +464,7 @@ CaseConfigParamInput_EFConstruction_PgVectoRS = CaseConfigInput(
470
464
  "max": 2000,
471
465
  "value": 300,
472
466
  },
473
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
474
- == IndexType.HNSW.value,
467
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.HNSW.value,
475
468
  )
476
469
 
477
470
  CaseConfigParamInput_EFSearch_PgVectoRS = CaseConfigInput(
@@ -482,8 +475,7 @@ CaseConfigParamInput_EFSearch_PgVectoRS = CaseConfigInput(
482
475
  "max": 65535,
483
476
  "value": 100,
484
477
  },
485
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
486
- == IndexType.HNSW.value,
478
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.HNSW.value,
487
479
  )
488
480
 
489
481
  CaseConfigParamInput_EFConstruction_PgVector = CaseConfigInput(
@@ -494,8 +486,7 @@ CaseConfigParamInput_EFConstruction_PgVector = CaseConfigInput(
494
486
  "max": 1024,
495
487
  "value": 256,
496
488
  },
497
- isDisplayed=lambda config: config[CaseConfigParamType.IndexType]
498
- == IndexType.HNSW.value,
489
+ isDisplayed=lambda config: config[CaseConfigParamType.IndexType] == IndexType.HNSW.value,
499
490
  )
500
491
 
501
492
 
@@ -527,8 +518,7 @@ CaseConfigParamInput_EF_Milvus = CaseConfigInput(
527
518
  "max": MAX_STREAMLIT_INT,
528
519
  "value": 100,
529
520
  },
530
- isDisplayed=lambda config: config[CaseConfigParamType.IndexType]
531
- == IndexType.HNSW.value,
521
+ isDisplayed=lambda config: config[CaseConfigParamType.IndexType] == IndexType.HNSW.value,
532
522
  )
533
523
 
534
524
  CaseConfigParamInput_EF_Weaviate = CaseConfigInput(
@@ -555,8 +545,7 @@ CaseConfigParamInput_SearchList = CaseConfigInput(
555
545
  "max": MAX_STREAMLIT_INT,
556
546
  "value": 100,
557
547
  },
558
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
559
- == IndexType.DISKANN.value,
548
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.DISKANN.value,
560
549
  )
561
550
 
562
551
  CaseConfigParamInput_Nlist = CaseConfigInput(
@@ -601,8 +590,7 @@ CaseConfigParamInput_M_PQ = CaseConfigInput(
601
590
  "max": 65536,
602
591
  "value": 0,
603
592
  },
604
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
605
- in [IndexType.GPU_IVF_PQ.value],
593
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_IVF_PQ.value],
606
594
  )
607
595
 
608
596
 
@@ -614,8 +602,7 @@ CaseConfigParamInput_Nbits_PQ = CaseConfigInput(
614
602
  "max": 65536,
615
603
  "value": 8,
616
604
  },
617
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
618
- in [IndexType.GPU_IVF_PQ.value],
605
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_IVF_PQ.value],
619
606
  )
620
607
 
621
608
  CaseConfigParamInput_intermediate_graph_degree = CaseConfigInput(
@@ -626,8 +613,7 @@ CaseConfigParamInput_intermediate_graph_degree = CaseConfigInput(
626
613
  "max": 65536,
627
614
  "value": 64,
628
615
  },
629
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
630
- in [IndexType.GPU_CAGRA.value],
616
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
631
617
  )
632
618
 
633
619
  CaseConfigParamInput_graph_degree = CaseConfigInput(
@@ -638,8 +624,7 @@ CaseConfigParamInput_graph_degree = CaseConfigInput(
638
624
  "max": 65536,
639
625
  "value": 32,
640
626
  },
641
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
642
- in [IndexType.GPU_CAGRA.value],
627
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
643
628
  )
644
629
 
645
630
  CaseConfigParamInput_itopk_size = CaseConfigInput(
@@ -650,8 +635,7 @@ CaseConfigParamInput_itopk_size = CaseConfigInput(
650
635
  "max": 65536,
651
636
  "value": 128,
652
637
  },
653
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
654
- in [IndexType.GPU_CAGRA.value],
638
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
655
639
  )
656
640
 
657
641
  CaseConfigParamInput_team_size = CaseConfigInput(
@@ -662,8 +646,7 @@ CaseConfigParamInput_team_size = CaseConfigInput(
662
646
  "max": 65536,
663
647
  "value": 0,
664
648
  },
665
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
666
- in [IndexType.GPU_CAGRA.value],
649
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
667
650
  )
668
651
 
669
652
  CaseConfigParamInput_search_width = CaseConfigInput(
@@ -674,8 +657,7 @@ CaseConfigParamInput_search_width = CaseConfigInput(
674
657
  "max": 65536,
675
658
  "value": 4,
676
659
  },
677
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
678
- in [IndexType.GPU_CAGRA.value],
660
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
679
661
  )
680
662
 
681
663
  CaseConfigParamInput_min_iterations = CaseConfigInput(
@@ -686,8 +668,7 @@ CaseConfigParamInput_min_iterations = CaseConfigInput(
686
668
  "max": 65536,
687
669
  "value": 0,
688
670
  },
689
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
690
- in [IndexType.GPU_CAGRA.value],
671
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
691
672
  )
692
673
 
693
674
  CaseConfigParamInput_max_iterations = CaseConfigInput(
@@ -698,8 +679,7 @@ CaseConfigParamInput_max_iterations = CaseConfigInput(
698
679
  "max": 65536,
699
680
  "value": 0,
700
681
  },
701
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
702
- in [IndexType.GPU_CAGRA.value],
682
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
703
683
  )
704
684
 
705
685
  CaseConfigParamInput_build_algo = CaseConfigInput(
@@ -708,8 +688,7 @@ CaseConfigParamInput_build_algo = CaseConfigInput(
708
688
  inputConfig={
709
689
  "options": ["IVF_PQ", "NN_DESCENT"],
710
690
  },
711
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
712
- in [IndexType.GPU_CAGRA.value],
691
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.GPU_CAGRA.value],
713
692
  )
714
693
 
715
694
 
@@ -752,8 +731,7 @@ CaseConfigParamInput_Lists = CaseConfigInput(
752
731
  "max": 65536,
753
732
  "value": 10,
754
733
  },
755
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
756
- in [IndexType.IVFFlat.value],
734
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) in [IndexType.IVFFlat.value],
757
735
  )
758
736
 
759
737
  CaseConfigParamInput_Probes = CaseConfigInput(
@@ -774,8 +752,7 @@ CaseConfigParamInput_Lists_PgVector = CaseConfigInput(
774
752
  "max": 65536,
775
753
  "value": 10,
776
754
  },
777
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
778
- == IndexType.IVFFlat.value,
755
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.IVFFlat.value,
779
756
  )
780
757
 
781
758
  CaseConfigParamInput_Probes_PgVector = CaseConfigInput(
@@ -786,8 +763,7 @@ CaseConfigParamInput_Probes_PgVector = CaseConfigInput(
786
763
  "max": 65536,
787
764
  "value": 1,
788
765
  },
789
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
790
- == IndexType.IVFFlat.value,
766
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.IVFFlat.value,
791
767
  )
792
768
 
793
769
  CaseConfigParamInput_EFSearch_PgVector = CaseConfigInput(
@@ -798,8 +774,7 @@ CaseConfigParamInput_EFSearch_PgVector = CaseConfigInput(
798
774
  "max": 2048,
799
775
  "value": 256,
800
776
  },
801
- isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None)
802
- == IndexType.HNSW.value,
777
+ isDisplayed=lambda config: config.get(CaseConfigParamType.IndexType, None) == IndexType.HNSW.value,
803
778
  )
804
779
 
805
780
 
@@ -835,8 +810,7 @@ CaseConfigParamInput_QuantizationRatio_PgVectoRS = CaseConfigInput(
835
810
  inputConfig={
836
811
  "options": ["x4", "x8", "x16", "x32", "x64"],
837
812
  },
838
- isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None)
839
- == "product"
813
+ isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None) == "product"
840
814
  and config.get(CaseConfigParamType.IndexType, None)
841
815
  in [
842
816
  IndexType.HNSW.value,
@@ -875,8 +849,7 @@ CaseConfigParamInput_reranking_PgVector = CaseConfigInput(
875
849
  inputConfig={
876
850
  "value": False,
877
851
  },
878
- isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None)
879
- == "bit"
852
+ isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None) == "bit",
880
853
  )
881
854
 
882
855
  CaseConfigParamInput_quantized_fetch_limit_PgVector = CaseConfigInput(
@@ -889,8 +862,8 @@ CaseConfigParamInput_quantized_fetch_limit_PgVector = CaseConfigInput(
889
862
  "max": 1000,
890
863
  "value": 200,
891
864
  },
892
- isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None)
893
- == "bit" and config.get(CaseConfigParamType.reranking, False)
865
+ isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None) == "bit"
866
+ and config.get(CaseConfigParamType.reranking, False),
894
867
  )
895
868
 
896
869
 
@@ -898,12 +871,10 @@ CaseConfigParamInput_reranking_metric_PgVector = CaseConfigInput(
898
871
  label=CaseConfigParamType.rerankingMetric,
899
872
  inputType=InputType.Option,
900
873
  inputConfig={
901
- "options": [
902
- metric.value for metric in MetricType if metric.value not in ["HAMMING", "JACCARD"]
903
- ],
874
+ "options": [metric.value for metric in MetricType if metric.value not in ["HAMMING", "JACCARD"]],
904
875
  },
905
- isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None)
906
- == "bit" and config.get(CaseConfigParamType.reranking, False)
876
+ isDisplayed=lambda config: config.get(CaseConfigParamType.quantizationType, None) == "bit"
877
+ and config.get(CaseConfigParamType.reranking, False),
907
878
  )
908
879
 
909
880
 
@@ -1040,6 +1011,35 @@ CaseConfigParamInput_max_parallel_workers_AlloyDB = CaseConfigInput(
1040
1011
  },
1041
1012
  )
1042
1013
 
1014
+ CaseConfigParamInput_EFConstruction_AliES = CaseConfigInput(
1015
+ label=CaseConfigParamType.EFConstruction,
1016
+ inputType=InputType.Number,
1017
+ inputConfig={
1018
+ "min": 8,
1019
+ "max": 512,
1020
+ "value": 360,
1021
+ },
1022
+ )
1023
+
1024
+ CaseConfigParamInput_M_AliES = CaseConfigInput(
1025
+ label=CaseConfigParamType.M,
1026
+ inputType=InputType.Number,
1027
+ inputConfig={
1028
+ "min": 4,
1029
+ "max": 64,
1030
+ "value": 30,
1031
+ },
1032
+ )
1033
+ CaseConfigParamInput_NumCandidates_AliES = CaseConfigInput(
1034
+ label=CaseConfigParamType.numCandidates,
1035
+ inputType=InputType.Number,
1036
+ inputConfig={
1037
+ "min": 1,
1038
+ "max": 10000,
1039
+ "value": 100,
1040
+ },
1041
+ )
1042
+
1043
1043
 
1044
1044
  MilvusLoadConfig = [
1045
1045
  CaseConfigParamInput_IndexType,
@@ -1092,13 +1092,21 @@ ESPerformanceConfig = [
1092
1092
  CaseConfigParamInput_NumCandidates_ES,
1093
1093
  ]
1094
1094
 
1095
- AWSOpensearchLoadingConfig = [CaseConfigParamInput_EFConstruction_AWSOpensearch, CaseConfigParamInput_M_AWSOpensearch]
1095
+ AWSOpensearchLoadingConfig = [
1096
+ CaseConfigParamInput_EFConstruction_AWSOpensearch,
1097
+ CaseConfigParamInput_M_AWSOpensearch,
1098
+ ]
1096
1099
  AWSOpenSearchPerformanceConfig = [
1097
1100
  CaseConfigParamInput_EFConstruction_AWSOpensearch,
1098
1101
  CaseConfigParamInput_M_AWSOpensearch,
1099
1102
  CaseConfigParamInput_EF_SEARCH_AWSOpensearch,
1100
1103
  ]
1101
1104
 
1105
+ AliyunOpensearchLoadingConfig = []
1106
+ AliyunOpenSearchPerformanceConfig = [
1107
+ CaseConfigParamInput_EF_SEARCH_AliyunOpensearch,
1108
+ ]
1109
+
1102
1110
  PgVectorLoadingConfig = [
1103
1111
  CaseConfigParamInput_IndexType_PgVector,
1104
1112
  CaseConfigParamInput_Lists_PgVector,
@@ -1206,6 +1214,15 @@ AlloyDBPerformanceConfig = [
1206
1214
  CaseConfigParamInput_max_parallel_workers_AlloyDB,
1207
1215
  ]
1208
1216
 
1217
+ AliyunElasticsearchLoadingConfig = [
1218
+ CaseConfigParamInput_EFConstruction_AliES,
1219
+ CaseConfigParamInput_M_AliES,
1220
+ ]
1221
+ AliyunElasticsearchPerformanceConfig = [
1222
+ CaseConfigParamInput_EFConstruction_AliES,
1223
+ CaseConfigParamInput_M_AliES,
1224
+ CaseConfigParamInput_NumCandidates_AliES,
1225
+ ]
1209
1226
 
1210
1227
  CASE_CONFIG_MAP = {
1211
1228
  DB.Milvus: {
@@ -1247,4 +1264,12 @@ CASE_CONFIG_MAP = {
1247
1264
  CaseLabel.Load: AlloyDBLoadConfig,
1248
1265
  CaseLabel.Performance: AlloyDBPerformanceConfig,
1249
1266
  },
1267
+ DB.AliyunElasticsearch: {
1268
+ CaseLabel.Load: AliyunElasticsearchLoadingConfig,
1269
+ CaseLabel.Performance: AliyunElasticsearchPerformanceConfig,
1270
+ },
1271
+ DB.AliyunOpenSearch: {
1272
+ CaseLabel.Load: AliyunOpensearchLoadingConfig,
1273
+ CaseLabel.Performance: AliyunOpenSearchPerformanceConfig,
1274
+ },
1250
1275
  }
@@ -9,7 +9,7 @@ from vectordb_bench.frontend.components.check_results.filters import getshownDat
9
9
  from vectordb_bench.frontend.components.concurrent.charts import drawChartsByCase
10
10
  from vectordb_bench.frontend.components.get_results.saveAsImage import getResults
11
11
  from vectordb_bench.frontend.config.styles import FAVICON
12
- from vectordb_bench.interface import benchMarkRunner
12
+ from vectordb_bench.interface import benchmark_runner
13
13
  from vectordb_bench.models import TestResult
14
14
 
15
15
 
@@ -25,7 +25,7 @@ def main():
25
25
  # header
26
26
  drawHeaderIcon(st)
27
27
 
28
- allResults = benchMarkRunner.get_results()
28
+ allResults = benchmark_runner.get_results()
29
29
 
30
30
  def check_conc_data(res: TestResult):
31
31
  case_results = res.results
@@ -57,9 +57,7 @@ def main():
57
57
 
58
58
  # main
59
59
  latency_type = st.radio("Latency Type", options=["latency_p99", "latency_avg"])
60
- drawChartsByCase(
61
- shownData, showCaseNames, st.container(), latency_type=latency_type
62
- )
60
+ drawChartsByCase(shownData, showCaseNames, st.container(), latency_type=latency_type)
63
61
 
64
62
  # footer
65
63
  footer(st.container())
@@ -1,13 +1,21 @@
1
+ from functools import partial
1
2
  import streamlit as st
2
3
  from vectordb_bench.frontend.components.check_results.headerIcon import drawHeaderIcon
3
- from vectordb_bench.frontend.components.custom.displayCustomCase import displayCustomCase
4
+ from vectordb_bench.frontend.components.custom.displayCustomCase import (
5
+ displayCustomCase,
6
+ )
4
7
  from vectordb_bench.frontend.components.custom.displaypPrams import displayParams
5
- from vectordb_bench.frontend.components.custom.getCustomConfig import CustomCaseConfig, generate_custom_case, get_custom_configs, save_custom_configs
8
+ from vectordb_bench.frontend.components.custom.getCustomConfig import (
9
+ CustomCaseConfig,
10
+ generate_custom_case,
11
+ get_custom_configs,
12
+ save_custom_configs,
13
+ )
6
14
  from vectordb_bench.frontend.components.custom.initStyle import initStyle
7
15
  from vectordb_bench.frontend.config.styles import FAVICON, PAGE_TITLE
8
16
 
9
17
 
10
- class CustomCaseManager():
18
+ class CustomCaseManager:
11
19
  customCaseItems: list[CustomCaseConfig]
12
20
 
13
21
  def __init__(self):
@@ -52,12 +60,25 @@ def main():
52
60
 
53
61
  columns = expander.columns(8)
54
62
  columns[0].button(
55
- "Save", key=f"{key}_", type="secondary", on_click=lambda: customCaseManager.save())
56
- columns[1].button(":red[Delete]", key=f"{key}_delete", type="secondary",
57
- on_click=lambda: customCaseManager.deleteCase(idx))
58
-
59
- st.button("\+ New Dataset", key=f"add_custom_configs",
60
- type="primary", on_click=lambda: customCaseManager.addCase())
63
+ "Save",
64
+ key=f"{key}_",
65
+ type="secondary",
66
+ on_click=lambda: customCaseManager.save(),
67
+ )
68
+ columns[1].button(
69
+ ":red[Delete]",
70
+ key=f"{key}_delete",
71
+ type="secondary",
72
+ # B023
73
+ on_click=partial(lambda idx: customCaseManager.deleteCase(idx), idx=idx),
74
+ )
75
+
76
+ st.button(
77
+ "\+ New Dataset",
78
+ key="add_custom_configs",
79
+ type="primary",
80
+ on_click=lambda: customCaseManager.addCase(),
81
+ )
61
82
 
62
83
 
63
84
  if __name__ == "__main__":
@@ -15,8 +15,8 @@ from vectordb_bench.frontend.components.check_results.nav import (
15
15
  from vectordb_bench.frontend.components.check_results.charts import drawMetricChart
16
16
  from vectordb_bench.frontend.components.check_results.filters import getshownData
17
17
  from vectordb_bench.frontend.components.get_results.saveAsImage import getResults
18
- from vectordb_bench.frontend.config.styles import *
19
- from vectordb_bench.interface import benchMarkRunner
18
+
19
+ from vectordb_bench.interface import benchmark_runner
20
20
  from vectordb_bench.metric import QURIES_PER_DOLLAR_METRIC
21
21
 
22
22
 
@@ -27,7 +27,7 @@ def main():
27
27
  # header
28
28
  drawHeaderIcon(st)
29
29
 
30
- allResults = benchMarkRunner.get_results()
30
+ allResults = benchmark_runner.get_results()
31
31
 
32
32
  st.title("Vector DB Benchmark (QP$)")
33
33
 
@@ -15,10 +15,10 @@ from vectordb_bench.frontend.components.check_results.stPageConfig import initRu
15
15
  def main():
16
16
  # set page config
17
17
  initRunTestPageConfig(st)
18
-
18
+
19
19
  # init style
20
20
  initStyle(st)
21
-
21
+
22
22
  # header
23
23
  drawHeaderIcon(st)
24
24
 
@@ -48,11 +48,7 @@ def main():
48
48
  activedCaseList, allCaseConfigs = caseSelector(caseSelectorContainer, activedDbList)
49
49
 
50
50
  # generate tasks
51
- tasks = (
52
- generate_tasks(activedDbList, dbConfigs, activedCaseList, allCaseConfigs)
53
- if isAllValid
54
- else []
55
- )
51
+ tasks = generate_tasks(activedDbList, dbConfigs, activedCaseList, allCaseConfigs) if isAllValid else []
56
52
 
57
53
  # submit
58
54
  submitContainer = st.container()
@@ -18,5 +18,5 @@ def addHorizontalLine(st):
18
18
 
19
19
  def generate_random_string(length):
20
20
  letters = string.ascii_letters + string.digits
21
- result = ''.join(random.choice(letters) for _ in range(length))
21
+ result = "".join(random.choice(letters) for _ in range(length))
22
22
  return result
@@ -11,8 +11,8 @@ from vectordb_bench.frontend.components.check_results.nav import (
11
11
  from vectordb_bench.frontend.components.check_results.charts import drawCharts
12
12
  from vectordb_bench.frontend.components.check_results.filters import getshownData
13
13
  from vectordb_bench.frontend.components.get_results.saveAsImage import getResults
14
- from vectordb_bench.frontend.config.styles import *
15
- from vectordb_bench.interface import benchMarkRunner
14
+
15
+ from vectordb_bench.interface import benchmark_runner
16
16
 
17
17
 
18
18
  def main():
@@ -22,7 +22,7 @@ def main():
22
22
  # header
23
23
  drawHeaderIcon(st)
24
24
 
25
- allResults = benchMarkRunner.get_results()
25
+ allResults = benchmark_runner.get_results()
26
26
 
27
27
  st.title("Vector Database Benchmark")
28
28
  st.caption(
@@ -32,9 +32,7 @@ def main():
32
32
 
33
33
  # results selector and filter
34
34
  resultSelectorContainer = st.sidebar.container()
35
- shownData, failedTasks, showCaseNames = getshownData(
36
- allResults, resultSelectorContainer
37
- )
35
+ shownData, failedTasks, showCaseNames = getshownData(allResults, resultSelectorContainer)
38
36
 
39
37
  resultSelectorContainer.divider()
40
38