Skip to content

[Doc] Add tutorial#48

Merged
rapids-bot[bot] merged 10 commits intorapidsai:mainfrom
hcho3:add_tutorial
Feb 27, 2026
Merged

[Doc] Add tutorial#48
rapids-bot[bot] merged 10 commits intorapidsai:mainfrom
hcho3:add_tutorial

Conversation

@hcho3
Copy link
Copy Markdown
Contributor

@hcho3 hcho3 commented Feb 24, 2026

  • Migrate BUILD.md to Sphinx.
  • Provide a basic tutorial for Python and C++ API.
  • Rename: cuforest -> nvforest

@hcho3 hcho3 requested review from a team as code owners February 24, 2026 07:56
@hcho3 hcho3 requested a review from jameslamb February 24, 2026 07:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 24, 2026

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
📝 Walkthrough

Walkthrough

The changes consolidate and reorganize nvForest documentation by moving detailed build instructions from BUILD.md to a new comprehensive docs/source/build.rst file, adding new getting-started guides with Python and C++ usage examples, restructuring the documentation index with updated toctree entries, removing the supported versions documentation, and updating build system paths for Doxygen configuration.

Changes

Cohort / File(s) Summary
Documentation Consolidation
BUILD.md, docs/source/build.rst
Removed detailed build and environment setup instructions from BUILD.md (214 lines) and delegated to new comprehensive build.rst documentation covering hardware/software dependencies, GPU/CPU build modes, conda setup, CMake workflow, custom build options, and ccache usage.
Documentation Restructuring
docs/source/index.rst, docs/source/supported_versions.rst
Updated documentation title from cuForest to nvForest, restructured toctree entries to include new Getting started and build sections, and removed entire supported_versions.rst file (10 lines deleted).
New Documentation
docs/source/getting_started.rst
Added comprehensive getting-started guide with Python examples (XGBoost, LightGBM, scikit-learn model loading), multi-GPU device handling, inference methods, and C++/Treelite integration workflow with code examples.
Documentation Formatting Updates
docs/source/cpp_api.rst, docs/source/python_api.rst
Updated documentation header formatting from underlined titles to formatted heading blocks; changed "C++ API Documentation" to "C++ API" and "Python API Reference" to "Python API".
Build System Updates
cpp/CMakeLists.txt
Updated Doxygen target configuration to reference new doxygen subdirectory paths for both OUT_DOXYFILE and working directory instead of root directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@hcho3 hcho3 added doc Improvements or additions to documentation non-breaking Introduces a non-breaking change labels Feb 24, 2026
Comment thread docs/source/build.rst Outdated
@github-actions github-actions Bot added the CMake label Feb 25, 2026
Co-authored-by: James Lamb <jaylamb20@gmail.com>
@hcho3
Copy link
Copy Markdown
Contributor Author

hcho3 commented Feb 25, 2026

/merge

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Feb 27, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@hcho3
Copy link
Copy Markdown
Contributor Author

hcho3 commented Feb 27, 2026

/ok to test 596d49f

@rapids-bot rapids-bot Bot merged commit b4e8ba2 into rapidsai:main Feb 27, 2026
59 checks passed
Copy link
Copy Markdown
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Not sure how this got merged, but there are some things that need to be fixed.

Comment thread docs/source/build.rst
Comment on lines +21 to +22
It is possible to build nvForest without GPU support; in this case, the CUDA toolkit is not required.
To build nvForest without GPU, set the CMake option ``NVFOREST_ENABLE_GPU=ON``.
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.

That seems backwards.

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.

We should automatically run the code in these files in a follow-up. I know that we are note, because there are some minor syntax errors within the code right now.

Copy link
Copy Markdown
Contributor Author

@hcho3 hcho3 Feb 27, 2026

Choose a reason for hiding this comment

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

I'm sorry that I missed the syntax errors. I will pay more attention to the details in the future. Also, I will follow up by creating an automated CI pipeline to run the example code.

Comment on lines +15 to +16
fm = nvforest.load_model("/path/to/xgboost_model.ubj", device="gpu"
model_type="xgboost_ubj")
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.

missing comma

Suggested change
fm = nvforest.load_model("/path/to/xgboost_model.ubj", device="gpu"
model_type="xgboost_ubj")
fm = nvforest.load_model("/path/to/xgboost_model.ubj", device="gpu",
model_type="xgboost_ubj")

The model will reside in the GPU memory.
* :py:class:`~nvforest.CPUForestInferenceClassifier`: a classification model, to run on CPU.
The model object will reside in the main memory.
* :py:class:`~nvforest.CPUForestInferenceRegressor`: a classification model, to run on CPU.
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.

Suggested change
* :py:class:`~nvforest.CPUForestInferenceRegressor`: a classification model, to run on CPU.
* :py:class:`~nvforest.CPUForestInferenceRegressor`: a regression model, to run on CPU.

Comment on lines +92 to +94
std::unique_ptr<treelite::Model> treelite_model
= treelite::model_loader::LoadXGBoostModelUBJSON(
"/path/to/xgboost_model.ubj", "{}")
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.

missing semicolon

Suggested change
std::unique_ptr<treelite::Model> treelite_model
= treelite::model_loader::LoadXGBoostModelUBJSON(
"/path/to/xgboost_model.ubj", "{}")
std::unique_ptr<treelite::Model> treelite_model
= treelite::model_loader::LoadXGBoostModelUBJSON(
"/path/to/xgboost_model.ubj", "{}");

Comment thread docs/source/build.rst
- [ON, OFF]
- ON
- Use detection of conda environment for dependencies. If set to ON, and no value for CMAKE_INSTALL_PREFIX is passed, then it will assign it to $CONDA_PREFIX (to install in the active environment).
* - DIABLE_DEPRECATION_WARNINGS
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.

typo

Suggested change
* - DIABLE_DEPRECATION_WARNINGS
* - DISABLE_DEPRECATION_WARNINGS

@csadorf
Copy link
Copy Markdown
Contributor

csadorf commented Feb 27, 2026

Not sure how this got merged, but there are some things that need to be fixed.

Might be related to the codeowner team names.

@hcho3 hcho3 deleted the add_tutorial branch February 27, 2026 21:54
rapids-bot Bot pushed a commit that referenced this pull request Mar 5, 2026
* Address comments from #48
* Set up doctest

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - Simon Adorf (https://github.com/csadorf)
  - James Lamb (https://github.com/jameslamb)

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

Labels

CMake CUDA/C++ doc Improvements or additions to documentation non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants