From 8b6a0d83a65cbb8f060df2e98c7d9588a26775d1 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Mon, 10 Oct 2022 11:23:32 -0400 Subject: [PATCH 1/5] FIX Prefer binary when building scikit-learn wheels --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 328b589b1b1a6..8250dc5e616c3 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -142,6 +142,7 @@ jobs: OPENBLAS_NUM_THREADS=2 SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 + PIP_PREFER_BINARY=1 CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} From aaa1599938eecf000031cdb13ae7f9db55e87d83 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Mon, 10 Oct 2022 12:04:30 -0400 Subject: [PATCH 2/5] DOC Adds comment about PIP_PREFER_BINARY [cd build gh] --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8250dc5e616c3..e9378352f0d4c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -142,7 +142,7 @@ jobs: OPENBLAS_NUM_THREADS=2 SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 - PIP_PREFER_BINARY=1 + PIP_PREFER_BINARY=1 # Prefer older binary packages over building from source CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} From 7de0c76d41c5e9b6dd0d0024caacb32e12fb0cdf Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Tue, 11 Oct 2022 12:14:48 -0400 Subject: [PATCH 3/5] BLD Remove 32bit window wheels --- .github/workflows/wheels.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e9378352f0d4c..c5cad72a6d5a5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -68,16 +68,6 @@ jobs: bitness: 64 platform_id: win_amd64 - # Window 32 bit - - os: windows-latest - python: 38 - bitness: 32 - platform_id: win32 - - os: windows-latest - python: 39 - bitness: 32 - platform_id: win32 - # Linux 64 bit manylinux2014 - os: ubuntu-latest python: 38 @@ -142,7 +132,6 @@ jobs: OPENBLAS_NUM_THREADS=2 SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 - PIP_PREFER_BINARY=1 # Prefer older binary packages over building from source CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} From 9bd5fc796a70eaafa3a829e442bf0f8c53c8139f Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Wed, 12 Oct 2022 09:45:43 -0400 Subject: [PATCH 4/5] CI Remove windows 32bit testing --- azure-pipelines.yml | 6 ------ build_tools/azure/test_script.sh | 2 -- build_tools/github/test_windows_wheels.sh | 26 ++++++++--------------- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eee5c150daffb..5257c90aa4701 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -280,9 +280,3 @@ jobs: COVERAGE: 'true' SKLEARN_ENABLE_DEBUG_CYTHON_DIRECTIVES: '1' SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '7' # non-default seed - py38_pip_openblas_32bit: - DISTRIB: 'pip-windows' - PYTHON_VERSION: '3.8' - PYTHON_ARCH: '32' - LOCK_FILE: ./build_tools/azure/py38_pip_openblas_32bit_lock.txt - SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '8' # non-default seed diff --git a/build_tools/azure/test_script.sh b/build_tools/azure/test_script.sh index 41b3d9cd21aee..d39e1ce69cde0 100755 --- a/build_tools/azure/test_script.sh +++ b/build_tools/azure/test_script.sh @@ -9,8 +9,6 @@ if [[ "$DISTRIB" =~ ^conda.* ]]; then source activate $VIRTUALENV elif [[ "$DISTRIB" == "ubuntu" || "$DISTRIB" == "debian-32" || "$DISTRIB" == "pip-nogil" ]]; then source $VIRTUALENV/bin/activate -elif [[ "$DISTRIB" == "pip-windows" ]]; then - source $VIRTUALENV/Scripts/activate fi if [[ "$BUILD_WITH_ICC" == "true" ]]; then diff --git a/build_tools/github/test_windows_wheels.sh b/build_tools/github/test_windows_wheels.sh index a04e390b5cdc4..38875b159506c 100755 --- a/build_tools/github/test_windows_wheels.sh +++ b/build_tools/github/test_windows_wheels.sh @@ -6,21 +6,13 @@ set -x PYTHON_VERSION=$1 BITNESS=$2 -if [[ "$BITNESS" == "32" ]]; then - # 32-bit architectures use the regular - # test command (outside of the minimal Docker container) - cp $CONFTEST_PATH $CONFTEST_NAME - python -c "import sklearn; sklearn.show_versions()" - pytest --pyargs sklearn -else - docker container run \ - --rm scikit-learn/minimal-windows \ - powershell -Command "python -c 'import sklearn; sklearn.show_versions()'" +docker container run \ + --rm scikit-learn/minimal-windows \ + powershell -Command "python -c 'import sklearn; sklearn.show_versions()'" - docker container run \ - -e SKLEARN_SKIP_NETWORK_TESTS=1 \ - -e OMP_NUM_THREADS=2 \ - -e OPENBLAS_NUM_THREADS=2 \ - --rm scikit-learn/minimal-windows \ - powershell -Command "pytest --pyargs sklearn" -fi +docker container run \ + -e SKLEARN_SKIP_NETWORK_TESTS=1 \ + -e OMP_NUM_THREADS=2 \ + -e OPENBLAS_NUM_THREADS=2 \ + --rm scikit-learn/minimal-windows \ + powershell -Command "pytest --pyargs sklearn" From 6cd8b03bd247093a10fed92c83680e7a652ee2f4 Mon Sep 17 00:00:00 2001 From: "Thomas J. Fan" Date: Wed, 12 Oct 2022 13:51:11 -0400 Subject: [PATCH 5/5] CLN Removes configuration that generate windows 32 lock files --- .../azure/py38_pip_openblas_32bit_lock.txt | 65 ------------------- .../py38_pip_openblas_32bit_requirements.txt | 13 ---- .../update_environments_and_lock_files.py | 23 ------- 3 files changed, 101 deletions(-) delete mode 100644 build_tools/azure/py38_pip_openblas_32bit_lock.txt delete mode 100644 build_tools/azure/py38_pip_openblas_32bit_requirements.txt diff --git a/build_tools/azure/py38_pip_openblas_32bit_lock.txt b/build_tools/azure/py38_pip_openblas_32bit_lock.txt deleted file mode 100644 index 3af4f65609125..0000000000000 --- a/build_tools/azure/py38_pip_openblas_32bit_lock.txt +++ /dev/null @@ -1,65 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: -# -# pip-compile --output-file=build_tools/azure/py38_pip_openblas_32bit_lock.txt build_tools/azure/py38_pip_openblas_32bit_requirements.txt -# -appdirs==1.4.4 - # via pooch -attrs==22.1.0 - # via pytest -certifi==2022.9.24 - # via requests -charset-normalizer==2.1.1 - # via requests -cython==0.29.32 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -execnet==1.9.0 - # via pytest-xdist -idna==3.4 - # via requests -iniconfig==1.1.1 - # via pytest -joblib==1.2.0 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -numpy==1.23.3 - # via - # -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt - # scipy -packaging==21.3 - # via - # pooch - # pytest -pillow==9.2.0 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -pluggy==1.0.0 - # via pytest -pooch==1.6.0 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -py==1.11.0 - # via - # pytest - # pytest-forked -pyparsing==3.0.9 - # via packaging -pytest==7.1.3 - # via - # -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt - # pytest-forked - # pytest-xdist -pytest-forked==1.4.0 - # via pytest-xdist -pytest-xdist==2.5.0 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -requests==2.28.1 - # via pooch -scipy==1.9.1 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -threadpoolctl==3.1.0 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt -tomli==2.0.1 - # via pytest -urllib3==1.26.12 - # via requests -wheel==0.37.1 - # via -r build_tools/azure/py38_pip_openblas_32bit_requirements.txt diff --git a/build_tools/azure/py38_pip_openblas_32bit_requirements.txt b/build_tools/azure/py38_pip_openblas_32bit_requirements.txt deleted file mode 100644 index 64cad93723155..0000000000000 --- a/build_tools/azure/py38_pip_openblas_32bit_requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT: this file is generated from the specification found in the -# following script to centralize the configuration for CI builds: -# build_tools/update_environments_and_lock_files.py -numpy -scipy==1.9.1 -cython -joblib -threadpoolctl -pytest -pytest-xdist -pillow -pooch -wheel diff --git a/build_tools/update_environments_and_lock_files.py b/build_tools/update_environments_and_lock_files.py index 155ebff050a61..6c6a028e7ca4e 100644 --- a/build_tools/update_environments_and_lock_files.py +++ b/build_tools/update_environments_and_lock_files.py @@ -330,29 +330,6 @@ def remove_from(alist, to_remove): # pip-compile "python_version": "3.8.5", }, - { - "build_name": "py38_pip_openblas_32bit", - "folder": "build_tools/azure", - "pip_dependencies": [ - "numpy", - "scipy", - "cython", - "joblib", - "threadpoolctl", - "pytest", - "pytest-xdist", - "pillow", - "pooch", - "wheel", - ], - # The Windows 32bit build use 3.8.10. No cross-compilation support for - # pip-compile, we are going to assume the pip lock file on a Linux - # 64bit machine gives appropriate versions - "python_version": "3.8.10", - "package_constraints": { - "scipy": "1.9.1", # 1.9.2 not available for 32 bit Windows - }, - }, ]