Skip to content
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

Closed

Conversation

AmirAflak
Copy link

Closes #475

@@ -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_')
Copy link
Contributor

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_')
Copy link
Contributor

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?

Copy link
Collaborator

@mnagired mnagired left a 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.

Copy link
Collaborator

@mnagired mnagired left a 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?

@hoffmansc
Copy link
Collaborator

closing in favor of #511

@hoffmansc hoffmansc closed this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

if_delegate_has_method is deprecated, use available_if instead
4 participants