Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 6c038a2

Browse files
authored
Update CI to use Python 3.8-3.10 (#288)
Python 3.7 is EOL and the Ray OSS CI has switched to Python 3.8 as well.
1 parent 8daed68 commit 6c038a2

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

.github/workflows/gpu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
timeout-minutes: 20
1010
steps:
1111
- uses: actions/checkout@v3
12-
- name: Set up Python 3.7
12+
- name: Set up Python 3.8
1313
uses: actions/setup-python@v3
1414
with:
15-
python-version: 3.7
15+
python-version: 3.8
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

.github/workflows/test.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
timeout-minutes: 3
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up Python 3.7
15+
- name: Set up Python 3.8
1616
uses: actions/setup-python@v3
1717
with:
18-
python-version: 3.7
18+
python-version: 3.8
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
@@ -34,14 +34,14 @@ jobs:
3434
timeout-minutes: 160
3535
strategy:
3636
matrix:
37-
python-version: [3.7, 3.8, 3.9]
37+
python-version: ["3.8", "3.9", "3.10"]
3838
include:
39-
- python-version: 3.7
40-
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
41-
- python-version: 3.8
39+
- python-version: "3.8"
4240
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
43-
- python-version: 3.9
41+
- python-version: "3.9"
4442
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
43+
- python-version: "3.10"
44+
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
4545
steps:
4646
- uses: actions/checkout@v3
4747
- name: Set up Python ${{ matrix.python-version }}
@@ -78,7 +78,7 @@ jobs:
7878
timeout-minutes: 160
7979
strategy:
8080
matrix:
81-
python-version: [3.7, 3.8, 3.9]
81+
python-version: ["3.8", "3.9", "3.10"]
8282
steps:
8383
- uses: actions/checkout@v3
8484
- name: Set up Python ${{ matrix.python-version }}
@@ -117,7 +117,7 @@ jobs:
117117
timeout-minutes: 160
118118
strategy:
119119
matrix:
120-
python-version: [3.7, 3.8, 3.9]
120+
python-version: ["3.8", "3.9", "3.10"]
121121
steps:
122122
- uses: actions/checkout@v3
123123
- name: Set up Python ${{ matrix.python-version }}
@@ -161,14 +161,14 @@ jobs:
161161
strategy:
162162
matrix:
163163
# no new versions for xgboost are published for 3.6
164-
python-version: [3.7, 3.8, 3.9]
164+
python-version: ["3.8", "3.9", "3.10"]
165165
include:
166-
- python-version: 3.7
167-
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
168-
- python-version: 3.8
166+
- python-version: "3.8"
169167
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
170-
- python-version: 3.9
168+
- python-version: "3.9"
171169
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
170+
- python-version: "3.10"
171+
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
172172
steps:
173173
- uses: actions/checkout@v3
174174
- name: Set up Python ${{ matrix.python-version }}
@@ -223,7 +223,7 @@ jobs:
223223
timeout-minutes: 160
224224
strategy:
225225
matrix:
226-
python-version: [3.7]
226+
python-version: [3.8]
227227
steps:
228228
- uses: actions/checkout@v3
229229
- name: Set up Python ${{ matrix.python-version }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"distributed computing framework Ray.",
1212
url="https://github.com/ray-project/xgboost_ray",
1313
install_requires=[
14-
"ray>=1.10",
14+
"ray>=2.0",
1515
"numpy>=1.16",
1616
"pandas",
1717
"wrapt>=1.12.1",

xgboost_ray/matrix.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,13 @@ def ensure_sorted_by_qid(
8585
_qid = qid.iloc[:, 0]
8686
elif isinstance(qid, pd.Series):
8787
_qid = qid
88-
if _qid.is_monotonic:
88+
# pandas < 2.0
89+
if getattr(_qid, "is_monotonic", False):
90+
return _qid, df
91+
# pandas >= 2.0
92+
elif getattr(_qid, "is_monotonic_increasing", False) or getattr(
93+
_qid, "is_monotonic_decreasing", False
94+
):
8995
return _qid, df
9096
else:
9197
if isinstance(qid, str):

0 commit comments

Comments
 (0)