-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT compatibility sklearn 1.5 (#1074)
- Loading branch information
Showing
6 changed files
with
58 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,11 @@ | |
# Christos Aridas | ||
# Guillaume Lemaitre <[email protected]> | ||
# License: BSD | ||
import sklearn | ||
from sklearn import pipeline | ||
from sklearn.base import clone | ||
from sklearn.utils import Bunch, _print_elapsed_time | ||
from sklearn.utils import Bunch | ||
from sklearn.utils.fixes import parse_version | ||
from sklearn.utils.metaestimators import available_if | ||
from sklearn.utils.validation import check_memory | ||
|
||
|
@@ -34,6 +36,12 @@ | |
|
||
__all__ = ["Pipeline", "make_pipeline"] | ||
|
||
sklearn_version = parse_version(sklearn.__version__).base_version | ||
if parse_version(sklearn_version) < parse_version("1.5"): | ||
from sklearn.utils import _print_elapsed_time | ||
else: | ||
from sklearn.utils._user_interface import _print_elapsed_time | ||
|
||
|
||
class Pipeline(_ParamsValidationMixin, pipeline.Pipeline): | ||
"""Pipeline of transforms and resamples with a final estimator. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters