vectordb-bench 0.0.30__py3-none-any.whl → 1.0.0__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 (76) hide show
  1. vectordb_bench/__init__.py +14 -27
  2. vectordb_bench/backend/assembler.py +19 -6
  3. vectordb_bench/backend/cases.py +186 -23
  4. vectordb_bench/backend/clients/__init__.py +16 -0
  5. vectordb_bench/backend/clients/api.py +22 -1
  6. vectordb_bench/backend/clients/aws_opensearch/aws_opensearch.py +82 -41
  7. vectordb_bench/backend/clients/aws_opensearch/config.py +23 -4
  8. vectordb_bench/backend/clients/chroma/chroma.py +6 -2
  9. vectordb_bench/backend/clients/elastic_cloud/config.py +19 -1
  10. vectordb_bench/backend/clients/elastic_cloud/elastic_cloud.py +133 -45
  11. vectordb_bench/backend/clients/milvus/config.py +1 -0
  12. vectordb_bench/backend/clients/milvus/milvus.py +74 -22
  13. vectordb_bench/backend/clients/oceanbase/cli.py +100 -0
  14. vectordb_bench/backend/clients/oceanbase/config.py +125 -0
  15. vectordb_bench/backend/clients/oceanbase/oceanbase.py +215 -0
  16. vectordb_bench/backend/clients/pinecone/pinecone.py +39 -25
  17. vectordb_bench/backend/clients/qdrant_cloud/config.py +59 -3
  18. vectordb_bench/backend/clients/qdrant_cloud/qdrant_cloud.py +100 -33
  19. vectordb_bench/backend/dataset.py +143 -27
  20. vectordb_bench/backend/filter.py +76 -0
  21. vectordb_bench/backend/runner/__init__.py +3 -3
  22. vectordb_bench/backend/runner/mp_runner.py +52 -39
  23. vectordb_bench/backend/runner/rate_runner.py +68 -52
  24. vectordb_bench/backend/runner/read_write_runner.py +125 -68
  25. vectordb_bench/backend/runner/serial_runner.py +56 -23
  26. vectordb_bench/backend/task_runner.py +48 -20
  27. vectordb_bench/cli/cli.py +59 -1
  28. vectordb_bench/cli/vectordbbench.py +3 -0
  29. vectordb_bench/frontend/components/check_results/data.py +16 -11
  30. vectordb_bench/frontend/components/check_results/filters.py +53 -25
  31. vectordb_bench/frontend/components/check_results/headerIcon.py +16 -13
  32. vectordb_bench/frontend/components/check_results/nav.py +20 -0
  33. vectordb_bench/frontend/components/custom/displayCustomCase.py +43 -8
  34. vectordb_bench/frontend/components/custom/displaypPrams.py +10 -5
  35. vectordb_bench/frontend/components/custom/getCustomConfig.py +10 -0
  36. vectordb_bench/frontend/components/label_filter/charts.py +60 -0
  37. vectordb_bench/frontend/components/run_test/caseSelector.py +48 -52
  38. vectordb_bench/frontend/components/run_test/dbSelector.py +9 -5
  39. vectordb_bench/frontend/components/run_test/inputWidget.py +48 -0
  40. vectordb_bench/frontend/components/run_test/submitTask.py +3 -1
  41. vectordb_bench/frontend/components/streaming/charts.py +253 -0
  42. vectordb_bench/frontend/components/streaming/data.py +62 -0
  43. vectordb_bench/frontend/components/tables/data.py +1 -1
  44. vectordb_bench/frontend/components/welcome/explainPrams.py +66 -0
  45. vectordb_bench/frontend/components/welcome/pagestyle.py +106 -0
  46. vectordb_bench/frontend/components/welcome/welcomePrams.py +147 -0
  47. vectordb_bench/frontend/config/dbCaseConfigs.py +307 -40
  48. vectordb_bench/frontend/config/styles.py +32 -2
  49. vectordb_bench/frontend/pages/concurrent.py +5 -1
  50. vectordb_bench/frontend/pages/custom.py +4 -0
  51. vectordb_bench/frontend/pages/label_filter.py +56 -0
  52. vectordb_bench/frontend/pages/quries_per_dollar.py +5 -1
  53. vectordb_bench/frontend/pages/results.py +60 -0
  54. vectordb_bench/frontend/pages/run_test.py +3 -3
  55. vectordb_bench/frontend/pages/streaming.py +135 -0
  56. vectordb_bench/frontend/pages/tables.py +4 -0
  57. vectordb_bench/frontend/vdb_benchmark.py +16 -41
  58. vectordb_bench/interface.py +6 -2
  59. vectordb_bench/metric.py +15 -1
  60. vectordb_bench/models.py +31 -11
  61. vectordb_bench/results/ElasticCloud/result_20250318_standard_elasticcloud.json +5890 -0
  62. vectordb_bench/results/Milvus/result_20250509_standard_milvus.json +6138 -0
  63. vectordb_bench/results/OpenSearch/result_20250224_standard_opensearch.json +7319 -0
  64. vectordb_bench/results/Pinecone/result_20250124_standard_pinecone.json +2365 -0
  65. vectordb_bench/results/QdrantCloud/result_20250602_standard_qdrantcloud.json +3556 -0
  66. vectordb_bench/results/ZillizCloud/result_20250613_standard_zillizcloud.json +6290 -0
  67. vectordb_bench/results/dbPrices.json +12 -4
  68. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/METADATA +85 -32
  69. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/RECORD +73 -56
  70. vectordb_bench/results/ZillizCloud/result_20230727_standard_zillizcloud.json +0 -791
  71. vectordb_bench/results/ZillizCloud/result_20230808_standard_zillizcloud.json +0 -679
  72. vectordb_bench/results/ZillizCloud/result_20240105_standard_202401_zillizcloud.json +0 -1352
  73. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/WHEEL +0 -0
  74. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/entry_points.txt +0 -0
  75. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/licenses/LICENSE +0 -0
  76. {vectordb_bench-0.0.30.dist-info → vectordb_bench-1.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,106 @@
1
+ def pagestyle():
2
+ html_content = """
3
+ <style>
4
+ .grid-container {
5
+ display: grid;
6
+ grid-template-columns: repeat(3, 1fr);
7
+ grid-template-rows: repeat(3, auto);
8
+ gap: 20px;
9
+ padding: 20px 0;
10
+ }
11
+
12
+ .title-row {
13
+ grid-column: 1 / 4;
14
+ text-align: left;
15
+ margin: 20px 0;
16
+ }
17
+
18
+ .title-row h2 {
19
+ font-size: 35px;
20
+ color: #333;
21
+ font-weight: 600;
22
+ }
23
+
24
+ .last-row {
25
+ grid-column: 1 / 7;
26
+ display: grid;
27
+ grid-template-columns: repeat(6, 1fr);
28
+ gap: 40px;
29
+ }
30
+
31
+ .last-row > :nth-child(1) {
32
+ grid-column: 2 / 4;
33
+ }
34
+
35
+ .last-row > :nth-child(2) {
36
+ grid-column: 4 / 6;
37
+ gap: 40px;
38
+ }
39
+ .section-card {
40
+ width: 100%;
41
+ height: 350px;
42
+ padding: 15px;
43
+ border-radius: 10px;
44
+ background-color: #f0f2f6;
45
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
46
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
47
+ text-align: center;
48
+ overflow: hidden;
49
+ cursor: pointer;
50
+ display: flex;
51
+ flex-direction: column;
52
+ }
53
+ .section-card:hover {
54
+ transform: scale(1.05);
55
+ box-shadow: 0 10px 20px rgba(0,0,0,0.2);
56
+ z-index: 100;
57
+ }
58
+ .section-image {
59
+ width: 100%;
60
+ height: 185px;
61
+ object-fit: cover;
62
+ object-position: 0 0;
63
+ border-radius: 5px;
64
+ margin-bottom: 10px;
65
+ }
66
+ .section-title {
67
+ font-size: 18px;
68
+ font-weight: bold;
69
+ margin-bottom: 10px;
70
+ color: #262730;
71
+ }
72
+ .section-description {
73
+ font-size: 14px;
74
+ color: #555;
75
+ height: 80px;
76
+ overflow-y: auto;
77
+ margin-bottom: 10px;
78
+ }
79
+ .scroll-container {
80
+ width: 100%;
81
+ overflow-x: auto;
82
+ white-space: nowrap;
83
+ margin-top: auto;
84
+ padding: 10px 0;
85
+ border-top: 1px solid #eee;
86
+ }
87
+ .scroll-content {
88
+ display: inline-block;
89
+ white-space: nowrap;
90
+ padding: 0 10px;
91
+ }
92
+ .scroll-item {
93
+ display: inline-block;
94
+ width: 50px;
95
+ height: 30px;
96
+ margin-right: 10px;
97
+ background-color: #ddd;
98
+ border-radius: 5px;
99
+ text-align: center;
100
+ line-height: 30px;
101
+ }
102
+ </style>
103
+
104
+ <div class="grid-container">
105
+ """
106
+ return html_content
@@ -0,0 +1,147 @@
1
+ import base64
2
+ from PIL import Image
3
+ from io import BytesIO
4
+ import os
5
+
6
+ from vectordb_bench.frontend.components.welcome.pagestyle import pagestyle
7
+
8
+
9
+ def get_image_as_base64(image_path):
10
+ try:
11
+ if image_path.startswith("http"):
12
+ return image_path
13
+
14
+ path = os.path.expanduser(image_path)
15
+ img = Image.open(path)
16
+ buffered = BytesIO()
17
+ img.save(buffered, format="PNG")
18
+ return f"data:image/png;base64,{base64.b64encode(buffered.getvalue()).decode()}"
19
+ except Exception as e:
20
+ return None
21
+
22
+
23
+ def welcomePrams(st):
24
+ st.title("Welcome to VectorDB Benchmark!")
25
+ options = [
26
+ {
27
+ "title": "Standard Test Results",
28
+ "description": (
29
+ "<span style='font-size: 17px;'>"
30
+ "Select a specific run or compare all results side by side to view the results of previous tests."
31
+ "</span>"
32
+ ),
33
+ "image": "fig/homepage/bar-chart.png",
34
+ "link": "results",
35
+ },
36
+ {
37
+ "title": "Quries Per Dollar",
38
+ "description": (
39
+ "<span style='font-size: 17px;'>"
40
+ "To view the results of quries per dollar.<br> "
41
+ "(similar to qps in Results) "
42
+ "</span>"
43
+ ),
44
+ "image": "fig/homepage/qp$.png",
45
+ "link": "quries_per_dollar",
46
+ },
47
+ {
48
+ "title": "Tables",
49
+ "description": (
50
+ "<span style='font-size: 17px;'>" "To view the results of differnt datasets in tables." "</span>"
51
+ ),
52
+ "image": "fig/homepage/table.png",
53
+ "link": "tables",
54
+ },
55
+ {
56
+ "title": "Concurrent Performance",
57
+ "description": (
58
+ "<span style='font-size: 17px;'>"
59
+ "To view the variation of qps with latency under different concurrent."
60
+ "</span>"
61
+ ),
62
+ "image": "fig/homepage/concurrent.png",
63
+ "link": "concurrent",
64
+ },
65
+ {
66
+ "title": "Label Filter Performance",
67
+ "description": (
68
+ "<span style='font-size: 17px;'>"
69
+ "To view the perfomance of datasets under different filter ratios "
70
+ "</span>"
71
+ ),
72
+ "image": "fig/homepage/label_filter.png",
73
+ "link": "label_filter",
74
+ },
75
+ {
76
+ "title": "Streaming Performance",
77
+ "description": (
78
+ "<span style='font-size: 17px;'>"
79
+ "To view the perfomance of datasets under different search stages and insertion rates. "
80
+ "</span>"
81
+ ),
82
+ "image": "fig/homepage/streaming.png",
83
+ "link": "streaming",
84
+ },
85
+ {
86
+ "title": "Run Test",
87
+ "description": (
88
+ "<span style='font-size: 17px;'>"
89
+ "Select the databases and cases to test.<br>"
90
+ "The test results will be displayed in Results."
91
+ "</span>"
92
+ ),
93
+ "image": "fig/homepage/run_test.png",
94
+ "link": "run_test",
95
+ },
96
+ {
97
+ "title": "Custom Dataset",
98
+ "description": (
99
+ "<span style='font-size: 17px;'>"
100
+ "Define users' own datasets with detailed descriptions of setting each parameter."
101
+ "</span>"
102
+ ),
103
+ "image": "fig/homepage/custom.png",
104
+ "link": "custom",
105
+ },
106
+ ]
107
+
108
+ html_content = pagestyle()
109
+
110
+ for option in options:
111
+ option["image"] = get_image_as_base64(option["image"])
112
+
113
+ for i, option in enumerate(options[:6]):
114
+ html_content += f"""
115
+ <a href="/{option['link']}" target="_self" style="text-decoration: none;">
116
+ <div class="section-card">
117
+ <img src="{option['image']}" class="section-image" alt="{option['title']}">
118
+ <div class="section-title">{option['title']}</div>
119
+ <div class="section-description">{option['description']}</div>
120
+ </div>
121
+ </a>
122
+ """
123
+
124
+ html_content += """
125
+ </div>
126
+ <div class="title-row">
127
+ <h2>Run Your Own Test</h2>
128
+ </div>
129
+ <div class="last-row">
130
+ """
131
+
132
+ for option in options[6:8]:
133
+ html_content += f"""
134
+ <a href="/{option['link']}" target="_self" style="text-decoration: none;">
135
+ <div class="section-card">
136
+ <img src="{option['image']}" class="section-image" alt="{option['title']}">
137
+ <div class="section-title">{option['title']}</div>
138
+ <div class="section-description">{option['description']}</div>
139
+ </div>
140
+ </a>
141
+ """
142
+
143
+ html_content += """
144
+ </div>
145
+ """
146
+
147
+ st.html(html_content)