Commit 8cc25c3
authored
fix(cli): Add validation for search-mode parameter (#1026)
This minor PR will add validation check for the search-mode parameter. Originally i tried to run the `cuvs_bench` as following
```
python -m cuvs_bench.run --dataset fbv6_50m --algorithms cuvs_cagra --batch-size 100 -k 10
Enter the path to dataset folder [/opt/conda/lib/python3.10/site-packages/cuvs_bench/run/datasets/]: /data/benchmarks/cuvs_experiments/datasets
Enter the comma separated groups of parameters [base]: base
Enter the search mode ("latency" or "throughput") [latency]: througput
/opt/conda/lib/python3.10/site-packages/cuvs_bench/run/run.py:187: UserWarning: Could not load YAML config
```
As you can see, I had the typo in this line `Enter the search mode ("latency" or "throughput") [latency]: througput` missing `h` and it defaulted to `latency`. This PR would print error if there's anything else specified other than `latency` or `throughput`.
Authors:
- https://github.com/mayani-nv
- Divye Gala (https://github.com/divyegala)
- Corey J. Nolet (https://github.com/cjnolet)
Approvers:
- Divye Gala (https://github.com/divyegala)
- Tarang Jain (https://github.com/tarang-jain)
URL: #10261 parent 730524d commit 8cc25c3
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
0 commit comments