Skip to content

macOS.pylatest_conda_forge_mkl sometimes fails pickling test #27268

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

Closed
thomasjpfan opened this issue Sep 2, 2023 · 4 comments · Fixed by #27554
Closed

macOS.pylatest_conda_forge_mkl sometimes fails pickling test #27268

thomasjpfan opened this issue Sep 2, 2023 · 4 comments · Fixed by #27554

Comments

@thomasjpfan
Copy link
Member

thomasjpfan commented Sep 2, 2023

This test has failed in #27266 with those logs. It also failed on the nightly CI, but the logs were too old and are no preserved.

_____ test_pickle_version_warning_is_issued_when_no_version_info_in_pickle _____
[gw0] darwin -- Python 3.11.5 /usr/local/miniconda/envs/testvenv/bin/python

    def test_pickle_version_warning_is_issued_when_no_version_info_in_pickle():
        iris = datasets.load_iris()
        # TreeNoVersion has no getstate, like pre-0.18
        tree = TreeNoVersion().fit(iris.data, iris.target)
    
        tree_pickle_noversion = pickle.dumps(tree)
>       assert b"version" not in tree_pickle_noversion
E       assert b'version' not in b"\x80\x04\x95)\n\x00\x00\x00\x00\x00\x00\x8c\x17sklearn.tests.test_base\x94\x8c\rTreeNoVersion\x94\x93\x94)\x81\x94}\...0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80E@\x94t\x94bubub."

iris       = {'data': array([[5.1, 3.5, 1.4, 0.2],
       [4.9, 3. , 1.4, 0.2],
       [4.7, 3.2, 1.3, 0.2],
       [4.6, 3.1, 1.5,... width (cm)', 'petal length (cm)', 'petal width (cm)'], 'filename': 'iris.csv', 'data_module': 'sklearn.datasets.data'}
tree       = TreeNoVersion()
tree_pickle_noversion = b"\x80\x04\x95)\n\x00\x00\x00\x00\x00\x00\x8c\x17sklearn.tests.test_base\x94\x8c\rTreeNoVersion\x94\x93\x94)\x81\x94}\...0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80E@\x94t\x94bubub."
@adrinjalali
Copy link
Member

I've seen this recently quite frequently, a restart of the CI has never reproduced it for me.

@ogrisel
Copy link
Member

ogrisel commented Sep 11, 2023

Is this always with the latest Python 3.11.5 version? Maybe something has changed in the pickle module of the standard library.

@ogrisel
Copy link
Member

ogrisel commented Sep 11, 2023

The failure reported in #27302 was running Python 3.11.4 on macOS.

@lesteve
Copy link
Member

lesteve commented Oct 9, 2023

I saw the Pyodide fail with the same test which got me very intrigued. I opened #27554 with a work-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants