From ccdbf8f363c123c842b5d43923c9a282e5c796a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 23:10:31 +0000 Subject: [PATCH 01/10] build(deps): bump mypy from 1.17.1 to 1.18.1 in /requirements Bumps [mypy](https://github.com/python/mypy) from 1.17.1 to 1.18.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.17.1...v1.18.1) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.18.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements/typing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/typing.txt b/requirements/typing.txt index 44eb019ced1..e92b1eb166a 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,4 +1,4 @@ -mypy ==1.17.1 +mypy ==1.18.1 torch ==2.8.0 types-PyYAML From 9e43434daee317337952177550627859c7342dd6 Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Thu, 18 Sep 2025 03:46:25 +0530 Subject: [PATCH 02/10] Update ssim.py --- src/torchmetrics/functional/image/ssim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/image/ssim.py b/src/torchmetrics/functional/image/ssim.py index ccaafe66065..a0c7d7e14a6 100644 --- a/src/torchmetrics/functional/image/ssim.py +++ b/src/torchmetrics/functional/image/ssim.py @@ -111,7 +111,7 @@ def _ssim_update( raise ValueError(f"Expected `sigma` to have positive number. Got {sigma}.") if data_range is None: - data_range = max(preds.max() - preds.min(), target.max() - target.min()) # type: ignore[call-overload] + data_range = max(preds.max() - preds.min(), target.max() - target.min()) elif isinstance(data_range, tuple): preds = torch.clamp(preds, min=data_range[0], max=data_range[1]) target = torch.clamp(target, min=data_range[0], max=data_range[1]) From edb7f0a91032017a0e7996054fca8fba13ef49a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:16:52 +0000 Subject: [PATCH 03/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/torchmetrics/functional/image/ssim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/image/ssim.py b/src/torchmetrics/functional/image/ssim.py index a0c7d7e14a6..29b841ac40e 100644 --- a/src/torchmetrics/functional/image/ssim.py +++ b/src/torchmetrics/functional/image/ssim.py @@ -111,7 +111,7 @@ def _ssim_update( raise ValueError(f"Expected `sigma` to have positive number. Got {sigma}.") if data_range is None: - data_range = max(preds.max() - preds.min(), target.max() - target.min()) + data_range = max(preds.max() - preds.min(), target.max() - target.min()) elif isinstance(data_range, tuple): preds = torch.clamp(preds, min=data_range[0], max=data_range[1]) target = torch.clamp(target, min=data_range[0], max=data_range[1]) From 801e22840d179f02641db3f97b6be59b27dafc19 Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Thu, 18 Sep 2025 03:46:55 +0530 Subject: [PATCH 04/10] Update squad.py --- src/torchmetrics/functional/text/squad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/text/squad.py b/src/torchmetrics/functional/text/squad.py index c52f0860e14..93a57aa31b7 100644 --- a/src/torchmetrics/functional/text/squad.py +++ b/src/torchmetrics/functional/text/squad.py @@ -87,7 +87,7 @@ def _metric_max_over_ground_truths( metric_fn: Callable[[str, str], Tensor], prediction: str, ground_truths: list[str] ) -> Tensor: """Calculate maximum score for a predicted answer with all reference answers.""" - return max(metric_fn(prediction, truth) for truth in ground_truths) # type: ignore[type-var] + return max(metric_fn(prediction, truth) for truth in ground_truths) def _squad_input_check( From ed0b99f6ee6c4384208e23a62d0a5dec995820ed Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:17:16 +0000 Subject: [PATCH 05/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/torchmetrics/functional/text/squad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/text/squad.py b/src/torchmetrics/functional/text/squad.py index 93a57aa31b7..6d4cfd5985d 100644 --- a/src/torchmetrics/functional/text/squad.py +++ b/src/torchmetrics/functional/text/squad.py @@ -87,7 +87,7 @@ def _metric_max_over_ground_truths( metric_fn: Callable[[str, str], Tensor], prediction: str, ground_truths: list[str] ) -> Tensor: """Calculate maximum score for a predicted answer with all reference answers.""" - return max(metric_fn(prediction, truth) for truth in ground_truths) + return max(metric_fn(prediction, truth) for truth in ground_truths) def _squad_input_check( From 9ea9bb2c5d16a2485b153c47eaca4201833c2de7 Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Sun, 21 Sep 2025 03:54:31 +0530 Subject: [PATCH 06/10] Update ssim.py --- src/torchmetrics/functional/image/ssim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/image/ssim.py b/src/torchmetrics/functional/image/ssim.py index 29b841ac40e..40fe5296ab1 100644 --- a/src/torchmetrics/functional/image/ssim.py +++ b/src/torchmetrics/functional/image/ssim.py @@ -111,7 +111,7 @@ def _ssim_update( raise ValueError(f"Expected `sigma` to have positive number. Got {sigma}.") if data_range is None: - data_range = max(preds.max() - preds.min(), target.max() - target.min()) + data_range = max(preds.max() - preds.min(), target.max() - target.min()).item() elif isinstance(data_range, tuple): preds = torch.clamp(preds, min=data_range[0], max=data_range[1]) target = torch.clamp(target, min=data_range[0], max=data_range[1]) From 000fc9209c9af6149b74d02ff3e674c6305cae8f Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Sun, 21 Sep 2025 04:00:07 +0530 Subject: [PATCH 07/10] Update ssim.py --- src/torchmetrics/functional/image/ssim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torchmetrics/functional/image/ssim.py b/src/torchmetrics/functional/image/ssim.py index 40fe5296ab1..2dbc1632568 100644 --- a/src/torchmetrics/functional/image/ssim.py +++ b/src/torchmetrics/functional/image/ssim.py @@ -117,8 +117,8 @@ def _ssim_update( target = torch.clamp(target, min=data_range[0], max=data_range[1]) data_range = data_range[1] - data_range[0] - c1 = pow(k1 * data_range, 2) # type: ignore[operator] - c2 = pow(k2 * data_range, 2) # type: ignore[operator] + c1 = pow(k1 * data_range, 2) + c2 = pow(k2 * data_range, 2) device = preds.device channel = preds.size(1) From c213497ae30fc05c104952ce231272f9c6276d25 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 22:30:27 +0000 Subject: [PATCH 08/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/torchmetrics/functional/image/ssim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/torchmetrics/functional/image/ssim.py b/src/torchmetrics/functional/image/ssim.py index 2dbc1632568..72e1cdee684 100644 --- a/src/torchmetrics/functional/image/ssim.py +++ b/src/torchmetrics/functional/image/ssim.py @@ -117,8 +117,8 @@ def _ssim_update( target = torch.clamp(target, min=data_range[0], max=data_range[1]) data_range = data_range[1] - data_range[0] - c1 = pow(k1 * data_range, 2) - c2 = pow(k2 * data_range, 2) + c1 = pow(k1 * data_range, 2) + c2 = pow(k2 * data_range, 2) device = preds.device channel = preds.size(1) From 3cb90a192278457a2a495c3d6cb4e441c820b795 Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Wed, 1 Oct 2025 01:40:07 +0530 Subject: [PATCH 09/10] Update typing.txt --- requirements/typing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/typing.txt b/requirements/typing.txt index e92b1eb166a..aa882423cb2 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,4 +1,4 @@ -mypy ==1.18.1 +mypy ==1.18.2 torch ==2.8.0 types-PyYAML From 239fcb7b6f5fe0ae363754df1557aa0188968b49 Mon Sep 17 00:00:00 2001 From: Nicki Skafte Date: Mon, 6 Oct 2025 09:18:05 +0200 Subject: [PATCH 10/10] pre-commit --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fd00bcaa6bd..c77320656fd 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,15 @@ ______________________________________________________________________ # Looking for GPUs? -Over 340,000 developers use [Lightning Cloud](https://lightning.ai/?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme) - purpose-built for PyTorch and PyTorch Lightning. -- [GPUs](https://lightning.ai/pricing?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme) from $0.19. -- [Clusters](https://lightning.ai/clusters?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): frontier-grade training/inference clusters. + +Over 340,000 developers use [Lightning Cloud](https://lightning.ai/?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme) - purpose-built for PyTorch and PyTorch Lightning. + +- [GPUs](https://lightning.ai/pricing?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme) from $0.19. +- [Clusters](https://lightning.ai/clusters?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): frontier-grade training/inference clusters. - [AI Studio (vibe train)](https://lightning.ai/studios?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): workspaces where AI helps you debug, tune and vibe train. -- [AI Studio (vibe deploy)](https://lightning.ai/studios?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): workspaces where AI helps you optimize, and deploy models. +- [AI Studio (vibe deploy)](https://lightning.ai/studios?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): workspaces where AI helps you optimize, and deploy models. - [Notebooks](https://lightning.ai/notebooks?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): Persistent GPU workspaces where AI helps you code and analyze. -- [Inference](https://lightning.ai/deploy?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): Deploy models as inference APIs. +- [Inference](https://lightning.ai/deploy?utm_source=tm_readme&utm_medium=referral&utm_campaign=tm_readme): Deploy models as inference APIs. # Installation