-
Notifications
You must be signed in to change notification settings - Fork 84
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
Better error message when custom objective specified as string without required args in pipeline score #1941
Better error message when custom objective specified as string without required args in pipeline score #1941
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.
|
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! 🥳 🎉
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 |
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.
Curious, what's the behavior if CostBenefitMatrix is not properly instantiated, like CostBenefitMatrix(1)
? :o
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.
You'd get a TypeError
but before the code gets into the score
method!
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.
Solid, good work.
… and no default arguments specified.
3a3a2bc
to
5660e8c
Compare
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.rst
to include this pull request by adding :pr:123
.