rapidsai / raft

RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications.

Home Page:https://docs.rapids.ai/api/raft/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QST] Check rapids/raft version when installing through pip

shekhars-li opened this issue · comments

Hi,
I am installing raft using pip method. However, I am confused how raft libraries are installed and how can I check the version of it?

pip install dask-cuda==24.* --extra-index-url=https://pypi.org/simple/
pip install --extra-index-url=https://pypi.nvidia.com cudf-cu11==24.* dask-cudf-cu11==24.* pylibraft-cu11==24.* raft-dask-cu11==24.*

When using conda method, we specify the raft version, but not when using pip. I am specifically interested in installing raft 12.02 and above that added support for fp16 in this PR. However, with my installation, I see that the support is missing, even though I install latest version of all the required dependencies. What am I missing?
Thanks!

Hi @shekhars-li, thanks for filing this issue. I transferred it to the RAFT repository.

You can check the installed version of RAFT with:

import pylibraft
print(pylibraft.__version__)

The latest pip installation commands can be found at https://docs.rapids.ai/install. Click "pip" in the install selector, then you can see the RAPIDS version:

pip install \
    --extra-index-url=https://pypi.nvidia.com \
    cudf-cu12==24.4.* dask-cudf-cu12==24.4.* cuml-cu12==24.4.* \
    cugraph-cu12==24.4.* cuspatial-cu12==24.4.* cuproj-cu12==24.4.* \
    cuxfilter-cu12==24.4.* cucim-cu12==24.4.* pylibraft-cu12==24.4.* \
    raft-dask-cu12==24.4.* cuvs-cu12==24.4.*

Let us know if you need more help.

A couple of notes to add to Bradley's explanation above:

I am confused how raft libraries are installed

If by "libraries" you are referring to the C++, you cannot (currently) install the C++ raft library separately when installing with pip. Unlike conda, pip is not designed for generically installing native libraries, only Python packages. Therefore, the raft libraries are actually bundled with the raft Python packages pylibraft and raft-dask. You'll notice that the wheels for pylibraft and raft-dask are much, much larger than the corresponding conda packages for this reason.

I am specifically interested in installing raft 12.02 and above that added support for fp16 in this #2085.

I assume that you mean 24.02, not 12.02?

pip install --extra-index-url=https://pypi.nvidia.com cudf-cu11==24.* dask-cudf-cu11==24.* pylibraft-cu11==24.* raft-dask-cu11==24.*

Note that with this installation command you've only specified the YY segment. I don't know if that was intentional, but you can also specify something like ==24.02.* and be more explicit about what you want.