Skip to content

Commit e62b340

Browse files
authored
Add Python 3.11 wheels (#27)
* test_wheels * update_sklearndependency * update_pythonversion * fixwheeltest * update_target * update_buildwheels * update_wheels * update_wheels * update
1 parent 692793d commit e62b340

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

.github/scripts/build_wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [[ "$RUNNER_OS" == "macOS" ]]; then
1818
export MACOSX_DEPLOYMENT_TARGET=12.0
1919
OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-arm64/llvm-openmp-11.1.0-hf3c4609_1.tar.bz2"
2020
else
21-
export MACOSX_DEPLOYMENT_TARGET=10.9
21+
export MACOSX_DEPLOYMENT_TARGET=10.13
2222
OPENMP_URL="https://anaconda.org/conda-forge/llvm-openmp/11.1.0/download/osx-64/llvm-openmp-11.1.0-hda6cdc1_1.tar.bz2"
2323
fi
2424

.github/workflows/build_wheels.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request, workflow_call]
55

66
jobs:
77
build_wheels:
8-
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
8+
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}
99
runs-on: ${{ matrix.os }}
1010

1111
strategy:
@@ -23,8 +23,11 @@ jobs:
2323
- os: windows-latest
2424
python: 310
2525
platform_id: win_amd64
26-
27-
# Linux 64 bit manylinux2014
26+
- os: windows-latest
27+
python: 311
28+
platform_id: win_amd64
29+
30+
# Linux 64 bit manylinux2014
2831
- os: ubuntu-latest
2932
python: 38
3033
platform_id: manylinux_x86_64
@@ -33,12 +36,14 @@ jobs:
3336
python: 39
3437
platform_id: manylinux_x86_64
3538
manylinux_image: manylinux2014
36-
37-
# NumPy on Python 3.10 only supports 64bit and is only available with manylinux2014
3839
- os: ubuntu-latest
3940
python: 310
4041
platform_id: manylinux_x86_64
4142
manylinux_image: manylinux2014
43+
- os: ubuntu-latest
44+
python: 311
45+
platform_id: manylinux_x86_64
46+
manylinux_image: manylinux2014
4247

4348
# MacOS x86_64
4449
- os: macos-latest
@@ -50,6 +55,9 @@ jobs:
5055
- os: macos-latest
5156
python: 310
5257
platform_id: macosx_x86_64
58+
- os: macos-latest
59+
python: 311
60+
platform_id: macosx_x86_64
5361

5462
# MacOS arm64
5563
- os: macos-latest
@@ -61,6 +69,9 @@ jobs:
6169
- os: macos-latest
6270
python: 310
6371
platform_id: macosx_arm64
72+
- os: macos-latest
73+
python: 311
74+
platform_id: macosx_arm64
6475

6576
steps:
6677
- name: Checkout PGBM
@@ -72,7 +83,7 @@ jobs:
7283
- name: Setup Python
7384
uses: actions/setup-python@v4
7485
with:
75-
python-version: '3.9' # update once build dependencies are available
86+
python-version: '3.8' # update once build dependencies are available
7687

7788
- name: Build wheels
7889
env:
@@ -104,7 +115,7 @@ jobs:
104115
- name: Setup Python
105116
uses: actions/setup-python@v4
106117
with:
107-
python-version: '3.9' # update once build dependencies are available
118+
python-version: '3.8' # update once build dependencies are available
108119

109120
- name: Build source distribution
110121
run: bash .github/scripts/build_source.sh

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.3.0 ##
2+
* Added Python 3.11 testing scripts to wheel
3+
* Update scikit-learn minimum dependency requirement to 1.2
4+
* Update MacOSX minimum dependency to MacOSX 10.13
5+
16
## 2.1.2 ##
27
* Fixed bug in sklearn cython code
38

pgbm/sklearn/tests/test_grower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def test_ohe_equivalence(min_samples_leaf, n_unique_categories, target):
555555
n_samples = 10_000
556556
X_binned = rng.randint(0, n_unique_categories, size=(n_samples, 1), dtype=np.uint8)
557557

558-
X_ohe = OneHotEncoder(sparse=False).fit_transform(X_binned)
558+
X_ohe = OneHotEncoder(sparse_output=False).fit_transform(X_binned)
559559
X_ohe = np.asfortranarray(X_ohe).astype(np.uint8)
560560

561561
if target == "equal":

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_openmp_flag():
5757
if __name__ == "__main__":
5858
setup(
5959
name="pgbm",
60-
version="2.2.0",
60+
version="2.3.0",
6161
description="Probabilistic Gradient Boosting Machines",
6262
author="Olivier Sprangers",
6363
author_email="[email protected]",
@@ -70,8 +70,8 @@ def get_openmp_flag():
7070
"Programming Language :: Python :: 3.8",
7171
"License :: OSI Approved :: Apache Software License",
7272
"Operating System :: OS Independent"],
73-
python_requires='>=3.8',
74-
install_requires=["scikit-learn>=1.1.2",
73+
python_requires='>=3.8,<3.12',
74+
install_requires=["scikit-learn>=1.2.0",
7575
"ninja>=1.10.2.2",
7676
"numba>=0.56"],
7777
zip_safe=False,

0 commit comments

Comments
 (0)