Deprecate predict_model in cuml.ensemble/cuml.dask.ensemble#7155
Merged
rapids-bot[bot] merged 5 commits intorapidsai:branch-25.10from Aug 29, 2025
Merged
Deprecate predict_model in cuml.ensemble/cuml.dask.ensemble#7155rapids-bot[bot] merged 5 commits intorapidsai:branch-25.10from
predict_model in cuml.ensemble/cuml.dask.ensemble#7155rapids-bot[bot] merged 5 commits intorapidsai:branch-25.10from
Conversation
csadorf
approved these changes
Aug 29, 2025
Contributor
csadorf
left a comment
There was a problem hiding this comment.
LGTM, but please address my comments and suggestions.
Member
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
predictmethods of our ensemble estimators (cuml.ensemble.RandomForestClassifier,cuml.ensemble.RandomForestRegressor, and the dask equivalents) include an oldpredict_modelkwarg. This kwarg may be one of("GPU", "CPU"), with"GPU"as the default.On single node:
predict_model="GPU": used FIL on GPU to do inferencepredict_model="CPU": used the internal decision tree representation used for fitting (so tied to the GPU), but does the predict on CPU. This is less performant and still doesn't let users do inference without a GPU.On multi node (dask):
predict_model="GPU": used FIL on GPU to do inference (broadcasting the complete model to every worker node)predict_model="CPU": used the internal decision tree repr from fitting, but with some very inefficient post processing (looping over the full length of the data! building up a python list of responses!). Usingbroadcast_data=Trueseems to better match the intent here (more efficient with small datasets), and is available with the default FIL codepath.This PR:
predict_modeleverywhere. The FIL codepath is always taken. A warning is raised ifpredict_modelis explicitly set, but the old codepaths no longer exist.No existing code should be broken by this (at most users will see a warning telling them the kwargs are going away), and all use cases should still be supported without the
predict_modelkwarg.This PR is part of cleaning up the memory management and internals of our
cuml.ensembleestimators.