-
Notifications
You must be signed in to change notification settings - Fork 228
More systematic checks that an estimator was fit before using its parameters #267
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
More systematic checks that an estimator was fit before using its parameters #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
@RobinVogel It seems like this PR might have caused master branch to fail. Could you take a look? https://travis-ci.org/scikit-learn-contrib/metric-learn/builds/620639370 |
Looking into it. The tests fail only on python 3 with skggm. |
It is strange because all tests passed on merge: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to review a bit late but I see a few minor issues. In addition to the comments below, there is a problem when calling score_pairs
which raises an error of the form: (error: AttributeError: 'ITML' object has no attribute 'preprocessor_')
. I think we need a check_is_fitted(self, ['preprocessor_', 'components_'])
there as well
I have re-run Travis to make sure it was not a glitch - but the errors are still there |
Fixing the failing tests in #270 |
* maj * maj * corrected PR 267 * trailing whitespace * test calibrate_threshold, test predict * maj * Checks estimator is fitted before set threshold * correct failed tests with MockBadClassifier * remove checks * forgot one * missed one check_is_fitted * sklearn changed the assumptions behind check_is_fitted
Solves #255