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
While working on PR #11682 I stumbled upon this small issue in tests/test_metaestimator.py. In the delegation test, score only has the parameter X, while estimators expect X and y to be passed. Because of this, RFE and RFECV cannot be tested for score delegation.
Steps/Code to Reproduce
Remove score from the skip_methods for RFE and RFECV in test_metaestimator.py and run the test.
Expected Results
The test passes.
Actual Results
It fails with:
E
======================================================================
ERROR: sklearn.tests.test_metaestimators.test_metaestimator_delegation
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/oliver/repos/scikit-learn/sklearn/tests/test_metaestimators.py", line 124, in test_metaestimator_delegation
delegator_data.fit_args[0])
File "/home/oliver/repos/scikit-learn/sklearn/utils/_unittest_backport.py", line 204, in assertRaises
return context.handle('assertRaises', args, kwargs)
File "/home/oliver/repos/scikit-learn/sklearn/utils/_unittest_backport.py", line 113, in handle
callable_obj(*args, **kwargs)
File "/home/oliver/repos/scikit-learn/sklearn/utils/metaestimators.py", line 118, in <lambda>
out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs)
TypeError: score() missing 1 required positional argument: 'y'
----------------------------------------------------------------------
Ran 1 test in 0.006s
FAILED (errors=1)
Description
While working on PR #11682 I stumbled upon this small issue in
tests/test_metaestimator.py
. In the delegation test, score only has the parameter X, while estimators expect X and y to be passed. Because of this, RFE and RFECV cannot be tested for score delegation.Steps/Code to Reproduce
Remove
score
from theskip_methods
for RFE and RFECV intest_metaestimator.py
and run the test.Expected Results
The test passes.
Actual Results
It fails with:
Versions
The text was updated successfully, but these errors were encountered: