Skip to content

Commit 45b2244

Browse files
mihowclaude
andcommitted
Add Python 3.12 support with torch 2.5.x
- Update Python version constraint from <3.12 to <3.13 - Upgrade torch from ^2.1.0 to ^2.5.0 (required for py3.12 + triton) - Upgrade torchvision from ^0.16.0 to ^0.20.0 - Update CI workflows to test both Python 3.10 and 3.12 The triton package bundled with torch 2.1.x only had wheels for Python 3.10/3.11. Torch 2.5.x includes triton 3.x which supports Python 3.12. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent da630f2 commit 45b2244

File tree

4 files changed

+157
-122
lines changed

4 files changed

+157
-122
lines changed

.github/workflows/test-ml.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ permissions:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.10", "3.12"]
21+
fail-fast: false
1822

1923
steps:
2024
- uses: actions/checkout@v3
21-
- name: Set up Python 3.10
25+
- name: Set up Python ${{ matrix.python-version }}
2226
uses: actions/setup-python@main # Need latest version to use pyproject.toml instead of requirements.txt
2327
with:
24-
python-version: "3.10"
28+
python-version: ${{ matrix.python-version }}
2529
cache: "pip"
2630
- name: Install dependencies
2731
run: |

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ jobs:
1313
test:
1414
name: Run Python Tests
1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.10", "3.12"]
19+
fail-fast: false
1620

1721
steps:
1822
- uses: actions/checkout@v4
1923

20-
- name: Set up Python 3.10
24+
- name: Set up Python ${{ matrix.python-version }}
2125
uses: actions/setup-python@v5
2226
with:
23-
python-version: "3.10"
27+
python-version: ${{ matrix.python-version }}
2428
cache: "pip"
2529
cache-dependency-path: |
2630
poetry.lock

0 commit comments

Comments
 (0)