Skip to content

Remove RAFT - #301

Open
chyunsu3 wants to merge 7 commits into
rapidsai:mainfrom
chyunsu3:remove_raft
Open

chyunsu3 wants to merge 7 commits into
rapidsai:mainfrom
chyunsu3:remove_raft

Conversation

@chyunsu3

@chyunsu3 chyunsu3 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #199
Closes #168

@copy-pr-bot

copy-pr-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@chyunsu3 chyunsu3 added breaking Introduces a breaking change improvement Improves an existing functionality labels Dec 1, 2026
@chyunsu3 chyunsu3 changed the title [WIP] Remove RAFT Remove RAFT Dec 1, 2026
@chyunsu3
chyunsu3 marked this pull request as ready for review December 1, 2026 03:16
@chyunsu3
chyunsu3 requested review from a team as code owners December 1, 2026 03:16
@chyunsu3
chyunsu3 requested a review from jameslamb December 1, 2026 03:16

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! This will simplify #302

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Breaking Changes
    • Removed support for the deprecated handle argument in model-loading and inference APIs. Pass a stream directly instead.
    • Removed the exported Handle name from the Python package.
    • Replaced the RMM_LOGGING_LEVEL build setting with LIBNVFOREST_LOGGING_LEVEL.
  • Dependency Changes
    • Removed RAFT and RMM dependencies from CUDA environments, Python packages, and build requirements.
    • GPU builds no longer link publicly to RAFT; they use CUDA runtime and CCCL libraries.

The PR removes RAFT and RMM dependency declarations and CMake integration. It removes Python’s deprecated Handle compatibility API and stream conversion module. It also updates C++ stream-pool type handling, removes a RAFT-handle inference test, and replaces the RMM logging-level cache variable.

Changes: RAFT and Handle removal

Layer / File(s) Summary
Remove RAFT and RMM dependency declarations
dependencies.yaml, conda/environments/*, conda/recipes/*, python/libnvforest/pyproject.toml, python/nvforest/pyproject.toml, python/libnvforest/libnvforest/load.py
Dependency definitions and package requirements for RAFT and RMM are removed from shared dependency lists, environment files, package recipes, and Python project configurations. The library loader no longer loads libraft or librmm.
Remove RAFT from C++ build and inference
cpp/CMakeLists.txt, cpp/cmake/modules/ConfigureCUDA.cmake, cpp/cmake/thirdparty/get_raft.cmake, cpp/include/nvforest/forest_model.hpp, cpp/tests/inference.cu
CMake no longer configures or links RAFT, and the RMM logging setting is replaced by LIBNVFOREST_LOGGING_LEVEL. The stream-pool io_type lookup uses std::remove_reference_t. The RAFT-handle inference test is removed.
Remove Python Handle compatibility API
python/nvforest/CMakeLists.txt, python/nvforest/nvforest/__init__.py, python/nvforest/nvforest/_factory.py, python/nvforest/nvforest/_forest_inference.py, python/nvforest/nvforest/_handle.py, python/nvforest/nvforest/detail/raft_stream.pyx, python/nvforest/tests/test_compat.py
The Python package removes the Handle export, handle arguments, handle-to-stream conversion, and the module that implemented that conversion. The deprecated-handle compatibility test is removed.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related PRs

  • rapidsai/nvforest#193: It removes RAFT and RMM dependencies and changes related stream and handle code paths.

Suggested reviewers: csadorf, kylefromnvidia

Merge Risk: Minimal · up to 42644

The change removes the RAFT and RMM dependencies and the deprecated handle argument. No concrete defect remains, so the change looks ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Remove RAFT" matches the main change. The changeset removes the RAFT dependency across CMake, conda environments, dependencies.yaml, Python packages, and tests. The title is short and speci…
Description check Passed The description lists two issue closures (#199 and #168). Both relate to this changeset: #168 asks for RAFT removal and #199 asks for removal of the deprecated handle argument. The description is br…
Linked Issues check Passed [#199] Deprecated handle removal is implemented. _factory.py drops handle from load_model, load_from_sklearn, and load_from_treelite_model. _forest_inference.py drops handle from the f…
Out of Scope Changes check Passed All changed files relate to removing RAFT, the RAFT-derived handle argument, or the RAFT-linked RMM dependency. Build, packaging, and dependency files drop libraft, librmm, and pylibraft. Python cod…
Full details: Title check

Explanation

The title "Remove RAFT" matches the main change. The changeset removes the RAFT dependency across CMake, conda environments, dependencies.yaml, Python packages, and tests. The title is short and specific, though it does not mention the removal of the deprecated handle argument.

Full details: Description check

Explanation

The description lists two issue closures (#199 and #168). Both relate to this changeset: #168 asks for RAFT removal and #199 asks for removal of the deprecated handle argument. The description is brief but relevant.

Full details: Linked Issues check

Explanation

[#199] Deprecated handle removal is implemented. _factory.py drops handle from load_model, load_from_sklearn, and load_from_treelite_model. _forest_inference.py drops handle from the four CPU and GPU classifier and regressor constructors. _handle.py and raft_stream.pyx are deleted, and Handle is removed from nvforest/__init__.py. The compatibility test for handle is deleted. stream remains the only stream argument. [#168] RAFT is removed from the build and packaging. get_raft.cmake is deleted, and the RAFT CMake options and public linking are removed. dependencies.yaml, conda environments, recipes, and pyproject files no longer list libraft, librmm, or pylibraft. load.py no longer loads libraft or librmm. CUDA stream handling uses cpp/include/nvforest/cuda_stream.hpp, which depends only on cuda_runtime_api.h. CCCL is added as a public link dependency. The reviewed file list and change summary show no remaining RAFT include in changed sources. The summary is AI-generated, and no full-repository search for residual raft references was possible with the available tools. The CCCL-based stream management is shown by the removal of RAFT handle usage, not by a new CCCL stream wrapper.

Full details: Out of Scope Changes check

Explanation

All changed files relate to removing RAFT, the RAFT-derived handle argument, or the RAFT-linked RMM dependency. Build, packaging, and dependency files drop libraft, librmm, and pylibraft. Python code drops handle. The GPUModelWithRAFTHandle test and the compatibility test are removed with their subject code. The forest_model.hpp change corrects a stream-pool predict type extraction and supports the stream path. The CMake change renames RMM_LOGGING_LEVEL to LIBNVFOREST_LOGGING_LEVEL. It is a minor rename that follows from dropping RMM, and it is not listed in the linked issues. The ConfigureCUDA.cmake change removes RAFT_HIDE_DEPRECATION_WARNINGS and updates the copyright. This is a direct consequence of removing RAFT. No unrelated functional change is shown.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c0f1e78 and 4264437.

Files selected for processing: 7

  • cpp/include/nvforest/forest_model.hpp
  • cpp/tests/inference.cu
  • dependencies.yaml
  • python/nvforest/nvforest/__init__.py
  • python/nvforest/nvforest/_factory.py
  • python/nvforest/nvforest/_forest_inference.py
  • python/nvforest/pyproject.toml
Files with no reviewable changes: 6

  • cpp/tests/inference.cu
  • dependencies.yaml
  • python/nvforest/nvforest/init.py
  • python/nvforest/nvforest/_factory.py
  • python/nvforest/nvforest/_forest_inference.py
  • python/nvforest/pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change CMake conda Relates to conda packaging CUDA/C++ Cython / Python improvement Improves an existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up to #168: Remove the deprecated handle argument. Remove RAFT dependency

2 participants