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
CI Remove Windows 32 bit support #24627
Conversation
Thanks @thomasjpfan .... I guess this is the answer to my question (see comment) Please note that the amd64 Windows issue is fixed by adding a new dll as in https://github.com/scikit-learn/scikit-learn/pull/24446/files#diff-e0a07d85249fa03c06895043f2d57076b4a1a30b195631e1682b5470db6a5ac3 : should I offer a separate PR for that? |
Yea, I like the idea of opening a separate PR to fix the current Windows 64bit wheels. It should also make the Python 3.11 PR smaller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix.
Although in retrospect, won't this hide problems faced by our users that use the pip commandline with the default configuration? Still getting a more stable wheel CI is nice. So still +0 for merging this. |
This is an issue when producing scikit-learn wheels for windows 32. |
Here are some options:
I can get behind Option 4 and dropping Windows 32bit. |
+1 |
I updated this PR to remove Windows 32 bit support. If SciPy is not building for it anymore, then I think we can follow them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are Windows 32-specific adaptation left in some part of the code-base.
For instance, there are references and specific setup:
- in
conda
lock-files' fixtures:
scikit-learn/build_tools/update_environments_and_lock_files.py
Lines 348 to 354 in 5ceb8a6
# 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 }, - in Windows wheels testing:
scikit-learn/build_tools/github/test_windows_wheels.sh
Lines 9 to 14 in fe62250
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 - for the 32bit OpenBLAS which seems to use Windows (inferred from
pip-windows
)?
scikit-learn/azure-pipelines.yml
Lines 283 to 288 in 0ae132f
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
scikit-learn/build_tools/azure/test_script.sh
Lines 12 to 13 in 0ae132f
elif [[ "$DISTRIB" == "pip-windows" ]]; then source $VIRTUALENV/Scripts/activate - for compilers flags for handling OpenMP:
scikit-learn/sklearn/_build_utils/openmp_helpers.py
Lines 24 to 27 in 594b1f7
if sys.platform == "win32" and ("icc" in compiler or "icl" in compiler): return ["/Qopenmp"] elif sys.platform == "win32": return ["/openmp"] - for this test adaptation:
scikit-learn/sklearn/decomposition/tests/test_sparse_pca.py
Lines 142 to 153 in 2c2ee2d
if sys.platform == "win32": # fake parallelism for win32 import joblib _mp = joblib.parallel.multiprocessing joblib.parallel.multiprocessing = None try: spca = MiniBatchSparsePCA( n_components=3, n_jobs=2, alpha=alpha, random_state=0 ) U2 = spca.fit(Y).transform(Y) finally: joblib.parallel.multiprocessing = _mp - for a test skipping reason:
scikit-learn/sklearn/conftest.py
Lines 148 to 152 in b2632de
elif sys.platform.startswith("win32"): reason = ( "doctests are not run for Windows because numpy arrays " "repr is inconsistent across platforms." )
Should some of them be removed?
I think "win32" means "Windows" and does not specify the bitness. In Python, the platform is defined here: https://github.com/python/cpython/blob/0895c2a066c64c84cab0821886dfa66efc1bdc2f/PC/pyconfig.h#L288-L292 |
How confusing. 🤷 Then… |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the 32 bit windows support as long as scipy does not support it anymore.
I think we should still have at least one 32 bit runtime in our CI build (but this is the case with linux) to make sure that our Cython code is not bitness dependent to be able to support platforms such as WASM in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Reference Issues/PRs
Addresses #24612 for Windows 32 bit
What does this implement/fix? Explain your changes.
Using
PIP_PREFER_BINARY=1
configurespip
to prefer older binary packages over building from source.Any other comments?
This PR only fixes the Windows 32 bit issue and not the Windows 64 bit issue.