Skip to content

Commit c943513

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cloud-payload-search-case
# Conflicts: # vectordb_bench/backend/clients/milvus/milvus.py # vectordb_bench/backend/clients/turbopuffer/turbopuffer.py # vectordb_bench/backend/dataset.py # vectordb_bench/backend/runner/serial_runner.py
2 parents 829d7f4 + c2a6f85 commit c943513

112 files changed

Lines changed: 18879 additions & 2775 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Close Stale Issues
2+
3+
on:
4+
schedule:
5+
# Run every day at 02:00 UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
close-stale-issues:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
steps:
15+
- uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const STALE_DAYS = 30;
19+
const EXEMPT_LABEL = 'keep-open';
20+
// MEMBER = org member, OWNER = org owner
21+
const TEAM_ASSOCIATIONS = ['MEMBER', 'OWNER'];
22+
23+
const now = new Date();
24+
const staleThreshold = new Date(now.getTime() - STALE_DAYS * 24 * 60 * 60 * 1000);
25+
26+
console.log(`Looking for issues with last team reply before ${staleThreshold.toISOString()}`);
27+
28+
const issues = await github.paginate(github.rest.issues.listForRepo, {
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
state: 'open',
32+
sort: 'updated',
33+
direction: 'asc',
34+
per_page: 100,
35+
});
36+
37+
let closedCount = 0;
38+
39+
for (const issue of issues) {
40+
// Skip pull requests (GitHub API returns PRs as issues too)
41+
if (issue.pull_request) continue;
42+
43+
// Skip issues with the exempt label
44+
if (issue.labels.some(l => l.name === EXEMPT_LABEL)) {
45+
console.log(`Skipping #${issue.number} (has '${EXEMPT_LABEL}' label)`);
46+
continue;
47+
}
48+
49+
// Get all comments for this issue
50+
const comments = await github.paginate(github.rest.issues.listComments, {
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
issue_number: issue.number,
54+
per_page: 100,
55+
});
56+
57+
// Skip issues with no comments
58+
if (comments.length === 0) continue;
59+
60+
const lastComment = comments[comments.length - 1];
61+
const lastCommentDate = new Date(lastComment.created_at);
62+
const isFromTeam = TEAM_ASSOCIATIONS.includes(lastComment.author_association);
63+
const isStale = lastCommentDate < staleThreshold;
64+
65+
if (isFromTeam && isStale) {
66+
console.log(`Closing #${issue.number}: last team reply on ${lastCommentDate.toISOString()} by @${lastComment.user.login}`);
67+
68+
await github.rest.issues.createComment({
69+
owner: context.repo.owner,
70+
repo: context.repo.repo,
71+
issue_number: issue.number,
72+
body: [
73+
'This issue has been automatically closed because it has not received a response for over 30 days since the last reply from a team member.',
74+
'',
75+
'If this issue is still relevant, feel free to reopen it or create a new issue.',
76+
'You can also add the `keep-open` label to prevent automatic closure.',
77+
].join('\n'),
78+
});
79+
80+
await github.rest.issues.update({
81+
owner: context.repo.owner,
82+
repo: context.repo.repo,
83+
issue_number: issue.number,
84+
state: 'closed',
85+
state_reason: 'not_planned',
86+
});
87+
88+
closedCount++;
89+
}
90+
}
91+
92+
console.log(`Done. Closed ${closedCount} stale issue(s).`);
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Keep Open Command
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
keep-open:
9+
if: >-
10+
!github.event.issue.pull_request
11+
&& contains(github.event.comment.body, '/keep-open')
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
steps:
16+
- uses: actions/github-script@v7
17+
with:
18+
script: |
19+
const TEAM_ASSOCIATIONS = ['MEMBER', 'OWNER'];
20+
const association = context.payload.comment.author_association;
21+
22+
if (!TEAM_ASSOCIATIONS.includes(association)) {
23+
console.log(`Ignoring /keep-open from non-team user (association: ${association})`);
24+
return;
25+
}
26+
27+
const owner = context.repo.owner;
28+
const repo = context.repo.repo;
29+
const issue_number = context.issue.number;
30+
31+
await github.rest.issues.addLabels({
32+
owner,
33+
repo,
34+
issue_number,
35+
labels: ['keep-open'],
36+
});
37+
38+
console.log(`Added 'keep-open' label to #${issue_number}`);

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ build/
1010
venv/
1111
.venv/
1212
.idea/
13-
results/
1413
logs/
1514

15+
# Worktrees
16+
.worktrees/
17+
1618
# AI rules
1719
CLAUDE.md
1820
AGENTS.md

README.md

Lines changed: 131 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ python >= 3.11
2727
pip install vectordb-bench
2828
```
2929

30-
**Install all database clients**
31-
32-
``` shell
33-
pip install 'vectordb-bench[all]'
34-
```
3530
**Install the specific database client**
3631

3732
```shell
@@ -42,12 +37,11 @@ All the database client supported
4237
| Optional database client | install command |
4338
|--------------------------|---------------------------------------------|
4439
| pymilvus, zilliz_cloud (*default*) | `pip install vectordb-bench` |
45-
| all (*clients requirements might be conflict with each other*) | `pip install vectordb-bench[all]` |
4640
| qdrant | `pip install vectordb-bench[qdrant]` |
4741
| pinecone | `pip install vectordb-bench[pinecone]` |
4842
| weaviate | `pip install vectordb-bench[weaviate]` |
4943
| elastic, aliyun_elasticsearch| `pip install vectordb-bench[elastic]` |
50-
| pgvector, pgvectorscale, pgdiskann, alloydb | `pip install vectordb-bench[pgvector]` |
44+
| pgvector, pgvectorscale, pgdiskann, alloydb, vectorchord | `pip install vectordb-bench[pgvector]` |
5145
| pgvecto.rs | `pip install vectordb-bench[pgvecto_rs]` |
5246
| redis | `pip install vectordb-bench[redis]` |
5347
| memorydb | `pip install vectordb-bench[memorydb]` |
@@ -62,9 +56,11 @@ All the database client supported
6256
| hologres | `pip install vectordb-bench[hologres]` |
6357
| tencent_es | `pip install vectordb-bench[tencent_es]` |
6458
| alisql | `pip install 'vectordb-bench[alisql]'` |
59+
| polardb | `pip install vectordb-bench[polardb]` |
6560
| doris | `pip install vectordb-bench[doris]` |
6661
| zvec | `pip install vectordb-bench[zvec]` |
6762
| endee | `pip install vectordb-bench[endee]` |
63+
| lindorm | `pip install vectordb-bench[lindorm]` |
6864

6965
### Run
7066

@@ -90,6 +86,7 @@ Options:
9086
Commands:
9187
pgvectorhnsw
9288
pgvectorivfflat
89+
vectorchordrq
9390
test
9491
weaviate
9592
```
@@ -150,6 +147,15 @@ Options:
150147
quantization type for vectors (in table). If
151148
equal to bit, the parameter
152149
quantization_type will be set to bit too.
150+
--reranking / --skip-reranking Enable reranking for HNSW search for binary
151+
quantization
152+
--reranking-metric [L2|COSINE|IP|DP]
153+
Distance metric for reranking [default:
154+
COSINE]
155+
--quantized-fetch-limit INTEGER
156+
Limit of fetching quantized vector ranked by
157+
distance for reranking --
158+
bound by ef_search
153159
--custom-case-name TEXT Custom case name i.e. PerformanceCase1536D50K
154160
--custom-case-description TEXT Custom name description
155161
--custom-case-load-timeout INTEGER
@@ -174,6 +180,34 @@ Options:
174180
--help Show this message and exit.
175181
```
176182

183+
### Run VectorChord (vchordrq) from command line
184+
185+
VectorChord is a PostgreSQL extension for scalable vector similarity search using IVF + RaBitQ indexing.
186+
It is fully compatible with pgvector data types and provides faster queries and index builds.
187+
188+
```shell
189+
vectordbbench vectorchordrq \
190+
--user-name postgres --password '<password>' \
191+
--host localhost --port 5432 --db-name vectordb \
192+
--case-type Performance1536D50K \
193+
--lists 1000 --probes 10 --epsilon 1.9 \
194+
--spherical-centroids --build-threads 8 \
195+
--max-parallel-workers 15
196+
```
197+
198+
Key VectorChord-specific options:
199+
| Option | Description |
200+
|--------|-------------|
201+
| `--lists` | Number of IVF lists for vchordrq index |
202+
| `--probes` | Number of probes during search (default: 10) |
203+
| `--epsilon` | Reranking precision factor, 0.0-4.0 (default: 1.9) |
204+
| `--residual-quantization` | Enable residual quantization |
205+
| `--spherical-centroids` | L2-normalize centroids (recommended for cosine/IP) |
206+
| `--build-threads` | Number of threads for index building (1-255) |
207+
| `--degree-of-parallelism` | Degree of parallelism for index build (1-256) |
208+
| `--max-parallel-workers` | Sets max_parallel_workers & max_parallel_maintenance_workers |
209+
| `--max-scan-tuples` | Max tuples to scan before stopping (-1 for unlimited) |
210+
177211
### Run awsopensearch from command line
178212

179213
```shell
@@ -215,7 +249,6 @@ Options:
215249
216250
--ondisk Ondisk mode with binary quantization(32x compression)
217251
--oversample-factor Controls the degree of oversampling applied to minority classes in imbalanced datasets to improve model performance by balancing class distributions.(default 1.0)
218-
219252
220253
# Quantization Type
221254
--quantization-type TEXT which type of quantization to use valid values [fp32, fp16, bq]
@@ -284,13 +317,13 @@ Options:
284317
# Connection
285318
--cloud-id TEXT Elastic Cloud ID [required]
286319
--password TEXT Elastic Cloud password [required]
287-
320+
288321
# HNSW Index Parameters
289322
--m INTEGER HNSW M parameter [default: 16]
290323
--ef-construction INTEGER HNSW efConstruction parameter [default: 100]
291324
--num-candidates INTEGER Number of candidates for search [default: 100]
292325
--element-type [float|byte] Element type for vectors (float: 4 bytes, byte: 1 byte) [default: float]
293-
326+
294327
# Index Configuration
295328
--number-of-shards INTEGER Number of shards [default: 1]
296329
--number-of-replicas INTEGER Number of replicas [default: 0]
@@ -301,7 +334,7 @@ Options:
301334
--use-routing BOOLEAN Whether to use routing [default: False]
302335
--use-rescore BOOLEAN Whether to use rescore [default: False]
303336
--oversample-ratio FLOAT Oversample ratio for rescore [default: 2.0]
304-
337+
305338
# Common Options
306339
--case-type [CapacityDim128|CapacityDim960|Performance768D100M|...]
307340
Case type
@@ -472,6 +505,92 @@ Mote options:
472505
--no-index Create table without ANN index
473506
```
474507

508+
### Run Lindorm from command line
509+
510+
Lindorm supports index types: hnsw, ivfpq, or ivfbq.
511+
512+
**Example: Run hnsw index test**
513+
514+
```shell
515+
vectordbbench lindormhnsw --case-type Performance768D10M --index-name <index_name> --k 10 \
516+
--host <lindorm_host> --port <lindorm_port> --user <username> --password <password> --m 32 \
517+
--ef-construction 400 --ef-search 150
518+
```
519+
520+
**Example: Run ivfpq index test**
521+
522+
```shell
523+
vectordbbench lindormivfpq --case-type Performance768D10M \
524+
--index-name <index_name> --k 10 --host <lindorm_host> --port <lindorm_port> \
525+
--user <username> --password <password> --lists <nlist> --probes <nprobe> \
526+
--m 32 --ef-construction 500 --ef-search 200 --reorder-factor 2
527+
```
528+
529+
**Example: Run ivfbq index test**
530+
531+
```shell
532+
vectordbbench lindormivfbq --case-type Performance768D10M --index-name <index_name> \
533+
--k 10 --host <index_name> --port <lindorm_port> \
534+
--user <username> --password <password> --lists <nlist> --probes <nprobe> \
535+
--exbits 2 --m 32 --ef-construction 500 --ef-search 200 --reorder-factor 2
536+
```
537+
538+
To list the options for Lindorm, execute `vectordbbench lindormhnsw --help`, The following are some Lindorm-specific command-line options.
539+
540+
```text
541+
--host TEXT host connection string [required]
542+
--port INTEGER Db Port [required]
543+
--user TEXT Db username [required]
544+
--password TEXT Db password [required]
545+
--index-name TEXT Db index name [required]
546+
--filter-type TEXT post_filter|pre_filter|efficient_filter
547+
--number-of-regions INTEGER Vector number of regions
548+
--m INTEGER hnsw m [required]
549+
--ef-construction INTEGER hnsw ef-construction [required]
550+
--ef-search INTEGER hnsw ef-search [required]
551+
```
552+
553+
### Run PolarDB from command line
554+
555+
PolarDB supports index types: faiss_hnsw_flat, faiss_hnsw_pq, and faiss_hnsw_sq.
556+
557+
**Example: Run faiss_hnsw_flat benchmark**
558+
559+
```shell
560+
vectordbbench polardbhnswflat \
561+
--case-type Performance768D1M \
562+
--username <db_user> \
563+
--password '<db_password>' \
564+
--host <db_host> \
565+
--port 3306 \
566+
--m 16 \
567+
--ef-construction 256 \
568+
--ef-search 256 \
569+
--insert-workers 64 \
570+
--num-concurrency '10,20,40,60,80' \
571+
--concurrency-duration 60 \
572+
--task-label <task_label> \
573+
--db-label <db_label> \
574+
--skip-search-serial \
575+
--post-load-index
576+
```
577+
578+
To list the options for PolarDB, execute `vectordbbench polardbhnswflat --help`. The following are some PolarDB-specific command-line options.
579+
580+
```text
581+
--username TEXT Username [required]
582+
--password TEXT Password
583+
--host TEXT Db host [default: 127.0.0.1]
584+
--port INTEGER Db Port [default: 3306]
585+
--database TEXT Database name [default: vectordbbench]
586+
--m INTEGER M parameter (max_degree) in HNSW
587+
--ef-construction INTEGER ef_construction parameter in HNSW
588+
--ef-search INTEGER polar_vector_index_hnsw_ef_search session variable
589+
--insert-workers INTEGER Number of concurrent threads for data insertion
590+
--post-load-index / --inline-index
591+
Create index after load or inline at table creation
592+
```
593+
475594
#### Using a configuration file.
476595

477596
The vectordbbench command can optionally read some or all the options from a yaml formatted configuration file.
@@ -666,7 +785,7 @@ Now we can only run one task at the same time.
666785
### Code Structure
667786
![image](https://github.com/zilliztech/VectorDBBench/assets/105927039/8c06512e-5419-4381-b084-9c93aed59639)
668787
### Client
669-
Our client module is designed with flexibility and extensibility in mind, aiming to integrate APIs from different systems seamlessly. As of now, it supports Milvus, Zilliz Cloud, Elastic Search, Pinecone, Qdrant Cloud, Weaviate Cloud, PgVector, Redis, Chroma, CockroachDB, etc. Stay tuned for more options, as we are consistently working on extending our reach to other systems.
788+
Our client module is designed with flexibility and extensibility in mind, aiming to integrate APIs from different systems seamlessly. As of now, it supports Milvus, Zilliz Cloud, Elastic Search, Pinecone, Qdrant Cloud, Weaviate Cloud, PgVector, VectorChord, Redis, Chroma, CockroachDB, etc. Stay tuned for more options, as we are consistently working on extending our reach to other systems.
670789
### Benchmark Cases
671790
We've developed lots of comprehensive benchmark cases to test vector databases' various capabilities, each designed to give you a different piece of the puzzle. These cases are categorized into four main types:
672791
#### Capacity Case

0 commit comments

Comments
 (0)