Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions vectordb_bench/backend/clients/milvus/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,36 @@ def MilvusGPUBruteForce(**parameters: Unpack[MilvusGPUBruteForceTypedDict]):
**parameters,
)

class MilvusGPUBruteForceTypedDict(CommonTypedDict, MilvusTypedDict):
metric_type: Annotated[
str,
click.option("--metric-type", type=str, required=True, help="Metric type for brute force search"),
]
limit: Annotated[
int,
click.option("--limit", type=int, required=True, help="Top-k limit for search"),
]

@cli.command()
@click_parameter_decorators_from_typed_dict(MilvusGPUBruteForceTypedDict)
def MilvusGPUBruteForce(**parameters: Unpack[MilvusGPUBruteForceTypedDict]):
from .config import GPUBruteForceConfig, MilvusConfig

run(
db=DBTYPE,
db_config=MilvusConfig(
db_label=parameters["db_label"],
uri=SecretStr(parameters["uri"]),
user=parameters["user_name"],
password=SecretStr(parameters["password"]),
),
db_case_config=GPUBruteForceConfig(
metric_type=parameters["metric_type"],
limit=parameters["limit"], # top-k for search
),
**parameters,
)


class MilvusGPUIVFPQTypedDict(
CommonTypedDict,
Expand Down
Loading