Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

TorchMetrics

lightning.ai

  • Free plan
  • Linux
7.4 Club score Visit lightning.ai

TorchMetrics

Free

Free plan

What the maker publishes

Batch accumulation
Metrics can accumulate results across batches and compute an aggregate value. source
Bayesian analysis
No source
Community support
The project repository directs users with questions to its Discord community. source
Compatibility limit
The documentation says TorchMetrics supports the latest two major PyTorch Lightning versions and recommends keeping both frameworks up to date. source
Custom metrics
Users can create custom metrics by subclassing Metric and implementing update() and compute(). source
Distributed training
Metrics support distributed training and synchronize state across devices. source
Distributed training
Module metrics support automatic accumulation across batches and synchronization across devices for distributed training. source
Free plan
Yes source
Installation
The documentation lists installation with pip install torchmetrics or conda install -c conda-forge torchmetrics. source
Installation
The project documents installation with pip, conda, uv, or directly from its source repository. source
Interfaces
TorchMetrics provides module-based metrics and functional metrics that take tensors as input and return metric values as tensors. source
License
The project repository states that TorchMetrics is licensed under Apache 2.0. source
Lightning integration
When used with PyTorch Lightning, metrics can be logged with self.log and are automatically placed on the correct device when properly defined inside a LightningModule. source
Metric collections
MetricCollection wraps multiple metrics in one callable metric class. source
Metric coverage
The project lists more than 100 metrics across audio, classification, detection, information retrieval, image, multimodal, nominal, regression, segmentation, and text domains. source
Optional dependencies
Specialized audio, image, and text metrics may require extra dependencies, which can be installed with package extras. source
Plotting
Modular metrics provide a plot method, and the plotting interface requires matplotlib. source
Plotting
Nearly all modular metrics support plotting through the plot method when the visualization dependencies are installed. source
Purpose
TorchMetrics is a collection of more than 100 PyTorch metrics implementations with an API for creating custom metrics. source
PyTorch integration
TorchMetrics can be used directly with PyTorch models independently of PyTorch Lightning. source
PyTorch Lightning integration
When metrics are properly defined inside a LightningModule, Lightning can place them on the module’s device and log them with self.log or self.log_dict. source
Regression models
No source
Scripting support
Yes source
Standardized interface
Its standardized interface is intended to improve reproducibility and reduce boilerplate. source

Checked against the maker's pages on 11 Oct 2026.