Skip to content

Commit 1f1cbd9

Browse files
committed
Merging main
Signed-off-by: Adam Li <adam2392@gmail.com>
2 parents ac5cb8a + 390ce98 commit 1f1cbd9

File tree

171 files changed

+3708
-2436
lines changed

Some content is hidden

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

171 files changed

+3708
-2436
lines changed

.github/workflows/cuda-ci.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,41 @@ on:
88
- labeled
99

1010
jobs:
11+
build_wheel:
12+
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
13+
runs-on: "ubuntu-latest"
14+
name: Build wheel for Pull Request
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Build wheels
19+
uses: pypa/cibuildwheel@v2.20.0
20+
env:
21+
CIBW_BUILD: cp312-manylinux_x86_64
22+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
23+
CIBW_BUILD_VERBOSITY: 1
24+
CIBW_ARCHS: x86_64
25+
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: cibw-wheels
29+
path: ./wheelhouse/*.whl
30+
1131
tests:
1232
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
33+
needs: [build_wheel]
1334
runs-on:
1435
group: cuda-gpu-runner-group
1536
# Set this high enough so that the tests can comforatble run. We set a
1637
# timeout to make abusing this workflow less attractive.
1738
timeout-minutes: 20
1839
name: Run Array API unit tests
1940
steps:
41+
- uses: actions/download-artifact@v4
42+
with:
43+
pattern: cibw-wheels
44+
path: ~/dist
45+
2046
- uses: actions/setup-python@v5
2147
with:
2248
# XXX: The 3.12.4 release of Python on GitHub Actions is corrupted:
@@ -37,9 +63,14 @@ jobs:
3763
run: |
3864
source "${HOME}/conda/etc/profile.d/conda.sh"
3965
conda activate sklearn
40-
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
66+
pip install ~/dist/cibw-wheels/$(ls ~/dist/cibw-wheels)
67+
4168
- name: Run array API tests
4269
run: |
4370
source "${HOME}/conda/etc/profile.d/conda.sh"
4471
conda activate sklearn
45-
SCIPY_ARRAY_API=1 pytest -k 'array_api'
72+
python -c "import sklearn; sklearn.show_versions()"
73+
74+
SCIPY_ARRAY_API=1 pytest --pyargs sklearn -k 'array_api'
75+
# Run in /home/runner to not load sklearn from the checkout repo
76+
working-directory: /home/runner

.github/workflows/publish_pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
run: |
4040
python build_tools/github/check_wheels.py
4141
- name: Publish package to TestPyPI
42-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
42+
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
4343
with:
4444
repository-url: https://test.pypi.org/legacy/
4545
print-hash: true
4646
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
4747
- name: Publish package to PyPI
48-
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
48+
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
4949
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
5050
with:
5151
print-hash: true

.github/workflows/update-lock-files-pr.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ permissions:
1010
jobs:
1111
update-lock-files:
1212
if: >-
13-
github.event.issue.pull_request
13+
github.repository == 'scikit-learn/scikit-learn'
14+
&& github.event.issue.pull_request
1415
&& startsWith(github.event.comment.body, '@scikit-learn-bot update lock-files')
1516
runs-on: ubuntu-latest
1617

@@ -39,9 +40,9 @@ jobs:
3940
# malicious changes to these scripts in PRs to be executed
4041
- name: Download scripts from main
4142
run: |
42-
curl https://raw.githubusercontent.com/${{ github.repository }}/comment-update-lock/build_tools/shared.sh --retry 5 -o ./build_tools/shared.sh
43-
curl https://raw.githubusercontent.com/${{ github.repository }}/comment-update-lock/build_tools/update_environments_and_lock_files.py --retry 5 -o ./build_tools/update_environments_and_lock_files.py
44-
curl https://raw.githubusercontent.com/${{ github.repository }}/comment-update-lock/build_tools/on_pr_comment_update_environments_and_lock_files.py --retry 5 -o ./build_tools/on_pr_comment_update_environments_and_lock_files.py
43+
curl https://raw.githubusercontent.com/${{ github.repository }}/main/build_tools/shared.sh --retry 5 -o ./build_tools/shared.sh
44+
curl https://raw.githubusercontent.com/${{ github.repository }}/main/build_tools/update_environments_and_lock_files.py --retry 5 -o ./build_tools/update_environments_and_lock_files.py
45+
curl https://raw.githubusercontent.com/${{ github.repository }}/main/build_tools/on_pr_comment_update_environments_and_lock_files.py --retry 5 -o ./build_tools/on_pr_comment_update_environments_and_lock_files.py
4546
4647
- name: Update lock files
4748
env:

CITATION.cff

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
cff-version: 1.2.0
2+
title: scikit-learn
3+
type: software
4+
authors:
5+
- name: "The scikit-learn developers"
6+
message: "If you use scikit-learn in a scientific publication, we would appreciate citations to the following paper:"
7+
preferred-citation:
8+
type: article
9+
title: "Scikit-learn: Machine Learning in Python"
10+
authors:
11+
- family-names: "Pedregosa"
12+
given-names: "Fabian"
13+
- family-names: "Varoquaux"
14+
given-names: "Gaël"
15+
- family-names: "Gramfort"
16+
given-names: "Alexandre"
17+
- family-names: "Michel"
18+
given-names: "Vincent"
19+
- family-names: "Thirion"
20+
given-names: "Bertrand"
21+
- family-names: "Grisel"
22+
given-names: "Olivier"
23+
- family-names: "Blondel"
24+
given-names: "Mathieu"
25+
- family-names: "Prettenhofer"
26+
given-names: "Peter"
27+
- family-names: "Weiss"
28+
given-names: "Ron"
29+
- family-names: "Dubourg"
30+
given-names: "Vincent"
31+
- family-names: "Vanderplas"
32+
given-names: "Jake"
33+
- family-names: "Passos"
34+
given-names: "Alexandre"
35+
- family-names: "Cournapeau"
36+
given-names: "David"
37+
- family-names: "Brucher"
38+
given-names: "Matthieu"
39+
- family-names: "Perrot"
40+
given-names: "Matthieu"
41+
- family-names: "Duchesnay"
42+
given-names: "Édouard"
43+
journal: "Journal of Machine Learning Research"
44+
volume: 12
45+
start: 2825
46+
end: 2830
47+
year: 2011
48+
url: "https://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html"

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ jobs:
236236
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
237237
)
238238
matrix:
239-
debian_atlas_32bit:
240-
DOCKER_CONTAINER: 'i386/debian:12'
239+
debian_32bit:
240+
DOCKER_CONTAINER: 'i386/debian:trixie'
241241
DISTRIB: 'debian-32'
242242
COVERAGE: "true"
243-
LOCK_FILE: './build_tools/azure/debian_atlas_32bit_lock.txt'
243+
LOCK_FILE: './build_tools/azure/debian_32bit_lock.txt'
244244
# disable pytest xdist due to unknown bug with 32-bit container
245245
PYTEST_XDIST_VERSION: 'none'
246246
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '4' # non-default seed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --output-file=build_tools/azure/debian_32bit_lock.txt build_tools/azure/debian_32bit_requirements.txt
6+
#
7+
coverage[toml]==7.6.1
8+
# via pytest-cov
9+
cython==3.0.11
10+
# via -r build_tools/azure/debian_32bit_requirements.txt
11+
iniconfig==2.0.0
12+
# via pytest
13+
joblib==1.4.2
14+
# via -r build_tools/azure/debian_32bit_requirements.txt
15+
meson==1.5.1
16+
# via meson-python
17+
meson-python==0.16.0
18+
# via -r build_tools/azure/debian_32bit_requirements.txt
19+
ninja==1.11.1.1
20+
# via -r build_tools/azure/debian_32bit_requirements.txt
21+
packaging==24.1
22+
# via
23+
# meson-python
24+
# pyproject-metadata
25+
# pytest
26+
pluggy==1.5.0
27+
# via pytest
28+
pyproject-metadata==0.8.0
29+
# via meson-python
30+
pytest==8.3.2
31+
# via
32+
# -r build_tools/azure/debian_32bit_requirements.txt
33+
# pytest-cov
34+
pytest-cov==5.0.0
35+
# via -r build_tools/azure/debian_32bit_requirements.txt
36+
threadpoolctl==3.5.0
37+
# via -r build_tools/azure/debian_32bit_requirements.txt
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# DO NOT EDIT: this file is generated from the specification found in the
22
# following script to centralize the configuration for CI builds:
33
# build_tools/update_environments_and_lock_files.py
4-
cython==3.0.10 # min
5-
joblib==1.2.0 # min
6-
threadpoolctl==3.1.0
7-
pytest==7.1.2 # min
8-
pytest-cov==2.9.0 # min
4+
cython
5+
joblib
6+
threadpoolctl
7+
pytest
8+
pytest-cov
99
ninja
1010
meson-python

build_tools/azure/debian_atlas_32bit_lock.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

build_tools/azure/install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ setup_ccache() {
2424
done
2525
export PATH="${CCACHE_LINKS_DIR}:${PATH}"
2626
ccache -M 256M
27+
28+
# Zeroing statistics so that ccache statistics are shown only for this build
29+
ccache -z
2730
fi
2831
}
2932

@@ -36,7 +39,7 @@ pre_python_environment_install() {
3639
elif [[ "$DISTRIB" == "debian-32" ]]; then
3740
apt-get update
3841
apt-get install -y python3-dev python3-numpy python3-scipy \
39-
python3-matplotlib libatlas3-base libatlas-base-dev \
42+
python3-matplotlib libopenblas-dev \
4043
python3-virtualenv python3-pandas ccache git
4144

4245
# TODO for now we use CPython 3.13 from Ubuntu deadsnakes PPA. When CPython

0 commit comments

Comments
 (0)