diff --git a/doc/requirements.txt b/doc/requirements.txt index 62accbdd..68b7011a 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -5,5 +5,5 @@ nbconvert==6.4.4 nbformat==5.3.0 numpydoc>=1.5.0 pandas>=0.25.3,<=2.3.3 -scikit-learn>=0.22.2,<=1.7.2 +scikit-learn>=1.7.2,<1.9.0 sphinx-copybutton>=0.5.0 diff --git a/khiops/sklearn/dataset.py b/khiops/sklearn/dataset.py index 989f45a7..de1b46e1 100644 --- a/khiops/sklearn/dataset.py +++ b/khiops/sklearn/dataset.py @@ -1077,7 +1077,7 @@ def __init__(self, name, array, key=None): raise TypeError(type_error_message("array", array, np.ndarray, Sequence)) # Initialize the members - self.data_source = check_array(array, ensure_2d=True, force_all_finite=False) + self.data_source = check_array(array, ensure_2d=True, ensure_all_finite=False) self.column_ids = column_or_1d(range(self.data_source.shape[1])) self.khiops_types = { column_id: get_khiops_type(self.data_source.dtype) diff --git a/packaging/conda/meta.yaml b/packaging/conda/meta.yaml index 101efa79..b81c7656 100644 --- a/packaging/conda/meta.yaml +++ b/packaging/conda/meta.yaml @@ -25,7 +25,7 @@ requirements: - python - khiops-core =11.0.0 - pandas >=0.25.3,<=2.3.3 - - scikit-learn >=0.22.2 + - scikit-learn>=1.7.2,<1.9.0 run_constrained: # do not necessary use the latest version # to avoid undesired breaking changes diff --git a/packaging/docker/khiopspydev/Dockerfile.rocky b/packaging/docker/khiopspydev/Dockerfile.rocky index 9d925a9c..8feab2e6 100644 --- a/packaging/docker/khiopspydev/Dockerfile.rocky +++ b/packaging/docker/khiopspydev/Dockerfile.rocky @@ -21,16 +21,12 @@ RUN true \ git \ pandoc \ wget \ - # Install Python 3.11 if on Rocky 8 \ - && if [ "$KHIOPSDEV_OS" = "rocky8" ]; then \ + # Install Python 3.11 on Rocky 8 or 9 as they come with obsolete versions (<= 3.9) \ + && if [ "$KHIOPSDEV_OS" = "rocky8" -o "$KHIOPSDEV_OS" = "rocky9" ]; then \ dnf install -y \ python3.11 \ python3.11-pip \ python3.11-setuptools ; \ - else \ - dnf install -y \ - python3-setuptools \ - python3-pip ; \ fi \ # Get Linux distribution codename \ && if [ -f /etc/os-release ]; then . /etc/os-release; fi \ diff --git a/pyproject.toml b/pyproject.toml index 8b2da47b..fd34aa0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,7 +106,7 @@ requires-python = ">=3.8" dependencies = [ # do not use the latest versions, to avoid undesired breaking changes "pandas>=0.25.3,<=2.3.3", - "scikit-learn>=0.22.2,<=1.7.2", + "scikit-learn>=1.7.2,<1.9.0", ] [project.urls] diff --git a/tests/test_sklearn.py b/tests/test_sklearn.py index c06a35f2..ffeee06c 100644 --- a/tests/test_sklearn.py +++ b/tests/test_sklearn.py @@ -18,7 +18,7 @@ import numpy as np import pandas as pd from sklearn.exceptions import NotFittedError -from sklearn.utils.estimator_checks import check_estimator +from sklearn.utils.estimator_checks import estimator_checks_generator from sklearn.utils.validation import check_is_fitted import khiops.core as kh @@ -1784,9 +1784,7 @@ def test_sklearn_check_estimator(self): # Execute sklearn's estimator test battery print("") for khiops_estimator in khiops_estimators: - for estimator, check in check_estimator( - khiops_estimator, generate_only=True - ): + for estimator, check in estimator_checks_generator(khiops_estimator): check_name = check.func.__name__ if check_name == "check_n_features_in_after_fitting": continue