Skip to content

Commit 04e16c3

Browse files
authored
Add: CLI support for --dataset-with-size-type and --filter-rate in NewIntFilterPerformanceCase (#593)
Signed-off-by: pitiless0514 <[email protected]>
1 parent bec56a1 commit 04e16c3

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

vectordb_bench/cli/cli.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ def get_custom_case_config(parameters: dict) -> dict:
183183
"with_gt": parameters["custom_dataset_with_gt"],
184184
},
185185
}
186+
elif parameters["case_type"] == "NewIntFilterPerformanceCase" :
187+
custom_case_config = {
188+
"dataset_with_size_type" : parameters["dataset_with_size_type"],
189+
"filter_rate": parameters["filter_rate"],
190+
}
186191
return custom_case_config
187192

188193

@@ -416,7 +421,24 @@ class CommonTypedDict(TypedDict):
416421
),
417422
]
418423
task_label: Annotated[str, click.option("--task-label", help="Task label")]
419-
424+
dataset_with_size_type: Annotated[
425+
str,
426+
click.option(
427+
"--dataset-with-size-type",
428+
help="Dataset with size type for NewIntFilterPerformanceCase, you can use Medium Cohere (768dim, 1M)|Large Cohere (768dim, 10M)|Medium Bioasq (1024dim, 1M)|Large Bioasq (1024dim, 10M)|Large OpenAI (1536dim, 5M)|Medium OpenAI (1536dim, 500K)",
429+
default="Medium Cohere (768dim, 1M)",
430+
show_default=True,
431+
)
432+
]
433+
filter_rate: Annotated[
434+
float,
435+
click.option(
436+
"--filter-rate",
437+
help="Filter rate for NewIntFilterPerformanceCase",
438+
default=0.01,
439+
show_default=True,
440+
)
441+
]
420442

421443
class HNSWBaseTypedDict(TypedDict):
422444
m: Annotated[int | None, click.option("--m", type=int, help="hnsw m")]

vectordb_bench/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class CaseConfigParamType(Enum):
127127
use_routing = "use_routing"
128128

129129
dataset_with_size_type = "dataset_with_size_type"
130+
filter_rate = "filter_rate"
130131
insert_rate = "insert_rate"
131132
search_stages = "search_stages"
132133
concurrencies = "concurrencies"

0 commit comments

Comments
 (0)