-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix broken properties when search has not been run #894
Conversation
Codecov Report
@@ Coverage Diff @@
## master #894 +/- ##
=======================================
Coverage 99.79% 99.79%
=======================================
Files 195 195
Lines 9085 9132 +47
=======================================
+ Hits 9066 9113 +47
Misses 19 19
Continue to review full report at Codecov.
|
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.
Awesome! I left a few suggestions. Nothing blocking except adding a docstring to has_searched
. Once that's in will be 🚢 -able!
@@ -669,12 +668,21 @@ def add_to_rankings(self, pipeline, X, y): | |||
if not isinstance(y, pd.Series): | |||
y = pd.Series(y) | |||
|
|||
if not self.has_searched: | |||
raise RuntimeError("Please run automl search before calling `add_to_rankings()`") |
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.
👍
mock_score.return_value = {'Log Loss Binary': 0.1234} | ||
test_pipeline = dummy_binary_pipeline_class(parameters={}) | ||
with pytest.raises(RuntimeError, match="Please run automl"): | ||
automl.add_to_rankings(test_pipeline, X, y) |
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.
👍
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.
@jeremyliweishih LGTM!
Fixes #744.