Skip to content

remove unused dependencies - #302

Open
jameslamb wants to merge 4 commits into
rapidsai:mainfrom
jameslamb:trim-dependencies
Open

jameslamb wants to merge 4 commits into
rapidsai:mainfrom
jameslamb:trim-dependencies

Conversation

@jameslamb

@jameslamb jameslamb commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Contributes to rapidsai/build-planning#353

Notes for Reviewers

See inline comments for details.

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Nov 30, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 30, 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.

@jameslamb

Copy link
Copy Markdown
Member Author

/ok to test f751598

Comment on lines +23 to +24
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

C++20 standard was coming through transitively from other other targets before. This PR removes them, so now it needs to be set explicitly.

Recall that other projects across RAPIDS have been using C++20 for a while, e.g. cuML has for over a year: NVIDIA/cuml#7619

"librmm==27.2.*,>=0.0.0a0",
"ninja",
"pylibraft==27.2.*,>=0.0.0a0",
"treelite==4.8.1",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

treelite wheels don't have headers or the treelite static library. They aren't actually needed at build time for nvforest wheels.

Wheel builds here get treelite via CPM instead, just like cuML does (I'm proposing a similar change in NVIDIA/cuml#8973)

Comment thread cpp/cmake/thirdparty/get_raft.cmake Outdated
GLOBAL_TARGETS raft::raft
BUILD_EXPORT_SET nvforest-exports
INSTALL_EXPORT_SET nvforest-exports COMPONENTS ${RAFT_COMPONENTS}
GLOBAL_TARGETS raft::raft COMPONENTS ${RAFT_COMPONENTS}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because raft is a PRIVATE dependency only used in nvforest's tests, it doesn't need to be in any export set.

Comment thread python/libnvforest/libnvforest/load.py Outdated
try:
# These libraries must all be loaded before libnvforest
import libraft
import librmm

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

libnvforest doesn't actually need RAFT or RMM for library code. Only for C++ tests.

$ git grep -E 'include.*(raft|rmm)'
cpp/CMakeLists.txt:  include(cmake/thirdparty/get_raft.cmake)
cpp/tests/inference.cu:#include <raft/core/handle.hpp>
cpp/tests/inference.cu:#include <rmm/cuda_stream_pool.hpp>

Comment thread dependencies.yaml
- output_types: [conda, requirements, constraints, pyproject]
packages:
- click
- *packaging

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nvforest[test] doesn't need to declare packaging. The only use in this repo is in the sphinx configuration.

$ git grep packaging *.py
docs/source/conf.py:from packaging.version import Version
python/libnvforest/libnvforest/load.py:        # before packaging the wheel), look for a system installation.

@jameslamb jameslamb changed the title WIP: remove unused dependencies remove unused dependencies Nov 30, 2026
@jameslamb
jameslamb marked this pull request as ready for review November 30, 2026 21:21
@jameslamb
jameslamb requested review from a team as code owners November 30, 2026 21:21
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Compatibility
    • CUDA environment configurations now accept Treelite 4.x versions from 4.8.1 onward, rather than requiring exactly 4.8.1.
    • The nvforest package now requires scikit-learn 1.5 or newer.
  • Build and Documentation
    • Updated Python build requirements and documentation tooling configuration. Python extension builds now require a newer C++ standard and a matching RAPIDS library.

The change updates RAFT integration in the Python CMake project, adjusts Treelite and scikit-learn constraints, and revises documentation and test dependency declarations.

Changes: Build and Dependency Configuration

Layer / File(s) Summary
Python CMake and RAFT integration
python/nvforest/CMakeLists.txt
The project now requires C++20. CMake requires the RAPIDS-matched raft package and links raft::raft to the raft_stream.pyx module.
Treelite and scikit-learn constraints
conda/environments/all_cuda-*/...yaml, conda/recipes/nvforest/recipe.yaml, dependencies.yaml, python/nvforest/pyproject.toml
CUDA environment declarations allow Treelite 4.x versions from 4.8.1 onward. The build requirements remove the exact Treelite pin, and the nvforest runtime recipe raises the scikit-learn minimum to 1.5.
Documentation and test dependencies
dependencies.yaml, docs/source/conf.py, python/nvforest/pyproject.toml
The docs dependency group declares packaging directly. Test dependency declarations remove packaging, and the Sphinx extension list removes recommonmark and sphinx_markdown_tables.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • rapidsai/nvforest#193: Removes RAFT and RMM dependencies from nvForest, which relates to this PR’s RAFT dependency configuration.
  • rapidsai/nvforest#263: Changes the Treelite pin to 4.8.1, which relates to this PR’s Treelite constraint updates.

Suggested reviewers: chyunsu3

Merge Risk: Minimal · up to 620d3

This PR removes unused dependencies and loosens the Treelite pin to the 4.x series from 4.8.1 onward. No concrete breakage was found, and the change looks safe to merge after normal CI.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "remove unused dependencies" matches the changeset. The diff removes Treelite pins and the treelite==4.8.1 build requirement, drops the packaging anchor and test alias, and removes recommonm…
Description check Passed The description links the PR to build-planning issue #353 and says reviewer notes are in inline comments. It is brief and gives no detail on the changes, but it relates to the changeset, so the lenien…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "remove unused dependencies" matches the changeset. The diff removes Treelite pins and the treelite==4.8.1 build requirement, drops the packaging anchor and test alias, and removes recommonmark and sphinx_markdown_tables from the Sphinx extensions. The title is short and specific, but it does not name which dependencies are removed.

Full details: Description check

Explanation

The description links the PR to build-planning issue #353 and says reviewer notes are in inline comments. It is brief and gives no detail on the changes, but it relates to the changeset, so the lenient check passes.

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 f751598 and 620d3c3.

Files selected for processing: 8

  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-134_arch-aarch64.yaml
  • conda/environments/all_cuda-134_arch-x86_64.yaml
  • conda/recipes/nvforest/recipe.yaml
  • dependencies.yaml
  • docs/source/conf.py
  • python/nvforest/pyproject.toml
Files with no reviewable changes: 6

  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-134_arch-aarch64.yaml
  • conda/environments/all_cuda-134_arch-x86_64.yaml
  • docs/source/conf.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.

@chyunsu3

chyunsu3 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Let's come back to this after #301

@csadorf

csadorf commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

#301 was merged so we can move forward here.

@csadorf csadorf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, pending resolution of the merge conflicts and removal of the RAFT/RMM-related changes already covered by #301.

@github-actions github-actions Bot removed the CUDA/C++ label Dec 5, 2026
@chyunsu3

chyunsu3 commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

I went ahead and resolved the merge conflicts.

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

Labels

CMake conda Relates to conda packaging Cython / Python improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants