From 194942dcf5e78874eef974b8639220122ae867f2 Mon Sep 17 00:00:00 2001 From: Mike McCarty Date: Tue, 30 Jul 2024 18:45:01 -0400 Subject: [PATCH] Fixed link to build docs and corrected ivf_flat_example (#255) Fixed link to build docs and corrected ivf_flat_example notebook for handles to resources kwarg change. Authors: - Mike McCarty (https://github.com/mmccarty) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/cuvs/pull/255 --- README.md | 2 +- notebooks/ivf_flat_example.ipynb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23856060d..543ce941c 100755 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ If installing a version that has not yet been released, the `rapidsai` channel c mamba install -c conda-forge -c nvidia -c rapidsai-nightly cuvs=24.10 ``` -Please see the [Build and Install Guide](docs/source/build.md) for more information on installing cuVS and building from source. +Please see the [Build and Install Guide](https://docs.rapids.ai/api/cuvs/stable/build/) for more information on installing cuVS and building from source. ## Getting Started diff --git a/notebooks/ivf_flat_example.ipynb b/notebooks/ivf_flat_example.ipynb index 38bacb8a7..2d9c5fb58 100644 --- a/notebooks/ivf_flat_example.ipynb +++ b/notebooks/ivf_flat_example.ipynb @@ -216,7 +216,7 @@ "search_params = ivf_flat.SearchParams(n_probes=30)\n", "\n", "# Search 10 nearest neighbors.\n", - "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, handle=handle)\n", + "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, resources=handle)\n", " \n", "# cuVS calls are asynchronous (when handle arg is provided), we need to sync before accessing the results.\n", "handle.sync()\n", @@ -302,7 +302,7 @@ " index,\n", " cp.asarray(queries),\n", " k=10,\n", - " handle=handle,\n", + " resources=handle,\n", " )\n", " handle.sync()\n", " \n", @@ -382,7 +382,7 @@ " add_data_on_build=True\n", " )\n", "\n", - "index = ivf_flat.build(build_params, dataset, handle=handle)" + "index = ivf_flat.build(build_params, dataset, resources=handle)" ] }, { @@ -406,7 +406,7 @@ "search_params = ivf_flat.SearchParams(n_probes=10)\n", "\n", "# Search 10 nearest neighbors.\n", - "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, handle=handle)\n", + "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, resources=handle)\n", " \n", "handle.sync()\n", "distances, neighbors = cp.asnumpy(distances), cp.asnumpy(indices)" @@ -445,7 +445,7 @@ " kmeans_trainset_fraction=0.1, \n", " kmeans_n_iters=20 \n", " ) \n", - "index = ivf_flat.build(build_params, dataset, handle=handle)" + "index = ivf_flat.build(build_params, dataset, resources=handle)" ] }, { @@ -465,7 +465,7 @@ "source": [ "search_params = ivf_flat.SearchParams(n_probes=10)\n", "\n", - "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, handle=handle)\n", + "distances, indices = ivf_flat.search(search_params, index, cp.asarray(queries[:n_queries,:]), k=10, resources=handle)\n", " \n", "handle.sync()\n", "distances, neighbors = cp.asnumpy(distances), cp.asnumpy(indices)\n",