Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove utils.inspect #1433

Open
MaxHalford opened this issue Nov 1, 2023 · 0 comments
Open

Remove utils.inspect #1433

MaxHalford opened this issue Nov 1, 2023 · 0 comments

Comments

@MaxHalford
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

No branches or pull requests

1 participant