Torchmetrics

Latest version: v1.7.0

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 10

1.7.0

Added

- Additions to image domain:
- Added `ARNIQA` metric ([2953](https://github.com/Lightning-AI/torchmetrics/pull/2953))
- Added `DeepImageStructureAndTextureSimilarity` ([2993](https://github.com/Lightning-AI/torchmetrics/pull/2993))
- Added support for more models and processors in `CLIPScore` ([2978](https://github.com/Lightning-AI/torchmetrics/pull/2978))
- Added `JensenShannonDivergence` metric to regression package ([2992](https://github.com/Lightning-AI/torchmetrics/pull/2992))
- Added `ClusterAccuracy` metric to cluster package ([2777](https://github.com/Lightning-AI/torchmetrics/pull/2777))
- Added `Equal Error Rate (EER)` to classification package ([3013](https://github.com/Lightning-AI/torchmetrics/pull/3013))
- Added functional interface to `MeanAveragePrecision` metric ([3011](https://github.com/Lightning-AI/torchmetrics/pull/3011))

Changed

- Making `num_classes` optional for `one-hot` inputs in `MeanIoU` ([3012](https://github.com/Lightning-AI/torchmetrics/pull/3012))

Removed

- Removed `Dice` from classification ([3017](https://github.com/Lightning-AI/torchmetrics/pull/3017))

Fixed

- Fixed edge case in integration between class-wise wrapper and metric tracker ([3008](https://github.com/Lightning-AI/torchmetrics/pull/3008))
- Fixed `IndexError` in `MultiClassAccuracy` when using `top_k` with single sample ([3021](https://github.com/Lightning-AI/torchmetrics/pull/3021))

---

1.6.3

Fixed

- Fixed logic in how metric states referencing is handled in `MetricCollection` ([2990](https://github.com/Lightning-AI/torchmetrics/pull/2990))
- Fixed integration between class-wise wrapper and metric tracker ([3004](https://github.com/Lightning-AI/torchmetrics/pull/3004))

1.6.2

Added

- Added `zero_division` argument to `DiceScore` in segmentation package ([2860](https://github.com/Lightning-AI/torchmetrics/pull/2860))
- Added `cache_session` to `DNSMOS` metric to control caching behavior ([2974](https://github.com/Lightning-AI/torchmetrics/pull/2974))
- Added `disable` option to `nan_strategy` in basic aggregation metrics ([2943](https://github.com/Lightning-AI/torchmetrics/pull/2943))

Changed

- Make `num_classes` optional for classification in case of micro averaging ([2841](https://github.com/Lightning-AI/torchmetrics/pull/2841))
- Enhance `Clip_Score` to calculate similarities between same modalities ([2875](https://github.com/Lightning-AI/torchmetrics/pull/2875))

Fixed

- Fixed `DiceScore` when there is zero overlap between predictions and targets ([2860](https://github.com/Lightning-AI/torchmetrics/pull/2860))
- Fixed `MeanAveragePrecision` for `average="micro"` when 0 label is not present ([2968](https://github.com/Lightning-AI/torchmetrics/pull/2968))
- Fixed corner-case in `PearsonCorrCoef` when input is constant ([2975](https://github.com/Lightning-AI/torchmetrics/pull/2975))
- Fixed `MetricCollection.update` gives identical results ([2944](https://github.com/Lightning-AI/torchmetrics/pull/2944))
- Fixed missing `kwargs` in `PIT` metric for permutation wise mode ([2977](https://github.com/Lightning-AI/torchmetrics/pull/2977))
- Fixed multiple errors in the `_final_aggregation` function for `PearsonCorrCoef` ([2980](https://github.com/Lightning-AI/torchmetrics/pull/2980))
- Fixed incorrect CLIP-IQA type hints ([2952](https://github.com/Lightning-AI/torchmetrics/pull/2952))

1.6.1

Changed

- Enabled specifying weights path for FID ([2867](https://github.com/Lightning-AI/torchmetrics/pull/2867))
- Delete `Device2Host` caused by comm with device and host ([2840](https://github.com/Lightning-AI/torchmetrics/pull/2840))

Fixed

- Fixed plotting of multilabel confusion matrix ([2858](https://github.com/Lightning-AI/torchmetrics/pull/2858))
- Fixed issue with shared state in metric collection when using dice score ([2848](https://github.com/Lightning-AI/torchmetrics/pull/2848))
- Fixed `top_k` for `multiclassf1score` with one-hot encoding ([2839](https://github.com/Lightning-AI/torchmetrics/pull/2839))
- Fixed slow calculations of classification metrics with MPS ([2876](https://github.com/Lightning-AI/torchmetrics/pull/2876))

1.6.0

Added

- Added audio metric `NISQA` ([2792](https://github.com/Lightning-AI/torchmetrics/pull/2792))
- Added classification metric `LogAUC` ([2377](https://github.com/Lightning-AI/torchmetrics/pull/2377))
- Added classification metric `NegativePredictiveValue` ([2433](https://github.com/Lightning-AI/torchmetrics/pull/2433))
- Added regression metric `NormalizedRootMeanSquaredError` ([2442](https://github.com/Lightning-AI/torchmetrics/pull/2442))
- Added segmentation metric `Dice` ([2725](https://github.com/Lightning-AI/torchmetrics/pull/2725))
- Added method `merge_state` to `Metric` ([2786](https://github.com/Lightning-AI/torchmetrics/pull/2786))
- Added support for propagation of the autograd graph in ddp setting ([2754](https://github.com/Lightning-AI/torchmetrics/pull/2754))

Changed

- Changed naming and input order arguments in `KLDivergence` ([2800](https://github.com/Lightning-AI/torchmetrics/pull/2800))

Deprecated

- Deprecated Dice from classification metrics ([2725](https://github.com/Lightning-AI/torchmetrics/pull/2725))

Removed

- Changed minimum supported Pytorch version to 2.0 ([2671](https://github.com/Lightning-AI/torchmetrics/pull/2671))
- Dropped support for Python 3.8 ([2827](https://github.com/Lightning-AI/torchmetrics/pull/2827))
- Removed `num_outputs` in `R2Score` ([2800](https://github.com/Lightning-AI/torchmetrics/pull/2800))

Fixed

- Fixed segmentation `Dice` + `GeneralizedDice` for 2d index tensors ([2832](https://github.com/Lightning-AI/torchmetrics/pull/2832))
- Fixed mixed results of `rouge_score` with `accumulate='best'` ([2830](https://github.com/Lightning-AI/torchmetrics/pull/2830))

---

1.5.2

Changed

- Re-adding `numpy` 2+ support ([2804](https://github.com/Lightning-AI/torchmetrics/pull/2804))

Fixed

- Fixed iou scores in detection for either empty predictions/targets leading to wrong scores ([2805](https://github.com/Lightning-AI/torchmetrics/pull/2805))
- Fixed `MetricCollection` compatibility with `torch.jit.script` ([2813](https://github.com/Lightning-AI/torchmetrics/pull/2813))
- Fixed assert in PIT ([2811](https://github.com/Lightning-AI/torchmetrics/pull/2811))
- Patched `np.Inf` for `numpy` 2.0+ ([2826](https://github.com/Lightning-AI/torchmetrics/pull/2826))

Page 1 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.