Skip to content

Commit

Permalink
Update CI to use Python 3.8-3.10 (#288)
Browse files Browse the repository at this point in the history
Python 3.7 is EOL and the Ray OSS CI has switched to Python 3.8 as well.
  • Loading branch information
krfricke authored Aug 4, 2023
1 parent 8daed68 commit 6c038a2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
timeout-minutes: 3
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -34,14 +34,14 @@ jobs:
timeout-minutes: 160
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
include:
- python-version: 3.7
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
- python-version: 3.8
- python-version: "3.8"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
- python-version: 3.9
- python-version: "3.9"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
- python-version: "3.10"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
timeout-minutes: 160
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
timeout-minutes: 160
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -161,14 +161,14 @@ jobs:
strategy:
matrix:
# no new versions for xgboost are published for 3.6
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
include:
- python-version: 3.7
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
- python-version: 3.8
- python-version: "3.8"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
- python-version: 3.9
- python-version: "3.9"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
- python-version: "3.10"
ray-wheel: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
timeout-minutes: 160
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"distributed computing framework Ray.",
url="https://github.com/ray-project/xgboost_ray",
install_requires=[
"ray>=1.10",
"ray>=2.0",
"numpy>=1.16",
"pandas",
"wrapt>=1.12.1",
Expand Down
8 changes: 7 additions & 1 deletion xgboost_ray/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ def ensure_sorted_by_qid(
_qid = qid.iloc[:, 0]
elif isinstance(qid, pd.Series):
_qid = qid
if _qid.is_monotonic:
# pandas < 2.0
if getattr(_qid, "is_monotonic", False):
return _qid, df
# pandas >= 2.0
elif getattr(_qid, "is_monotonic_increasing", False) or getattr(
_qid, "is_monotonic_decreasing", False
):
return _qid, df
else:
if isinstance(qid, str):
Expand Down

0 comments on commit 6c038a2

Please sign in to comment.