Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/ci-tests-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,20 @@ jobs:
matrix:
os: [macOS-14, ubuntu-22.04, windows-2022]
config:
# only run PyTorch latest
# Test unified "lightning" package with PyTorch 2.1-2.5
- { pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }

# only run PyTorch latest with Python latest, use Fabric scope to limit dependency issues
# Test standalone "fabric" package with PyTorch 2.6-2.9
- { pkg-name: "fabric", python-version: "3.12.7", pytorch-version: "2.6" }

# "fabric" installs the standalone package
- { pkg-name: "fabric", python-version: "3.10", pytorch-version: "2.7" }

# adding recently cut Torch 2.7 - FUTURE
- { pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.7" }
- { pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.8" }
- { pkg-name: "fabric", python-version: "3.12", pytorch-version: "2.9" }

# "oldest" versions tests, only on minimum Python
# Test minimum supported versions (oldest)
- { pkg-name: "fabric", pytorch-version: "2.1", requires: "oldest" }
timeout-minutes: 25 # because of building grpcio on Mac
env:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/ci-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,20 @@ jobs:
matrix:
os: [macOS-14, ubuntu-22.04, windows-2022]
config:
# only run PyTorch latest
# Test unified "lightning" package with PyTorch 2.1-2.5
- { pkg-name: "lightning", python-version: "3.10", pytorch-version: "2.1" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.2.2" }
- { pkg-name: "lightning", python-version: "3.11", pytorch-version: "2.3" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.4.1" }
- { pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }

# only run PyTorch latest with Python latest, use PyTorch scope to limit dependency issues
# Test standalone "pytorch" package with PyTorch 2.6-2.9
- { pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.6" }

# "pytorch" installs the standalone package
- { pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.7" }

# adding recently cut Torch 2.7 - FUTURE
- { pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" }
- { pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.8" }
- { pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.9" }

# "oldest" versions tests, only on minimum Python
# Test minimum supported versions (oldest)
- { pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
timeout-minutes: 50
env:
Expand Down
1 change: 1 addition & 0 deletions src/lightning/pytorch/utilities/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
_TORCHMETRICS_GREATER_EQUAL_0_11 = RequirementCache("torchmetrics>=0.11.0") # using new API with task
_TORCHMETRICS_GREATER_EQUAL_1_0_0 = RequirementCache("torchmetrics>=1.0.0")
_TORCH_EQUAL_2_8 = RequirementCache("torch>=2.8.0,<2.9.0")
_TORCH_EQUAL_2_9 = RequirementCache("torch>=2.9.0,<2.10.0")

_OMEGACONF_AVAILABLE = package_available("omegaconf")
_TORCHVISION_AVAILABLE = RequirementCache("torchvision")
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_pytorch/helpers/runif.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import pytest

from lightning.fabric.utilities.imports import _IS_WINDOWS
from lightning.pytorch.utilities.imports import _TORCH_EQUAL_2_8
from lightning.pytorch.utilities.imports import _TORCH_EQUAL_2_8, _TORCH_EQUAL_2_9
from lightning.pytorch.utilities.testing import _runif_reasons


Expand All @@ -27,6 +27,6 @@ def RunIf(**kwargs):
_xfail_gloo_windows = pytest.mark.xfail(
RuntimeError,
strict=True,
condition=(_IS_WINDOWS and _TORCH_EQUAL_2_8),
condition=(_IS_WINDOWS and (_TORCH_EQUAL_2_8 or _TORCH_EQUAL_2_9)),
reason="makeDeviceForHostname(): unsupported gloo device",
)
Loading