Better error message when custom objective specified as string without required args in pipeline score#1941
Merged
freddyaboulton merged 2 commits intomainfrom Mar 8, 2021
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1941 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 265 265
Lines 21712 21737 +25
=========================================
+ Hits 21706 21731 +25
Misses 6 6
Continue to review full report at Codecov.
|
angela97lin
approved these changes
Mar 8, 2021
Contributor
angela97lin
left a comment
There was a problem hiding this comment.
LGTM! 🥳 🎉
Left a comment more for my own understanding heh
| with pytest.raises(ObjectiveNotFoundError, match="cost benefit is not a valid Objective!"): | ||
| pipeline.score(X, y, objectives=["cost benefit", "F1"]) | ||
|
|
||
| # Verify no exception when objective properly specified |
Contributor
There was a problem hiding this comment.
Curious, what's the behavior if CostBenefitMatrix is not properly instantiated, like CostBenefitMatrix(1)? :o
Contributor
Author
There was a problem hiding this comment.
You'd get a TypeError but before the code gets into the score method!
… and no default arguments specified.
3a3a2bc to
5660e8c
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Fixes #1603
After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of
docs/source/release_notes.rstto include this pull request by adding :pr:123.