-
Notifications
You must be signed in to change notification settings - Fork 87
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
allow add_to_rankings
to work before search
#1250
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1250 +/- ##
==========================================
+ Coverage 91.91% 99.93% +8.01%
==========================================
Files 207 207
Lines 12898 12927 +29
==========================================
+ Hits 11855 12918 +1063
+ Misses 1043 9 -1034
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.
@bchen1116 awesome! I left one test comment but once that's outta the way, 🚢
|
||
|
||
@patch('evalml.pipelines.RegressionPipeline.score') | ||
@patch('evalml.pipelines.RegressionPipeline.fit') |
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.
No need to mock fit
if we're not calling automl.search
Do we have separate coverage already for calling add_to_rankings
after search
has been called? It would be nice to add that to this test since you're already mocking fit
:)
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 are tests that call search
after add_to_rankings
. I'll remove the fit
mocks
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.
Would also be nice to make sure automl.search
behaves properly if add_to_rankings
is called first as well.
@@ -798,8 +805,7 @@ 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()`") | |||
self._set_data_split(X) |
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.
Looks great!
fix #900
Implementation to allow
add_to_rankings()
to be called before AutoMLSearch().search().