From 62a2661f51222ec25f6cf0075d590c100daa5580 Mon Sep 17 00:00:00 2001 From: Victor Lafargue Date: Thu, 5 Jan 2023 17:24:24 +0100 Subject: [PATCH] Fix `Lasso` interop issue (#5116) Answers https://github.com/rapidsai/cuml/issues/5106 Authors: - Victor Lafargue (https://github.com/viclafargue) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: https://github.com/rapidsai/cuml/pull/5116 --- python/cuml/internals/api_decorators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/cuml/internals/api_decorators.py b/python/cuml/internals/api_decorators.py index dfe2687c90..53f73e0751 100644 --- a/python/cuml/internals/api_decorators.py +++ b/python/cuml/internals/api_decorators.py @@ -785,6 +785,10 @@ def device_interop_preparation(init_func): @functools.wraps(init_func) def processor(self, *args, **kwargs): + # if child class is already prepared for interop, skip + if hasattr(self, '_full_kwargs'): + return init_func(self, *args, **kwargs) + # Save all kwargs self._full_kwargs = kwargs # Generate list of available cuML hyperparameters