Skip to content

Commit 4432dc8

Browse files
committed
fix(cli): Add validation for search-mode parameter
1 parent 32be51a commit 4432dc8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

python/cuvs_bench/cuvs_bench/run/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024, NVIDIA CORPORATION.
2+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -112,6 +112,7 @@
112112
@click.option(
113113
"-m",
114114
"--search-mode",
115+
type=click.Choice(["latency", "throughput"], case_sensitive=False),
115116
default="latency",
116117
show_default=True,
117118
prompt='Enter the search mode ("latency" or "throughput")',
@@ -135,7 +136,7 @@
135136
"--dry-run",
136137
is_flag=True,
137138
help="Dry-run mode will convert the yaml config for the specified "
138-
"algorithms and datasets to the json format thats consumed "
139+
"algorithms and datasets to the json format that's consumed "
139140
"by the lower-level c++ binaries and then print the command to "
140141
"run execute the benchmarks but will not actually execute "
141142
"the command.",

0 commit comments

Comments
 (0)