Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 274
Update tests for sklearn 1.2, server issue#1200
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
80f1ae174f11d2016e7ba8dcb9ee2388525File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -410,10 +410,19 @@ def test_check_erronous_sklearn_flow_fails(self): | ||
| # Invalid parameter values | ||
| clf = LogisticRegression(C="abc", solver="lbfgs") | ||
| with self.assertRaisesRegex( | ||
| ValueError, | ||
| r"Penalty term must be positive; got \(C=u?'abc'\)", # u? for 2.7/3.4-6 compability | ||
| ): | ||
| # The exact error message depends on scikit-learn version. | ||
| # Because the sklearn-extension module is to be separated, | ||
| # I will simply relax specifics of the raised Error. | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible to test on a more relaxed regex so we can make sure that we test for the right thing? | ||
| # old: r"Penalty term must be positive; got \(C=u?'abc'\)" | ||
| # new: sklearn.utils._param_validation.InvalidParameterError: | ||
| # The 'C' parameter of LogisticRegression must be a float in the range (0, inf]. Got 'abc' instead. # noqa: E501 | ||
| try: | ||
| from sklearn.utils._param_validation import InvalidParameterError | ||
| exceptions = (ValueError, InvalidParameterError) | ||
| except ImportError: | ||
| exceptions = (ValueError,) | ||
| with self.assertRaises(exceptions): | ||
| openml.runs.run_model_on_task( | ||
| task=task, | ||
| model=clf, | ||
| @@ -680,6 +689,7 @@ def get_ct_cf(nominal_indices, numeric_indices): | ||
| sentinel=sentinel, | ||
| ) | ||
| @unittest.skip("https://github.com/openml/OpenML/issues/1180") | ||
| @unittest.skipIf( | ||
| LooseVersion(sklearn.__version__) < "0.20", | ||
| reason="columntransformer introduction in 0.20.0", | ||
Uh oh!
There was an error while loading. Please reload this page.