Skip to content

Commit

Permalink
MNT compatability with sklearn 1.3.0 (close #31)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhiningLiu1998 committed Jul 22, 2023
1 parent 9c2e612 commit 2739bf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imbens/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from sklearn import pipeline
from sklearn.base import clone
from sklearn.utils import _print_elapsed_time
from sklearn.utils.metaestimators import if_delegate_has_method
from sklearn.utils.metaestimators import available_if
from sklearn.utils.validation import check_memory

__all__ = ["Pipeline", "make_pipeline"]
Expand Down Expand Up @@ -373,7 +373,7 @@ def fit_resample(self, X, y=None, sample_weight=None, **fit_params):
if hasattr(last_step, "fit_resample"):
return last_step.fit_resample(Xt, yt, **fit_params_last_step)

@if_delegate_has_method(delegate="_final_estimator")
@available_if(delegate="_final_estimator")
def fit_predict(self, X, y=None, **fit_params):
"""Apply `fit_predict` of last step in pipeline after transforms.
Expand Down

0 comments on commit 2739bf6

Please sign in to comment.