Torchmetrics

Latest version: v1.7.0

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

Scan your dependencies

Page 2 of 10

1.5.1

Fixed

- Changing `_modules` dict type in Pytorch 2.5 preventing to fail collections metrics ([2793](https://github.com/Lightning-AI/torchmetrics/pull/2793))

1.5.0

Added

- Added segmentation metric `HausdorffDistance` ([2122](https://github.com/Lightning-AI/torchmetrics/pull/2122))
- Added audio metric `DNSMOS` ([2525](https://github.com/Lightning-AI/torchmetrics/pull/2525))
- Added shape metric `ProcrustesDistance` ([2723](https://github.com/Lightning-AI/torchmetrics/pull/2723)
- Added `MetricInputTransformer` wrapper ([2392](https://github.com/Lightning-AI/torchmetrics/pull/2392))
- Added `input_format` argument to segmentation metrics ([2572](https://github.com/Lightning-AI/torchmetrics/pull/2572))
- Added `multi-output` support for MAE metric ([2605](https://github.com/Lightning-AI/torchmetrics/pull/2605))
- Added `truncation` argument to `BERTScore` ([2776](https://github.com/Lightning-AI/torchmetrics/pull/2776))

Changed

- Tracker higher is better integration ([2649](https://github.com/Lightning-AI/torchmetrics/pull/2649))
- Updated `InfoLM` class to dynamically set `higher_is_better` ([2674](https://github.com/Lightning-AI/torchmetrics/pull/2674))

Deprecated

- Deprecated `num_outputs` in `R2Score` ([2705](https://github.com/Lightning-AI/torchmetrics/pull/2705))

Fixed

- Fixed corner case in `IoU` metric for single empty prediction tensors ([2780](https://github.com/Lightning-AI/torchmetrics/pull/2780))
- Fixed `PSNR` calculation for integer type input images ([2788](https://github.com/Lightning-AI/torchmetrics/pull/2788))

---

1.4.3

Fixed

- Fixed for Pearson changes inputs ([2765](https://github.com/Lightning-AI/torchmetrics/pull/2765))
- Fixed bug in `PESQ` metric where `NoUtterancesError` prevented calculating on a batch of data ([2753](https://github.com/Lightning-AI/torchmetrics/pull/2753))
- Fixed corner case in `MatthewsCorrCoef` ([2743](https://github.com/Lightning-AI/torchmetrics/pull/2743))

1.4.2

Added

- Re-adding `Chrf` implementation ([2701](https://github.com/Lightning-AI/torchmetrics/pull/2701))

Fixed

- Fixed wrong aggregation in `segmentation.MeanIoU` ([2698](https://github.com/Lightning-AI/torchmetrics/pull/2698))
- Fixed handling zero division error in binary IoU (Jaccard index) calculation ([2726](https://github.com/Lightning-AI/torchmetrics/pull/2726))
- Corrected the padding related calculation errors in SSIM ([2721](https://github.com/Lightning-AI/torchmetrics/pull/2721))
- Fixed compatibility of audio domain with new `scipy` ([2733](https://github.com/Lightning-AI/torchmetrics/pull/2733))
- Fixed how `prefix`/`postfix` works in `MultitaskWrapper` ([2722](https://github.com/Lightning-AI/torchmetrics/pull/2722))
- Fixed flakiness in tests related to `torch.unique` with `dim=None` ([2650](https://github.com/Lightning-AI/torchmetrics/pull/2650))

1.4.1

Changed

- Calculate text color of `ConfusionMatrix` plot based on luminance ([2590](https://github.com/Lightning-AI/torchmetrics/pull/2590))
- Updated `_safe_divide` to allow `Accuracy` to run on the GPU ([2640](https://github.com/Lightning-AI/torchmetrics/pull/2640))
- Improved error messages for intersection detection metrics for wrong user input ([2577](https://github.com/Lightning-AI/torchmetrics/pull/2577))

Removed

- Dropped `Chrf` implementation due to licensing issues with the upstream package ([2668](https://github.com/Lightning-AI/torchmetrics/pull/2668))

Fixed

- Fixed bug in `MetricCollection` when using compute groups and `compute` is called more than once ([2571](https://github.com/Lightning-AI/torchmetrics/pull/2571))
- Fixed class order of `panoptic_quality(..., return_per_class=True)` output ([2548](https://github.com/Lightning-AI/torchmetrics/pull/2548))
- Fixed `BootstrapWrapper` not being reset correctly ([2574](https://github.com/Lightning-AI/torchmetrics/pull/2574))
- Fixed integration between `ClasswiseWrapper` and `MetricCollection` with custom `_filter_kwargs` method ([2575](https://github.com/Lightning-AI/torchmetrics/pull/2575))
- Fixed BertScore calculation: pred target misalignment ([2347](https://github.com/Lightning-AI/torchmetrics/pull/2347))
- Fixed `_cumsum` helper function in multi-gpu ([2636](https://github.com/Lightning-AI/torchmetrics/pull/2636))
- Fixed bug in `MeanAveragePrecision.coco_to_tm` ([2588](https://github.com/Lightning-AI/torchmetrics/pull/2588))
- Fixed missed f-strings in exceptions/warnings ([2667](https://github.com/Lightning-AI/torchmetrics/pull/2667))

1.4.0

Added

- Added `SensitivityAtSpecificity` metric to classification subpackage ([2217](https://github.com/Lightning-AI/torchmetrics/pull/2217))
- Added `QualityWithNoReference` metric to image subpackage ([2288](https://github.com/Lightning-AI/torchmetrics/pull/2288))
- Added a new segmentation metric:
- `MeanIoU` ([1236](https://github.com/Lightning-AI/torchmetrics/pull/1236))
- `GeneralizedDiceScore` ([1090](https://github.com/Lightning-AI/torchmetrics/pull/1090))
- Added support for calculating segmentation quality and recognition quality in `PanopticQuality` metric ([2381](https://github.com/Lightning-AI/torchmetrics/pull/2381))
- Added `pretty-errors` for improving error prints ([2431](https://github.com/Lightning-AI/torchmetrics/pull/2431))
- Added support for `torch.float` weighted networks for FID and KID calculations ([2483](https://github.com/Lightning-AI/torchmetrics/pull/2483))
- Added `zero_division` argument to selected classification metrics ([2198](https://github.com/Lightning-AI/torchmetrics/pull/2198))

Changed

- Made `__getattr__` and `__setattr__` of `ClasswiseWrapper` more general ([2424](https://github.com/Lightning-AI/torchmetrics/pull/2424))

Fixed

- Fix getitem for metric collection when prefix/postfix is set ([2430](https://github.com/Lightning-AI/torchmetrics/pull/2430))
- Fixed axis names with Precision-Recall curve ([2462](https://github.com/Lightning-AI/torchmetrics/pull/2462))
- Fixed list synchronization with partly empty lists ([2468](https://github.com/Lightning-AI/torchmetrics/pull/2468))
- Fixed memory leak in metrics using list states ([2492](https://github.com/Lightning-AI/torchmetrics/pull/2492))
- Fixed bug in computation of `ERGAS` metric ([2498](https://github.com/Lightning-AI/torchmetrics/pull/2498))
- Fixed `BootStrapper` wrapper not working with `kwargs` provided argument ([2503](https://github.com/Lightning-AI/torchmetrics/pull/2503))
- Fixed warnings being suppressed in `MeanAveragePrecision` when requested ([2501](https://github.com/Lightning-AI/torchmetrics/pull/2501))
- Fixed corner-case in `binary_average_precision` when only negative samples are provided ([2507](https://github.com/Lightning-AI/torchmetrics/pull/2507))

---

Page 2 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.