Open
Description
The utils.inspect
submodule is very ugly. It's here because in some parts of the codebase, we need to check what kind of model we're dealing with. Ideally, we would just use isinstance
. However, that wouldn't work for pipelines. Indeed, for a pipeline, we would like isinstance(pipeline, base.Classifier)
to actually return True
if the last step of the pipeline is indeed a classifier.
This needs a bit of Python black magic. Once it's done, we can tidy up a lot of code.