From aaa2f401a21ca649863f4a8b8018b7e1395c994b Mon Sep 17 00:00:00 2001 From: Samir Nasibli Date: Fri, 9 Aug 2024 14:04:56 -0700 Subject: [PATCH] DEP: deprecate fallback to sklearn after onedal in LogReg --- sklearnex/linear_model/logistic_regression.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sklearnex/linear_model/logistic_regression.py b/sklearnex/linear_model/logistic_regression.py index 107a442213..5ae76177ee 100644 --- a/sklearnex/linear_model/logistic_regression.py +++ b/sklearnex/linear_model/logistic_regression.py @@ -290,17 +290,8 @@ def _onedal_fit(self, X, y, sample_weight=None, queue=None): X, y = check_X_y(X, y, dtype=[np.float64, np.float32]) self._initialize_onedal_estimator() - try: - self._onedal_estimator.fit(X, y, queue=queue) - self._save_attributes() - except RuntimeError: - logging.getLogger("sklearnex").info( - f"{self.__class__.__name__}.fit " - + get_patch_message("sklearn_after_onedal") - ) - - del self._onedal_estimator - super().fit(X, y) + self._onedal_estimator.fit(X, y, queue=queue) + self._save_attributes() def _onedal_predict(self, X, queue=None): if queue is None or queue.sycl_device.is_cpu: