[MRG] Deprecate class support for check_estimator and parametrize_with_checks - #17032
Conversation
|
|
||
|
|
||
| @parametrize_with_checks(_tested_estimators()) | ||
| @parametrize_with_checks(list(_tested_estimators())) |
There was a problem hiding this comment.
without this, the iterator would be consumed in parametrize_with_checks due to the addition of if any(isinstance(est, type) for est in estimators):
Note that the docstring of parametrize_with_checks says that its argument should be a list.
|
Thanks @NicolasHug ! Generally I think this would be a good idea. A few comments,
|
BTW, is this actually necessary? We could have kept |
…move_class_support_check_estimators
…move_class_support_check_estimators
| warnings.warn(str(exception), SkipTestWarning) | ||
|
|
||
|
|
||
| def check_estimator_class(Estimator): |
|
Can't we just run |
Yes, I'll update asap and ping when ready ;) |
…move_class_support_check_estimators
|
PR ready for review @rth @jnothman @adrinjalali @thomasjpfan
|
|
maybe @ogrisel too if you have time |
| estimators : list of estimators objects or classes | ||
| Estimators to generated checks for. | ||
|
|
||
| .. deprecated:: 0.23 |
There was a problem hiding this comment.
the estimator is not deprecated, but changed? I'm not sure if versionchanged works better here or not.
There was a problem hiding this comment.
I guess it should be deprecated for now, and become versionchanged in 0.24
|
Thanks for the reviews! do you want to have a last look @rth? Otherwise I'll merge tomorrow |
|
Thanks! ping #17010 |
and parametrize_with_checks
and parametrize_with_checks
and parametrize_with_checks
Fix #17030
This PR deprecates passing a class to
check_estimatorandparametrize_with_checks.A newHopefully, this will make the code simpler and our lives easier in the long run.check_classutility is created.CC @rth @thomasjpfan
Maybe also @adrinjalali @jnothman @amueller would want to have a look