From 8f15cc1644a6927be5f549f9b6baa9752cc8a175 Mon Sep 17 00:00:00 2001 From: Micka Date: Sun, 5 Feb 2023 15:31:43 +0100 Subject: [PATCH] Add `_predict_model_on_cpu` for `RandomForestClassifier` (#5148) Closes #5008 Authors: - Micka (https://github.com/lowener) - Dante Gama Dessavre (https://github.com/dantegd) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: https://github.com/rapidsai/cuml/pull/5148 --- python/cuml/dask/ensemble/randomforestclassifier.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/cuml/dask/ensemble/randomforestclassifier.py b/python/cuml/dask/ensemble/randomforestclassifier.py index c1d3c8ab4e..50c6994167 100755 --- a/python/cuml/dask/ensemble/randomforestclassifier.py +++ b/python/cuml/dask/ensemble/randomforestclassifier.py @@ -188,6 +188,10 @@ def _construct_rf( **kwargs ) + @staticmethod + def _predict_model_on_cpu(model, X, convert_dtype): + return model._predict_model_on_cpu(X, convert_dtype=convert_dtype) + def get_summary_text(self): """ Obtain the text summary of the random forest model