ci: add minimal-version resolution matrix to cpu and gpu jobs#214
ci: add minimal-version resolution matrix to cpu and gpu jobs#214janickm wants to merge 1 commit into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
5c67b3b to
26ae181
Compare
2bcac5c to
aadb9ad
Compare
Add a resolution: [pinned, minimal] matrix dimension to both CI jobs. - pinned: uses uv sync from the lock file (existing behavior), runs lint (pre-commit/ty) and wheel build in addition to tests. - minimal: uses uv sync --resolution lowest-direct, which re-resolves to the lowest versions allowed by pyproject.toml bounds (e.g. torch 2.9 instead of 2.12). Only runs tests -- linting is skipped because older type stubs produce false positives against current code. fail-fast: false so both cells run to completion even if one fails. publish-testpypi requires all matrix cells to pass. Also: - Removes the Windows-only cu130 PyTorch index and triton-windows dep from flashdreams/pyproject.toml. Windows CUDA users can configure their own index. Removing the cu130 index eliminates cross-index CUDA version mismatches during lowest-direct resolution. - Lowers omnidreams and ludus-renderer torch floor from >=2.11 to >=2.9. - Lowers omnidreams torchvision from >=0.26 to >=0.24. - Raises opencv-python-headless from >=4.5 to >=4.6. - Raises pytest-asyncio from >=0.23 to >=0.24.
aadb9ad to
94ab942
Compare
Greptile SummaryThis PR adds a
Confidence Score: 4/5Safe to merge after confirming whether the lock file being permanently lowest-direct is intentional. The CI plumbing is sound — matrix expansion, cache key separation, conditional lint/wheel steps, and publish gating all work as described. The uv.lock — specifically the new [options] resolution-mode entry and the loss of all Windows platform markers. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
push[Push / merge_group] --> cpu & gpu
subgraph cpu["cpu job (matrix: pinned | minimal)"]
C1[Install system deps] --> C2[Checkout + setup uv]
C2 --> C3{matrix.resolution}
C3 -- pinned --> C4["uv sync --extra dev --group lint"]
C3 -- minimal --> C5["uv sync --resolution lowest-direct\n--extra dev --group lint"]
C4 --> C6["Run linter checks (pinned only)"]
C4 --> C7["Build wheel (pinned only)"]
C5 -. skipped .-> C6
C5 -. skipped .-> C7
C6 --> C8[pytest -m ci_cpu]
C7 --> C8
C5 --> C8
end
subgraph gpu["gpu job (matrix: pinned | minimal)"]
G1[Detect GPU arch] --> G2[Checkout + setup uv]
G2 --> G3{matrix.resolution}
G3 -- pinned --> G4["uv sync --extra dev"]
G3 -- minimal --> G5["uv sync --resolution lowest-direct --extra dev"]
G4 --> G6[pytest -m ci_gpu]
G5 --> G6
G6 --> G7[Trim uv cache]
end
cpu & gpu --> pub{all 4 cells pass?}
pub -- yes, main branch --> PYPI[publish-testpypi]
pub -- no --> FAIL[Block publish]
|
| if [ "${{ matrix.resolution }}" = "minimal" ]; then | ||
| uv sync --resolution lowest-direct --extra dev --group lint \ | ||
| --no-install-package transformer-engine-torch | ||
| else |
There was a problem hiding this comment.
The
minimal CPU cell installs --group lint (which pulls in pre-commit and ty) even though the "Run linter checks" step is skipped for that cell. Only --group test is needed to satisfy pytest-asyncio and imageio-ffmpeg for the unit-test step, saving two unnecessary package installs per minimal run.
| if [ "${{ matrix.resolution }}" = "minimal" ]; then | |
| uv sync --resolution lowest-direct --extra dev --group lint \ | |
| --no-install-package transformer-engine-torch | |
| else | |
| if [ "${{ matrix.resolution }}" = "minimal" ]; then | |
| uv sync --resolution lowest-direct --extra dev --group test \ | |
| --no-install-package transformer-engine-torch | |
| else |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Add a
resolution: [pinned, minimal]matrix dimension to both CI jobs, validating that declared minimum dependency bounds actually work.How it works
pinneduv sync(lock file)minimaluv sync --resolution lowest-directThe
minimalcell re-resolves the workspace from scratch using the lowest allowed version for each direct dependency (e.g.torch>=2.9resolves totorch==2.9.0instead of2.12.0). This catches cases where code uses APIs not available at the declared minimum.Details
pinned(we publish against locked versions)publish-testpypirequires all matrix cells (needs: [cpu, gpu]) -- both pinned and minimal must pass before publishingfail-fast: false-- both cells run to completion even if one failscpu-pinned/cpu-minimal,gpu-sm{arch}-pinned/gpu-sm{arch}-minimalPrerequisites
Depends on #211 which pins lower bounds on all workspace dependencies (enabling
--resolution lowest-directto resolve without failures).Local validation
Tested locally with torch 2.9.0 (lowest-direct resolution):