You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 useisinstance
. However, that wouldn't work for pipelines. Indeed, for a pipeline, we would likeisinstance(pipeline, base.Classifier)
to actually returnTrue
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.
The text was updated successfully, but these errors were encountered: