From adc04de962daab2d69a051e9b14ae630a20bf142 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 11:49:58 +0000 Subject: [PATCH 1/3] update --- .github/actions/setup/action.yml | 9 +++++++ .github/workflows/testing.yml | 34 ++++++++++++++---------- CHANGELOG.md | 1 + README.md | 3 ++- docs/source/get_started/installation.rst | 2 +- pyproject.toml | 2 ++ test/gbdt/test_gbdt.py | 9 ++++++- test/nn/models/test_compile.py | 2 +- 8 files changed, 44 insertions(+), 18 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 20b6b2bf5..b5ba336cf 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -43,3 +43,12 @@ runs: - name: List installed packages run: pip list shell: bash + + # TODO: Include catboost in Python 3.13 CI when catboost supports it: + # https://github.com/catboost/catboost/issues/2748 + - name: Exclude catboost on Python 3.13 from pyproject.toml + if: ${{ inputs.python-version == '3.13' }} + run: | + sed -i '/ "catboost",/d' pyproject.toml + cat pyproject.toml + shell: bash diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c5e025bed..229bd64fa 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -3,7 +3,7 @@ name: Testing on: # yamllint disable-line rule:truthy push: branches: - - master + - master - aki/py313 pull_request: concurrency: @@ -17,19 +17,25 @@ jobs: strategy: fail-fast: false matrix: - python-version: - - '3.9' - - '3.11' - torch-version: - - '1.13' - - '2.0' - - '2.1' - - '2.2' - - '2.3' - - '2.4' - - '2.5' - - '2.6' - - 'nightly' + include: + - { torch-version: '1.13', python-version: '3.9' } + - { torch-version: '1.13', python-version: '3.11' } + - { torch-version: '2.0', python-version: '3.9' } + - { torch-version: '2.0', python-version: '3.11' } + - { torch-version: '2.1', python-version: '3.9' } + - { torch-version: '2.1', python-version: '3.11' } + - { torch-version: '2.2', python-version: '3.9' } + - { torch-version: '2.2', python-version: '3.12' } + - { torch-version: '2.3', python-version: '3.9' } + - { torch-version: '2.3', python-version: '3.12' } + - { torch-version: '2.4', python-version: '3.9' } + - { torch-version: '2.4', python-version: '3.12' } + - { torch-version: '2.5', python-version: '3.9' } + - { torch-version: '2.5', python-version: '3.13' } + - { torch-version: '2.6', python-version: '3.9' } + - { torch-version: '2.6', python-version: '3.13' } + - { torch-version: 'nightly', python-version: '3.9' } + - { torch-version: 'nightly', python-version: '3.13' } steps: - name: Checkout repository diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e01f97b..77046a46a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added +- Added support for Python 3.12 and 3.13 ([#500](https://github.com/pyg-team/pytorch-frame/pull/500)) - Added support for PyTorch 2.6 ([#494](https://github.com/pyg-team/pytorch-frame/pull/494)) ### Changed diff --git a/README.md b/README.md index a16b3a155..8dd10c9c9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ ______________________________________________________________________ [![arXiv][arxiv-image]][arxiv-url] +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytorch-frame)](https://pypi.org/project/pytorch-frame/) [![PyPI Version][pypi-image]][pypi-url] [![Testing Status][testing-image]][testing-url] [![Docs Status][docs-image]][docs-url] @@ -245,7 +246,7 @@ The benchmark script for Hugging Face text encoders is in this [file](https://gi ## Installation -PyTorch Frame is available for Python 3.9 to Python 3.11. +PyTorch Frame is available for Python 3.9 to Python 3.13. ``` pip install pytorch-frame diff --git a/docs/source/get_started/installation.rst b/docs/source/get_started/installation.rst index 045f89f96..41278183a 100644 --- a/docs/source/get_started/installation.rst +++ b/docs/source/get_started/installation.rst @@ -1,7 +1,7 @@ Installation ============ -:pyf:`PyTorch Frame` is available for `Python 3.9` to `Python 3.11` on Linux, Windows and macOS. +:pyf:`PyTorch Frame` is available for `Python 3.9` to `Python 3.13` on Linux, Windows and macOS. Installation via PyPI --------------------- diff --git a/pyproject.toml b/pyproject.toml index 77401fe55..fe812761f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,8 @@ classifiers=[ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", ] dependencies=[ diff --git a/test/gbdt/test_gbdt.py b/test/gbdt/test_gbdt.py index b216f04c5..adb228860 100644 --- a/test/gbdt/test_gbdt.py +++ b/test/gbdt/test_gbdt.py @@ -1,4 +1,5 @@ import os.path as osp +import sys import tempfile import pytest @@ -13,7 +14,13 @@ @pytest.mark.parametrize('gbdt_cls', [ - CatBoost, + pytest.param( + CatBoost, + marks=pytest.mark.skipif( + sys.version_info >= (3, 13), + reason="Not supported on Python 3.13", + ), + ), XGBoost, LightGBM, ]) diff --git a/test/nn/models/test_compile.py b/test/nn/models/test_compile.py index 79db1da5e..6f4abe3e2 100644 --- a/test/nn/models/test_compile.py +++ b/test/nn/models/test_compile.py @@ -14,7 +14,7 @@ from torch_frame.testing import withPackage -@withPackage("torch>=2.5.0") +@withPackage("torch>=2.6.0") @pytest.mark.parametrize( "model_cls, model_kwargs, stypes, expected_graph_breaks", [ From f33355abb20951843c443992cbeec64b21fddc8b Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 12:45:17 +0000 Subject: [PATCH 2/3] . --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 229bd64fa..cd8c909b8 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -3,7 +3,7 @@ name: Testing on: # yamllint disable-line rule:truthy push: branches: - - master - aki/py313 + - master pull_request: concurrency: From 03595c7d6354f563f67f6c94a5058dafcbcdf622 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 12:52:15 +0000 Subject: [PATCH 3/3] Update test/gbdt/test_gbdt.py --- test/gbdt/test_gbdt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/gbdt/test_gbdt.py b/test/gbdt/test_gbdt.py index adb228860..36c8c3273 100644 --- a/test/gbdt/test_gbdt.py +++ b/test/gbdt/test_gbdt.py @@ -14,6 +14,8 @@ @pytest.mark.parametrize('gbdt_cls', [ + # TODO: Run CatBoost test on Python 3.13 once supported + # https://github.com/catboost/catboost/issues/2748 pytest.param( CatBoost, marks=pytest.mark.skipif(