Skip to content

Commit 49ce810

Browse files
authored
Update cuvs-bench docs to show both CLI and Python API usage (#2084)
Authors: - Joseph Nke (https://github.com/jnke2016) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #2084
1 parent 776795b commit 49ce810

2 files changed

Lines changed: 203 additions & 196 deletions

File tree

docs/source/cuvs_bench/index.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@ The steps below demonstrate how to download, install, and run benchmarks on a su
122122
# (4) Plot results.
123123
python -m cuvs_bench.plot --dataset deep-image-96-inner
124124
125+
Alternatively, step (2) can be done programmatically using the Python API for more control (e.g., custom workflows, result inspection between runs, or notebook-based exploration):
126+
127+
.. code-block:: python
128+
129+
from cuvs_bench.orchestrator import BenchmarkOrchestrator
130+
131+
orchestrator = BenchmarkOrchestrator(backend_type="cpp_gbench")
132+
results = orchestrator.run_benchmark(
133+
dataset="deep-image-96-inner",
134+
algorithms="cuvs_cagra",
135+
count=10,
136+
batch_size=10,
137+
build=True,
138+
search=True,
139+
)
140+
125141
.. list-table::
126142

127143
* - Dataset name
@@ -207,6 +223,22 @@ The steps below demonstrate how to download, install, and run benchmarks on a su
207223
# (4) Plot results.
208224
python -m cuvs_bench.plot --dataset deep-1B
209225
226+
Alternatively, step (2) can be done programmatically using the Python API:
227+
228+
.. code-block:: python
229+
230+
from cuvs_bench.orchestrator import BenchmarkOrchestrator
231+
232+
orchestrator = BenchmarkOrchestrator(backend_type="cpp_gbench")
233+
results = orchestrator.run_benchmark(
234+
dataset="deep-1B",
235+
algorithms="cuvs_cagra",
236+
count=10,
237+
batch_size=10,
238+
build=True,
239+
search=True,
240+
)
241+
210242
The usage of `python -m cuvs_bench.split_groundtruth` is:
211243

212244
.. code-block:: bash

0 commit comments

Comments
 (0)