-
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
Update Results Getter #919
Conversation
Codecov Report
@@ Coverage Diff @@
## main #919 +/- ##
=======================================
Coverage 99.83% 99.83%
=======================================
Files 168 168
Lines 8331 8348 +17
=======================================
+ Hits 8317 8334 +17
Misses 14 14
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.
Left requests for a few minor changes, but after that looks good to me!
mock_score.return_value = {'Log Loss Binary': 1.0} | ||
automl.search(X, y) | ||
|
||
assert automl.results['pipeline_results'][0]['score'] == 1.0 |
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.
Nice. Any reason you can't do something like assert automl.results == {'pipeline_results': {[{'score': 1.0, ...}]}, 'search_order': [0]}
?
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.
Yes. One, it's really long (900 characters). Two, I think that if anyone changes any small part of how results are delivered, they would necessarily have to update the test (if they change this specific part of the dictionary they would also have to update the test, but that seems like it would happen with less frequency). I am happy to add more assertions maybe checking the keys of some dictionaries, but I think checking the whole dict matching isn't necessarily worth it. Let me know what you think.
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.
That's convincing! Sounds good. I forgot how much stuff ends up in here.
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 other than Dylan's comments!
automl.results = 2.0 | ||
|
||
automl.results['pipeline_results'][0]['score'] = 2.0 | ||
assert automl.results['pipeline_results'][0]['score'] == 1.0 |
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.
Thanks, awesome
Fixes #274. Makes sure that results are read-only with @ property decorator.