diff --git a/autosklearn/pipeline/components/base.py b/autosklearn/pipeline/components/base.py index 7b496842b2..04d7259a81 100644 --- a/autosklearn/pipeline/components/base.py +++ b/autosklearn/pipeline/components/base.py @@ -43,7 +43,7 @@ def __init__(self, base_class): self.components = OrderedDict() def add_component(self, obj): - if inspect.isclass(obj) and self.base_class in obj.__bases__: + if inspect.isclass(obj) and isinstance(obj, self.base_class): name = obj.__name__ classifier = obj else: