Skip to content

Commit

Permalink
Fixed link to build docs and corrected ivf_flat_example (#255)
Browse files Browse the repository at this point in the history
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: #255
  • Loading branch information
mmccarty authored Jul 30, 2024
1 parent 1e62df3 commit 6b3c06f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions notebooks/ivf_flat_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -302,7 +302,7 @@
" index,\n",
" cp.asarray(queries),\n",
" k=10,\n",
" handle=handle,\n",
" resources=handle,\n",
" )\n",
" handle.sync()\n",
" \n",
Expand Down Expand Up @@ -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)"
]
},
{
Expand All @@ -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)"
Expand Down Expand Up @@ -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)"
]
},
{
Expand All @@ -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",
Expand Down

0 comments on commit 6b3c06f

Please sign in to comment.