diff --git a/requirements/fabric/base.txt b/requirements/fabric/base.txt index 0a7629151f6c1..ad36bc25fcc13 100644 --- a/requirements/fabric/base.txt +++ b/requirements/fabric/base.txt @@ -1,7 +1,7 @@ # NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment -torch >=2.1.0, <2.9.0 +torch >=2.1.0, <2.10.0 fsspec[http] >=2022.5.0, <2025.10.0 packaging >=20.0, <=25.0 typing-extensions >4.5.0, <4.16.0 diff --git a/requirements/fabric/examples.txt b/requirements/fabric/examples.txt index ab6ffb8b137df..72f13a4128e56 100644 --- a/requirements/fabric/examples.txt +++ b/requirements/fabric/examples.txt @@ -1,5 +1,5 @@ # NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment -torchvision >=0.16.0, <0.24.0 +torchvision >=0.16.0, <0.25.0 torchmetrics >=0.10.0, <1.9.0 diff --git a/requirements/pytorch/base.txt b/requirements/pytorch/base.txt index 9c7a60bd49f0e..1dbf53134cb31 100644 --- a/requirements/pytorch/base.txt +++ b/requirements/pytorch/base.txt @@ -1,7 +1,7 @@ # NOTE: the upper bound for the package version is only set for CI stability, and it is dropped while installing this package # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment -torch >=2.1.0, <2.9.0 +torch >=2.1.0, <2.10.0 tqdm >=4.57.0, <4.68.0 PyYAML >5.4, <6.1.0 fsspec[http] >=2022.5.0, <2025.10.0 diff --git a/requirements/pytorch/examples.txt b/requirements/pytorch/examples.txt index b64ed5ee47c67..b17e755cd18e2 100644 --- a/requirements/pytorch/examples.txt +++ b/requirements/pytorch/examples.txt @@ -2,6 +2,6 @@ # in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment requests <2.33.0 -torchvision >=0.16.0, <0.24.0 +torchvision >=0.16.0, <0.25.0 ipython[all] >=8.0.0, <10.0.0 torchmetrics >=0.10.0, <1.9.0 diff --git a/requirements/typing.txt b/requirements/typing.txt index dc848c55e583d..8c5ad38fb7825 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ mypy==1.18.2 -torch==2.8.0 +torch==2.9.0 types-Markdown types-PyYAML diff --git a/src/lightning/fabric/utilities/spike.py b/src/lightning/fabric/utilities/spike.py index 9c1b0a2a00572..cd2e05309e087 100644 --- a/src/lightning/fabric/utilities/spike.py +++ b/src/lightning/fabric/utilities/spike.py @@ -126,10 +126,10 @@ def _handle_spike(self, fabric: "Fabric", batch_idx: int) -> None: raise TrainingSpikeException(batch_idx=batch_idx) def _check_atol(self, val_a: Union[float, torch.Tensor], val_b: Union[float, torch.Tensor]) -> bool: - return (self.atol is None) or bool(abs(val_a - val_b) >= abs(self.atol)) + return (self.atol is None) or bool(abs(val_a - val_b) >= abs(self.atol)) # type: ignore def _check_rtol(self, val_a: Union[float, torch.Tensor], val_b: Union[float, torch.Tensor]) -> bool: - return (self.rtol is None) or bool(abs(val_a - val_b) >= abs(self.rtol * val_b)) + return (self.rtol is None) or bool(abs(val_a - val_b) >= abs(self.rtol * val_b)) # type: ignore def _is_better(self, diff_val: torch.Tensor) -> bool: if self.mode == "min":