Skip to content

Commit d9d1ea6

Browse files
authored
Merge branch 'scikit-learn:main' into submodulev3
2 parents 6086c9c + bdf66d0 commit d9d1ea6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1086
-703
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
.. |SciPyMinVersion| replace:: 1.5.0
3838
.. |JoblibMinVersion| replace:: 1.1.1
3939
.. |ThreadpoolctlMinVersion| replace:: 2.0.0
40-
.. |MatplotlibMinVersion| replace:: 3.1.3
40+
.. |MatplotlibMinVersion| replace:: 3.3.4
4141
.. |Scikit-ImageMinVersion| replace:: 0.16.2
4242
.. |PandasMinVersion| replace:: 1.0.5
4343
.. |SeabornMinVersion| replace:: 0.9.0

azure-pipelines.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ jobs:
127127
vmImage: ubuntu-22.04
128128
variables:
129129
# Need to match Python version and Emscripten version for the correct
130-
# Pyodide version. For example, for Pyodide version 0.23.4, see
131-
# https://github.com/pyodide/pyodide/blob/0.23.4/Makefile.envs
132-
PYODIDE_VERSION: '0.23.4'
133-
EMSCRIPTEN_VERSION: '3.1.32'
134-
PYTHON_VERSION: '3.11.2'
130+
# Pyodide version. For example, for Pyodide version 0.24.1, see
131+
# https://github.com/pyodide/pyodide/blob/0.24.1/Makefile.envs
132+
PYODIDE_VERSION: '0.24.1'
133+
EMSCRIPTEN_VERSION: '3.1.45'
134+
PYTHON_VERSION: '3.11.3'
135135

136136
dependsOn: [git_commit, linting]
137137
condition: |
@@ -150,7 +150,7 @@ jobs:
150150
addToPath: true
151151

152152
- bash: bash build_tools/azure/install_pyodide.sh
153-
displayName: Build Pyodide wheel and install it in a Pyodide venv
153+
displayName: Build Pyodide wheel
154154

155155
- bash: bash build_tools/azure/test_script_pyodide.sh
156156
displayName: Test Pyodide wheel

build_tools/azure/install_pyodide.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ pyodide build
1515

1616
ls -ltrh dist
1717

18-
pyodide venv pyodide-venv
19-
source pyodide-venv/bin/activate
20-
21-
pip install dist/*.whl
22-
pip list
18+
# The Pyodide js library is needed by build_tools/azure/test_script_pyodide.sh
19+
# to run tests inside Pyodide
20+
npm install pyodide@$PYODIDE_VERSION

build_tools/azure/py38_conda_defaults_openblas_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
- cython<3.0.0
1212
- joblib
1313
- threadpoolctl=2.2.0
14-
- matplotlib=3.1.3 # min
14+
- matplotlib=3.3.4 # min
1515
- pandas
1616
- pyamg
1717
- pytest

build_tools/azure/py38_conda_defaults_openblas_linux-64_conda.lock

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Generated by conda-lock.
22
# platform: linux-64
3-
# input_hash: cc5492b4677e6d5132ab4ab70eda13c942bdf5f6dd53af977e801c42d5f48132
3+
# input_hash: 8ab29d5bd10968567d77fd3563ef1c61a10907318ccab81f9e3703588aa4dfd6
44
@EXPLICIT
55
https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda#c3473ff8bdb3d124ed5ff11ec380d6f9
66
https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-openblas.conda#9ddfcaef10d79366c90128f5dc444be8
7-
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2023.05.30-h06a4308_0.conda#979be8dd2368decd342b13e01540d297
7+
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2023.08.22-h06a4308_0.conda#243d5065a09a3e85ab888c05f5b6445a
88
https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.38-h1181459_1.conda#68eedfd9c06f2b0e6888d8db345b7f5b
99
https://repo.anaconda.com/pkgs/main/linux-64/libgfortran4-7.5.0-ha8ba4b0_17.conda#e3883581cbf0a98672250c3e80d292bf
1010
https://repo.anaconda.com/pkgs/main/linux-64/libgfortran-ng-7.5.0-ha8ba4b0_17.conda#ecb35c8952579d5c8dc56c6e076ba948
@@ -21,12 +21,12 @@ https://repo.anaconda.com/pkgs/main/linux-64/libdeflate-1.17-h5eee18b_0.conda#b4
2121
https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.4.4-h6a678d5_0.conda#06e288f9250abef59b9a367d151fc339
2222
https://repo.anaconda.com/pkgs/main/linux-64/libopenblas-0.3.18-hf726d26_0.conda#10422bb3b9b022e27798fc368cda69ba
2323
https://repo.anaconda.com/pkgs/main/linux-64/libuuid-1.41.5-h5eee18b_0.conda#4a6a2354414c9080327274aa514e5299
24-
https://repo.anaconda.com/pkgs/main/linux-64/libwebp-base-1.2.4-h5eee18b_1.conda#a65a20c48061ecf2a6f4f02eae9f2366
24+
https://repo.anaconda.com/pkgs/main/linux-64/libwebp-base-1.3.2-h5eee18b_0.conda#9179fc7baefa1e027f572edbc519d805
2525
https://repo.anaconda.com/pkgs/main/linux-64/libxcb-1.15-h7f8727e_0.conda#ada518dcadd6aaee9aae47ba9a671553
2626
https://repo.anaconda.com/pkgs/main/linux-64/lz4-c-1.9.4-h6a678d5_0.conda#53915e9402180a7f22ea619c41089520
2727
https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.4-h6a678d5_0.conda#5558eec6e2191741a92f832ea826251c
2828
https://repo.anaconda.com/pkgs/main/linux-64/nspr-4.35-h6a678d5_0.conda#208fff5d60133bcff6998a70c9f5203b
29-
https://repo.anaconda.com/pkgs/main/linux-64/openssl-3.0.10-h7f8727e_2.conda#066a828cc9dcd120af8c503381d6a1b8
29+
https://repo.anaconda.com/pkgs/main/linux-64/openssl-3.0.11-h7f8727e_2.conda#6cad6f2dcde73f8625d729c6db1272d0
3030
https://repo.anaconda.com/pkgs/main/linux-64/pcre-8.45-h295c915_0.conda#b32ccc24d1d9808618c1e898da60f68d
3131
https://repo.anaconda.com/pkgs/main/linux-64/xz-5.4.2-h5eee18b_0.conda#bcd31de48a0dcb44bc5b99675800c5cc
3232
https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.13-h5eee18b_0.conda#333e31fbfbb5057c92fa845ad6adef93
@@ -56,9 +56,10 @@ https://repo.anaconda.com/pkgs/main/linux-64/gst-plugins-base-1.14.1-h6a678d5_1.
5656
https://repo.anaconda.com/pkgs/main/linux-64/lcms2-2.12-h3be6417_0.conda#719db47afba9f6586eecb5eacac70bff
5757
https://repo.anaconda.com/pkgs/main/linux-64/libclang-14.0.6-default_hc6dbbc7_1.conda#8f12583c4027b2861cff470f6b8837c4
5858
https://repo.anaconda.com/pkgs/main/linux-64/libpq-12.15-hdbd6064_1.conda#218227d255f6056b6f49f52dd0d1731f
59-
https://repo.anaconda.com/pkgs/main/linux-64/libwebp-1.2.4-h11a3e52_1.conda#9f9153b30e58e9ce896f74634622cbf1
59+
https://repo.anaconda.com/pkgs/main/linux-64/libwebp-1.3.2-h11a3e52_0.conda#9e0d6c9abdd97b076c66d4cf488589ee
6060
https://repo.anaconda.com/pkgs/main/linux-64/nss-3.89.1-h6a678d5_0.conda#4d9d28fc3a0ca4916f281d2f5429ac50
61-
https://repo.anaconda.com/pkgs/main/linux-64/python-3.8.17-h955ad1f_0.conda#f901f4fd76d24a2d598788a24e4d7246
61+
https://repo.anaconda.com/pkgs/main/linux-64/python-3.8.18-h955ad1f_0.conda#fa35c1028f48db26df051ee75dd9422f
62+
https://repo.anaconda.com/pkgs/main/linux-64/certifi-2023.7.22-py38h06a4308_0.conda#59416ad8979a654bb8f5184b62d8a9e7
6263
https://repo.anaconda.com/pkgs/main/noarch/cycler-0.11.0-pyhd3eb1b0_0.conda#f5e365d2cdb66d547eb8c3ab93843aab
6364
https://repo.anaconda.com/pkgs/main/linux-64/cython-0.29.36-py38h5eee18b_0.conda#0465e461450c86b395da9ccc3853d7dc
6465
https://repo.anaconda.com/pkgs/main/linux-64/exceptiongroup-1.0.4-py38h06a4308_0.conda#db954e73dca6076c64a1004d71b45784
@@ -69,12 +70,12 @@ https://repo.anaconda.com/pkgs/main/linux-64/kiwisolver-1.4.4-py38h6a678d5_0.con
6970
https://repo.anaconda.com/pkgs/main/linux-64/mysql-5.7.24-h721c034_2.conda#dfc19ca2466d275c4c1f73b62c57f37b
7071
https://repo.anaconda.com/pkgs/main/linux-64/numpy-base-1.17.3-py38h2f8d375_0.conda#40edbb76ecacefb1e6ab639b514822b1
7172
https://repo.anaconda.com/pkgs/main/linux-64/packaging-23.1-py38h06a4308_0.conda#9ec9b6ee22dad7f49806c51218befd5b
72-
https://repo.anaconda.com/pkgs/main/linux-64/pillow-9.4.0-py38h6a678d5_0.conda#8afd1f4f8b23a1c44fca4975253b17f7
73+
https://repo.anaconda.com/pkgs/main/linux-64/pillow-9.4.0-py38h6a678d5_1.conda#3cc4f7f7c7ca5d7a5c5f26ad5425d8ef
7374
https://repo.anaconda.com/pkgs/main/linux-64/pluggy-1.0.0-py38h06a4308_1.conda#87bb1d3f6cf3e409a1dac38cee99918e
7475
https://repo.anaconda.com/pkgs/main/linux-64/ply-3.11-py38_0.conda#d6a69c576c6e4d19e3074eaae3d149f2
7576
https://repo.anaconda.com/pkgs/main/noarch/py-1.11.0-pyhd3eb1b0_0.conda#7205a898ed2abbf6e9b903dff6abe08e
7677
https://repo.anaconda.com/pkgs/main/linux-64/pyparsing-3.0.9-py38h06a4308_0.conda#becbbf51d2b05de228eed968e20f963d
77-
https://repo.anaconda.com/pkgs/main/linux-64/pytz-2022.7-py38h06a4308_0.conda#19c9f6a24d5c6f779c645d00f646666b
78+
https://repo.anaconda.com/pkgs/main/linux-64/pytz-2023.3.post1-py38h06a4308_0.conda#351d59ddfed216ab9b05481d3bb63106
7879
https://repo.anaconda.com/pkgs/main/linux-64/setuptools-68.0.0-py38h06a4308_0.conda#24f9c895455f3992d6b04957fd0e7546
7980
https://repo.anaconda.com/pkgs/main/noarch/six-1.16.0-pyhd3eb1b0_1.conda#34586824d411d36af2fa40e799c172d0
8081
https://repo.anaconda.com/pkgs/main/noarch/threadpoolctl-2.2.0-pyh0d69192_0.conda#bbfdbae4934150b902f97daaf287efe2
@@ -87,15 +88,15 @@ https://repo.anaconda.com/pkgs/main/linux-64/pytest-7.4.0-py38h06a4308_0.conda#b
8788
https://repo.anaconda.com/pkgs/main/noarch/python-dateutil-2.8.2-pyhd3eb1b0_0.conda#211ee00320b08a1ac9fea6677649f6c9
8889
https://repo.anaconda.com/pkgs/main/linux-64/qt-main-5.15.2-h7358343_9.conda#d3eac069d7e4e93b866a07c2274c9ee7
8990
https://repo.anaconda.com/pkgs/main/linux-64/sip-6.6.2-py38h6a678d5_0.conda#cb3f0d10f7f79870945f4dbbe0000f92
90-
https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-base-3.1.3-py38hef1b27d_0.conda#a7ad7d097c25b7beeb76f370d51687a1
91+
https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-base-3.3.4-py38h62a2d02_0.conda#7156fafe3362d0b6a2de43e0002febb3
9192
https://repo.anaconda.com/pkgs/main/linux-64/pandas-1.2.4-py38ha9443f7_0.conda#5bd3fd807a294f387feabc65821b75d0
9293
https://repo.anaconda.com/pkgs/main/linux-64/pyqt5-sip-12.11.0-py38h6a678d5_1.conda#7bc403c7d55f1465e922964d293d2186
93-
https://repo.anaconda.com/pkgs/main/linux-64/pytest-cov-4.0.0-py38h06a4308_0.conda#54035e39255f285f98ca1141b7f098e7
94+
https://repo.anaconda.com/pkgs/main/linux-64/pytest-cov-4.1.0-py38h06a4308_0.conda#ef981a8b88a9ecf7a84bf50516211e0c
9495
https://repo.anaconda.com/pkgs/main/noarch/pytest-forked-1.3.0-pyhd3eb1b0_0.tar.bz2#07970bffdc78f417d7f8f1c7e620f5c4
9596
https://repo.anaconda.com/pkgs/main/linux-64/qt-webengine-5.15.9-h9ab4d14_7.conda#907aa480f11eabd16bd6c72c81720ef2
9697
https://repo.anaconda.com/pkgs/main/linux-64/scipy-1.5.0-py38habc2bb6_0.conda#a27a97fc2377ab74cbd33ce22d3c3353
9798
https://repo.anaconda.com/pkgs/main/linux-64/pyamg-4.2.3-py38h79cecc1_0.conda#6e7f4f94000b244396de8bf4e6ae8dc4
9899
https://repo.anaconda.com/pkgs/main/noarch/pytest-xdist-2.5.0-pyhd3eb1b0_0.conda#d15cdc4207bcf8ca920822597f1d138d
99100
https://repo.anaconda.com/pkgs/main/linux-64/qtwebkit-5.212-h3fafdc1_5.conda#e811bbc0456e3d3a02cab199492153ee
100101
https://repo.anaconda.com/pkgs/main/linux-64/pyqt-5.15.7-py38h6a678d5_1.conda#62232dc285be8e7e85ae9596d89b3b95
101-
https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-3.1.3-py38_0.conda#70d5f6df438d469dc78f082389ada23d
102+
https://repo.anaconda.com/pkgs/main/linux-64/matplotlib-3.3.4-py38h06a4308_0.conda#96033fd3465abc467ae394c6852930de

build_tools/azure/pytest-pyodide.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
const { opendir } = require('node:fs/promises');
2+
const { loadPyodide } = require("pyodide");
3+
4+
async function main() {
5+
let exit_code = 0;
6+
try {
7+
global.pyodide = await loadPyodide();
8+
let pyodide = global.pyodide;
9+
const FS = pyodide.FS;
10+
const NODEFS = FS.filesystems.NODEFS;
11+
12+
let mountDir = "/mnt";
13+
pyodide.FS.mkdir(mountDir);
14+
pyodide.FS.mount(pyodide.FS.filesystems.NODEFS, { root: "." }, mountDir);
15+
16+
await pyodide.loadPackage(["micropip"]);
17+
await pyodide.runPythonAsync(`
18+
import glob
19+
import micropip
20+
21+
wheels = glob.glob('/mnt/dist/*.whl')
22+
wheels = [f'emfs://{wheel}' for wheel in wheels]
23+
print(f'installing wheels: {wheels}')
24+
await micropip.install(wheels);
25+
26+
pkg_list = micropip.list()
27+
print(pkg_list)
28+
`);
29+
30+
// Pyodide is built without OpenMP, need to set environment variable to
31+
// skip related test
32+
await pyodide.runPythonAsync(`
33+
import os
34+
os.environ['SKLEARN_SKIP_OPENMP_TEST'] = 'true'
35+
`);
36+
37+
await pyodide.runPythonAsync("import micropip; micropip.install('pytest')");
38+
let pytest = pyodide.pyimport("pytest");
39+
let args = process.argv.slice(2);
40+
console.log('pytest args:', args);
41+
exit_code = pytest.main(pyodide.toPy(args));
42+
} catch (e) {
43+
console.error(e);
44+
// Arbitrary exit code here. I have seen this code reached instead of a
45+
// Pyodide fatal error sometimes
46+
exit_code = 66;
47+
48+
} finally {
49+
process.exit(exit_code);
50+
}
51+
}
52+
53+
main();

build_tools/azure/test_script_pyodide.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22

33
set -e
44

5-
source pyodide-venv/bin/activate
6-
7-
pip list
8-
9-
# Need to be outside of the git clone otherwise finds non build sklearn folder
10-
cd /tmp
11-
12-
# TODO for now only testing sklearn import to make sure the wheel is not badly
13-
# broken. When Pyodide 0.24 is released we should run the full test suite and
14-
# xfail tests that fail due to Pyodide limitations
15-
python -c 'import sklearn'
5+
# We are using a pytest js wrapper script to run tests inside Pyodide. Maybe
6+
# one day we can use a Pyodide venv instead but at the time of writing
7+
# (2023-09-27) there is an issue with scipy.linalg in a Pyodide venv, see
8+
# https://github.com/pyodide/pyodide/issues/3865 for more details.
9+
node build_tools/azure/pytest-pyodide.js --pyargs sklearn --durations 20 --showlocals

build_tools/circle/doc_min_dependencies_environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
- cython=0.29.33 # min
1212
- joblib
1313
- threadpoolctl
14-
- matplotlib=3.1.3 # min
14+
- matplotlib=3.3.4 # min
1515
- pandas=1.0.5 # min
1616
- pyamg
1717
- pytest

0 commit comments

Comments
 (0)