Skip to content

Remove utils.inspect #1433

Open
Open
@MaxHalford

Description

@MaxHalford

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions