Torchmetrics

Latest version: v1.7.0

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

Scan your dependencies

Page 7 of 10

0.9.0

Added

- Added `RetrievalPrecisionRecallCurve` and `RetrievalRecallAtFixedPrecision` to retrieval package ([951](https://github.com/Lightning-AI/torchmetrics/pull/951))
- Added class property `full_state_update` that determines `forward` should call `update` once or twice (
[984](https://github.com/Lightning-AI/torchmetrics/pull/984),
[1033](https://github.com/Lightning-AI/torchmetrics/pull/1033))
- Added support for nested metric collections ([1003](https://github.com/Lightning-AI/torchmetrics/pull/1003))
- Added `Dice` to classification package ([1021](https://github.com/Lightning-AI/torchmetrics/pull/1021))
- Added support to segmentation type `segm` as IOU for mean average precision ([822](https://github.com/Lightning-AI/torchmetrics/pull/822))

Changed

- Renamed `reduction` argument to `average` in Jaccard score and added additional options ([874](https://github.com/Lightning-AI/torchmetrics/pull/874))

Removed

- Removed deprecated `compute_on_step` argument (
[962](https://github.com/Lightning-AI/torchmetrics/pull/962),
[967](https://github.com/Lightning-AI/torchmetrics/pull/967),
[979](https://github.com/Lightning-AI/torchmetrics/pull/979),
[990](https://github.com/Lightning-AI/torchmetrics/pull/990),
[991](https://github.com/Lightning-AI/torchmetrics/pull/991),
[993](https://github.com/Lightning-AI/torchmetrics/pull/993),
[1005](https://github.com/Lightning-AI/torchmetrics/pull/1005),
[1004](https://github.com/Lightning-AI/torchmetrics/pull/1004),
[1007](https://github.com/Lightning-AI/torchmetrics/pull/1007)
)

Fixed

- Fixed non-empty state dict for a few metrics ([1012](https://github.com/Lightning-AI/torchmetrics/pull/1012))
- Fixed bug when comparing states while finding compute groups ([1022](https://github.com/Lightning-AI/torchmetrics/pull/1022))
- Fixed `torch.double` support in stat score metrics ([1023](https://github.com/Lightning-AI/torchmetrics/pull/1023))
- Fixed `FID` calculation for non-equal size real and fake input ([1028](https://github.com/Lightning-AI/torchmetrics/pull/1028))
- Fixed case where `KLDivergence` could output `Nan` ([1030](https://github.com/Lightning-AI/torchmetrics/pull/1030))
- Fixed deterministic for PyTorch<1.8 ([1035](https://github.com/Lightning-AI/torchmetrics/pull/1035))
- Fixed default value for `mdmc_average` in `Accuracy` ([1036](https://github.com/Lightning-AI/torchmetrics/pull/1036))
- Fixed missing copy of property when using compute groups in `MetricCollection` ([1052](https://github.com/Lightning-AI/torchmetrics/pull/1052))

---

0.8.2

Fixed

- Fixed multi device aggregation in `PearsonCorrCoef` ([998](https://github.com/Lightning-AI/torchmetrics/pull/998))
- Fixed MAP metric when using custom list of thresholds ([995](https://github.com/Lightning-AI/torchmetrics/pull/995))
- Fixed compatibility between compute groups in `MetricCollection` and prefix/postfix arg ([1007](https://github.com/Lightning-AI/torchmetrics/pull/1008))
- Fixed compatibility with future Pytorch 1.12 in `safe_matmul` ([1011](https://github.com/Lightning-AI/torchmetrics/pull/1011), [#1014](https://github.com/Lightning-AI/torchmetrics/pull/1014))

0.8.1

Changed

- Reimplemented the `signal_distortion_ratio` metric, which removed the absolute requirement of `fast-bss-eval` ([964](https://github.com/Lightning-AI/torchmetrics/pull/964))

Fixed

- Fixed "Sort currently does not support bool dtype on CUDA" error in MAP for empty preds ([983](https://github.com/Lightning-AI/torchmetrics/pull/983))
- Fixed `BinnedPrecisionRecallCurve` when `thresholds` argument is not provided ([968](https://github.com/Lightning-AI/torchmetrics/pull/968))
- Fixed `CalibrationError` to work on logit input ([985](https://github.com/Lightning-AI/torchmetrics/pull/985))

0.8.0

Added

- Added `WeightedMeanAbsolutePercentageError` to regression package ([948](https://github.com/Lightning-AI/torchmetrics/pull/948))
- Added new classification metrics:
* `CoverageError` ([787](https://github.com/Lightning-AI/torchmetrics/pull/787))
* `LabelRankingAveragePrecision` and `LabelRankingLoss` ([787](https://github.com/Lightning-AI/torchmetrics/pull/787))
- Added new image metric:
* `SpectralAngleMapper` ([885](https://github.com/Lightning-AI/torchmetrics/pull/885))
* `ErrorRelativeGlobalDimensionlessSynthesis` ([894](https://github.com/Lightning-AI/torchmetrics/pull/894))
* `UniversalImageQualityIndex` ([824](https://github.com/Lightning-AI/torchmetrics/pull/824))
* `SpectralDistortionIndex` ([873](https://github.com/Lightning-AI/torchmetrics/pull/873))
- Added support for `MetricCollection` in `MetricTracker` ([718](https://github.com/Lightning-AI/torchmetrics/pull/718))
- Added support for 3D image and uniform kernel in `StructuralSimilarityIndexMeasure` ([818](https://github.com/Lightning-AI/torchmetrics/pull/818))
- Added smart update of `MetricCollection` ([709](https://github.com/Lightning-AI/torchmetrics/pull/709))
- Added `ClasswiseWrapper` for better logging of classification metrics with multiple output values ([832](https://github.com/Lightning-AI/torchmetrics/pull/832))
- Added `**kwargs` argument for passing additional arguments to base class ([833](https://github.com/Lightning-AI/torchmetrics/pull/833))
- Added negative `ignore_index` for the Accuracy metric ([362](https://github.com/Lightning-AI/torchmetrics/pull/362))
- Added `adaptive_k` for the `RetrievalPrecision` metric ([910](https://github.com/Lightning-AI/torchmetrics/pull/910))
- Added `reset_real_features` argument image quality assessment metrics ([722](https://github.com/Lightning-AI/torchmetrics/pull/722))
- Added new keyword argument `compute_on_cpu` to all metrics ([867](https://github.com/Lightning-AI/torchmetrics/pull/867))

Changed

- Made `num_classes` in `jaccard_index` a required argument ([853](https://github.com/Lightning-AI/torchmetrics/pull/853), [#914](https://github.com/Lightning-AI/torchmetrics/pull/914))
- Added normalizer, tokenizer to ROUGE metric ([838](https://github.com/Lightning-AI/torchmetrics/pull/838))
- Improved shape checking of `permutation_invariant_training` ([864](https://github.com/Lightning-AI/torchmetrics/pull/864))
- Allowed reduction `None` ([891](https://github.com/Lightning-AI/torchmetrics/pull/891))
- `MetricTracker.best_metric` will now give a warning when computing on metric that do not have a best ([913](https://github.com/Lightning-AI/torchmetrics/pull/913))

Deprecated

- Deprecated argument `compute_on_step` ([792](https://github.com/Lightning-AI/torchmetrics/pull/792))
- Deprecated passing in `dist_sync_on_step`, `process_group`, `dist_sync_fn` direct argument ([833](https://github.com/Lightning-AI/torchmetrics/pull/833))

Removed

- Removed support for versions of [Pytorch-Lightning](https://github.com/Lightning-AI/lightning) lower than v1.5 ([#788](https://github.com/Lightning-AI/torchmetrics/pull/788))
- Removed deprecated functions, and warnings in Text ([773](https://github.com/Lightning-AI/torchmetrics/pull/773))
* `WER` and `functional.wer`
- Removed deprecated functions and warnings in Image ([796](https://github.com/Lightning-AI/torchmetrics/pull/796))
* `SSIM` and `functional.ssim`
* `PSNR` and `functional.psnr`
- Removed deprecated functions, and warnings in classification and regression ([806](https://github.com/Lightning-AI/torchmetrics/pull/806))
* `FBeta` and `functional.fbeta`
* `F1` and `functional.f1`
* `Hinge` and `functional.hinge`
* `IoU` and `functional.iou`
* `MatthewsCorrcoef`
* `PearsonCorrcoef`
* `SpearmanCorrcoef`
- Removed deprecated functions, and warnings in detection and pairwise ([804](https://github.com/Lightning-AI/torchmetrics/pull/804))
* `MAP` and `functional.pairwise.manhattan`
- Removed deprecated functions, and warnings in Audio ([805](https://github.com/Lightning-AI/torchmetrics/pull/805))
* `PESQ` and `functional.audio.pesq`
* `PIT` and `functional.audio.pit`
* `SDR` and `functional.audio.sdr` and `functional.audio.si_sdr`
* `SNR` and `functional.audio.snr` and `functional.audio.si_snr`
* `STOI` and `functional.audio.stoi`
- Removed unused `get_num_classes` from `torchmetrics.utilities.data` ([914](https://github.com/Lightning-AI/torchmetrics/pull/914))

Fixed

- Fixed device mismatch for `MAP` metric in specific cases ([950](https://github.com/Lightning-AI/torchmetrics/pull/950))
- Improved testing speed ([820](https://github.com/Lightning-AI/torchmetrics/pull/820))
- Fixed compatibility of `ClasswiseWrapper` with the `prefix` argument of `MetricCollection` ([843](https://github.com/Lightning-AI/torchmetrics/pull/843))
- Fixed `BestScore` on GPU ([912](https://github.com/Lightning-AI/torchmetrics/pull/912))
- Fixed Lsum computation for `ROUGEScore` ([944](https://github.com/Lightning-AI/torchmetrics/pull/944))

---

0.7.3

Fixed

- Fixed unsafe log operation in `TweedieDeviace` for power=1 ([847](https://github.com/Lightning-AI/torchmetrics/pull/847))
- Fixed bug in MAP metric related to either no ground truth or no predictions ([884](https://github.com/Lightning-AI/torchmetrics/pull/884))
- Fixed `ConfusionMatrix`, `AUROC` and `AveragePrecision` on GPU when running in deterministic mode ([900](https://github.com/Lightning-AI/torchmetrics/pull/900))
- Fixed NaN or Inf results returned by `signal_distortion_ratio` ([899](https://github.com/Lightning-AI/torchmetrics/pull/899))
- Fixed memory leak when using `update` method with tensor where `requires_grad=True` ([902](https://github.com/Lightning-AI/torchmetrics/pull/902))

0.7.2

Fixed

- Minor patches in JOSS paper.

Page 7 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.