8000 :lock: :robot: CI Update lock files for main CI build(s) :lock: :robot: by scikit-learn-bot · Pull Request #29276 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

🔒 🤖 CI Update lock files for main CI build(s) 🔒 🤖 #29276

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

Conversation

scikit-learn-bot
Copy link
Contributor

Update lock files.

Note

If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.

Copy link
github-actions bot commented Jun 17, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 8efbaeb. Link to the linter CI: here

@lesteve
Copy link
Member
lesteve commented Jun 17, 2024

The CI issue comes from pyamg uses np.deprecate which is deprecated in Numpy 2: pyamg/pyamg#406

The short-term fix is to ignore the warning similarly to pyamg warnings which are already ignored.

@ogrisel
Copy link
Member
ogrisel commented Jun 17, 2024

The short-term fix is to ignore the warning similarly to pyamg warnings which are already ignored.

+1

@scikit-learn-bot scikit-learn-bot force-pushed the auto-update-lock-files-main branch from 99b3de3 to 180e9fa Compare June 24, 2024 05:08
@lesteve
Copy link
Member
lesteve commented Jun 27, 2024

pyamg 5.2 has been released without the DeprecationWarning due to Numpy 2, so I guess the best thing to do is to wait until next Monday and see what happens on the next bot schedule run.

See pyamg/pyamg#406.

@lesteve
Copy link
Member
lesteve commented Jul 1, 2024

27 failures from one Azure build log. Here is a quick summary looking at the different errors.

doctests differences likely due to scipy 1.13 -> 1.14?

Probably a work-around is to skip doctests in some settings, there is already some logic to do this.

_________________ [doctest] sklearn.utils.validation.indexable _________________
[gw1] linux -- Python 3.11.9 /usr/share/miniconda/envs/testvenv/bin/python
494 
495     Examples
496     --------
497     >>> from sklearn.utils import indexable
498     >>> from scipy.sparse import csr_matrix
499     >>> import numpy as np
500     >>> iterables = [
501     ...     [1, 2, 3], np.array([2, 3, 4]), None, csr_matrix([[5], [6], [7]])
502     ... ]
503     >>> indexable(*iterables)
Expected:
    [[1, 2, 3], array([2, 3, 4]), None, <3x1 sparse matrix ...>]
Got:
    [[1, 2, 3], array([2, 3, 4]), None, <Compressed Sparse Row sparse matrix of dtype 'int64'
    	with 3 stored elements and shape (3, 1)>]

array API issues

likely due to array-api-strict 1.1 -> 2.0 update?

TypeError: array iteration is not allowed in array-api-strict
__________ test_isin[uint8-14-False-False-array_api_strict-None-None] __________
[gw1] linux -- Python 3.11.9 /usr/share/miniconda/envs/testvenv/bin/python

array_namespace = 'array_api_strict', device = None, _ = None, invert = False
assume_unique = False, element_size = 14, int_dtype = 'uint8'

    @pytest.mark.parametrize(
        "array_namespace, device, _", yield_namespace_device_dtype_combinations()
    )
    @pytest.mark.parametrize("invert", [True, False])
    @pytest.mark.parametrize("assume_unique", [True, False])
    @pytest.mark.parametrize("element_size", [6, 10, 14])
    @pytest.mark.parametrize("int_dtype", ["int16", "int32", "int64", "uint8"])
    def test_isin(
        array_namespace, device, _, invert, assume_unique, element_size, int_dtype
    ):
        xp = _array_api_for_tests(array_namespace, device)
        r = element_size // 2
        element = 2 * numpy.arange(element_size).reshape((r, 2)).astype(int_dtype)
        test_elements = numpy.array(numpy.arange(14), dtype=int_dtype)
        element_xp = xp.asarray(element, device=device)
        test_elements_xp = xp.asarray(test_elements, device=device)
        expected = numpy.isin(
            element=element,
            test_elements=test_elements,
            assume_unique=assume_unique,
            invert=invert,
        )
        with config_context(array_api_dispatch=True):
>           result = _isin(
                element=element_xp,
                test_elements=test_elements_xp,
E       TypeError: array iteration is not allowed in array-api-strict

self       = Array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,
        9, 10, 11, 12, 13], dtype=array_api_strict.uint8)

Cryptic CircleCI failure (segmentation fault?)

build log

generating gallery for auto_examples/gaussian_process... [ 10%] plot_gpr_noisy.py
generating gallery for auto_examples/gaussian_process... [ 20%] plot_compare_gpr_krr.py
generating gallery for auto_examples/gaussian_process... [ 30%] plot_gpr_co2.py
make: *** [Makefile:73: html] Segmentation fault (core dumped)
/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/joblib/externals/loky/backend/resource_tracker.py:314: UserWarning: resource_tracker: There appear to be 8 leaked semlock objects to clean up at shutdown
  warnings.warn(
/home/circleci/miniforge3/envs/testenv/lib/python3.9/site-packages/joblib/externals/loky/backend/resource_tracker.py:314: UserWarning: resource_tracker: There appear to be 1328 leaked folder objects to clean up at shutdown
  warnings.warn(

Exited with code exit status 2

@lesteve
Copy link 8000
Member
lesteve commented Jul 2, 2024

Scipy bumped into array-api-strict 2 issues: scipy/scipy#21074, some were fixed in 2.0.1 released yesterday but locally I still get some issue about searchsorted and The function searchsorted requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12, see below. Edit this would actually be fixed by #29387

_________________________________________________________________________________________________________________________ test_label_encoder_array_api_compliance[y2-array_api_strict-None-None] __________________________________________________________________________________________________________________________
[gw1] linux -- Python 3.11.9 /home/lesteve/micromamba/envs/scikit-learn-conda-forge-mkl/bin/python

y = array([3, 5, 9, 5, 9, 3]), array_namespace = 'array_api_strict', device = None, dtype = None

    @pytest.mark.parametrize(
        "array_namespace, device, dtype", yield_namespace_device_dtype_combinations()
    )
    @pytest.mark.parametrize(
        "y",
        [
            np.array([2, 1, 3, 1, 3]),
            np.array([1, 1, 4, 5, -1, 0]),
            np.array([3, 5, 9, 5, 9, 3]),
        ],
    )
    def test_label_encoder_array_api_compliance(y, array_namespace, device, dtype):
        xp = _array_api_for_tests(array_namespace, device)
        xp_y = xp.asarray(y, device=device)
        with config_context(array_api_dispatch=True):
            xp_label = LabelEncoder()
            np_label = LabelEncoder()
            xp_label = xp_label.fit(xp_y)
>           xp_transformed = xp_label.transform(xp_y)

sklearn/preprocessing/tests/test_label.py:729: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sklearn/preprocessing/_label.py:134: in transform
    return _encode(y, uniques=self.classes_)
sklearn/utils/_encode.py:240: in _encode
    return _searchsorted(xp, uniques, values)
sklearn/utils/_array_api.py:860: in _searchsorted
    return xp.searchsorted(a, v, side=side, sorter=sorter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (Array([3, 5, 9], dtype=array_api_strict.int64), Array([3, 5, 9, 5, 9, 3], dtype=array_api_strict.int64)), kwargs = {'side': 'left', 'sorter': None}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        if version > API_VERSION:
>           raise RuntimeError(
                f"The function {func.__name__} requires API version {version} or later, "
                f"but the current API version for array-api-strict is {API_VERSION}"
            )
E           RuntimeError: The function searchsorted requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12

../../micromamba/envs/scikit-learn-conda-forge-mkl/lib/python3.11/site-packages/array_api_strict/_flags.py:355: RuntimeError
================================================================================================================================================= short test summary info =================================================================================================================================================
FAILED sklearn/preprocessing/tests/test_label.py::test_label_encoder_array_api_compliance[y0-array_api_strict-None-None] - RuntimeError: The function searchsorted requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12
FAILED sklearn/preprocessing/tests/test_label.py::test_label_encoder_array_api_compliance[y1-array_api_strict-None-None] - RuntimeError: The function searchsorted requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12
FAILED sklearn/preprocessing/tests/test_label.py::test_label_encoder_array_api_compliance[y2-array_api_strict-None-None] - RuntimeError: The function searchsorted requires API version 2023.12 or later, but the current API version for array-api-strict is 2022.12
================================================================================================================================= 3 failed, 149 passed, 1 skipped, 417 warnings in 11.14s =================================================================================================================================

@lesteve
Copy link
Member
lesteve commented Jul 2, 2024

I have opened #29385 to fix the doctests to be compatible for scipy>=1.14.

@lesteve
Copy link
Member
lesteve commented Jul 5, 2024

This is taken over by #29388 since this requires quite a few changes.

I let this open otherwise the bot will open a separate PR on Monday and we want to have all the info in the same PR.

@scikit-learn-bot scikit-learn-bot force-pushed the auto-update-lock-files-main branch from 76940df to 8efbaeb Compare July 8, 2024 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0