Skip to content

Commit 8aae706

Browse files
authored
Small fixes to docs and pairwise distances (#570)
Authors: - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Ben Frederickson (https://github.com/benfred) URL: #570
1 parent c49ba7b commit 8aae706

3 files changed

Lines changed: 19 additions & 17 deletions

File tree

docs/source/cuvs_bench/index.rst

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This tool offers several benefits, including
2424

2525
* `Docker`_
2626

27-
- `How to run the benchmarks`_
27+
- `How benchmarks are run`_
2828

2929
* `Step 1: Prepare the dataset`_
3030

@@ -93,32 +93,36 @@ We provide images for GPU enabled systems, as well as systems without a GPU. The
9393
- `cuvs-bench-datasets`: Contains the GPU and CPU benchmarks with million-scale datasets already included in the container. Best suited for users that want to run multiple million scale datasets already included in the image.
9494
- `cuvs-bench-cpu`: Contains only CPU benchmarks with minimal size. Best suited for users that want the smallest containers to reproduce benchmarks on systems without a GPU.
9595

96-
Nightly images are located in `dockerhub <https://hub.docker.com/r/rapidsai/cuvs-bench/tags>`_, meanwhile release (stable) versions are located in `NGC <https://hub.docker.com/r/rapidsai/cuvs-bench>`_, starting with release 24.10.
96+
Nightly images are located in `dockerhub <https://hub.docker.com/r/rapidsai/cuvs-bench/tags>`_.
9797

98-
The following command pulls the nightly container for Python version 3.10, CUDA version 12.0, and cuVS version 24.10:
98+
The following command pulls the nightly container for Python version 3.10, CUDA version 12.5, and cuVS version 24.12:
9999

100100
.. code-block:: bash
101101
102-
docker pull rapidsai/cuvs-bench:24.10a-cuda12.0-py3.10 #substitute cuvs-bench for the exact desired container.
102+
docker pull rapidsai/cuvs-bench:24.12a-cuda12.5-py3.10 #substitute cuvs-bench for the exact desired container.
103103
104104
The CUDA and python versions can be changed for the supported values:
105-
- Supported CUDA versions: 11.4 and 12.x
106-
- Supported Python versions: 3.9 and 3.10.
105+
- Supported CUDA versions: 11.8 and 12.5
106+
- Supported Python versions: 3.10 and 3.11.
107107

108108
You can see the exact versions as well in the dockerhub site:
109109
- `cuVS bench images <https://hub.docker.com/r/rapidsai/cuvs-bench/tags>`_
110-
- `cuVS bench with datasets preloaded images <https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags>`_
110+
- `cuVS bench with pre-loaded million-scale datasets images <https://hub.docker.com/r/rapidsai/cuvs-bench-cpu/tags>`_
111111
- `cuVS bench CPU only images <https://hub.docker.com/r/rapidsai/cuvs-bench-datasets/tags>`_
112112

113113
**Note:** GPU containers use the CUDA toolkit from inside the container, the only requirement is a driver installed on the host machine that supports that version. So, for example, CUDA 11.8 containers can run in systems with a CUDA 12.x capable driver. Please also note that the Nvidia-Docker runtime from the `Nvidia Container Toolkit <https://github.com/NVIDIA/nvidia-docker>`_ is required to use GPUs inside docker containers.
114114

115-
How to run the benchmarks
116-
=========================
115+
How benchmarks are run
116+
======================
117+
118+
The `cuvs-bench` package contains lightweight Python scripts to run the benchmarks. There are 4 general steps to running the benchmarks and visualizing the results.
117119

118-
We provide a collection of lightweight Python scripts to run the benchmarks. There are 4 general steps to running the benchmarks and visualizing the results.
119120
#. Prepare Dataset
121+
120122
#. Build Index and Search Index
123+
121124
#. Data Export
125+
122126
#. Plot Results
123127

124128
Step 1: Prepare the dataset

python/cuvs/cuvs/distance/distance.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ SUPPORTED_DISTANCES = ["euclidean", "l1", "cityblock", "l2", "inner_product",
5656

5757
@auto_sync_resources
5858
@auto_convert_output
59-
def pairwise_distance(X, Y, out=None, metric="euclidean", metric_arg=2.0,
59+
def pairwise_distance(X, Y, out=None, metric="euclidean", p=2.0,
6060
resources=None):
6161
"""
6262
Compute pairwise distances between X and Y
@@ -74,7 +74,7 @@ def pairwise_distance(X, Y, out=None, metric="euclidean", metric_arg=2.0,
7474
Y : CUDA array interface compliant matrix shape (n, k)
7575
out : Optional writable CUDA array interface matrix shape (m, n)
7676
metric : string denoting the metric type (default="euclidean")
77-
metric_arg : metric parameter (currently used only for "minkowski")
77+
p : metric parameter (currently used only for "minkowski")
7878
{resources_docstring}
7979
8080
Examples
@@ -139,6 +139,6 @@ def pairwise_distance(X, Y, out=None, metric="euclidean", metric_arg=2.0,
139139
y_dlpack,
140140
out_dlpack,
141141
distance_type,
142-
metric_arg))
142+
p))
143143

144144
return out

python/cuvs/cuvs/test/test_distance.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"jensenshannon",
3636
"russellrao",
3737
"cosine",
38+
"minkowski",
3839
"sqeuclidean",
3940
"inner_product",
4041
],
@@ -70,10 +71,7 @@ def test_distance(n_rows, n_cols, inplace, order, metric, dtype):
7071
output_device = device_ndarray(output) if inplace else None
7172

7273
ret_output = pairwise_distance(
73-
input1_device,
74-
input1_device,
75-
output_device,
76-
metric,
74+
input1_device, input1_device, output_device, metric, p=2.0
7775
)
7876

7977
output_device = ret_output if not inplace else output_device

0 commit comments

Comments
 (0)