From d87634a1a4ad3d6de2830cbbc1085d0575440489 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 18:27:32 +0200 Subject: [PATCH] Update torchmetrics requirement from <0.12.0,>=0.10.0 to >=0.10.0,<1.1.0 in /requirements (#18353) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com> --- requirements/fabric/examples.txt | 2 +- requirements/pytorch/examples.txt | 2 +- src/lightning/pytorch/_graveyard/_torchmetrics.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/fabric/examples.txt b/requirements/fabric/examples.txt index b609512899..596954733f 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.12.0, <=0.15.2 -torchmetrics >=0.10.0, <0.12.0 +torchmetrics >=0.10.0, <1.1.0 lightning-utilities >=0.8.0, <0.10.0 diff --git a/requirements/pytorch/examples.txt b/requirements/pytorch/examples.txt index 65ed18b4fb..5f5bb89f0f 100644 --- a/requirements/pytorch/examples.txt +++ b/requirements/pytorch/examples.txt @@ -3,5 +3,5 @@ torchvision >=0.12.0, <=0.15.2 gym[classic_control] >=0.17.0, <0.26.3 ipython[all] <8.14.1 -torchmetrics >=0.10.0, <0.12.0 +torchmetrics >=0.10.0, <1.1.0 lightning-utilities >=0.7.0, <0.10.0 diff --git a/src/lightning/pytorch/_graveyard/_torchmetrics.py b/src/lightning/pytorch/_graveyard/_torchmetrics.py index c61eb3f8dc..6bbc66887b 100644 --- a/src/lightning/pytorch/_graveyard/_torchmetrics.py +++ b/src/lightning/pytorch/_graveyard/_torchmetrics.py @@ -17,7 +17,7 @@ def compare_version(package: str, op: Callable, version: str, use_base_version: # https://github.com/Lightning-AI/metrics/blob/v0.7.3/torchmetrics/metric.py#L96 with contextlib.suppress(AttributeError): if hasattr(torchmetrics.utilities.imports, "_compare_version"): - torchmetrics.utilities.imports._compare_version = compare_version # type: ignore + torchmetrics.utilities.imports._compare_version = compare_version with contextlib.suppress(AttributeError): if hasattr(torchmetrics.metric, "_compare_version"):