Skip to content

Commit 4fd15fd

Browse files
committed
Merge branch 'main' into submodulev3
2 parents e4b9728 + eec6ef0 commit 4fd15fd

File tree

203 files changed

+4112
-3408
lines changed

Some content is hidden

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

203 files changed

+4112
-3408
lines changed

.github/workflows/cuda-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: Build wheels
19-
uses: pypa/cibuildwheel@v2.20.0
19+
uses: pypa/cibuildwheel@v2.21.1
2020
env:
2121
CIBW_BUILD: cp312-manylinux_x86_64
2222
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014

.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@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
42+
uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # v1.10.2
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@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
48+
uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # v1.10.2
4949
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
5050
with:
5151
print-hash: true

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

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: write
9+
statuses: write
910

1011
jobs:
1112
update-lock-files:
@@ -23,12 +24,30 @@ jobs:
2324
env:
2425
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2526
run: |
26-
pr_info=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} --json headRefName,headRepository,headRepositoryOwner)
27+
pr_info=$(gh pr view ${{ github.event.issue.number }} --repo ${{ github.repository }} --json headRefName,headRefOid,headRepository,headRepositoryOwner)
2728
pr_head_ref=$(echo "$pr_info" | jq -r '.headRefName')
29+
pr_head_sha=$(echo "$pr_info" | jq -r '.headRefOid')
2830
pr_head_repository=$(echo "$pr_info" | jq -r '.headRepositoryOwner.login + "/" + .headRepository.name')
2931
echo "pr_head_ref=$pr_head_ref" >> $GITHUB_OUTPUT
32+
echo "pr_head_sha=$pr_head_sha" >> $GITHUB_OUTPUT
3033
echo "pr_head_repository=$pr_head_repository" >> $GITHUB_OUTPUT
3134
35+
# Set the status of the latest commit in the PR to indicate that the update is in progress
36+
# https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status
37+
- name: Set pending status
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
gh api \
42+
--method POST \
43+
-H "Accept: application/vnd.github+json" \
44+
-H "X-GitHub-Api-Version: 2022-11-28" \
45+
/repos/${{ github.repository }}/statuses/${{ steps.pr-head-info.outputs.pr_head_sha }} \
46+
-f "state=pending" \
47+
-f "target_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
48+
-f "description=Updating lock files..." \
49+
-f "context=update-lock-files-pr"
50+
3251
- name: Check out the PR branch
3352
uses: actions/checkout@v4
3453
with:
@@ -57,3 +76,18 @@ jobs:
5776
conda install -c conda-forge "$(get_dep conda-lock min)" -y
5877
5978
python build_tools/on_pr_comment_update_environments_and_lock_files.py
79+
80+
- name: Set completion status
81+
if: ${{ always() }}
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
run: |
85+
gh api \
86+
--method POST \
87+
-H "Accept: application/vnd.github+json" \
88+
-H "X-GitHub-Api-Version: 2022-11-28" \
89+
/repos/${{ github.repository }}/statuses/${{ steps.pr-head-info.outputs.pr_head_sha }} \
90+
-f "state=${{ job.status == 'success' && 'success' || 'error' }}" \
91+
-f "target_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
92+
-f "description=Lock files ${{ job.status == 'success' && 'updated' || 'failed to update' }}." \
93+
-f "context=update-lock-files-pr"

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
schedule:
77
- cron: '0 5 * * 1'
88

9-
# In order to add the "CUDA CI" label we need to have write permissions for PRs
10-
permissions:
11-
pull-requests: write
12-
139
jobs:
1410
update_lock_files:
1511
if: github.repository == 'scikit-learn/scikit-learn'
@@ -46,7 +42,7 @@ jobs:
4642
4743
- name: Create Pull Request
4844
id: cpr
49-
uses: peter-evans/create-pull-request@v6
45+
uses: peter-evans/create-pull-request@v7
5046
with:
5147
token: ${{ secrets.BOT_GITHUB_TOKEN }}
5248
push-to-fork: scikit-learn-bot/scikit-learn
@@ -66,7 +62,7 @@ jobs:
6662
- name: Trigger additional tests
6763
if: steps.cpr.outputs.pull-request-number != '' && matrix.name == 'array-api'
6864
env:
69-
GH_TOKEN: ${{ github.token }}
65+
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
7066
run: |
7167
gh pr edit ${{steps.cpr.outputs.pull-request-number}} --add-label "CUDA CI"
7268

.github/workflows/wheels.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ jobs:
6565
- os: windows-latest
6666
python: 312
6767
platform_id: win_amd64
68+
- os: windows-latest
69+
python: 313
70+
platform_id: win_amd64
71+
# TODO: remove next line when Python 3.13 is released
72+
prerelease_pythons: True
6873

6974
# Linux 64 bit manylinux2014
7075
- os: ubuntu-latest
@@ -86,12 +91,14 @@ jobs:
8691
python: 312
8792
platform_id: manylinux_x86_64
8893
manylinux_image: manylinux2014
94+
- os: ubuntu-latest
95+
python: 313
96+
platform_id: manylinux_x86_64
97+
manylinux_image: manylinux2014
8998
- os: ubuntu-latest
9099
python: 313t
91100
platform_id: manylinux_x86_64
92101
manylinux_image: manylinux2014
93-
# TODO: remove next line when Python 3.13 is released
94-
prerelease_pythons: True
95102
free_threaded_support: True
96103

97104
# MacOS x86_64
@@ -107,6 +114,13 @@ jobs:
107114
- os: macos-12
108115
python: 312
109116
platform_id: macosx_x86_64
117+
- os: macos-12
118+
python: 313
119+
platform_id: macosx_x86_64
120+
- os: macos-12
121+
python: 313t
122+
platform_id: macosx_x86_64
123+
free_threaded_support: True
110124

111125
# MacOS arm64
112126
- os: macos-14
@@ -121,6 +135,13 @@ jobs:
121135
- os: macos-14
122136
python: 312
123137
platform_id: macosx_arm64
138+
- os: macos-14
139+
python: 313
140+
platform_id: macosx_arm64
141+
- os: macos-14
142+
python: 313t
143+
platform_id: macosx_arm64
144+
free_threaded_support: True
124145

125146
steps:
126147
- name: Checkout scikit-learn
@@ -173,11 +194,17 @@ jobs:
173194
# toolchain
174195
CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv"
175196
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir}
197+
CIBW_BEFORE_BUILD: bash {project}/build_tools/wheels/cibw_before_build.sh {project}
176198
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }}
177199
CIBW_BEFORE_TEST: bash {project}/build_tools/wheels/cibw_before_test.sh
200+
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS
178201
CIBW_TEST_REQUIRES: pytest pandas
179-
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
180-
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }}
202+
# On Windows, we use a custom Docker image and CIBW_TEST_REQUIRES_WINDOWS
203+
# does not make sense because it would install dependencies in the host
204+
# rather than inside the Docker image
205+
CIBW_TEST_REQUIRES_WINDOWS: ""
206+
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh {project}
207+
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }} {project}
181208
CIBW_BUILD_VERBOSITY: 1
182209

183210
run: bash build_tools/wheels/build_wheels.sh

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ sklearn-env/
9090

9191
# Default JupyterLite content
9292
jupyterlite_contents
93+
94+
# file recognised by vscode IDEs containing env variables
95+
.env

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| ------------- | ------------------ |
7-
| 1.5.1 | :white_check_mark: |
8-
| < 1.5.1 | :x: |
7+
| 1.5.2 | :white_check_mark: |
8+
| < 1.5.2 | :x: |
99

1010
## Reporting a Vulnerability
1111

benchmarks/bench_20newsgroups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"extra_trees": ExtraTreesClassifier(max_features="sqrt", min_samples_split=10),
2222
"logistic_regression": LogisticRegression(),
2323
"naive_bayes": MultinomialNB(),
24-
"adaboost": AdaBoostClassifier(n_estimators=10, algorithm="SAMME"),
24+
"adaboost": AdaBoostClassifier(n_estimators=10),
2525
}
2626

2727

build_tools/azure/debian_32bit_lock.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ iniconfig==2.0.0
1212
# via pytest
1313
joblib==1.4.2
1414
# via -r build_tools/azure/debian_32bit_requirements.txt
15-
meson==1.5.1
15+
meson==1.5.2
1616
# via meson-python
1717
meson-python==0.16.0
1818
# via -r build_tools/azure/debian_32bit_requirements.txt
@@ -27,7 +27,7 @@ pluggy==1.5.0
2727
# via pytest
2828
pyproject-metadata==0.8.0
2929
# via meson-python
30-
pytest==8.3.2
30+
pytest==8.3.3
3131
# via
3232
# -r build_tools/azure/debian_32bit_requirements.txt
3333
# pytest-cov

build_tools/azure/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ scikit_learn_install() {
120120
# brings in openmp so that you end up having the omp.h include inside
121121
# the conda environment.
122122
find $CONDA_PREFIX -name omp.h -delete -print
123+
# meson 1.5 detects OpenMP installed with brew and OpenMP is installed
124+
# with brew in CI runner
125+
brew uninstall --ignore-dependencies libomp
123126
fi
124127

125128
if [[ "$UNAMESTR" == "Linux" ]]; then

0 commit comments

Comments
 (0)