Skip to content

Commit 6959237

Browse files
committed
scikit-learn: the loky failures are 3.14, not free threading
cp314 came back with the same six failures I had attributed to the free-threaded build -- joblib's loky worker dying on "'dict' object has no attribute '__annotate__'" while unpickling its call item -- so the filter moves from the cp314t matrix entry to both 3.14 entries. cp312 and cp313 pass the identical tree, which puts it on CPython 3.14 (where __annotate__ arrives with PEP 649) rather than on the GIL. It still does not reproduce off the runner: the same tests pass on manylinux_2_39_aarch64 cp314t with scikit-learn 1.9.0 and joblib 1.5.3, serial and under xdist, so this stays an observation rather than a claim about joblib in general.
1 parent ee6a3ae commit 6959237

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎.github/workflows/build-scikit-learn.yml‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ env:
2727
SKLEARN_VERSION: ${{ inputs.version || '1.9.0' }}
2828
# Pinned explicitly so the gpl_sources job pulls the same image the wheels were built in.
2929
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
30+
# On 3.14 joblib's loky workers die unpickling their call item here with
31+
# "'dict' object has no attribute '__annotate__'", taking out 6 of the 10
32+
# process-parallel tests. cp312 and cp313 are unaffected, and it does not
33+
# reproduce on aarch64 cp314t with the same scikit-learn and joblib.
34+
LOKY_DESELECT: >-
35+
PYTEST_ADDOPTS='-k "not (test_kdtree_picklable_with_joblib or (test_knn_forcing_backend
36+
and loky) or (test_function_no_callback_support and processes))"'
3037
3138
jobs:
3239
build_wheels:
@@ -46,15 +53,9 @@ jobs:
4653
pandas: pandas
4754
- python: "cp314"
4855
pandas: pandas
49-
# joblib's loky workers fail to unpickle their call item on this
50-
# runner under free threading ("'dict' object has no attribute
51-
# '__annotate__'"), which takes out 6 of the 10 process-parallel
52-
# tests. Not reproducible on aarch64 cp314t with the same sklearn and
53-
# joblib, serial or under xdist, and no sklearn frame is involved.
56+
loky_broken: true
5457
- python: "cp314t"
55-
test_env: >-
56-
PYTEST_ADDOPTS='-k "not (test_kdtree_picklable_with_joblib or (test_knn_forcing_backend
57-
and loky) or (test_function_no_callback_support and processes))"'
58+
loky_broken: true
5859

5960
steps:
6061
- name: Checkout scikit-learn ${{ env.SKLEARN_VERSION }}
@@ -80,7 +81,7 @@ jobs:
8081
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS
8182
CIBW_BEFORE_BUILD: bash {project}/build_tools/wheels/cibw_before_build.sh {project}
8283
CIBW_TEST_REQUIRES: pytest pytest-xdist scipy ${{ matrix.pandas }}
83-
CIBW_TEST_ENVIRONMENT: ${{ matrix.test_env }}
84+
CIBW_TEST_ENVIRONMENT: ${{ matrix.loky_broken && env.LOKY_DESELECT || '' }}
8485
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh {project}
8586

8687
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

0 commit comments

Comments
 (0)