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
When performing a grid search on a pipeline that has None for a transformer step, an AttributeError is raised. This snippet below previously ran successfully with scikit-learn==0.23.2 but no longer works the 0.24.dev0.
The GridSearchCV.fit call is able to successfully complete
Actual Results
The following error is raised (I've included the full traceback further down):
File "/Users/james/miniforge3/envs/dask-ml/lib/python3.8/site-packages/sklearn/base.py", line 863, in _is_pairwise
pairwise_tag = estimator._get_tags().get('pairwise', False)
File "/Users/james/miniforge3/envs/dask-ml/lib/python3.8/site-packages/sklearn/base.py", line 348, in _get_tags
more_tags = base_class._more_tags(self)
File "/Users/james/miniforge3/envs/dask-ml/lib/python3.8/site-packages/sklearn/pipeline.py", line 626, in _more_tags
estimator_tags = self.steps[0][1]._get_tags()
AttributeError: 'NoneType' object has no attribute '_get_tags'
It appears that the _is_pairwise check doesn't work as expected when applied to a pipeline with None for a step transformer.
I'll mark it as a blocker because the error will not just appear when using None, but when using any step that doesn't have _get_tags attribute (likely because it doesn't inherit from BaseEstimator)
Describe the bug
When performing a grid search on a pipeline that has
None
for a transformer step, anAttributeError
is raised. This snippet below previously ran successfully withscikit-learn==0.23.2
but no longer works the0.24.dev0
.Steps/Code to Reproduce
Expected Results
The
GridSearchCV.fit
call is able to successfully completeActual Results
The following error is raised (I've included the full traceback further down):
It appears that the
_is_pairwise
check doesn't work as expected when applied to a pipeline withNone
for a step transformer.Full traceback:
Versions
The text was updated successfully, but these errors were encountered: