The PipelineCreator seems to fail when using a scikitlearn estimator object.
The simple example:
from julearn.pipeline import PipelineCreator
from sklearn.kernel_ridge import KernelRidge
creator = PipelineCreator(problem_type="regression", apply_to="*").add(
KernelRidge()
)
results in:
Traceback (most recent call last):
File "cls_bug.py", line 4, in <module>
creator = PipelineCreator(problem_type="regression", apply_to="*").add(
File "/home/leonard/projects/julearn_hackathon/julearn/julearn/pipeline/pipeline.py", line 125, in add
name = step if isinstance(step, str) else step.__cls__.lower()
AttributeError: 'KernelRidge' object has no attribute '__cls__'
I believe this is intended to be the class.name attribute?
With the applied change it works.
The PipelineCreator seems to fail when using a scikitlearn estimator object. The simple example:
results in:
I believe this is intended to be the class.name attribute? With the applied change it works.