diff --git a/.azure/gpu-unittests.yml b/.azure/gpu-unittests.yml index bb5f6816e83..238fac3bde0 100644 --- a/.azure/gpu-unittests.yml +++ b/.azure/gpu-unittests.yml @@ -20,7 +20,6 @@ jobs: "PyTorch | old": # Torch does not have build wheels with old Torch versions for newer CUDA docker-image: "pytorchlightning/torchmetrics:ubuntu20.04-cuda11.1.1-py3.8-torch1.8.1" - agent-pool: "lit-rtx-3090" torch-ver: "1.8.1" "PyTorch | 1.X": docker-image: "pytorchlightning/torchmetrics:ubuntu22.04-cuda11.8.0-py3.9-torch1.13" @@ -76,6 +75,11 @@ jobs: pip list displayName: "Image info & NVIDIA" + - bash: | + python .github/assistant.py set-oldest-versions + condition: eq(variables['torch-ver'], '1.8.1') + displayName: "Setting oldest versions" + - bash: | pip install -q packaging wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index fbef75eb5de..9cf08c6e574 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -32,7 +32,7 @@ jobs: matrix: os: ["ubuntu-20.04"] python-version: ["3.9"] - pytorch-version: ["1.9.1", "1.10.2", "1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.0"] + pytorch-version: ["1.10.2", "1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.0"] include: - { os: "ubuntu-22.04", python-version: "3.8", pytorch-version: "1.13.1" } - { os: "ubuntu-22.04", python-version: "3.10", pytorch-version: "1.13.1" } @@ -49,6 +49,7 @@ jobs: - { os: "windows-2022", python-version: "3.11", pytorch-version: "2.1.0" } # the oldest configurations - { os: "ubuntu-20.04", python-version: "3.8", pytorch-version: "1.8.1", requires: "oldest" } + - { os: "ubuntu-20.04", python-version: "3.8", pytorch-version: "1.9.1", requires: "oldest" } - { os: "macOS-11", python-version: "3.8", pytorch-version: "1.8.1", requires: "oldest" } - { os: "windows-2019", python-version: "3.8", pytorch-version: "1.8.1", requires: "oldest" } env: diff --git a/CHANGELOG.md b/CHANGELOG.md index a8a7ff2260e..a8f6ee4a3e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,53 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 **Note: we move fast, but still we preserve 0.1 version (one feature release) back compatibility.** -## [UnReleased] - 2023-MM-DD +## [1.2.1] - 2023-11-30 ### Added -- - - Added error if `NoTrainInceptionV3` is being initialized without `torch-fidelity` not being installed ([#2143](https://github.com/Lightning-AI/torchmetrics/pull/2143)) - - - Added support for Pytorch v2.1 ([#2142](https://github.com/Lightning-AI/torchmetrics/pull/2142)) ### Changed - Change default state of `SpectralAngleMapper` and `UniversalImageQualityIndex` to be tensors ([#2089](https://github.com/Lightning-AI/torchmetrics/pull/2089)) - - -- Use arange and repeat for deterministic bincount ([#2184](https://github.com/Lightning-AI/torchmetrics/pull/2184)) - +- Use `arange` and repeat for deterministic bincount ([#2184](https://github.com/Lightning-AI/torchmetrics/pull/2184)) ### Removed -- Removed `lpips` third-party package as dependency of `LearnedPerceptualImagePatchSimilarity` metric ([#2230](https://github.com/Lightning-AI/torchmetrics/pull/2230)) - +- Removed unused `lpips` third-party package as dependency of `LearnedPerceptualImagePatchSimilarity` metric ([#2230](https://github.com/Lightning-AI/torchmetrics/pull/2230)) ### Fixed - Fixed numerical stability bug in `LearnedPerceptualImagePatchSimilarity` metric ([#2144](https://github.com/Lightning-AI/torchmetrics/pull/2144)) - - - Fixed numerical stability issue in `UniversalImageQualityIndex` metric ([#2222](https://github.com/Lightning-AI/torchmetrics/pull/2222)) - - - Fixed incompatibility for `MeanAveragePrecision` with `pycocotools` backend when too little `max_detection_thresholds` are provided ([#2219](https://github.com/Lightning-AI/torchmetrics/pull/2219)) - - - Fixed support for half precision in Perplexity metric ([#2235](https://github.com/Lightning-AI/torchmetrics/pull/2235)) - - - Fixed device and dtype for `LearnedPerceptualImagePatchSimilarity` functional metric ([#2234](https://github.com/Lightning-AI/torchmetrics/pull/2234)) - - - Fixed bug in `Metric._reduce_states(...)` when using `dist_sync_fn="cat"` ([#2226](https://github.com/Lightning-AI/torchmetrics/pull/2226)) - - - Fixed bug in `CosineSimilarity` where 2d is expected but 1d input was given ([#2241](https://github.com/Lightning-AI/torchmetrics/pull/2241)) - - - Fixed bug in `MetricCollection` when using compute groups and `compute` is called more than once ([#2211](https://github.com/Lightning-AI/torchmetrics/pull/2211)) diff --git a/src/torchmetrics/__about__.py b/src/torchmetrics/__about__.py index cef6654df87..d2c192fc886 100644 --- a/src/torchmetrics/__about__.py +++ b/src/torchmetrics/__about__.py @@ -1,4 +1,4 @@ -__version__ = "1.3.0dev" +__version__ = "1.2.1" __author__ = "Lightning-AI et al." __author_email__ = "name@pytorchlightning.ai" __license__ = "Apache-2.0" diff --git a/tests/unittests/image/test_perceptual_path_length.py b/tests/unittests/image/test_perceptual_path_length.py index dd08bac4b22..a7bbfc21154 100644 --- a/tests/unittests/image/test_perceptual_path_length.py +++ b/tests/unittests/image/test_perceptual_path_length.py @@ -204,5 +204,5 @@ def test_compare(): ) result = result[-1].cpu() - assert 0.94 * result.mean() <= compare.mean() <= 1.06 * result.mean() - assert 0.94 * result.std() <= compare.std() <= 1.06 * result.std() + assert 0.92 * result.mean() <= compare.mean() <= 1.08 * result.mean() + assert 0.92 * result.std() <= compare.std() <= 1.08 * result.std()