-
Notifications
You must be signed in to change notification settings - Fork 840
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
upgrade: deprecated if_delegate_has_method #481
upgrade: deprecated if_delegate_has_method #481
Conversation
@@ -132,7 +132,7 @@ def fit(self, X, y, sample_weight=None, **fit_params): | |||
**fit_params) | |||
return self | |||
|
|||
@if_delegate_has_method('postprocessor_') | |||
@available_if('postprocessor_') |
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.
Do we need to make any changes in the unit test?
@@ -175,7 +175,7 @@ def predict_proba(self, X): | |||
y_score = pd.DataFrame(y_score, index=X.index).squeeze('columns') | |||
return self.postprocessor_.predict_proba(y_score) | |||
|
|||
@if_delegate_has_method('postprocessor_') | |||
@available_if('postprocessor_') |
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.
How do we test if this is working? Have we ran the code end to end to check if this is working?
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 good, seems like straightforward replacement of available_if
for any previous if_delegate_has_method
lines.
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.
actually, looks like all of the post-processing tests are failing with the same error:
TypeError: 'str' object is not callable
For example: FAILED tests/sklearn/test_reject_option_classification.py::test_rej_opt_clf_scoring[race-statistical_parity] - TypeError: 'str' object is not callable
Could you please look into this?
closing in favor of #511 |
Closes #475