From 315c80e852190b50f95bcb27eed2ac3a2c241210 Mon Sep 17 00:00:00 2001 From: Sarah Yurick <53962159+sarahyurick@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:41:15 -0400 Subject: [PATCH] update with rapids 21.06 (#1241) --- .../tabular/models/knn/knn_rapids_model.py | 6 +++--- .../tabular/models/lr/lr_rapids_model.py | 6 +++--- .../tabular/models/rf/rf_rapids_model.py | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tabular/src/autogluon/tabular/models/knn/knn_rapids_model.py b/tabular/src/autogluon/tabular/models/knn/knn_rapids_model.py index 64a41df7026..7a08dadd9ee 100644 --- a/tabular/src/autogluon/tabular/models/knn/knn_rapids_model.py +++ b/tabular/src/autogluon/tabular/models/knn/knn_rapids_model.py @@ -18,10 +18,10 @@ class KNNRapidsModel(KNNModel): RAPIDS KNearestNeighbors model : https://rapids.ai/start.html NOTE: This code is experimental, it is recommend to not use this unless you are a developer. - This was tested on rapids-0.18 via: + This was tested on rapids-21.06 via: - conda create -n rapids-0.18 -c rapidsai -c nvidia -c conda-forge -c defaults rapids-blazing=0.18 python=3.7 cudatoolkit=10.1 -y - conda activate rapids-0.18 + conda create -n rapids-21.06 -c rapidsai -c nvidia -c conda-forge rapids=21.06 python=3.8 cudatoolkit=11.2 + conda activate rapids-21.06 pip install --pre autogluon.tabular[all] """ def _get_model_type(self): diff --git a/tabular/src/autogluon/tabular/models/lr/lr_rapids_model.py b/tabular/src/autogluon/tabular/models/lr/lr_rapids_model.py index 478bc4afc80..186c0dddb33 100644 --- a/tabular/src/autogluon/tabular/models/lr/lr_rapids_model.py +++ b/tabular/src/autogluon/tabular/models/lr/lr_rapids_model.py @@ -17,10 +17,10 @@ class LinearRapidsModel(LinearModel): RAPIDS Linear model : https://rapids.ai/start.html NOTE: This code is experimental, it is recommend to not use this unless you are a developer. - This was tested on rapids-0.18 via: + This was tested on rapids-21.06 via: - conda create -n rapids-0.18 -c rapidsai -c nvidia -c conda-forge -c defaults rapids-blazing=0.18 python=3.7 cudatoolkit=10.1 -y - conda activate rapids-0.18 + conda create -n rapids-21.06 -c rapidsai -c nvidia -c conda-forge rapids=21.06 python=3.8 cudatoolkit=11.2 + conda activate rapids-21.06 pip install --pre autogluon.tabular[all] """ def _get_model_type(self): diff --git a/tabular/src/autogluon/tabular/models/rf/rf_rapids_model.py b/tabular/src/autogluon/tabular/models/rf/rf_rapids_model.py index d689cb58c07..b87bfeb9d96 100644 --- a/tabular/src/autogluon/tabular/models/rf/rf_rapids_model.py +++ b/tabular/src/autogluon/tabular/models/rf/rf_rapids_model.py @@ -10,17 +10,20 @@ # TODO: Improve memory safety # TODO: Respect time limit -# TODO: Significantly less accurate than RFModel with same hyperparameters. -# Refer to https://github.com/rapidsai/cuml/issues/2518 +# TODO: Depending on max_depth parameter, RFRapidsModel is slower than RFModel. +# A lower max_depth (e.g., 16) results in a RFRapidsModel that is faster than RFModel, +# but a higher max_depth (e.g., approximating unlimited depth) +# results in a RFRapidsModel that is significantly slower than RFModel. +# Refer to https://github.com/rapidsai/cuml/issues/1977 class RFRapidsModel(RFModel): """ RAPIDS Random Forest model : https://rapids.ai/start.html NOTE: This code is experimental, it is recommend to not use this unless you are a developer. - This was tested on rapids-0.18 via: + This was tested on rapids-21.06 via: - conda create -n rapids-0.18 -c rapidsai -c nvidia -c conda-forge -c defaults rapids-blazing=0.18 python=3.7 cudatoolkit=10.1 -y - conda activate rapids-0.18 + conda create -n rapids-21.06 -c rapidsai -c nvidia -c conda-forge rapids=21.06 python=3.8 cudatoolkit=11.2 + conda activate rapids-21.06 pip install --pre autogluon.tabular[all] """ def _get_model_type(self): @@ -41,9 +44,6 @@ def _set_default_params(self): self._set_default_param_value(param, val) def _fit(self, X, y, **kwargs): - logger.warning('\tWarning: Training RAPIDS RandomForest model... There is a known bug that lowers model quality compared to sklearn RandomForest. ' - 'Consider using CPU instead if model quality is not sufficient.\n' - '\t\tLink to issue: https://github.com/rapidsai/cuml/issues/2518') X = self.preprocess(X) self.model = self._get_model_type()(**self._get_model_params()) self.model = self.model.fit(X, y)