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
{{ message }}
Repository navigation
check_estimator for estimators which require a mandatory extra fit param. #16756
Right now the check_estimators will fail if the given estimator requires a parameter to fit other than X, y. fairlearn/fairlearn#342 is an example of where it fails.
In some use-cases, it makes sense to require an extra parameter. For instance, in the case of fairness, you may require the sensitive_features to be passed as well as the data itself. How should we handle these cases?
An alternative would be to have feature names during fit and set the sensitive feature names in __init__.
Maybe we can introduce _required_fit_parameters by analogy with _required_parameters for __init__?
Though generally it would likely mean that we would just skip all tests for estimators that require fit parameters, since it's hard to know what should be passed there in common tests.
In our monthly call we talked about this, and it seems we're okay with having a mechanism in the estimator checks, for the test suite to provide a data generator. This would have the benefit of keeping the estimators clean from test specific code, and yet allow third party developers to further tune the estimator checks. Afterall, one primary goal of estimator checks is to make sure they can be used in a pipeline and/or a grid search, and we know right now estimators can fail in the tests and yet be compatible with our pipeline/GS/etc.
Activity
rth commentedon Mar 25, 2020
Maybe we can introduce
_required_fit_parametersby analogy with_required_parametersfor__init__?Though generally it would likely mean that we would just skip all tests for estimators that require fit parameters, since it's hard to know what should be passed there in common tests.
amueller commentedon Mar 30, 2020
So in effect it would be the same as "_skip" right? Unless we provide a mechanism to create a valid column for arbitrary data ;)
adrinjalali commentedon Mar 31, 2020
In our monthly call we talked about this, and it seems we're okay with having a mechanism in the estimator checks, for the test suite to provide a data generator. This would have the benefit of keeping the estimators clean from test specific code, and yet allow third party developers to further tune the estimator checks. Afterall, one primary goal of estimator checks is to make sure they can be used in a pipeline and/or a grid search, and we know right now estimators can fail in the tests and yet be compatible with our pipeline/GS/etc.