Skip to content

Commit

Permalink
Merging main
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Sep 5, 2024
2 parents ac5cb8a + 390ce98 commit 1f1cbd9
Show file tree
Hide file tree
Showing 171 changed files with 3,708 additions and 2,436 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/cuda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,41 @@ on:
- labeled

jobs:
build_wheel:
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
runs-on: "ubuntu-latest"
name: Build wheel for Pull Request
steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_BUILD: cp312-manylinux_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: x86_64

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels
path: ./wheelhouse/*.whl

tests:
if: contains(github.event.pull_request.labels.*.name, 'CUDA CI')
needs: [build_wheel]
runs-on:
group: cuda-gpu-runner-group
# Set this high enough so that the tests can comforatble run. We set a
# timeout to make abusing this workflow less attractive.
timeout-minutes: 20
name: Run Array API unit tests
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-wheels
path: ~/dist

- uses: actions/setup-python@v5
with:
# XXX: The 3.12.4 release of Python on GitHub Actions is corrupted:
Expand All @@ -37,9 +63,14 @@ jobs:
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
pip install ~/dist/cibw-wheels/$(ls ~/dist/cibw-wheels)
- name: Run array API tests
run: |
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate sklearn
SCIPY_ARRAY_API=1 pytest -k 'array_api'
python -c "import sklearn; sklearn.show_versions()"
SCIPY_ARRAY_API=1 pytest --pyargs sklearn -k 'array_api'
# Run in /home/runner to not load sklearn from the checkout repo
working-directory: /home/runner
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
run: |
python build_tools/github/check_wheels.py
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
with:
repository-url: https://test.pypi.org/legacy/
print-hash: true
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
uses: pypa/gh-action-pypi-publish@8a08d616893759ef8e1aa1f2785787c0b97e20d6 # v1.10.0
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
with:
print-hash: true
9 changes: 5 additions & 4 deletions .github/workflows/update-lock-files-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ permissions:
jobs:
update-lock-files:
if: >-
github.event.issue.pull_request
github.repository == 'scikit-learn/scikit-learn'
&& github.event.issue.pull_request
&& startsWith(github.event.comment.body, '@scikit-learn-bot update lock-files')
runs-on: ubuntu-latest

Expand Down Expand Up @@ -39,9 +40,9 @@ jobs:
# malicious changes to these scripts in PRs to be executed
- name: Download scripts from main
run: |
curl https://raw.githubusercontent.com/${{ github.repository }}/comment-update-lock/build_tools/shared.sh --retry 5 -o ./build_tools/shared.sh
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
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
curl https://raw.githubusercontent.com/${{ github.repository }}/main/build_tools/shared.sh --retry 5 -o ./build_tools/shared.sh
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
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
- name: Update lock files
env:
Expand Down
48 changes: 48 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cff-version: 1.2.0
title: scikit-learn
type: software
authors:
- name: "The scikit-learn developers"
message: "If you use scikit-learn in a scientific publication, we would appreciate citations to the following paper:"
preferred-citation:
type: article
title: "Scikit-learn: Machine Learning in Python"
authors:
- family-names: "Pedregosa"
given-names: "Fabian"
- family-names: "Varoquaux"
given-names: "Gaël"
- family-names: "Gramfort"
given-names: "Alexandre"
- family-names: "Michel"
given-names: "Vincent"
- family-names: "Thirion"
given-names: "Bertrand"
- family-names: "Grisel"
given-names: "Olivier"
- family-names: "Blondel"
given-names: "Mathieu"
- family-names: "Prettenhofer"
given-names: "Peter"
- family-names: "Weiss"
given-names: "Ron"
- family-names: "Dubourg"
given-names: "Vincent"
- family-names: "Vanderplas"
given-names: "Jake"
- family-names: "Passos"
given-names: "Alexandre"
- family-names: "Cournapeau"
given-names: "David"
- family-names: "Brucher"
given-names: "Matthieu"
- family-names: "Perrot"
given-names: "Matthieu"
- family-names: "Duchesnay"
given-names: "Édouard"
journal: "Journal of Machine Learning Research"
volume: 12
start: 2825
end: 2830
year: 2011
url: "https://jmlr.csail.mit.edu/papers/v12/pedregosa11a.html"
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ jobs:
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
debian_atlas_32bit:
DOCKER_CONTAINER: 'i386/debian:12'
debian_32bit:
DOCKER_CONTAINER: 'i386/debian:trixie'
DISTRIB: 'debian-32'
COVERAGE: "true"
LOCK_FILE: './build_tools/azure/debian_atlas_32bit_lock.txt'
LOCK_FILE: './build_tools/azure/debian_32bit_lock.txt'
# disable pytest xdist due to unknown bug with 32-bit container
PYTEST_XDIST_VERSION: 'none'
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '4' # non-default seed
Expand Down
37 changes: 37 additions & 0 deletions build_tools/azure/debian_32bit_lock.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=build_tools/azure/debian_32bit_lock.txt build_tools/azure/debian_32bit_requirements.txt
#
coverage[toml]==7.6.1
# via pytest-cov
cython==3.0.11
# via -r build_tools/azure/debian_32bit_requirements.txt
iniconfig==2.0.0
# via pytest
joblib==1.4.2
# via -r build_tools/azure/debian_32bit_requirements.txt
meson==1.5.1
# via meson-python
meson-python==0.16.0
# via -r build_tools/azure/debian_32bit_requirements.txt
ninja==1.11.1.1
# via -r build_tools/azure/debian_32bit_requirements.txt
packaging==24.1
# via
# meson-python
# pyproject-metadata
# pytest
pluggy==1.5.0
# via pytest
pyproject-metadata==0.8.0
# via meson-python
pytest==8.3.2
# via
# -r build_tools/azure/debian_32bit_requirements.txt
# pytest-cov
pytest-cov==5.0.0
# via -r build_tools/azure/debian_32bit_requirements.txt
threadpoolctl==3.5.0
# via -r build_tools/azure/debian_32bit_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DO NOT EDIT: this file is generated from the specification found in the
# following script to centralize the configuration for CI builds:
# build_tools/update_environments_and_lock_files.py
cython==3.0.10 # min
joblib==1.2.0 # min
threadpoolctl==3.1.0
pytest==7.1.2 # min
pytest-cov==2.9.0 # min
cython
joblib
threadpoolctl
pytest
pytest-cov
ninja
meson-python
43 changes: 0 additions & 43 deletions build_tools/azure/debian_atlas_32bit_lock.txt

This file was deleted.

5 changes: 4 additions & 1 deletion build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ setup_ccache() {
done
export PATH="${CCACHE_LINKS_DIR}:${PATH}"
ccache -M 256M

# Zeroing statistics so that ccache statistics are shown only for this build
ccache -z
fi
}

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

# TODO for now we use CPython 3.13 from Ubuntu deadsnakes PPA. When CPython
Expand Down
Loading

0 comments on commit 1f1cbd9

Please sign in to comment.