cuml.compose.ColumnTransformer doesn't properly implement get_params/set_params. In particular, this means that sklearn.clone(transformer) doesn't result in an equivalent transformer, leading to errors when composing ColumnTransformer with other meta-estimators like GridSearchCV.
import sklearn
from sklearn.preprocessing import OneHotEncoder
from cuml.compose import ColumnTransformer
t1 = ColumnTransformer(
transformers=[
("one_hot_encoder", OneHotEncoder(), ["a", "b"])
]
)
t2 = sklearn.clone(t1)
assert len(t2.transformers) == 1
assert isinstance(t2.transformers[0][1], OneHotEncoder)
Traceback (most recent call last):
File "/home/jcristharif/Code/cuml/test.py", line 12, in <module>
assert len(t2.transformers) == 1
~~~^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()