Conversation
- 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 <[email protected]>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe changes expand CI/CD testing to multiple Python versions (3.10 and 3.12) using matrix strategies in workflows, while broadening the Python version constraint to support 3.12 and upgrading key dependencies (Pillow, PyTorch, torchvision). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pillow 9.5.0 doesn't provide pre-built wheels for Python 3.12, causing CI to fail when trying to compile from source. Pillow 10.0.0+ includes Python 3.12 wheels. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Allow any Python 3.10+ instead of capping at 3.13. The caret constraint ^3.10 already limits to <4.0.0. Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/test.yml (1)
40-45:⚠️ Potential issue | 🟠 MajorPoetry virtualenv cache key should include Python version.
The cache key
venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}doesn't differentiate between Python versions. This can cause cache collisions where a 3.10 venv is restored for a 3.12 build (or vice versa), leading to incompatible binaries and potential test failures.🔧 Proposed fix to include Python version in cache key
- name: Load cached Poetry virtualenv id: cached-poetry-dependencies uses: actions/cache@v3 with: path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
🤖 Fix all issues with AI agents
In @.github/workflows/test-ml.yml:
- Line 24: Replace the outdated checkout action reference "uses:
actions/checkout@v3" with "uses: actions/checkout@v4" in the workflow so it
matches the other workflows using v4; search for any other occurrences of
"actions/checkout@v3" in the repo and update them as well, then commit the
change and re-run the workflow to verify compatibility.
🧹 Nitpick comments (1)
.github/workflows/test-ml.yml (1)
26-26: Avoid using@mainbranch ref for actions.Using
actions/setup-python@mainis risky as it tracks the latest development code, which could introduce breaking changes unexpectedly. Thetest.ymlworkflow uses@v5. Pin to a specific version for stability.🔧 Proposed fix
- name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@main # Need latest version to use pyproject.toml instead of requirements.txt + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }}
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/test.yml (1)
40-45:⚠️ Potential issue | 🔴 CriticalBug: Virtualenv cache key doesn't include
python-version, so matrix jobs will corrupt each other's cache.The cache key
venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}is identical for both Python 3.10 and 3.12 matrix entries. Whichever job runs first will populate the cache with its Python-version-specific.venv, and the second job will restore an incompatible virtualenv, likely causing import errors or silent ABI mismatches.Include the Python version in the key:
🔧 Proposed fix
- name: Load cached Poetry virtualenv id: cached-poetry-dependencies uses: actions/cache@v3 with: path: .venv - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}pyproject.toml (1)
22-22:⚠️ Potential issue | 🔴 Critical
pandas = "^1.5.3"caps at <2.0.0 — pandas 1.x has no Python 3.12 support.Poetry's
^1.5.3resolves to>=1.5.3, <2.0.0. There are no pandas 1.x releases with Python 3.12 wheels. However, bumping to^2.0.0is insufficient—pandas 2.0.x also lacks Python 3.12 support (only up to 3.11). The minimum version for Python 3.12 support is pandas 2.1.1. Update to^2.1.1or higher.
🤖 Fix all issues with AI agents
In `@pyproject.toml`:
- Line 31: The pyproject specifies timm = "^0.6.13" which predates support for
torch 2.5.x; update the dependency in pyproject.toml from the pinned "timm =
\"^0.6.13\"" to a newer timm release that explicitly supports torch 2.5 (e.g.,
the latest stable timm compatible with your torch version), then regenerate your
lockfile / run your dependency install (poetry lock && poetry install or pip
freeze/update) and run your model tests to verify compatibility; ensure the
change is made where "timm = \"^0.6.13\"" appears and include the new version
string in the same dependency entry.
| torchvision = "^0.16.0" | ||
| torch = "^2.5.0" | ||
| torchvision = "^0.20.0" | ||
| timm = "^0.6.13" |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
timm 0.6 torch 2.5 compatibility
💡 Result:
timm==0.6.x is very old (e.g., 0.6.5 was released Jul 10, 2022) and doesn’t claim/testing coverage for modern PyTorch releases like torch 2.5. [1] In practice it may work for some models, but if you hit import/API issues, the realistic fix is to upgrade timm.
What is clearly defined is the torch/torchvision pairing for torch 2.5:
- torch 2.5.0 ⇔ torchvision 0.20.0 (and torchaudio 2.5.0) [3] (also shown in PyTorch’s domain-library compatibility matrix) [2]
Recommended (most compatible) setup for torch 2.5:
pip install --upgrade timm
pip install --upgrade torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0If you must stay on timm==0.6.*, at least ensure you’re on the correct torchvision for torch 2.5 (0.20.0), since mismatched torch/torchvision commonly causes binary-ops errors. [3] Also note current timm releases explicitly test newer PyTorch (e.g. “PyTorch 2.6 … tested and working”); 0.6.* predates that. [4]
Sources: PyPI timm==0.6.5 release info [1]; PyTorch versions compatibility matrix [2]; PyTorch “previous versions” install table for v2.5.0 [3]; PyPI timm changelog note about tested PyTorch versions [4].
Upgrade timm to a version with torch 2.5.x support.
The pinned version timm 0.6.13 (released July 2022) does not claim or test coverage for torch 2.5.x. While it may work for some models, compatibility issues are not unlikely. Current timm releases explicitly support torch 2.5.x and newer versions. Upgrade timm to the latest version compatible with your torch 2.5 setup.
🤖 Prompt for AI Agents
In `@pyproject.toml` at line 31, The pyproject specifies timm = "^0.6.13" which
predates support for torch 2.5.x; update the dependency in pyproject.toml from
the pinned "timm = \"^0.6.13\"" to a newer timm release that explicitly supports
torch 2.5 (e.g., the latest stable timm compatible with your torch version),
then regenerate your lockfile / run your dependency install (poetry lock &&
poetry install or pip freeze/update) and run your model tests to verify
compatibility; ensure the change is made where "timm = \"^0.6.13\"" appears and
include the new version string in the same dependency entry.
Summary
Why this change
The triton package bundled with torch 2.1.x only had Linux wheels for Python 3.10/3.11. Torch 2.5.x includes triton 3.x which properly supports Python 3.12.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit