-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
More generic estimator checks #14712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Another peripheral suggestion: This also helps us distinguish errors of incorrect usage (e.g. predicting before fitting) vs. incorrect input etc. |
Thanks for your input. Also see #13969, #6715. Clearly the hardcoded list here makes this impossible to apply to third party estimators. You might also be interested in #14381 which should make running the tests much nicer. |
Thanks - didn't realize this was being actively discussed and improved on (my search for Another suggestion to help the devs is to add a concrete check-list to the Rolling Your Own Estimator guide, detailing more concrete expectations. For example, With the disassembled version of checks, and this checklist, users would be less confused when estimator checks fail. Funny enough, in this case, check-list proposed is figurative as well as quite literal (i.e. list of checks) |
I agree ;) #10082 |
Thanks, would have loved to help. Given there may be multiple facets to this (disassembling the whole check_estimator part of codebase, different versions of check lists for different estimator types etc, and refining them by targeting the tests directly), it is a non-trivial job and I am unfortunately quite busy with my own software, trying to get kernelmethods published in JMLR etc. But I'd be happy to review any PRs in the meantime, as I believe this is important, and am also interested in extending the design of the estimator to allow for more advanced uses (such as passing in covariates etc). |
Description
While trying to roll my own estimator as part of kernelmethods, I ran into a failed estimator check
check_non_transformer_estimators_n_iter
.This function is not supposed to run the check (as my estimator is derived from SVR) according to code below:
However, given my estimator name (
OptimalKernelSVR
) is not actually in the list, it goes ahead and runs the check which is irrelevant to my estimator. To prevent this, I suggest making these checks less specific to sklearn's native estimators and more amenable to external libraries. Some possible solutions are:if name in not_run_check_n_iter:
tocheck_estimator
skip a specific test in hereSteps/Code to Reproduce
Clone and install kernelmethods in dev mode
Run this code
Versions
The text was updated successfully, but these errors were encountered: