Skip to content

Commit 620ebf6

Browse files
committed
make collection name configurable
1 parent f1c7ad3 commit 620ebf6

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

vectordb_bench/backend/clients/zilliz_cloud/cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ class ZillizTypedDict(CommonTypedDict):
4747
show_default=True,
4848
),
4949
]
50+
collection_name: Annotated[
51+
str,
52+
click.option(
53+
"--collection-name",
54+
type=str,
55+
help="Collection name for Zilliz",
56+
required=False,
57+
default="ZillizCloudVDBBench",
58+
show_default=True,
59+
),
60+
]
5061

5162

5263
@cli.command()
@@ -62,6 +73,7 @@ def ZillizAutoIndex(**parameters: Unpack[ZillizTypedDict]):
6273
user=parameters["user_name"],
6374
password=SecretStr(parameters["password"]),
6475
num_shards=parameters["num_shards"],
76+
collection_name=parameters["collection_name"],
6577
),
6678
db_case_config=AutoIndexConfig(
6779
level=int(parameters["level"]) if parameters["level"] else 1,

vectordb_bench/backend/clients/zilliz_cloud/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ class ZillizCloudConfig(DBConfig):
99
user: str
1010
password: SecretStr
1111
num_shards: int = 1
12+
collection_name: str = "ZillizCloudVDBBench"
1213

1314
def to_dict(self) -> dict:
1415
return {
1516
"uri": self.uri.get_secret_value(),
1617
"user": self.user,
1718
"password": self.password.get_secret_value(),
1819
"num_shards": self.num_shards,
20+
"collection_name": self.collection_name,
1921
}
2022

2123

0 commit comments

Comments
 (0)