8000 Merge branch 'main' into auto-update-lock-files-array-api · scikit-learn/scikit-learn@710654e · GitHub
[go: up one dir, main page]

Skip to content

Commit 710654e

Browse files
authored
Merge branch 'main' into auto-update-lock-files-array-api
2 parents 8d60544 + e7af195 commit 710654e

File tree

84 files changed

+2821
-2367
lines changed

Some content is hidden

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

84 files changed

+2821
-2367
lines changed

.codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ ignore:
3030
- "sklearn/_build_utils"
3131
- "sklearn/__check_build"
3232
- "sklearn/_min_dependencies.py"
33-
- "**/setup.py"
3433
- "**/conftest.py"

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ omit =
66
*/sklearn/externals/*
77
*/sklearn/_build_utils/*
88
*/benchmarks/*
9-
**/setup.py

.github/workflows/cuda-gpu-ci.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
name: CUDA GPU
2+
3+
# Only run this workflow when a Pull Request is labeled with the
4+
# 'CUDA CI' label.
25
on:
3-
workflow_dispatch:
4-
inputs:
5-
commit_hash:
6-
description: Commit hash to test
7-
required: true
6+
pull_request:
7+
types:
8+
- labeled
89

9-
permissions: read-all
10+
# In order to remove the "CUDA CI" label we need to have write permissions for PRs
11+
permissions:
12+
pull-requests: write
1013

1114
jobs:
1215
tests:
16+
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
1317
runs-on:
1418
group: cuda-gpu-runner-group
19+
# Set this high enough so that the tests can comforatble run. We set a
20+
# timeout to make abusing this workflow less attractive.
21+
timeout-minutes: 20
1522
name: Run Array API unit tests
1623
steps:
24+
- uses: actions-ecosystem/action-remove-labels@v1
25+
with:
26+
labels: CUDA CI
1727
- uses: actions/setup-python@v5
1828
with:
1929
# XXX: The 3.12.4 release of Python on GitHub Actions is corrupted:
2030
# https://github.com/actions/setup-python/issues/886
2131
python-version: '3.12.3'
22-
- uses: actions/checkout@v4
23-
with:
24-
ref: ${{ inputs.commit_hash }}
25-
- name: PRs associated with commit
26-
run: |
27-
echo "This commit belongs to PR(s):"
28-
git ls-remote origin 'pull/*/head' | grep -F -f <(git rev-parse HEAD) | awk -F'/' '{print $3}'
32+
- name: Checkout main repository
33+
uses: actions/checkout@v4
2934
- name: Cache conda environment
3035
id: cache-conda
3136
uses: actions/cache@v4

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

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

9-
# XXX Set the right permissions, per step??
10-
# Can we set read only at the global level here and then elevate to write for some steps?
11-
#permissions: read-all
9+
# In order to add the "CUDA CI" label we need to have write permissions for PRs
10+
permissions:
11+
pull-requests: write
1212

1313
jobs:
1414
update_lock_files:
@@ -68,7 +68,7 @@ jobs:
6868
env:
6969
GH_TOKEN: ${{ github.token }}
7070
run: |
71-
gh workflow run .github/workflows/cuda-gpu-ci.yml -f commit_hash=`git rev-parse HEAD`
71+
gh pr edit ${{steps.cpr.outputs.pull-request-number}} --add-label "CUDA CI"
7272
7373
- name: Check Pull Request
7474
if: steps.cpr.outputs.pull-request-number != ''

.github/workflows/wheels.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ jobs:
164164
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease_pythons }}
165165
CIBW_FREE_THREADED_SUPPORT: ${{ matrix.free_threaded_support }}
166166
CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1
167-
SKLEARN_BUILD_PARALLEL=3
168167
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
169168
CIBW_ARCHS: all
170169
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
@@ -216,8 +215,6 @@ jobs:
216215

217216
- name: Build source distribution
218217
run: bash build_tools/github/build_source.sh
219-
env:
220-
SKLEARN_BUILD_PARALLEL: 3
221218

222219
- name: Test source distribution
223220
run: bash build_tools/github/test_source.sh

Makefile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ all:
77
@echo "Please use 'make <target>' where <target> is one of"
88
@echo " dev build scikit-learn with Meson"
99
@echo " clean clean scikit-learn Meson build. Very rarely needed,"
10-
@echo " one use case is when switching back to setuptools"
11-
@echo " dev-setuptools build scikit-learn with setuptools (deprecated)"
12-
@echo " clean-setuptools clean scikit-learn setuptools build (deprecated)"
10+
@echo " since meson-python recompiles on import."
1311

1412
.PHONY: all
1513

@@ -23,14 +21,7 @@ clean: clean-meson
2321
clean-meson:
2422
pip uninstall -y scikit-learn
2523
# It seems in some cases removing the folder avoids weird compilation
26-
# errors (e.g. when switching from numpy>=2 to numpy<2). For some
24+
# errors (e.g. when switching from numpy>=2 to numpy<2). For some
2725
# reason ninja clean -C $(DEFAULT_MESON_BUILD_DIR) is not
28-
# enough
26+
# enough.
2927
rm -rf $(DEFAULT_MESON_BUILD_DIR)
30-
31-
dev-setuptools:
32-
$(PYTHON) setup.py build_ext -i
33-
34-
clean-setuptools:
35-
$(PYTHON) setup.py clean
36-
rm -rf dist

azure-pipelines.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ jobs:
208208
SKLEARN_ENABLE_DEBUG_CYTHON_DIRECTIVES: '1'
209209
SKLEARN_RUN_FLOAT32_TESTS: '1'
210210
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '2' # non-default seed
211-
BUILD_WITH_SETUPTOOLS: 'true'
212211
# Linux environment to test the latest available dependencies.
213212
# It runs tests requiring lightgbm, pandas and PyAMG.
214213
pylatest_pip_openblas_pandas:
@@ -236,7 +235,7 @@ jobs:
236235
)
237236
matrix:
238237
debian_atlas_32bit:
239-
DOCKER_CONTAINER: 'i386/debian:11.2'
238+
DOCKER_CONTAINER: 'i386/debian:12'
240239
DISTRIB: 'debian-32'
241240
COVERAGE: "true"
242241
LOCK_FILE: './build_tools/azure/debian_atlas_32bit_lock.txt'

build_tools/azure/debian_atlas_32bit_lock.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
attrs==23.2.0
88
# via pytest
9-
coverage==7.5.3
9+
coverage==7.5.4
1010
# via pytest-cov
1111
cython==3.0.10
1212
# via -r build_tools/azure/debian_atlas_32bit_requirements.txt

build_tools/azure/install.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ scikit_learn_install() {
107107
setup_ccache
108108
show_installed_libraries
109109

110-
# Set parallelism to 3 to overlap IO bound tasks with CPU bound tasks on CI
111-
# workers with 2 cores when building the compiled extensions of scikit-learn.
112-
export SKLEARN_BUILD_PARALLEL=3
113-
114110
if [[ "$UNAMESTR" == "Darwin" && "$SKLEARN_TEST_NO_OPENMP" == "true" ]]; then
115111
# Without openmp, we use the system clang. Here we use /usr/bin/ar
116112
# instead because llvm-ar errors
@@ -129,9 +125,7 @@ scikit_learn_install() {
129125
export LDFLAGS="$LDFLAGS -Wl,--sysroot=/"
130126
fi
131127

132-
if [[ "$BUILD_WITH_SETUPTOOLS" == "true" ]]; then
133-
python setup.py develop
134-
elif [[ "$PIP_BUILD_ISOLATION" == "true" ]]; then
128+
if [[ "$PIP_BUILD_ISOLATION" == "true" ]]; then
135129
# Check that pip can automatically build scikit-learn with the build
136130
# dependencies specified in pyproject.toml using an isolated build
137131
# environment:
@@ -143,12 +137,6 @@ scikit_learn_install() {
143137
# toolchain
144138
ADDITIONAL_PIP_OPTIONS='-Csetup-args=--vsenv'
145139
fi
146-
# TODO Always add --check-build-dependencies when all CI builds have
147-
# pip >= 22.1.1. At the time of writing, two CI builds (debian32_atlas and
148-
# ubuntu_atlas) have an older pip
149-
if pip install --help | grep check-build-dependencies; then
150-
ADDITIONAL_PIP_OPTIONS="$ADDITIONAL_PIP_OPTIONS --check-build-dependencies"
151-
fi
152140
# Use the pre-installed build dependencies and build directly in the
153141
# current environment.
154142
pip install --verbose --no-build-isolation --editable . $ADDITIONAL_PIP_OPTIONS

0 commit comments

Comments
 (0)
0