Lightning-AI/torchmetrics
Machine learning metrics for distributed, scalable PyTorch applications. observed · 2026-10-20
Health v2 · maintenance only
87/100
- Activity 98
- Release rhythm 66
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 18.0
- age_days: 2128
- days_rel: 225
- days_push: 13
- n_releases_24m: 15
Adoption not part of the score
2477 stars · 554 forks observed · 2026-10-20
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
TorchMetrics is a PyTorch-native library of machine learning metrics that work in distributed and scalable training pipelines. It provides 100+ built-in metrics (classification, regression, retrieval, multimodal, etc.) with a simple API for defining custom metrics.
Use cases
- compute accuracy, F1, and ROC-AUC during PyTorch training
- evaluate model metrics across distributed multi-GPU training
- implement a custom metric that accumulates batch statistics
- track validation metrics with PyTorch Lightning
- calculate image segmentation or object detection metrics
- evaluate retrieval and ranking quality for recommendation models
When to choose
- you train models in PyTorch or PyTorch Lightning and need reliable, well-tested metrics
- you need metrics that aggregate correctly across distributed workers
- you want a broad catalog of metrics with a consistent API
When to avoid
- you work in TensorFlow, JAX, or scikit-learn ecosystems with their own metric tooling
- you need only simple numpy-based evaluation without PyTorch
Facets
library · maturity stable
machine-learning benchmarking data-science machine-learning deep-learning data-science python pytorch metrics distributed-computing model-evaluation
3 sources
- readme: https://github.com/Lightning-AI/torchmetrics · fetched 2026-10-20 · 81c92b8431d2
- homepage: https://lightning.ai/docs/torchmetrics/ · fetched 2026-08-29 · 9c55a9440a9c
- registry_pypi: https://pypi.org/pypi/torchmetrics/json · fetched 2026-08-29 · 3793ae269ad6
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| Lightning-AI/torchmetrics | main | 87 |
For agents
markdown · JSON · MCP: product_card(name="Lightning-AI/torchmetrics")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem