Skip to content

Commit

Permalink
Enable support for scikit-learn 1.5
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
  • Loading branch information
kbattocchi committed Jun 29, 2024
1 parent 4fbd10e commit 1b3e2ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion econml/_ensemble/_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
import numpy as np
from abc import ABCMeta, abstractmethod
from sklearn.base import BaseEstimator, clone
from sklearn.utils import _print_elapsed_time
from sklearn.utils import check_random_state
from joblib import effective_n_jobs
from packaging.version import parse
import sklearn
if parse(sklearn.__version__) < parse("1.5"):
from sklearn.utils import _print_elapsed_time
else:
from sklearn.utils._user_interface import _print_elapsed_time


def _fit_single_estimator(estimator, X, y, sample_weight=None,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
dependencies = [
"numpy",
"scipy > 1.4.0",
"scikit-learn >= 1.0, < 1.5",
"scikit-learn >= 1.0, < 1.6",
"sparse",
"joblib >= 0.13.0",
"statsmodels >= 0.10",
Expand Down

0 comments on commit 1b3e2ed

Please sign in to comment.